Il 28/12/2023 15:48, Franco Martelli ha scritto:
Using systemctl, kernel module is broken after every suspend, even if
kaffeine is not running.
My system, if I don't restart Picom, freeze after a resume from suspend.
To fix it I've placed this shell script in
"/usr/lib/systemd/system-sleep/" directory
~$ cat /usr/lib/systemd/system-sleep/00_sleep.sh
I found that pm-suspend works because it unloads and reloades that module
In "/etc/pm/config.d/modules" there is
---
SUSPEND_MODULES="cx23885"
---
Now I've replicated this on systemd side with this script similar to yours:
/usr/lib/systemd/system-sleep/dvb-suspend.sh
---
#!/bin/bash
[ "$1" = "post" ] && exec /usr/sbin/modprobe cx23885
[ "$1" = "pre" ] && exec /usr/sbin/rmmod cx23885
exit 0
---
This way it works, both with "systemctl suspend" and from kde menu.