Compare commits
2 Commits
55f1349e14
...
d5b2c3984e
| Author | SHA1 | Date |
|---|---|---|
|
|
d5b2c3984e | |
|
|
88f9e83bf5 |
|
|
@ -69,9 +69,9 @@
|
|||
# My audio interface has issues after coming out from suspend/hibernate, this will reset it to fix it when necessary.
|
||||
|
||||
systemd.services.audiointerface-reset-unbind = {
|
||||
description = "Resets audio interface to clear up any issues - de-initialises audio interface before sleeping/hibernating";
|
||||
wantedBy = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ];
|
||||
before = [ "systemd-suspend.service" "systemd-hibernate.service" "systemd-hybrid-sleep.service" ];
|
||||
description = "Resets audio interface to clear up any issues - de-initialises audio interface before sleeping/hibernating/shutting down";
|
||||
wantedBy = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "shutdown.target" ];
|
||||
before = [ "systemd-suspend.service" "systemd-hibernate.service" "systemd-hybrid-sleep.service" "shutdown.target" ];
|
||||
path = with pkgs; [ bash coreutils kmod ];
|
||||
enable = true;
|
||||
serviceConfig = {
|
||||
|
|
@ -79,6 +79,8 @@
|
|||
Group = "root";
|
||||
};
|
||||
script = "
|
||||
# This service appears to have issues when system sleeps - stop service
|
||||
systemctl -M 'cspark@' --user stop mpd-discord-rpc.service
|
||||
# Unbind audio interface
|
||||
echo `grep 0a73 /sys/bus/usb/devices/*/idVendor | cut -d '/' -f 6` > /sys/bus/usb/drivers/usb/unbind
|
||||
# Remove snd_usb_audio once no longer in use
|
||||
|
|
@ -102,6 +104,8 @@
|
|||
modprobe snd_usb_audio
|
||||
# Rebind audio interface
|
||||
echo `grep 0a73 /sys/bus/usb/devices/*/idVendor | cut -d '/' -f 6` > /sys/bus/usb/drivers/usb/bind
|
||||
# This service appears to have issues when system sleeps - start service
|
||||
systemctl -M 'cspark@' --user start mpd-discord-rpc.service
|
||||
";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
set -x
|
||||
|
||||
# This service appears to have issues when system sleeps - stop service
|
||||
systemctl -M 'cspark@' --user stop mpd-discord-rpc.service
|
||||
|
||||
# Stop desktop environment and display manager
|
||||
pkill kwin_wayland
|
||||
systemctl --user -M cspark stop plasma*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
set -x
|
||||
|
||||
# This service appears to have issues when system sleeps - start service
|
||||
systemctl -M 'cspark@' --user start mpd-discord-rpc.service
|
||||
|
||||
# My audio interface has issues after coming out from a suspended type state, this will reset it to fix it when necessary.
|
||||
modprobe snd_usb_audio
|
||||
# Rebind audio interface
|
||||
|
|
|
|||
Loading…
Reference in New Issue