Volume level drops back to default level when logging out of desktop  [Solved]

Message
Author
User avatar
siamhie
Global Moderator
Posts: 3353
Joined: Fri Aug 20, 2021 5:45 pm

Re: Volume level drops back to default level when logging out of desktop

#11 Post by siamhie »

BitterTruth wrote: Mon Aug 07, 2023 7:59 pm
2) Next we can see from the groups command output that you are indeed a member of the audio group in both inits (I don't know why this would be different but I was hoping that somehow a script might be responsible and maybe the init was determining whether that script was running). Also I was wondering if it is a permissions issue since it happens when you log out.

I don't believe it's a permission issue as there are two display managers this is happening with. LightDM and SDDM.


3) the lspci | grep command shows me that the hdmi controller was the only one present in all the 3 scenarios including when you thought you disabled the onboard sound. In otherwords the hdmi controller was still active:

Code: Select all

0b:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller
 
This the one device I am seeing in all cases. This hdmi device.

This is the lspci command when the on-board audio is connected

Code: Select all

0b:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller
14:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
and this is when the sound blaster card was installed (Starship/Matisse disabled in BIOS)

Code: Select all

05:00.0 Audio device: Creative Labs CA0132 Sound Core3D [Sound Blaster Recon3D / Z-Series / Sound BlasterX AE-5 Plus] (rev 01)
0b:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller
As I stated earlier, the system sees the GPU's HDMI port but I'm connected via display port with no audio devices on the monitor.
I connect to the on-board sound card via the 3.5mm plug.



4) You did change your software since you first noticed the problem on Fluxbox liquorix kernel after which you installed:
MX23 + XFCE with the 6.4.1 kernel
MX23 + KDE with the 6.1.0 kernel

By doing this you eliminated the kernels, DE and any missing packages/install issues

All audio is handled by the Pipewire package and all three desktops run the same script for loading Pipewire.

pipewire-start located in /usr/bin

Code: Select all

#/bin/bash

INITSKIP="false"

#first init check for pure systemd, no shim
INITCHECK=$(readlink /usr/sbin/init)
echo $INITCHECK
if [ "$INITCHECK" = "/lib/systemd/systemd" ]; then
        INITSKIP="true"
fi

#second init check for system-shim configuration
INITCHECK=$(/usr/bin/ps -p 1 -o cmd -h)
echo $INITCHECK
if [ "$INITCHECK" = "/lib/systemd/systemd" ]; then 
	  INITSKIP="true"
fi

#else start them up
echo "start pipewire"

if [ "$INITSKIP" = "false" ]; then
	if [ -z "$(pgrep -x -u $USER pipewire)" ]; then 
		/usr/bin/pipewire &
	fi
	if [ -z "$(pgrep -x -u $USER pipewire-pulse)" ]; then
		/usr/bin/pipewire-pulse & 
	fi
	#wireplumber doesn't always close down
	if [ -z "$(pgrep -x -u $USER wireplumber)" ]; then
        sleep 2
        /usr/bin/wireplumber &
	else
        pkill wireplumber
        sleep 2
        /usr/bin/wireplumber &
	fi
fi

exit 0



The only other thing that was coming to mind is some kind of power management at play especially if you had pulseaudio installed but since you are using pipewire, I can't say.

MX-23 doesn't come with PulseAudio anymore. They've switched to Pipewire.


I would suggest that for the time being you
1) try disabling the hdmi controller if you are not using it.

It's not connected.

Code: Select all

xrandr --prop

DisplayPort-0 connected primary 2560x1440+0+0
DisplayPort-1 disconnected
DisplayPort-2 disconnected
HDMI-A-0 disconnected
2) try plugging the 3.5mm plug to front panel connectors if you have them
The tower (Cooler Master NR600) only has a headphone jack at the front.

3) remove yourself from the audio group, if that is what is working.

That means I would have to do that every time I install the ISO.

This is from an Ubuntu article on the implications of adding yourself to the audio group:


I came across that over the weekend. https://wiki.ubuntu.com/Audio/TheAudioGroup
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
dolphin_oracle
Developer
Posts: 22270
Joined: Sun Dec 16, 2007 12:17 pm

Re: Volume level drops back to default level when logging out of desktop

#12 Post by dolphin_oracle »

there is a key difference in how pipewire runs on sysVinit vs. systemd. under systemd, pipewire and wireplumber run as a "user service" and when you logout they quit running.

sysVinit doens't have the concept of a user service, so we just run them, but we don't kill them at logout.

now why the volume gets reset I can't say. I can confirm that after a reboot, if my user is not part of the audio group then the volume doens't reset on logout.

seems like a bug in the pipewire sound server to me, don't know.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
siamhie
Global Moderator
Posts: 3353
Joined: Fri Aug 20, 2021 5:45 pm

