Does anyone know when Linux save VGA memory to RAM? Is it in pm-suspend script before echo mem to /sys/power/state? Is it in kernel after echo -n "mem" > /sys/power/state? or both?
I have looked at the pm-suspend script, it uses vbetool to save the video state
vbe vbestate save > /var/run/vbestate
Is this the right place to save the VGA memory to RAM?
But if I only run echo mem > /sys/power/state(skip pm-suspend script in userspace), the system still can wakeup with correct GUI.
Thanks,
This is done into the kernel space, mostly in the video graphic driver suspend/resume methods. How it is done depends of the driver.(cf Linux kernel documentation)