Author Topic: How do I Disable Auto Resume from Hibernate?  (Read 699 times)

Offline ihyfr

  • Jr. Member
  • **
  • Posts: 16
  • טראכט גוט וועט זיין גוט, מיסטאמע
    • bitmote.com
How do I Disable Auto Resume from Hibernate?
« on: December 05, 2012, 12:08:58 PM »
I dual boot LXDE and Win7. I want to be able to hibernate from one and go to the other. Unfortunately LXDE resumes from hibernate immediately on startup. How can I get the grub menu like usual so I can hibernate LXDE and go into my Windows partition?
« Last Edit: December 05, 2012, 06:30:18 PM by ihyfr »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: How do I Disable Auto Resume from Hibernate?
« Reply #1 on: December 06, 2012, 01:04:30 AM »
When grub menu appears, choose the windows entry, if it is what you want and type the <Enter> key.     

Offline ihyfr

  • Jr. Member
  • **
  • Posts: 16
  • טראכט גוט וועט זיין גוט, מיסטאמע
    • bitmote.com
Re: How do I Disable Auto Resume from Hibernate?
« Reply #2 on: December 06, 2012, 02:57:20 AM »
That's the problem. I never see the GRUB menu. (Well, the grub menu actually flashes for an instant before resuming linux. )

I only have this problem after hibernating Linux.

I get the grub menu if I shutdown from Linux or Windows or if I hibernate Windows.

I actually assumed this was supposed to be a feature.

Switching the default OS didn't help.
« Last Edit: December 06, 2012, 03:17:18 AM by ihyfr »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: How do I Disable Auto Resume from Hibernate?
« Reply #3 on: December 06, 2012, 03:49:47 AM »
You should only see the grub menu when booting up, either on a reboot or a cold start.     

If you go into hibernate while running Linux, when you come out of hibernate, you will be returning to Linux. You cannot hibernate Linux and expect to go into windows on resuming.     

To go from Linux to windows, you need to reboot and choose windows at the grub menu.     

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10683
  • MLUs Forever!
Re: How do I Disable Auto Resume from Hibernate?
« Reply #4 on: December 06, 2012, 04:32:50 AM »
I dual boot LXDE and Win7. I want to be able to hibernate from one and go to the other. Unfortunately LXDE resumes from hibernate immediately on startup. How can I get the grub menu like usual so I can hibernate LXDE and go into my Windows partition?

Grub is the boot manager.
When you Hibernate, Grub is set to boot from the Hibernated OS on next launch.

It should be possible to use a second instance of Grub before the existing Grub, which could give you the option of the present Grub and a Windows boot.

It would be a bit much for most people to have to navigate through two boot managers to boot LXDE (Hibernated or not), but if you really need the option it should provide what you want.

« Last Edit: December 06, 2012, 04:50:08 AM by Just17 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3998
Re: How do I Disable Auto Resume from Hibernate?
« Reply #5 on: December 06, 2012, 05:14:49 AM »
It is dangerous to use one OS while another is suspended. When an OS comes out of hibernation it expects (and is entitled to expect) everything to be exactly as it was when it went into hibernation. If you run any other OS (even another install of the same OS) in the meantime you have changed the disc contents without the hibernating system's knowledge. When it tries to resume and finds things have suddenly changed it is likely to go into an emergency shutdown or crash (eg kernel panic) because something is clearly wrong and outside its control.

Always shut down an OS completely before booting another. You can use reboot to do this.

That Windows doesn't do it when chainloaded from Grub is an unfortunate limitation of booting Win via Grub. If Windows doesn't blue screen when you run Linux in between that is a bug in Windows.
« Last Edit: December 06, 2012, 05:23:09 AM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10683
  • MLUs Forever!
Re: How do I Disable Auto Resume from Hibernate?
« Reply #6 on: December 06, 2012, 06:00:29 AM »
kjpetrie,
               it is my understanding that the hibernation stores the OS state on the Swap partition.
Windows does not use the Swap partition.

How would the hibernated OS become corrupted by running Windows before booting the hibernated OS?

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: How do I Disable Auto Resume from Hibernate?
« Reply #7 on: December 06, 2012, 09:10:16 AM »
kjpetrie,
               it is my understanding that the hibernation stores the OS state on the Swap partition.
Windows does not use the Swap partition.

How would the hibernated OS become corrupted by running Windows before booting the hibernated OS?



If you had the Windows partition open in Linux before hibernating, and the contents changed, that could present some problems (but probably not catastrophic, in most cases).

More likely would be hardware drivers (between Windows and Linux) setting different values (firmwares, registers, etc.) that could create issues from OS to OS...

Offline ihyfr

  • Jr. Member
  • **
  • Posts: 16
  • טראכט גוט וועט זיין גוט, מיסטאמע
    • bitmote.com
Re: How do I Disable Auto Resume from Hibernate?
« Reply #8 on: December 06, 2012, 09:54:19 AM »
Well, if you can't tell me, whether for my safety or for lack of knowledge, I've found a somewhat silly workaround. I simply set a boot password on Linux. It tries to auto boot it and gets an error. I can then hit any key to return to the grub menu. So far neither system seems to mind.

I would like to note, I don't run anything critical and my files are generally saved. If something goes awry, I can always reboot. What strikes me as dangerous in my system, is how accidentally hitting logout instead of suspend immediately tosses out my session, or if I accidentally hit the power button it immediately shuts down. I suppose I should figure out how to change the behavior of my power button. The point is, auto resume from hibernate might be a sensible default feature, but I should be able to change it.
« Last Edit: December 06, 2012, 10:14:03 AM by ihyfr »

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: How do I Disable Auto Resume from Hibernate?
« Reply #9 on: December 06, 2012, 10:01:47 AM »
Inventive approach.  Good on you!

Let us know if anything untoward happens.

Good Luck
 ;D

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10683
  • MLUs Forever!
Re: How do I Disable Auto Resume from Hibernate?
« Reply #10 on: December 06, 2012, 12:24:58 PM »
Inventive approach.  Good on you!

Let us know if anything untoward happens.

Good Luck
 ;D

+1

Yeah, I would have gone with the dual Grub approach ......  the Linux Grub on the partition boot sector and the controlling Grub in the MBR ......  and not sure it would work even then  :D

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3998
Re: How do I Disable Auto Resume from Hibernate?
« Reply #11 on: December 06, 2012, 04:57:24 PM »
Consider what suspend to disc/hibernation is. You store all the registers, data in buffers, RAM contents, filesystem state, hardware set-ups, absolutely every thing in a special file and then cut the power. On resume, the system loads all this back into its appropriate places and tries to carry on from where it left off. It quickly discovers the hardware clock has changed and corrects its time, but if anything else has changed it won't know about it until an error occurs when it tries to use the device or access the file, write out buffers or whatever, and the disc state is not what it should be, causing errors the system can't explain except by assuming a major hardware fault or data corruption has occurred. At that point, any kernel must conclude it is unsafe to continue processing data in the inexplicably changed environment and can only dump debugging information and exit to protect data from further damage and aid a proper investigation.

It is possible you might escape this if the two systems have no shared partitions, but I'm not even sure about that. From a kernel's viewpoint, something has changed over which it had no control and that indicates something is seriously wrong, since the kernel is supposed to be in total control of the system. Any decent kernel should not tolerate such changes. As I recall, Windows will blue screen and Linux will ooops if you do this, and so they should.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf