In my config (~/.config/openbox/lubuntu-rc.xml
) are my multimedia keys set like:
<!-- Keybinding for Volume management -->
<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<command>amixer -q sset Master 3%+ unmute</command>
</action>
</keybind>
With xev
I checked, those are right keys.
But it does not work. AFAIU, problem is that my soundcard setup has no Master device.
Output of 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
I tried like:
amixer -q sset IEC958 3%+ unmute
but it does not affect volume level.
If I run alsamixer
, it does not seem look good:
┌────────────────────── 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 │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────┘
As you may see, there is also no way no trim volume.
Volume app on start bar works fine, also pavucontrol.
But how to set keyboard shortcuts to work with my setup?
Lubuntu 18.04, Lenovo 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)
That's the way to go. With the
pactl
-command you can easily control the pulseaudio sound server.With
you should find the sink to use, in my system it found only one sink which was listed as
sink #0
.The command to control the sink volume is
Example
reduces the volume by 5dB. There are more possibilities, you can raise or reduce the volume linear, by percentage etc. Please take a look at
man pactl
.With
you can toggle between muted and unmuted, replace SINK with your sink number.
Replace the
amixer
-command in your configuration files with the desiredpactl
-command.One nice effect of using
pactl
is that you will see the changes in your volume bar.