marioortizmanero / polybar-pulseaudio-control

A feature-full Polybar module to control PulseAudio
MIT License
466 stars 49 forks source link

pulseaudio-control does not quit correctly on shutdown, resulting in 90 second shutdown and reboot times #75

Open Fxzzi opened 1 year ago

Fxzzi commented 1 year ago

As you can see from this screenshot above, on shutting down or rebooting my system, a long 1m30s wait happens because of pulseaudio-control.

You can see from the line Nov 04 22:16:46 Kappa wireplumber[704]: to Nov 04 22:18:15 Kappa systemd[1]: session-1.scope: Stopping timed out. Killing. there is a 1m30s wait. This is the default timeout for systemd for hanging processes on reboot. I know this because editing the file /etc/systemd/system.conf and setting

DefaultTimeoutStartSec=10s
DefaultTimeoutStopSec=10s

will make the timeout 10 seconds.

I know it's pulseaudio-control because it is the only program running on my system, as my user, that uses pactl and bash. The rest of my scripts are set to use dash. It also shows polybar as still running, which is probably still running because it's trying to close pulseaudio-control.

This is a pretty serious issue considering it increases my shutdown and reboot times by 90 seconds. Let me know if you need any more info and I'll be happy to provide it for you.

Thanks for the amazing work on the script otherwise! Fazzi

marioortizmanero commented 1 year ago

Do you have any more logs you can share? It may have to do with pactl subscribe not being killed, as that's how we poll for events, maybe you can try with a simpler script that just runs that? We don't capture SIGINT or any similar signals, so I have no idea why this would happen.