Page 4 of 5
Re: Volume level drops back to default level when logging out of desktop
Posted: Tue Aug 08, 2023 2:38 pm
by BitterTruth
dolphin_oracle wrote: Tue Aug 08, 2023 2:12 pm
I do believe something is happening at logout when running systemd that is setting the alsa sound level to 40%, removing the user from the audio group prevents that, but we've had it that way for a long time without an ill effect.
Could it be the login manager doing something or the way you are logging in?
console =====> startx,
xinitrc
login manager
@siamhe how are you logging in btw?
I didn't see this minor issue when using pulseaudio with MX-21 and multiple desktops with systemd.
Points more and more to pipewire and wireplumber then?
The configuration files for wireplumber are in ~/.config/wireplumber/ (user configuration), /etc/wireplumber/ (global configuration), and then /usr/share/wireplumber/ (stock configuration).
If you guys are feeling brave enough you can have a look in there. Some people have had good results deleting their user configuration or replacing it with the stock one. If you don't want to do that, you could create a temporary user and see if the same problem occurs. That'll give you a clue that maybe it's your wireplumber config.
Re: Volume level drops back to default level when logging out of desktop
Posted: Tue Aug 08, 2023 2:51 pm
by richb
The same set back to 40% happens as well in my KDE install. I have considered it a minor issue.
Re: Volume level drops back to default level when logging out of desktop
Posted: Tue Aug 08, 2023 3:48 pm
by siamhie
BitterTruth wrote: Tue Aug 08, 2023 2:38 pm
dolphin_oracle wrote: Tue Aug 08, 2023 2:12 pm
I do believe something is happening at logout when running systemd that is setting the alsa sound level to 40%, removing the user from the audio group prevents that, but we've had it that way for a long time without an ill effect.
Could it be the login manager doing something or the way you are logging in?
console =====> startx,
xinitrc
login manager
@siamhe how are you logging in btw?
I've already mentioned this happens with LightDM (fluxbox, XFCE) and SDDM (KDE).
Re: Volume level drops back to default level when logging out of desktop
Posted: Tue Aug 08, 2023 4:03 pm
by siamhie
richb wrote: Tue Aug 08, 2023 2:51 pm
The same set back to 40% happens as well in my KDE install. I have considered it a minor issue.
@richb I'm going to go ahead and call it a nuance but livable as I'll explain below.
@dolphin_oracle
I don't think there is anything we can do about the volume dropping when logging out and in to the desktop while booted to systemd.
I downloaded the Debian 12.1 Gnome live ISO and it also uses Pipewire for the audio server. XFCE and KDE versions use PulseAudio.
When logging out of the desktop and back in the volume level dropped back to their default value.
I set the master volume to 100
volume-level-100.png
After I log back in it resets to default of 36
volume-level-36.png
Re: Volume level drops back to default level when logging out of desktop
Posted: Tue Aug 08, 2023 4:29 pm
by dolphin_oracle
Give that a user group has some interaction I’m actually blaming systemd’s user session management.
so a one-liner to remove a user from the audio group:
and for any future users, you could edit /etc/adduser.conf and look for the line with the EXTRA_GROUPS and remove audio from it.
Re: Volume level drops back to default level when logging out of desktop
Posted: Tue Aug 08, 2023 5:12 pm
by siamhie
dolphin_oracle wrote: Tue Aug 08, 2023 4:29 pm
Give that a user group has some interaction I’m actually blaming systemd’s user session management.
so a one-liner to remove a user from the audio group:
and for any future users, you could edit /etc/adduser.conf and look for the line with the EXTRA_GROUPS and remove audio from it.
I'm kinda of blaming both pipewire and systemd for this. PulseAudio never needed the user removed from the audio group when booted to systemd.
@dolphin_oracle Can editing the adduser.conf be done during the live ISO install? I'm thinking of removing the spare SSD and reinstall MX-23 fluxbox.
Re: Volume level drops back to default level when logging out of desktop
Posted: Tue Aug 08, 2023 6:20 pm
by dolphin_oracle
siamhie wrote: Tue Aug 08, 2023 5:12 pm
dolphin_oracle wrote: Tue Aug 08, 2023 4:29 pm
Give that a user group has some interaction I’m actually blaming systemd’s user session management.
so a one-liner to remove a user from the audio group:
and for any future users, you could edit /etc/adduser.conf and look for the line with the EXTRA_GROUPS and remove audio from it.
I'm kinda of blaming both pipewire and systemd for this. PulseAudio never needed the user removed from the audio group when booted to systemd.
@dolphin_oracle Can editing the adduser.conf be done during the live ISO install? I'm thinking of removing the spare SSD and reinstall MX-23 fluxbox.
yes, but you'll still need to remove the default user from the group.
Re: Volume level drops back to default level when logging out of desktop [Solved]
Posted: Sat May 25, 2024 12:39 pm
by siamhie
I finally cracked the code.
To recap, when you boot up to systemd and log out of the desktop and then log back in, the volume level gets reset back to 40% regardless if you've set a predetermined level (say 50%) in pavucontrol.
If you have set a predetermined level (say 50%) and reboot the computer, the volume level will stay at 50% at login. Seems to only get reset when logging out of the desktop and back in.
This does not happen if you boot up in sys-v, only systemd.
The fix.
Edit the file policy-device-routes.lua in /usr/share/wireplumber/scripts
Code: Select all
-- the default volume to apply
default_volume = tonumber(config["default-volume"] or 0.4^3)
and change the value 0.4^3 to the volume level you want to set it to. I have tested all these values and they work.
10% volume
20% volume
30% volume
40% volume
50% volume
60% volume
70% volume
80% volume
90% volume
100% volume
Re: Volume level drops back to default level when logging out of desktop
Posted: Sat May 25, 2024 12:57 pm
by BV206
siamhie wrote: Sat May 25, 2024 12:39 pm
I finally cracked the code.
I don't have a /usr/share/wireplumber/scripts/policy-device-routes.lua. Is it supposed to exist already or do you have to create it?
Do you know of a similar way to set the input audio level?
Re: Volume level drops back to default level when logging out of desktop
Posted: Sat May 25, 2024 2:23 pm
by siamhie
BV206 wrote: Sat May 25, 2024 12:57 pm
siamhie wrote: Sat May 25, 2024 12:39 pm
I finally cracked the code.
I don't have a /usr/share/wireplumber/scripts/policy-device-routes.lua. Is it supposed to exist already or do you have to create it?
Do you know of a similar way to set the input audio level?
Are you using MX-23? MX-21 uses PulseAudio for it's sound server. (post your QSI)