Open KaiChuan-Hsieh opened 6 months ago
You can run a custom suspend command with the "-cmd" option. For instance "sleepgraph -cmd "mysuspendscript.sh" -dev -proc" will call "mysuspendscript.sh" instead of "echo mode > /sys/power/state". We use -cmd all the time on android and chrome since both have significant pre-suspend calls to do. The tool will run over the whole command and create the timeline of what happens in the kernel. Using the -proc argument will show all the processes that your "-cmd" call initiated before the kernel suspend started.
Hello,
sleepgraph utilize sysfs node to suspend the system, ex: $ echo mem > /sys/power/state. Some devices customize the pre-sleep or post-resume operations by utilizing systemd sleep script, ex: Nvidia proprietary driver. It may cause some problem on the device that needs pre-sleep or post-resume operations.
Reproduce steps:
On Ubuntu 22.04 system with NV graphic
Thanks,