View previous topic :: View next topic |
Author |
Message |
wilsonsamm Apprentice
Joined: 12 Jul 2008 Posts: 196
|
Posted: Wed Nov 25, 2009 7:07 pm Post subject: Suspend/resume idea |
|
|
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 |
|
|
BonesToo Apprentice
Joined: 19 Aug 2003 Posts: 153
|
Posted: Wed Nov 25, 2009 8:03 pm Post subject: Re: Suspend/resume idea |
|
|
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 |
|
|
wilsonsamm Apprentice
Joined: 12 Jul 2008 Posts: 196
|
Posted: Thu Nov 26, 2009 3:13 pm Post subject: |
|
|
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 |
|
|
|
|
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
|
|