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

news2024/11/29 8:35:29

原文链接:麒麟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-01

test@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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1187663.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

aardio 模式匹配函数

废话不多说 直接开干&#xff01; 知识点 string.find 使用模式匹配查找字符串并返回起始位置(i),结束位置(j); 第三个参数pos指定搜索开始的位置&#xff0c;这个参数可以省略(使用默认值1); pos如果为负数&#xff0c;则从右侧倒数计数(-1表示字符串最后一个字符)。 函数返回…

Mysql 一步到位实现插入或替换数据(REPLACE INTO语句)

单条数据插入/替换 比如有一个数据表叫test_table&#xff0c;包含: 主键&#xff1a;key_id数据&#xff1a;value 运行&#xff1a; REPLACE INTO test_table (key_id,value) VALUES ("id_1","value_1"); REPLACE INTO test_table (key_id,value) VAL…

星乐园项目┃助学无止境·探访暖人心

2023年7月10日至10月31日&#xff0c;广州市从化区齐家社会工作服务中心的“星乐园-乡村儿童公益辅导服务项目”社工带领高校志愿老师、社区志愿者在从化区城郊街新开村、太平镇西湖村分阶段、分批次对两个助学点的学困儿童家庭开展了入户探访活动。旨在通过走访了解他们的生活…

第70讲:MySQL数据库全局锁的核心概念

文章目录 1.全局锁的概念2.使用全局锁的语法结构3.全局锁的基本使用 1.全局锁的概念 全局锁是对整个数据库实例添加一个锁&#xff0c;全局锁是面向整个数据库实例的&#xff0c;而不是单个数据库&#xff0c;添加锁之后这个实例就会处于只读状态&#xff0c;此时所有的数据库…

跨足泛娱乐:TikTok如何重新定义娱乐产业?

在当今数字时代&#xff0c;社交媒体已成为人们生活中不可或缺的一部分。它们不仅是人们互相分享生活、观点和见解的平台&#xff0c;还在娱乐产业中发挥着越来越重要的作用。 TikTok&#xff0c;作为一款短视频分享应用&#xff0c;已经在全球范围内引起轰动&#xff0c;重新…

huggingface-cli: error: invalid choice: ‘download‘解决方案

大家好,我是爱编程的喵喵。双985硕士毕业,现担任全栈工程师一职,热衷于将数据思维应用到工作与生活中。从事机器学习以及相关的前后端开发工作。曾在阿里云、科大讯飞、CCF等比赛获得多次Top名次。现为CSDN博客专家、人工智能领域优质创作者。喜欢通过博客创作的方式对所学的…

AWTK 与 Qt 的异同点比较

相似之处&#xff1a; 跨平台支持&#xff1a; AWTK 和 Qt 都提供了跨平台的支持&#xff0c;可以在多种操作系统上进行开发和部署&#xff0c;包括 Windows、Linux、macOS 等。丰富的组件库&#xff1a; 两者都提供了丰富的图形界面组件库&#xff0c;能够满足各种应用程序的…

基于SSM的生鲜配送系统的设计与实现

末尾获取源码 开发语言&#xff1a;Java Java开发工具&#xff1a;JDK1.8 后端框架&#xff1a;SSM 前端&#xff1a;采用JSP技术开发 数据库&#xff1a;MySQL5.7和Navicat管理工具结合 服务器&#xff1a;Tomcat8.5 开发软件&#xff1a;IDEA / Eclipse 是否Maven项目&#x…

img为空时不显示

当img标签的src为空时&#xff0c;会显示一个裂开的图片&#xff0c;不好看 <img src"" style"width:200px;height: 200px;" /> 解决办法&#xff1a; 1、图片为空时隐藏图片 <img src"" onerrorthis.style.display"none" …

MySQL最新2023年面试题及答案,汇总版(2)【MySQL最新2023年面试题及答案,汇总版-第三十二刊】

文章目录 MySQL最新2023年面试题及答案&#xff0c;汇总版(2)01、InnoDB的BTree 存储整行数据和主键的值的区别是什么&#xff1f;02、读写分离常见方案&#xff1f;03、为什么索引结构默认使用BTree&#xff0c;而不是Hash&#xff0c;二叉树&#xff0c;红黑树&#xff1f;04…

