Kodi Community Forum
Linux What command is run when I hit suspend? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux What command is run when I hit suspend? (/showthread.php?tid=158868)



What command is run when I hit suspend? - mosquitogang201 - 2013-03-10

I am running XBMC Frodo in Arch Linux. What actually happens when I hit the suspend button in XBMC? Can I edit this button to run a custom command?

The reason I ask is, Arch is using systemd. To suspend via the command line I would type "systemctl suspend". I have a hack script that is called to rmmod my TV tuner modules during the systemd suspend process because there is a bug in one of the drivers that prevents my computer from waking up. XBMC is suspending my computer differently though. The script is never run, so when I suspend via XBMC my computer doesn't wake up.


RE: What command is run when I hit suspend? - teeedubb - 2013-03-10

Does arch use hooks in /etc/pm/sleep.d/ ?

Another option is to bypass xbmc's suspend command by editing xbmc's remote mappings and use irexec to launch your script to remove modules then suspend.

Xbmc also has a runscript option for key maps that could be used too.