Sound Volume stuck at max (Ubuntu 18.04)

Hi!

Running a dell laptop connected to a newfangled USB-C style dock. Recently did a dist-upgrade and rebooted. Now, even if I enter alsamixer and set all sound output to zero, sound is still on at maximum volume.

uname -a tells the following:

Linux wsevst-c0030 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

And LSB:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

Running i3 as my window manager, so might very well be I just need to run some gnome configuration tool. Going to try that now, but what can I try otherwise?

Further debugging, tried logging into my Gnome3 setup now (this is a workstation so have limited time between actually getting work done).

Sound works perfectly there including buttons. This leads me to believe Ubuntu changed the way how sound volume is handled now.

So, now my question becomes; In latest Ubuntu 18.04.2 LTS, how do I change sound from command line?

Looking into my i3-config, I found:

bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound

Changing this to use set-sink-volume 1 solves my problem. So if anyone else encounters this, the fix is pretty simple… :slight_smile:

Edit: Only problem now is that the volume change is not registering on my status bar anymore… :frowning:

Edit 2: Ok, sorted that out as well, was simply looking at the wrong volume config option! Everything is back up in working order now! :smiley:

1 Like

The general format for command pactl set-sink-volume is explained in man pactl:

set-sink-volume SINK VOLUME [VOLUME ...]
Set the volume of the specified sink (identified by its symbolic name or numerical index)...

The number causing your problem was the sink ID number

pactl list short sinks will show list of sinks sorted by ID number

If you have further problems with ID number changing, use sink name instead of ID number

pactl list sinks | grep 'Name'

In this case, even the label seems to have been changed.

I get:

$ pactl list short sinks
0	alsa_output.usb-Generic_USB_Audio_200901010001-00.HiFi__hw_Dock_1__sink	module-alsa-card.c	s24le 2ch 48000Hz	SUSPENDED
1	alsa_output.usb-Generic_USB_Audio_200901010001-00.HiFi__hw_Dock_0__sink	module-alsa-card.c	s24le 2ch 48000Hz	SUSPENDED
2	alsa_output.pci-0000_00_1f.3.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED

But my colleague running the same setup before dist-upgrade gets:

$ pactl list short sinks
0	alsa_output.usb-Generic_USB_Audio_200901010001-00.HiFi__hw_Dock_0__sink	module-alsa-card.c	s24le 2ch 48000Hz	SUSPENDED
1	alsa_output.pci-0000_00_1f.3.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED

So… Yeah. Go Dell docks I suppose!

you could change the ID number ‘1’ in the 3 config commands to
alsa_output.usb-Generic_USB_Audio_200901010001-00.HiFi__hw_Dock_0__sink
but wouldn’t make any difference with your system as it is now

Your colleague can use same name too, sound should work after dist-upgrade whether Pulseaudio sinks change to same as yours or not

you could check dock further in Pulseaudio

pactl list cards

and check playback devices in ALSA:

aplay -l

‘Dock_1’ maybe HDMI audio or other digital device?

True, but at this point it’s just easier to change 0 to 1. #worksforme

I appreciate the help though, thanks for the discussion! :slight_smile: