r/xfce 2d ago

Support Play audio on lockscreen

Basically whenever I lock my system audio stops playing. Is there any way to have this not happen (basically have audio keep playing even though the system is locked)? I did see this but none of the three solutions I tried worked. I'm also pretty new to Linux so any help would be appreciated!

2 Upvotes

7 comments sorted by

1

u/krumpfwylg 1d ago

This could depend on the audio layer you're using. My system is ALSA only, just tested locking the screen with radio stream playing, and got no interruption. Same result when using Quodlibet music player.

1

u/BullfrogOne8888 1d ago

Thanks for the reply! How do you get your system to be ALSA only? I uninstalled PulseAudio, is there anything else I need to do?

1

u/krumpfwylg 1d ago

Because my distro (Gentoo) allows me to have a pure ALSA system. Afaik, most distros use Pulseaudio, or are replacing it with Pipewire. But those sound servers should not stop working when screen is locked.

What's your distro ? How do you lock the screen ?

P.S. : you shouldn't uninstall PulseAudio if it comes preinstalled, many apps are probably configured to use it as sound server, and removing it might cause issues.

1

u/BullfrogOne8888 1d ago

I'm using Mint 22.3 Xfce, I lock the screen by pressing the lock button in the Whisker menu.

1

u/krumpfwylg 1d ago

Try editing /etc/pulse/default.pa and add this to the bottom:

set-card-profile alsa_card.pci-0000_01_00.1 output:hdmi-stereo-extra2

save, reboot & try to lock the screen while music is playing.

1

u/BullfrogOne8888 1d ago

For some reason, I don't have a default.pa file? I think it got deleted when I uninstalled PulseAudio (oops). Is there any way to bring it back? It also won't let me create a new file in said folder. https://gyazo.com/3462d8b0e82e091533c06b360c88983a

1

u/nikgnomic Manjaro Xfce 17h ago

The AskUbuntu solutions are old and probably intended for PulseAudio not PipeWire

and Lock screen settings were moved from xfce4-power-manager to xfce4-screensaver recently
Xfce 4.20 Tour