当前位置: 首页 > news >正文

麒麟KYLINOS命令行设置系统静音

原文链接:麒麟KYLINOS命令行设置系统静音
hello,大家好啊,今天给大家带来一篇在麒麟KYLINOS上使用命令行调节系统静音的方法,有时候需要制作模板,便可以采用此方法,话不多说,一起来看看吧。
1、查看系统信息

test@pdsyw-pc:~$ cat /etc/.kyinfo 
[dist]
name=Kylin
milestone=Desktop-V10-SP1-General-Release-2303
arch=arm64
beta=False
time=2023-04-27 15:46:53
dist_id=Kylin-Desktop-V10-SP1-General-Release-2303-arm64-2023-04-27 15:46:53[servicekey]
key=0516013[os]
to=
term=2024-08-01test@pdsyw-pc:~$ uname -a
Linux pdsyw-pc 5.4.18-85-generic #74-KYLINOS SMP Fri Mar 24 11:20:19 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
test@pdsyw-pc:~$ 

image.png

2、查看当前的系统声音
image.png

3、编辑default.pa文件

test@pdsyw-pc:~$ sudo -i
输入密码
root@pdsyw-pc:~# vi /etc/pulse/default.pa 
root@pdsyw-pc:~# cat /etc/pulse/default.pa 

image.png

4、添加内容set-sink-mute @DEFAULT_SINK@ 1
image.png

5、编辑前

root@pdsyw-pc:~# cat /etc/pulse/default.pa 
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode).fail### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif### 加载module-echo-cancel模块以降低录音时的噪音
### 注:录音时应选择带有echo cancel的输入设备录音
#load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1"### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink### Honour intended role device property
load-module module-intended-roles### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif### Enable positioned event sounds
load-module module-position-event-sounds### Cork music/video streams when a phone stream is active
load-module module-role-cork### Block audio recording for snap confined packages unless they have
### the "pulseaudio" or "audio-record" interfaces plugged.
.ifexists module-snap-policy.so
load-module module-snap-policy
.endif### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply### Make some devices default
#set-default-sink output
#set-default-source input

6、编辑后

root@pdsyw-pc:~# cat /etc/pulse/default.pa 
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode).fail### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif### 加载module-echo-cancel模块以降低录音时的噪音
### 注:录音时应选择带有echo cancel的输入设备录音
#load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1"### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink### Honour intended role device property
load-module module-intended-roles### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif### Enable positioned event sounds
load-module module-position-event-sounds### Cork music/video streams when a phone stream is active
load-module module-role-cork### Block audio recording for snap confined packages unless they have
### the "pulseaudio" or "audio-record" interfaces plugged.
.ifexists module-snap-policy.so
load-module module-snap-policy
.endif### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply### Make some devices default
#set-default-sink output
#set-default-source input
set-sink-mute @DEFAULT_SINK@ 1

7、重启系统

root@pdsyw-pc:~# reboot 

image.png

10、重启后系统静音
image.png

相关文章:

麒麟KYLINOS命令行设置系统静音

原文链接&#xff1a;麒麟KYLINOS命令行设置系统静音 hello&#xff0c;大家好啊&#xff0c;今天给大家带来一篇在麒麟KYLINOS上使用命令行调节系统静音的方法&#xff0c;有时候需要制作模板&#xff0c;便可以采用此方法&#xff0c;话不多说&#xff0c;一起来看看吧。 1、…...

零信任安全:构建无懈可击的网络防护体系

随着网络技术的飞速发展&#xff0c;信息安全问题日益凸显&#xff0c;传统的安全防护手段已经无法满足复杂多变的安全需求。在此背景下&#xff0c;零信任安全模型逐渐受到广泛关注。本文将探讨零信任安全的概念、优势以及如何构建无懈可击的网络防护体系。 一、零信任安全概念…...

华为李鹏:到 2025 年智能算力需求将达到目前水平的 100 倍

在第十四届全球移动宽带论坛上&#xff0c;华为高级副总裁、运营商 BG 总裁李鹏表示&#xff0c;大模型为代表的 AI 应用发展带来对智能算力的爆发式需求。 李鹏在题为《加速 5G 商业正循环&#xff0c;拥抱更繁荣的 5.5G》的讲话中表示&#xff0c;「5G 已经走在商业成功的正确…...

【漏洞复现】深信服下一代防火墙NGAF存在任意文件上传漏洞 附POC

漏洞描述 深信服下一代防火墙(Next-Generation Application Firewall)NGAF是面向应用层设计,能够精确识别用户、应用和内容,具备完整安全防护能力,能够全面替代传统防火墙,并具有强劲应用层处理能力的全新网络安全设备。NGAF解决了传统安全设备在应用识别、访问控制、内…...

城市内涝积水预防,万宾科技内涝监测仪如何预警?

近几年来城市内涝所引发的安全隐患极为突出&#xff0c;影响着城市道路安全&#xff0c;而且也让市民心中多有惶恐。一旦城市内涝问题出现背后不仅是路面积水问题&#xff0c;更会导致城市无法正常运行&#xff0c;导致市民日常生活和工作受到影响。所以对于排水防涝设施的建设…...

SpringBoot定时任务打成jar 引入到新的项目中后并自动执行

一、springBoot开发定时任务 ①&#xff1a;连接数据库实现新增功能 1. 引入依赖 <dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional> </dependency> <dependen…...

AD9371 官方例程 NO-OS 主函数 headless 梳理(一)

AD9371 系列快速入口 AD9371ZCU102 移植到 ZCU106 &#xff1a; AD9371 官方例程构建及单音信号收发 ad9371_tx_jesd -->util_ad9371_xcvr接口映射&#xff1a; AD9371 官方例程之 tx_jesd 与 xcvr接口映射 AD9371 官方例程 时钟间的关系与生成 &#xff1a; AD9371 官方…...

SHAP 和 LIME 解释模型

内容大纲 1、SHAP 解释器1.1 案例&#xff1a;用于预测患者肺癌1.2 案例中使用的shap解释器1.3 SHAP工作原理1.4 举例说明 2、LIME 解释器2.1 案例&#xff1a;判断法律案件胜诉可能性2.2 LIME解释器工作原理2.3 本地解释模型的训练过程2.4 举例说明1&#xff1a;新闻分类2.4 举…...

若依vue-初步下载使用

若依框架可以满足大部分的后台管理系统的开发,使用频率也是比较高的,所以这里讲一下如何使用若依框架 若依框架代码克隆 首先去若依官网 http://www.ruoyi.vip/ 这里演示的是若依-vue版本的使用 我们点击下载 会跳转到码云仓库 或者直接点击下面的链接去码云仓库 https://git…...

Android 使用.9图 NinePatchDrawable实现动态聊天气泡

最近一段时间&#xff0c;在做一个需求&#xff0c;需要实现一个聊天气泡的动画效果&#xff0c;如下图所示&#xff1a; GitHub源码demo &#xff0c;建议下载demo&#xff0c;运行查看。 动态聊天气泡动画 静态聊天气泡 经过一段时间调研&#xff0c;实现方案如下: 实现方…...

力扣 LCR 024. 反转链表两种解法

目录 1.解题思路Ⅰ2.代码实现Ⅰ3.解题思路Ⅱ4.代码实现Ⅱ 1.解题思路Ⅰ 利用头插法&#xff0c;遍历数组将后面的元素头插到前面的元素. 2.代码实现Ⅰ struct ListNode* reverseList(struct ListNode* head) { struct ListNode*curhead;;struct ListNode*newheadNULL;whil…...

掌握Capture One 23 Pro,打造专业级图片编辑体验!

作为一位摄影师&#xff0c;您是否曾经为自己的照片无法达到预期效果而烦恼&#xff1f;或者您是否在寻找一种能够让您轻松处理和编辑照片的工具&#xff1f;如果是&#xff0c;那么您一定不能错过Capture One 23 Pro这款图片编辑软件&#xff01; Capture One 23 Pro的特点 …...

MFC-TCP网络编程服务端-Socket

目录 1、通过Socket建立服务端&#xff1a; 2、UI设计&#xff1a; 3、代码的实现&#xff1a; &#xff08;1&#xff09;、CListenSocket类 &#xff08;2&#xff09;、CConnectSocket类 &#xff08;3&#xff09;、CTcpServerDlg类 1、通过Socket建立服务端&#xff…...

ChatGPT辅助下的小组学习

1 网上分享会-主题 1.9曾子曰&#xff1a;“慎终追远&#xff0c;民德归厚矣。” Master Zeng said:“Be circumspect in funerary services and continue sacrifices to the distant ancestors, and the virtue (de 德) of the common people will thrive.” 2 过程记录 听…...

Linux相关命令

切换root用户&#xff1a;sudo su 串口功能测试&#xff1a;cutecom 某某驱动查询&#xff1a;nvidia-smi #xxx-smi查询某某驱动 在线安装某某程序&#xff1a;apt install xxx 设置文件权限chmod 常用&#xff1a;chmod 777 sudo chmod 600 &#xff08;只有所有者…...

详解卷积神经网络结构

前言 卷积神经网络是以卷积层为主的深度网路结构&#xff0c;网络结构包括有卷积层、激活层、BN层、池化层、FC层、损失层等。卷积操作是对图像和滤波矩阵做内积&#xff08;元素相乘再求和&#xff09;的操作。 1. 卷积层 常见的卷积操作如下&#xff1a; 卷积操作解释图解…...

java读取pdf数据

目录 读取方式有两种: 方式一: 方式一所需要的maven依赖如下: 方式一读取的Java代码如下:<...

arcmap / arcgis 安装教程

ArcGIS 10.8 for Desktop 完整安装教程&#xff08;含win7/8/10 32/64位下载地址亲测可用汉化&#xff09; | 麻辣GIS (malagis.com) 关于GIS语言汉化包&#xff08;中文&#xff09;安装失败的解决办法_arcgis中文语言包_miumiuniya的博客-CSDN博客 检查安装路径&#xff1a;…...

CMake中的变量: 改变构建行为的变量