PyCharm+Miniconda3安装配置教程

PyCharm是Python著名的Python集成开发环境&#xff08;IDE&#xff09; conda有Miniconda和Anaconda&#xff0c;前者应该是类似最小化版本&#xff0c;后者可能是功能更为强大的版本&#xff0c;我们这里安装Miniconda 按官方文档的说法conda相当于pip与virtualenv的结合&am…

基于Kinect 动捕XR直播解决方案 - 技术实现篇

一 安装与部署 1. 安装与部署Kinect-v2设备: 安装硬件: Kinect-v2设备带线一台; Kinect-v2 原装适配器适配器组合件设备一台; Kinect-v2 USB 3.0 WIndows PC 一天&#xff0c;原主板支持USB3.0接口; Windows PC 系统 Win10( Win 10 Version 21H2更新, 基于x64系统), 特别…

聚观早报 |苹果iMac2028年将有3款;小米汽车明年发布

【聚观365】11月9日消息 苹果iMac2028年将有多款 小米汽车明年发布 何小鹏再谈AEB 友道智途助力智慧交通新基建 vivo X100系列四款配色公布 苹果iMac2028年将有多款 据外媒报道&#xff0c;苹果iMac此前虽曾有21.5英寸、24英寸、27英寸等版本&#xff0c;但他们目前在售的…

NOIP2015提高组第二轮day2 - T2:子串

题目链接 [NOIP2015 提高组 day2 第二题] 子串 题目描述 有两个仅包含小写英文字母的字符串 A A A 和 B B B。 现在要从字符串 A A A 中取出 k k k 个互不重叠的非空子串&#xff0c;然后把这 k k k 个子串按照其在字符串 A A A 中出现的顺序依次连接起来得到一个新的…

科技改变农业:合成数据农业中的应用

介绍 农业在我们的生活中起着至关重要的作用&#xff0c;它为我们提供了生存的食物。如今&#xff0c;它遇到了各种困难&#xff0c;例如气候变化的影响、缺乏工人以及全球流行病造成的中断。这些困难影响了耕作用水和土地的供应&#xff0c;而这些水和土地正变得越来越稀缺。…

Python基础教程之六:Python中的关键字

Python关键字是python编程语言的保留字。这些关键字不能用于其他目的。 Python中有35个关键字-下面列出了它们的用法。 KeywordDescriptionandA logical AND operator. Return True if both statements are True. x (5 > 3 and 5 < 10) print(x) # True orA logic…

率能SS6216-单通道直流有刷电机驱动芯片

产品描述&#xff1a; SS6216是一款单通道直流有刷驱动芯片&#xff1b;工作电压为 2.0V&#xff5e;7.2V&#xff0c;每个通道的负载电流可达1.4A;峰值输出电流1.6A&#xff1b;低待机电流 (typ. 0.1uA&#xff09;低导通电阻0.6ohm(采用SOP8/SOT23-6两种封装)满足产品小型化…

pytest + yaml 框架 -58.运行报告总结summary.json

前言 用例运行结束后&#xff0c;在本地生成summary.json 文件&#xff0c;总结运行结果。 v1.5.1版本更新内容&#xff1a; 1.解决参数化&#xff0c;中文在控制台输出问题 2.保存用例结果summary.json 保存用例结果summary.json 命令行执行用例 pytest运行结束&#xff0…

查找-树表的查找-平衡二叉树

目录 平衡二叉树得定义插入操作平衡二叉树的平衡调整方法查找效率分析 平衡二叉树得定义 平衡二叉树(Balanced Binary Tree),简称平衡树(AVL树)&#xff0c;平衡二叉树或者空树&#xff0c;或者是具有以下特征得二叉树排序是&#xff1a; 左子树与右子树得深度之差得绝对值不超…

柯桥英语培训,商务英语学习,常用口语

欢迎各位小伙伴来到 ——“每个单词我都认识&#xff0c;但我又不认识整个短语”的时候啦&#xff01; “dog”是“狗” “breakfast”是早餐 那“a dogs breakfast”是“狗的早餐”&#xff1f; 狗听了都摇头。 a dogs breakfast是一句英文俚语&#xff0c;指的是无序、混…