Bug: Resume with Host Protected Area
Until today, I haven't been able to reliably put my ThinkPad T41 to sleep. After resuming, it generated lots of disk errors, and only a reboot would bring it back to sanity.
Today I finally realized what's going on. This laptop has a 3.5 GB protected area at the end of the drive. Linux disables the protection on bootup (making the whole drive available), but the laptop apparently re-enables the protection during the sleep cycle. So I moved my partitions out of the protected area and now the laptop finally resumes correctly. Yehaw!
The bugfix should be simple: call idedisk_check_hpa() during resume.
I'm not subscribed to this list, so please CC me on replies.
Shane
IMHO, if you are going to put live data in the HPA, you really should just kill the HPA permanently not depend on Linux to do a volitile reset on every reboot/resume.
See setmax at http://www.win.tue.nl/~aeb/linux/setmax.c
You can compile that and use it to permanently modify your HPA setting.
use the -m (--max) option to permanently modify your HPA setting.
You can also use -d to make volitile changes. IIRC, volitile changes to are reset on every power cycle of the drive.
HTH,
Greg
Signature · 1 line
Greg Freemyer
Quoted 21 lines · Shane Hathaway
Until today, I haven't been able to reliably put my ThinkPad T41 to sleep. After resuming, it generated lots of disk errors, and only a reboot would bring it back to sanity.
Today I finally realized what's going on. This laptop has a 3.5 GB protected area at the end of the drive. Linux disables the protection on bootup (making the whole drive available), but the laptop apparently re-enables the protection during the sleep cycle. So I moved my partitions out of the protected area and now the laptop finally resumes correctly. Yehaw!
The bugfix should be simple: call
idedisk_check_hpa()during resume.I'm not subscribed to this list, so please CC me on replies.
Shane
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Greg Freemyer The Norcross Group Forensics for the 21st Century
Quoted 5 lines · Greg Freemyer
IMHO, if you are going to put live data in the HPA, you really should just kill the HPA permanently not depend on Linux to do a volitile reset on every reboot/resume.
See setmax at http://www.win.tue.nl/~aeb/linux/setmax.c
Thanks for the pointer.
Still, I'm thinking of all the others who may have fallen into the same trap. I got into this situation purely by accident--I was never made aware of HPA at installation time; Linux must have disabled it automatically. Then it took me a year to guess that the problems with sleeping might be related to some peculiar messages I saw in the kernel logs.
The HPA support needs to be all or nothing: either Linux disables HPA automatically at boot *and* at resume, or it doesn't touch HPA at all. Also, HPA shouldn't be disabled without user consent. IBM put the Windows installer in my laptop's HPA rather than provide installation CDs. There were no partition table entries indicating there was anything stored at the end of the drive, so when I installed Linux, I wiped out the Windows installer without knowing it. IBM still hasn't sent the replacement CDs.
Shane