AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1145993
Accepted
wk.
wk.
Asked: 2019-05-25 10:43:54 +0800 CST2019-05-25 10:43:54 +0800 CST 2019-05-25 10:43:54 +0800 CST

如何在 Lubuntu 上设置 VolumeUp、VolumeDown 和静音快捷键?

  • 772

在我的配置(~/.config/openbox/lubuntu-rc.xml)中,我的多媒体键设置如下:

<!-- Keybinding for Volume management -->
<keybind key="XF86AudioRaiseVolume">
  <action name="Execute">
    <command>amixer -q sset Master 3%+ unmute</command>
  </action>
</keybind>

经过xev我检查,这些是正确的键。

但它不起作用。AFAIU,问题是我的声卡设置没有主设备。

输出amixer scontrols:

Simple mixer control 'IEC958',0
Simple mixer control 'IEC958',1
Simple mixer control 'IEC958',2
Simple mixer control 'IEC958',3
Simple mixer control 'IEC958',4

我试过像:

amixer -q sset IEC958 3%+ unmute

但它不影响音量。

如果我运行alsamixer,它看起来并不好:

┌────────────────────── AlsaMixer v1.1.3 ──────────────────────┐
│ Card: HDA Intel HDMI                 F1:  Help               │
│ Chip: Intel Haswell HDMI             F2:  System information │
│ View: Playback                       F6:  Select sound card  │
│ Item: S/PDIF                         Esc: Exit               │
│                                                              │
│                                                              │
│                                                              │
│                                                              │
│                                                              │
│           ┌──┐     ┌──┐     ┌──┐     ┌──┐     ┌──┐           │
│           │OO│     │OO│     │OO│     │OO│     │OO│           │
│           └──┘     └──┘     └──┘     └──┘     └──┘           │
│        < S/PDIF >S/PDIF 1 S/PDIF 2 S/PDIF 3 S/PDIF 4         │
│                                                              │
│                                                              │
│                                                              │
│                                                              │
│                                                              │
└──────────────────────────────────────────────────────────────┘ 

如您所见,也没有修剪音量。

开始栏上的音量应用程序工作正常,pavucontrol 也是如此。

但是如何设置键盘快捷键以与我的设置一起使用?

Lubuntu 18.04,联想 Thinkpad X240 lspci,:

00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:16.3 Serial controller: Intel Corporation 8 Series HECI KT (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-LM (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 6 (rev e4)
00:1c.1 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)
03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83)
lubuntu soundcard
  • 1 1 个回答
  • 74 Views

1 个回答

  • Voted
  1. Best Answer
    mook765
    2019-05-25T11:57:18+08:002019-05-25T11:57:18+08:00

    开始栏上的音量应用程序工作正常,pavucontrol 也是如此。

    这就是要走的路。使用 - 命令,pactl您可以轻松控制 pulseaudio 声音服务器。

    和

    pactl list sinks
    

    您应该找到要使用的水槽,在我的系统中它只找到一个列为sink #0.

    控制接收器音量的命令是

    pactl set-sink-volume SINK VOLUME [VOLUME ...]
    

    例子

    pactl set-sink-volume 0 -5dB
    

    将音量降低 5dB。还有更多的可能性,您可以线性增加或减少音量,按百分比等。请看一下man pactl。

    和

    pactl set-sink-mute SINK toggle
    

    您可以在静音和未静音之间切换,将 SINK 替换为您的接收器编号。

    将配置文件中的 -command 替换amixer为所需的pactl-command。

    使用的一个很好的效果pactl是您将看到音量条的变化。

    • 2

相关问题

  • 有没有办法强制 Ubuntu 对我的适配器使用 WPA?

  • 开机后音量总是最大

  • 5.1 Encore ENM232-6VIA 上的声音

  • 安装在 Live USB 驱动器上的顶级软件,用于 Windows 恢复

  • 替换 /home 后丢失 LXDE 菜单

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve