breath
breath copied to clipboard
Non-linear volume adjustment
[Running Gnome/Ubuntu 21.10 w PulseAudio installed and working.]
Issue
The "System Volume" slider does not adjust the volume linearly. It tracks with amixer 'Headphone' control; muting this slider mutes all audio on the device; but slider does not adjust volume linearly. The volume stays at a maximum level until the thumb is moved to like the 10% point on the slider. NOTE: This may be an issue with APL -- see this article.
Other sliders appear to work correctly
- Slider - Volume Levels - System Sounds: Controls audio like terminal beep; muting this slider affects only terminal beep and like audio; slider adjusts volume linearly.
- Slider - Volume Levels - Videos: Controls audio when playing video/audio (MP3); muting this slider only affects video; slider adjusts the audio linearly.
Possibly related factors
- In Sound settings, the internal audio "Output Device" appears as "Headphones - Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster".
- Originally (in Breath builds where it was not insalling PulseAudio), running
apl-sof-setup-audio
would result in working audio,amixer 'Master' control
was present, and I could useamixer set Master
to adjust the audio. In later builds (where Breath is now installing PulseAudio),amixer 'Master' control
no longer appears. The top control is 'Headphone'.
I don't think this is a volume scaling issue with max98357a
in the kernel. Does installing Pipewire (pipewire
, pipewire-pulse
) fix this? Once you've installed Pipewire, install pavucontrol
, open the program, and select Pro Audio
as the card profile.
The Pro Audio profile provides "raw device access with the maximum number of channels and no mixer controls" (from the release notes with the feature).
It seems like this would fix the issue. If my KBL chromebook's speakers were still working, I would test this too.
I don't think this is a volume scaling issue with
max98357a
in the kernel. Does installing Pipewire (pipewire
,pipewire-pulse
) fix this? Once you've installed Pipewire, installpavucontrol
, open the program, and selectPro Audio
as the card profile.The Pro Audio profile provides "raw device access with the maximum number of channels and no mixer controls" (from the release notes with the feature).
It seems like this would fix the issue. If my KBL chromebook's speakers were still working, I would test this too.
These packages fixed the volume slider for the speakers. *I did have to restart to see any changes.
Not that big of a deal but the headphone jack still does not do anything when headphones are plugged in.
Nice. Did you need to select Pro Audio or did it just work after installing the packages and rebooting?
I also had to select Pro Audio.
Also, to get bluetooth audio to work after this I had to do:
sudo apt install libspa-0.2-bluetooth && sudo apt purge pulseaudio-module-bluetooth
reboot, then reconnect bluetooth headphones
@MilkyDeveloper Well, some interesting results...
I installed pipewire
, pipewire-pulse
, and pavucontrol
. That resolved this volume issue. However, I have lost BT audio and now internal audio. Here's what I found:
- After installing the above and selecting Pro Audio, "Output Devices" -- instead of a single entry for 'Headphones...' as it previously listed -- now shows shows that entry plus five "Pro" entries. None of the "Pro" entries produce any audio when selected.
- I then took the steps to install
libspa-0.2-bluetooth
and removepulseaudio-mdoule-bluetooth
listed by @kylepwarren but it didn't fix it. - My BT device now connects but no audio comes out. And while connected -- and after disconnecting the BT -- I no longer have internal audio, either.
I'm still testing different scenarios to determine what is actually going on.
@MilkyDeveloper Well, some interesting results... I installed
pipewire
,pipewire-pulse
, andpavucontrol
. That resolved this volume issue. However, I have lost BT audio and now internal audio. Here's what I found:* After installing the above and selecting Pro Audio, "Output Devices" -- instead of a single entry for 'Headphones...' as it previously listed -- now shows shows that entry plus five "Pro" entries. None of the "Pro" entries produce any audio when selected. * I then took the steps to install `libspa-0.2-bluetooth` and remove `pulseaudio-mdoule-bluetooth` listed by @kylepwarren but it didn't fix it. * My BT device now connects but no audio comes out. And while connected -- and after disconnecting the BT -- I no longer have internal audio, either.
I'm still testing different scenarios to determine what is actually going on.
The bluetooth gui was giving me the error message: "no audio endpoints registered", which lead me to that recommended package swap. It seems like repairing the bluetooth afterwards was a little wonky. Like it took a couple of attempts to pair the headphones as an audio device. *definitely required rebooting, unpairing and repairing, not just [re]connecting. I guess it could be hardware specific. I'm using a Samsung chromebook 4.
UPDATE: The pipewire
change is not working on my device for internal audio (ignoring BT for now). Here's what I'm seeing:
- After installing the packages (
pipewire
,pipewire-pulse
,pavucontrol
) and then rebooting, if I leave the pavucontrol configuration at "Stereo Output" my audio and the system volume slider behaves as before, I see a single entry in "Output Devices" of "Headphones - Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster" which represents my internal audio. - If I then select "Pro Audio" it adds five additional lines in the "Output Device" selector. Each entry is the same as the original entry but missing the "Headphones - " portion and appended with "Pro", "Pro 1", "Pro 5", "Pro 6", and "Pro 7". Selecting any of these entries I have no internal audio even after a reboot.
- If I then select "Stereo Output" again, the original "Output Device" entry disappears but I now have audio working again. If I reboot, the "Stereo Output" configuration is retained and my audio continues to work as it did before the
pipewire
addition. I again have my original "Output Device" entry back and the additional "Pro" lines are all gone. - If I then select "Pro Audio" again, the results in step 2 happens again. Then, without rebooting, if I select "Stereo Output" and then "Pro Audio" again, it duplicates the five "Pro" lines. This happens every time I switch from "Stereo Output" to "Pro Audio". Five additional lines are added each time.
I can provide a video if that would be helpful. Just not sure what next to check.
UPDATE: The
pipewire
change is not working on my device for internal audio (ignoring BT for now). Here's what I'm seeing:1. After installing the packages (`pipewire`, `pipewire-pulse`, `pavucontrol`) and then rebooting, if I leave the pavucontrol configuration at "Stereo Output" my audio and the system volume slider behaves as before, I see a single entry in "Output Devices" of "Headphones - Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster" which represents my internal audio. 2. If I then select "Pro Audio" it adds five additional lines in the "Output Device" selector. Each entry is the same as the original entry but missing the "Headphones - " portion and appended with "Pro", "Pro 1", "Pro 5", "Pro 6", and "Pro 7". Selecting any of these entries I have no internal audio even after a reboot. 3. If I then select "Stereo Output" again, the original "Output Device" entry disappears but I now have audio working again. If I reboot, the "Stereo Output" configuration is retained and my audio continues to work as it did before the `pipewire` addition. I again have my original "Output Device" entry back and the additional "Pro" lines are all gone. 4. If I then select "Pro Audio" again, the results in step 2 happens again. Then, without rebooting, if I select "Stereo Output" and then "Pro Audio" again, it duplicates the five "Pro" lines. This happens every time I switch from "Stereo Output" to "Pro Audio". Five additional lines are added each time.
I can provide a video if that would be helpful. Just not sure what next to check.
Are you using the most recent 'sof-setup-audio'? That's the one I'm using. Not the one from the most recent tag/release (4.1.1)
I think a video would be useful. So internal audio works in Pipewire when you select Stereo Output and "Headphones - Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster", but the volume curves are messed up again?
@kylepwarren I'm using one which was last merged from my fork where we have PulseAudio working -- commit 428f50.
@MilkyDeveloper -- If I select "Stereo Output", then my internal audio works as it did before installing pipewire
. However, I have no BT audio at all in this situation.
@MilkyDeveloper Here's a video of PulseAudio working and a video of Pipewire not working.
Try getting the setup where you get the “Headphones” selected in the volume controls while using Pipewire. Confirm internal audio works, and then connect to a BT audio device. Post the output of sudo journalctl -b
.
I think this is a user space issue to fix, which is a good sign :D. Do other Bluetooth devices, like mice, work fine?
I installed the pipewire pieces, confirmed internal audio was working with 'Headphones' selected, then attempted to connect to my BT audio. It connects briefly but won't stay connected. I removed the device and repaired; same result. I then paired and connected to a BT mouse and it works fine.
What does journalctl -b
output after the BT audio disconnects?
The journalctl -b output is here.
UPDATE: I'm not sure that shows what you want. Try this one. It has several lines like this which seem pertinent:
bluetoothd[457]: src/profile.c:ext_start_servers() RFCOMM server failed for Message Notification: socket(STREAM, RFCOMM): Protocol not supported (93)
Note that, at this point I still have pulseaudio-module-bluetooth
in place and have not yet gone to libspa-0.2-bluetooth
.
@MilkyDeveloper Any other thoughts on this?
Does modprobe rfcomm
work?
sudo modprobe rfcomm
didn't return anything so I assume it is already there. I just did another test and journalctl -b
output appears as it did in the first link I sent; i.e., it reports Reached target Bluetooth
and then nothing else. I believe that means it has completed and thinks it was successful, right? So, maybe the second output showing the RFCOM issues was just an anomaly.
@kylepwarren Did you remove PulseAudio? Or did you just install PipeWire? Also, what distro/version are you using?
Ubuntu regular, but I installed and use xfce as the desktop.
I downloaded the sof-setup-audio that was updated about a week ago,
I ran: setup-audio, then sof-setup-audio , rebooted and selected the 'Pro Audio' option < this made the pavucontrol and internal speakers work. So, in other words I didn't do anything other than run the updated script.
Then when I got an error in the blueman gui I just google it and tried the recommended package swap, which fixed my problem with bluetooth.
Ok, I greped my history for apt and aything related. this was in there:
sudo apt-get install pipewire pipewire-pulse
apt install libspa-0.2-bluetooth && apt purge pulseaudio-module-bluetooth
packages I have installed containing the word 'pipe':
gstreamer1.0-pipewire/impish,now 0.3.32-1 amd64 [installed,automatic]
libpipeline1/impish,now 1.5.3-1build1 amd64 [installed,automatic]
libpipewire-0.3-0/impish,now 0.3.32-1 amd64 [installed,automatic]
libpipewire-0.3-common/impish,now 0.3.32-1 all [installed,automatic]
libpipewire-0.3-modules/impish,now 0.3.32-1 amd64 [installed,automatic]
pipewire-bin/impish,now 0.3.32-1 amd64 [installed,automatic]
pipewire-media-session/impish,now 0.3.32-1 amd64 [installed,automatic]
pipewire-pulse/impish,now 0.3.32-1 amd64 [installed]
pipewire/impish,now 0.3.32-1 amd64 [installed]
packages I have installed containing the word 'pulse':
apulse/impish,now 0.1.13-1 amd64 [installed]
gstreamer1.0-pulseaudio/impish,now 1.18.5-1ubuntu2 amd64 [installed]
libpulse-mainloop-glib0/impish-updates,now 1:15.0+dfsg1-1ubuntu2.2 amd64 [installed,automatic]
libpulse0/impish-updates,now 1:15.0+dfsg1-1ubuntu2.2 amd64 [installed,automatic]
libpulsedsp/impish-updates,now 1:15.0+dfsg1-1ubuntu2.2 amd64 [installed,automatic]
pipewire-pulse/impish,now 0.3.32-1 amd64 [installed]
pulseaudio-utils/impish-updates,now 1:15.0+dfsg1-1ubuntu2.2 amd64 [installed]
pulseaudio/impish-updates,now 1:15.0+dfsg1-1ubuntu2.2 amd64 [installed]
xfce4-pulseaudio-plugin/impish,now 0.4.3-1 amd64 [installed,automatic]
Thank you. I'm on Ubuntu 21.10 (which normally installs with pipewire running). I confirmed it is already installed. So, before doing any of this (as I noted in the original post), my audio works great whether internal or BT before doing any of this. I can switch to internal or BT and all audio goes to the selected output device. The only weirdness is the "System Volume" slider not being linear. So, I guess I will stay where it is until further releases improve this situation.
Just for reference: I tried going to the latest releases (following this article). I did find some success after installing libspa-0.2-bluetooth
-- I could connect to BT audio and by selecting the output device could cause the terminal beep to go to either internal or BT. However, other audio (e.g., video audio) continues to go to internal regardless of which is selected.
After installing pavucontrol -- which is not present in my initial image -- and then selecting Pro Audio, it seems to get even weirder (as noted above) and it doesn't really improve anything, just adds other issues.
UPDATE: I have discovered that the non-linear operation of System Volume only applies when Output Device is set for internal audio. When connected to BT audio, System Volume adjusts the volume linearly. Interesting...
Hey, I see this issue on my HP Chromebook 14a (blooglet board). BT audio worked out of the box, but I haven't tested if it still works since I've ran the script to get the internal speakers up and running. I don't see a pro audio card profile in pulseaudio volume control either, only stereo output and off.
Update: Rebooting my system seems to have broken sound completely, not even the dummy output is appearing.
@CorruptedPlazma I had that happen at one point a while back. Building a fresh image of Breath with the latest Ubuntu fixed it again. I still have this non-linear issue with the Master Volume but the other audio controls are working and I have both internal and BT audio working.
Yeah, I resolved it that way as well. My speakers are at maximum volume at around the 5% mark, BT audio scales fine though. Microphone and headphone jack are also non-functional from my testing, but I don't use those all too commonly anyways.
@CorruptedPlazma So you and I are in the same situation -- for good or bad. :-) I plan on investigating this further after I return from a couple planned trips. Please post, here, anything you discover on this.
This is a kernel bug that I haven't paid attention too, I'm looking into it now.