Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Suspend/resume idea
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
wilsonsamm
Apprentice
Apprentice


Joined: 12 Jul 2008
Posts: 196

PostPosted: Wed Nov 25, 2009 7:07 pm    Post subject: Suspend/resume idea Reply with quote

My understanding of the matter surrounding dodgy suspend/resume and some hardware, is that the driver initialises some hardware before it can be used. If the power is cycled, then the hardware is in the uninitialised state, which the driver isn't aware of.
For example, my laptop sometimes mutes all sound after suspend/resume. It may be fixed by unloading and loading the driver module, because as a module is loaded, the kernel calls the [initialise] function of that driver, the responsibility of which being, that the hardware is in a known state and ready to accept software control.

Why not simply have the kernel call this function on wakeup for known problematic hardware? Or alternatively, have it launch an executable, or a script, where the user may program his/her own procedure of unloading and loading modules and re-initialising hardware &c?
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Wed Nov 25, 2009 8:03 pm    Post subject: Re: Suspend/resume idea Reply with quote

wilsonsamm wrote:
Or alternatively, have it launch an executable, or a script, where the user may program his/her own procedure of unloading and loading modules and re-initialising hardware &c?


This exists in hibernate-script.
You can set it to unload and reload a module on suspend/resume. And you can have it run a script before suspend or after resume.
Back to top
View user's profile Send private message
wilsonsamm
Apprentice
Apprentice


Joined: 12 Jul 2008
Posts: 196

PostPosted: Thu Nov 26, 2009 3:13 pm    Post subject: Reply with quote

I did NOT know that. Well, I used to use just echo "disk" > /sys/power/state, and have the kernel do it all (hance my suggestion the solution should be in kernelspace).
This was on a laptop from 1998, though. Do we prefer userspace solutions these days or something?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum