Solved Want to know the knowledge about suspend and resume

Hi all and developers
I want to ask some questions about suspend and resume.

what’s happening when I run acpiconf -s 3

does the system will call some device driver callbacks.
the device driver how to know it will suspend or resume?

today I just put some debug information in amdgpu drm driver but I found the kernel didn’t call the Amdgpu device suspend and resume function when the system suspend or resume. I don’t know why.
please help me,I really want to know that the suspend how to work
 
Last edited:
I found a bug that Linuxkpi resume and suspend code never run when I run acpiconf -s 3,
this bug indirectly cause drm driver's suspend and resume function not work.
 
i read acpiconf source code , i found it just send an ioctl request to /dev/acpi, the device file was created by /usr/src/sys/dev/acpica/acpi.c
this acpi.c will process the suspend request , i will investigate this problem .
if you are an develoer, please help me to sove this problem , i want to know why linuxkip does not run resume or suspend code when suspending or resuming.
i already read a few amdgpu drm driver , i found amdgpu use linuxkpi abstraction layer to add pci device to kernel .
i think if the problem will resolve then the drm resume does not have any issue for resuming and suspending
 
the proble is solved now , the problem is from linuxkpi , its default compilation verion is lower than 50000, when linuxkpi is compiling it drops some member variable of struct for LINUXKPI_VERION lower than 50000 , it cause this issue, just put -DLINUXKPI_VERION=50000 in linux Makefile,
 
Back
Top