Fix sxmo auto suspend when mpv is playing
A mpv instance is a inhibit idle for the WM. It means that we should not rely on sxmo_idle.sh to start and stop the periodic wake lock checker. Instead we should just periodically run them.
This commit is contained in:
@@ -24,6 +24,7 @@ sxmo_wm.sh dpms off
|
||||
sxmo_wm.sh inputevent touchscreen off
|
||||
|
||||
sxmo_daemons.sh stop periodic_blink
|
||||
sxmo_daemons.sh stop periodic_wakelock_check
|
||||
|
||||
# Go to screenoff after 8 seconds of inactivity
|
||||
if ! [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
|
||||
|
@@ -31,13 +31,7 @@ case "$SXMO_WM" in
|
||||
;;
|
||||
esac
|
||||
|
||||
sxmo_hook_wakelocks.sh
|
||||
|
||||
# Start a periodic daemon (10s) to check wakelocks and go to suspend
|
||||
# Start a periodic daemon (2s) to blink leds
|
||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
||||
timeout 10 'sxmo_daemons.sh start periodic_wakelock_check sxmo_run_periodically.sh 10 sxmo_hook_wakelocks.sh' \
|
||||
resume 'sxmo_daemons.sh stop periodic_wakelock_check'
|
||||
sxmo_daemons.sh start periodic_wakelock_check sxmo_run_periodically.sh 10 sxmo_hook_wakelocks.sh
|
||||
|
||||
wait
|
||||
|
||||
|
@@ -23,6 +23,7 @@ sxmo_wm.sh dpms off
|
||||
sxmo_wm.sh inputevent touchscreen on
|
||||
|
||||
sxmo_daemons.sh stop periodic_blink
|
||||
sxmo_daemons.sh stop periodic_wakelock_check
|
||||
|
||||
# see https://todo.sr.ht/~mil/sxmo-tickets/150
|
||||
# We set the scan interval threshold here to
|
||||
|
Reference in New Issue
Block a user