文章目录 变量名称描述BUILD_SHARED_LIBS全局标志&#xff0c;用于在启用时使add_library()创建共享库。 如果存在并且为true&#xff0c;则这将导致所有库被构建为共享库&#xff0c;除非该库被明确添加为静态库。这个变量通常作为option()添加到项目中&#xff0c;这样项目的…...

台式电脑怎么无损备份迁移系统到新硬盘(使用傲梅,免费的就可以)

文章目录 前言一、想要将源硬盘上的系统原封不动地迁移到新硬盘上二、准备工作2.具体步骤 总结 前言 半路接手公司一台台式电脑&#xff0c;C盘&#xff08;120g&#xff09;爆红&#xff0c;仅剩几个G&#xff0c;优化了几次&#xff0c;无果后。准备换一个大一点的增到500g。…...

深入理解JavaScript设计模式之单例模式

目录 什么是单例模式为什么需要单例模式常见应用场景包括 单例模式实现透明单例模式实现不透明单例模式用代理实现单例模式javaScript中的单例模式使用命名空间使用闭包封装私有变量 惰性单例通用的惰性单例 结语 什么是单例模式 单例模式&#xff08;Singleton Pattern&#…...

定时器任务——若依源码分析

分析util包下面的工具类schedule utils&#xff1a; ScheduleUtils 是若依中用于与 Quartz 框架交互的工具类&#xff0c;封装了定时任务的 创建、更新、暂停、删除等核心逻辑。 createScheduleJob createScheduleJob 用于将任务注册到 Quartz&#xff0c;先构建任务的 JobD…...

Keil 中设置 STM32 Flash 和 RAM 地址详解

文章目录 Keil 中设置 STM32 Flash 和 RAM 地址详解一、Flash 和 RAM 配置界面(Target 选项卡)1. IROM1(用于配置 Flash)2. IRAM1(用于配置 RAM)二、链接器设置界面(Linker 选项卡)1. 勾选“Use Memory Layout from Target Dialog”2. 查看链接器参数(如果没有勾选上面…...

GitHub 趋势日报 (2025年06月08日)

&#x1f4ca; 由 TrendForge 系统生成 | &#x1f310; https://trendforge.devlive.org/ &#x1f310; 本日报中的项目描述已自动翻译为中文 &#x1f4c8; 今日获星趋势图 今日获星趋势图 884 cognee 566 dify 414 HumanSystemOptimization 414 omni-tools 321 note-gen …...

ABAP设计模式之---“简单设计原则(Simple Design)”

“Simple Design”&#xff08;简单设计&#xff09;是软件开发中的一个重要理念&#xff0c;倡导以最简单的方式实现软件功能&#xff0c;以确保代码清晰易懂、易维护&#xff0c;并在项目需求变化时能够快速适应。 其核心目标是避免复杂和过度设计&#xff0c;遵循“让事情保…...

苹果AI眼镜:从“工具”到“社交姿态”的范式革命——重新定义AI交互入口的未来机会

在2025年的AI硬件浪潮中,苹果AI眼镜(Apple Glasses)正在引发一场关于“人机交互形态”的深度思考。它并非简单地替代AirPods或Apple Watch,而是开辟了一个全新的、日常可接受的AI入口。其核心价值不在于功能的堆叠,而在于如何通过形态设计打破社交壁垒,成为用户“全天佩戴…...

nnUNet V2修改网络——暴力替换网络为UNet++

更换前,要用nnUNet V2跑通所用数据集,证明nnUNet V2、数据集、运行环境等没有问题 阅读nnU-Net V2 的 U-Net结构,初步了解要修改的网络,知己知彼,修改起来才能游刃有余。 U-Net存在两个局限,一是网络的最佳深度因应用场景而异,这取决于任务的难度和可用于训练的标注数…...

【Post-process】【VBA】ETABS VBA FrameObj.GetNameList and write to EXCEL

ETABS API实战:导出框架元素数据到Excel 在结构工程师的日常工作中,经常需要从ETABS模型中提取框架元素信息进行后续分析。手动复制粘贴不仅耗时,还容易出错。今天我们来用简单的VBA代码实现自动化导出。 🎯 我们要实现什么? 一键点击,就能将ETABS中所有框架元素的基…...

软件工程 期末复习

瀑布模型&#xff1a;计划 螺旋模型&#xff1a;风险低 原型模型: 用户反馈 喷泉模型:代码复用 高内聚 低耦合&#xff1a;模块内部功能紧密 模块之间依赖程度小 高内聚&#xff1a;指的是一个模块内部的功能应该紧密相关。换句话说&#xff0c;一个模块应当只实现单一的功能…...

在鸿蒙HarmonyOS 5中使用DevEco Studio实现指南针功能

指南针功能是许多位置服务应用的基础功能之一。下面我将详细介绍如何在HarmonyOS 5中使用DevEco Studio实现指南针功能。 1. 开发环境准备 确保已安装DevEco Studio 3.1或更高版本确保项目使用的是HarmonyOS 5.0 SDK在项目的module.json5中配置必要的权限 2. 权限配置 在mo…...