Re: Volume level drops back to default level when logging out of desktop

#13 Post by siamhie »

dolphin_oracle wrote: Mon Aug 07, 2023 9:14 pm there is a key difference in how pipewire runs on sysVinit vs. systemd. under systemd, pipewire and wireplumber run as a "user service" and when you logout they quit running.

sysVinit doens't have the concept of a user service, so we just run them, but we don't kill them at logout.

now why the volume gets reset I can't say. I can confirm that after a reboot, if my user is not part of the audio group then the volume doens't reset on logout.

seems like a bug in the pipewire sound server to me, don't know.

Thanks for confirming the log out issue @dolphin_oracle . I see trixie has 0.3.76-1 (https://packages.debian.org/search?keywords=pipewire) but I'm hesitant to give it a try.
I've searched all weekend on pipewire's github page reading through the issues section but nothing comes close to this issue.

I'll leave this thread open for the time being until we can figure out a solution.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
CharlesV
Global Moderator
Posts: 7364
Joined: Sun Jul 07, 2019 5:11 pm

Re: Volume level drops back to default level when logging out of desktop

#14 Post by CharlesV »

as a work around, you can setup a script to run amixer at login and set the volume to what ever you want.

Code: Select all

amixer -d set Master 50%
or ( what I use )

Code: Select all

amixer -d set Master 80%
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
siamhie
Global Moderator
Posts: 3353
Joined: Fri Aug 20, 2021 5:45 pm

Re: Volume level drops back to default level when logging out of desktop

#15 Post by siamhie »

CharlesV wrote: Mon Aug 07, 2023 11:40 pm as a work around, you can setup a script to run amixer at login and set the volume to what ever you want.

Code: Select all

amixer -d set Master 50%
or ( what I use )

Code: Select all

amixer -d set Master 80%

It only happens when I log out of the desktop, then log back in. Cold boots and reboots are fine.

Does that run in the background @CharlesV? I could probably put it in my fluxbox startup file.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
CharlesV
Global Moderator
Posts: 7364
Joined: Sun Jul 07, 2019 5:11 pm

Re: Volume level drops back to default level when logging out of desktop

#16 Post by CharlesV »

siamhie wrote: Tue Aug 08, 2023 1:27 am
CharlesV wrote: Mon Aug 07, 2023 11:40 pm as a work around, you can setup a script to run amixer at login and set the volume to what ever you want.

Code: Select all

amixer -d set Master 50%
or ( what I use )

Code: Select all

amixer -d set Master 80%

It only happens when I log out of the desktop, then log back in. Cold boots and reboots are fine.

Does that run in the background @CharlesV? I could probably put it in my fluxbox startup file.
No, its a one time setting. I would put it in a script and launch it at login.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
siamhie
Global Moderator
Posts: 3353
Joined: Fri Aug 20, 2021 5:45 pm

Re: Volume level drops back to default level when logging out of desktop

#17 Post by siamhie »

CharlesV wrote: Tue Aug 08, 2023 1:34 am
No, its a one time setting. I would put it in a script and launch it at login.

OK, then I won't bother with it. Even if I set my account to log in from boot, the volume stays at my setting of 70.
It's only when I log out of the desktop that the level drops back to 40 when I log back in and only when booted to systemd.
Sys-V is not affected by this issue.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
CharlesV
Global Moderator
Posts: 7364
Joined: Sun Jul 07, 2019 5:11 pm

Re: Volume level drops back to default level when logging out of desktop

#18 Post by CharlesV »

Gotcha.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
siamhie
Global Moderator
Posts: 3353
Joined: Fri Aug 20, 2021 5:45 pm

Re: Volume level drops back to default level when logging out of desktop

#19 Post by siamhie »

@CharlesV I've bookmarked this topic for future reference (if needed). viewtopic.php?t=76405
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

BitterTruth
Posts: 620
Joined: Tue Sep 22, 2020 7:36 pm

Re: Volume level drops back to default level when logging out of desktop

#20 Post by BitterTruth »

@siamhie , @dolphin_oracle , @CharlesV

Pipewire doesn't use the audio group. It has it's own 'pipewire' group instead. I think alsa-utils sets the audio group membership. How about making yourself part of that group and see if that helps (instead of audio).

Also @siamhe: How are you checking that the volume is back at 40%? Is it via the session volume icon or alsa mixer? Is only one changed? Is it alsamixer settings being reset?

Instead of logging out, you could try just locking your screen with xscreensaver (don't use the xfce4-screensaver, since it's been causing a lot of issues). You can also check what processes are running before and after login. See if anything changed.

After you log back in try doing dmesg and see if that shows you any errors.

Locked

Return to “Hardware /Configuration”