Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 2849

General Questions • Execute script on resuming from sleep (laptop)

$
0
0
Hi all,

Do you folks know how I can execute a script when my laptop resumes from sleep?

I tried searching for power management but couldn't find anything for Debian 12 apart from systemd-sleep.conf which is not really what I'm looking for.

The reason I want to create a script is because (after I store my settings with sudo alsactl store) upon resuming from sleep (with earphones plugged in) my volume jumps to a previous setting I had saved instead of the new one. It seems to work when I execute:

Code:

sudo alsactl -f /var/lib/alsa/asound.state restore
so I want to execute this command upon resuming from sleep.

Any help is much appreciated.

Statistics: Posted by alexander — 2024-01-03 14:04



Viewing all articles
Browse latest Browse all 2849

Trending Articles