6

When audio level is at 0 as expected no audio. Is heard but when I increase the volume level the volume is always at loudest possible.

Update: Ubuntu 18.10.

Laptop: asus ux550vd.

speakers laptop's builtin audio.

Audio device: Intel Corporation CM238 HD Audio Controller (rev 31).

00:1f.3 Audio device: Intel Corporation CM238 HD Audio Controller (rev 31)
Subsystem: ASUSTeK Computer Inc. CM238 HD Audio Controller
Flags: bus master, fast devsel, latency 32, IRQ 130
Memory at ed328000 (64-bit, non-prefetchable) [size=16K]
Memory at ed300000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
EC84B4
  • 235

2 Answers2

4

I had the same issue on my Laptop. (BTW my laptop is thinkpad x1)

When I checked the alsamixer I noticed that like you said, it was the PCM changes that affect volume and not Master.

I come upon this solution, and It worked for me.

In short, find this file:

/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common

And add these three lines:

[Element Master]
switch = mute
volume = ignore

Directly above of this part of code:

[Element PCM]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

And Restart.

Atorpat
  • 153
  • Just wanted to leave a comment saying thank you for posting this, as I was noticing the same behavior but wasn't sure how to fix it. This does the job perfectly!

    I don't know if this is just an X1 thing, or what, but everything else I tried didn't work at all. Now to figure out how to disable battery thresholds set when Windows 10 was installed ;)

    – ThoseKind Mar 30 '20 at 01:55
  • You wouldn't believe how long I was confused as to why alsa doesn't control PCM if PCM volume is set to merge. Turns out only one channel can be merged at a time (who would've thought). Worked for Envy x360 13-ar0xxx – fufs May 01 '21 at 23:01
3

EDIT: pactl load-module module-alsa-sink control=PCM should result in pulseaudio seeing a new output device that will control the PCM volume. If changing this device allows for proper control of audio output volume, you can add a line load-module module-alsa-sink control=PCM to /etc/pulse/default.pa

PCM (pulse code modulation) occurs at ALSA kernel level, and is responsible for sampling and conversion of digital signals from software to analog ones heard out of your hardware (PCM Playback channel), as well as analog ones coming in from your microphone (PCM Capture) to their digital form.

Linux audio output and volume control allows for a lot of versatility, but it can make thinks more complicated and more difficult to troubleshoot as well. For output, the flow is more or less like this:

START:Application audio you wish to hear produces digital audio data

  > Pulse app and libraries (user control with pavucontrol happens here and changes are then sent to the pulse engine server) 

     > Pulse engine server (the core of Pulseaudio package)  

         >  ALSA Kernel API (alsamixer control, PCM, MIDI and Sequencer API) 

              > ALSA kernel driver processes data to make it understandable to our hardware

END: Speaker output

I think pactl from pulseaudio package should get you started and on the right track, please try

$pactl set-sink-volume $(pactl info | grep -i Sink | cut -d ':' -f2) 25%

and let us know if the audio volume gets set to 1/4 of the range, or again jumps to 100%.

NetIceGear
  • 641
  • 3
  • 8
  • the volume level goes to 52% but the audio output is still as loud as possible – EC84B4 Feb 27 '19 at 07:53
  • Can you run pacmd list-sinks and post output. There will be lines that show volume steps available base volume: 65536 / 100% / 0.00 dB volume steps: 65537 but if you don't have that the rest of the info will help narrow the issue down. – NetIceGear Feb 28 '19 at 00:46
  • https://gist.github.com/kh-bakhtiari/57a4301d6a37aea3010f6fdbc8d7823e here's the output – EC84B4 Mar 01 '19 at 10:43
  • Thanks, I see that your card druver does not set the DECIBEL_VOLUME flag and your volumes appear without their decibel equivalents. Your number of steps is also off. Can you first make sure cat /etc/pulse/daemon.conf | grep flat outputs flat-volumes = no and if not edit the conf ,and restart pulse with killall pulseaudio. Then, please run pacmd unload-module module-udev-detect && pacmd load-module module-udev-detect ignore_DB=1 and let us know if this allows for better volume control. If so, I'll include the steps for making this permanent, as the above command won't survive reboot. – NetIceGear Mar 01 '19 at 17:42
  • flat-volumes is 'no' and the second command didn't change anything :( – EC84B4 Mar 01 '19 at 17:52
  • I see, can you now run pactl load-module module-alsa-sink control=PCM – NetIceGear Mar 01 '19 at 18:35
  • it gave out the value of 29 and every subsequent call its value increased by one – EC84B4 Mar 02 '19 at 12:40
  • After the module was loaded, did the volume jump to 100% persist? Are you controlling the volume using the Master or the PCM controll? If you try alsamixer see if you get any other response when you increase/decrease Master vs. when you decrease/increase the PCM value. – NetIceGear Mar 02 '19 at 16:00
  • 1
    something that I saw now, after module load an output device is added and when I switched to that one everything works correctly – EC84B4 Mar 02 '19 at 17:44
  • can you give me a lit a bit of info on what that module is and what PCM control is or a reference so I can read about it. thanks – EC84B4 Mar 02 '19 at 17:49
  • If you are able to adjust volume properly once you load the module-alsa-sink control=PCM you can include it in /etc/pulse/default.pa with load-module module-alsa-sink=PCM to run automatically at startup. You can also try setting PCM to lower % and adjusting Master volume with lowered PCM may give you master volume control to your liking. PCM (pulse code modulation ALSA kernel level) is responsible for sampling and conversion of digital/analog signals from the middleware engine layer(pulseaudio) by ALSA on its way to your output hardware. See my original post update. If helpful, please upvote. – NetIceGear Mar 02 '19 at 20:03