[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: suspend to disk while in X



On Tue, Aug 03, 2004 at 12:35:32PM -0400, John M Flinchbaugh wrote:
> On Tue, Aug 03, 2004 at 10:17:22AM -0400, Matt Perry wrote:
> > If I have X open, but switch to a console before closing the lid, it 
> will only 
> > have to resume once.  Then I just ctrl+alt+F7 to get my X session 
> back 
> > cleanly.  This leads me to believe it has something to do with the 
> video 
> > driver.  I'm using the free one that comes with X.
> > 

Do you have dri enabled? AFAIK the display should be ok as long as you
don't play with dri. Otherwise unless things have changed, suspend
support is implemented by reseting dri on VT switch, which is why you
need to switch to console.

> > Has anyone else had and/or fixed this problem?  I can't seem to 
> figure it out.  
> > And "just switch to a console before you close the lid" isn't the 
> answer I'm 
> > looking for :)
> 
> i have similar issues with ati mach64 driver (and other various
> devices that don't like to suspend).
> 

For me it suspends fine as long as I don't play with dri. I wrote a
patch to the dri code that resets the card on vt switch like the Radeon
one. I don't know whats the state of current things though, I still
haven't  upgraded from the dri tree of mid January (actually two
branches ago, since mach64 changed branches and then went mainline).

I do need to check the new code, hope I will have some time soon.

> i have a whole suspend script that unloads some modules, shuts
> some things down, and changes the console to a text console
> before suspending.  is it acceptable to have it automatically
> switch vt's for you?
> 
> #!/bin/sh
> chvt 1
> echo 4 > /proc/acpi/sleep
> chvt 7
> 

Or to make this code snippet a little more flexible:

#!/bin/sh
ORIG_VT=`fgconsole`
chvt 9
echo 4 > /proc/acpi/sleep
chvt $ORIG_VT

> -- 
> ____________________}John Flinchbaugh{______________________
> | glynis@hjsoft.com         http://www.hjsoft.com/~glynis/ |
> ~~Powered by Linux: Reboots are for hardware upgrades only~~



Reply to: