Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightdm seems to reset audio volume of system (pulse and pipewire) #213

Closed
Johndeep opened this issue Oct 20, 2021 · 5 comments
Closed

Lightdm seems to reset audio volume of system (pulse and pipewire) #213

Johndeep opened this issue Oct 20, 2021 · 5 comments

Comments

@Johndeep
Copy link

Johndeep commented Oct 20, 2021

What happens (at least in my case):

  • If I log out and log in via lightdm, the active audio volume (run by pipewire) seems to be enabled and set at very odd 76%. Microphone is also always switched on and set at odd but always consistent volume.

Steps to reproduce:

  • Being on Debian Unstable (optionally Xfce4 desktop ver. 4.16.1-1), have lightdm (ver. 1.26.0-7)
  • Configured pipewire and pipewire-pulse (so system is basically running pipewire ver. 0.3.38-2), masking pulseaudio
  • Use light-locker (ver. 1.8.0-3) to lock system. Or, just log out and log in again.

Various attempts:

  • I've tried to isolate the problems by removing all configurations from other parts (alsa, pipewire, pulse, etc.). And it boils down to lightdm it seems. If I try to lock my screen via xfce4-screensaver, issue does not happen.
  • A normal reboot/restart of system with initial login (via lightdm) does not trigger issue, volume stays the same as before.

I might be wrong about lightdm, but it is quite unsettling and strange the volume always resets after lightdm locks the screen.

@Jasmin68k
Copy link

I am also using Debian Unstable.

The same issue started to happen to me after unattended-upgrades removed pipewire-media-session and installed pipewire-pulse, wireplumber and libwireplumber-0.4-0.

It can be solved by either switching to another display manager, I tried xdm, or by removing pipewire-pulse, wireplumber and libwireplumber-0.4-0 and reinstalling pipewire-media-session.

@Johndeep
Copy link
Author

Johndeep commented Nov 9, 2021

If that is the case, then especially pipewire-pulse seems to have some interaction problems with lightdm. Or somehow lightdm boldly manipulates the audio volume for whatever reason.

But unfortunately I don't want to remove pipewire-pulse yet, since it provides me with very handy Bluetooth Headset abilities I don't want to miss out. In fact, Bluetooth Headset ability (easy switch between pure audio and mix of audio and microphone) is the reason why I ditched pulseaudio in the first place.

Furthermore, pipewire-media-session seems to become deprecated in the future, so I would rather use wireplumper instead. But this does not matter, because I also had pipewire-media-session installed alongside with pipewire-pulse, which still had the audio volume problem nonetheless.

My workaround solution (not the solution for this issue still) is to purge or remove light-locker and install xfce4-screensaver instead, for xfce4 desktop at least. This not only allow any Bluetooth connection still be active even after the screen is locked, but it also prevents any unwanted audio volume manipulation.
The one caveat is that if you log out and log in again, which will call up the login dialog of lightdm instead, audio volume will be manipulated by lightdm again..

So I would agree to searching for another session manager besides lightdm to work around this problem. But it would not solve the actual interaction problem between lightdm and pipewire-pulse.

@Johndeep Johndeep changed the title Lightdm seems to reset audio volume of pipewire Lightdm seems to reset audio volume of pipewire-pulse Nov 9, 2021
@Jasmin68k
Copy link

I also tried pipewire-media-session + pipewire-pulse having the same problem.

I agree with using wireplumber, since pipewire-media-session will become deprecated, and just using another display manager.

@Johndeep
Copy link
Author

Johndeep commented Dec 8, 2021

Okay, this problem is more global than I thought.
I've reinstalled Debian again, but currently without pipewire for now. It runs Debian Testing (Dec. 2021) with pure pulseaudio only. The exact same problem is still happening with how after every reboot of the system, the volume is set to a fixed number again.

Since this problem is not only affecting pipewire, but also pulseaudio and thus probably the volume management in general, I'll change the topic name.

@Johndeep Johndeep changed the title Lightdm seems to reset audio volume of pipewire-pulse Lightdm seems to reset audio volume of system (pulse and pipewire) Dec 8, 2021
@Johndeep
Copy link
Author

Johndeep commented Apr 29, 2022

After re-checking the logs and privileges, it seems that this can happen due of too many privileges.

To explain this, for a normal user using a Desktop, it seems to be recommended to have as few privileges as possible, the group sudo should suffice at most. Since I've installed my system with Debian, it seems that Debian always gave me too many privileges as default, which also includes the audio group.

To work around this strange arbitrary audio volume change as I use lightdm to lock the screen or just log out, I've removed myself from the audio group. In fact, I removed myself from all groups except for sudo group.

To remove a user from a certain group (i.e. the audio group):
# gpasswd -d <user> audio

To remove a user from all groups except for a certain group (i.e. sudo group):
# usermod -G sudo <user>

Now even after a logout or screen lock via light-locker, the volume settings are left untouched! Even though this is more of a workaround, I'll close this issue as solved.

The question is now, why does the user (with audio group privileges) always set the volume when locking the screen or logging out? Might this be caused by the interaction between the audio server and lightdm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants