vbestate handling is broken in sleep/resume (Presario 700)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpi-support (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
On my Presario 700, the consoles stay black after resume. I commented out the actual sleep trigger in sleep.sh to see if there was a hardware sleep issue, but no, the problem still appeared. In particular, the order and ways the vgastate is saved and restored, and in which mode, seems a little strange to me. I have tried to find documentation, but found nothing than the scripts themselves.
Looking at init.d/vbesave, prepare.sh and resume.sh I see:
If SAVE_VBE_STATE is set (in /etc/default/
1) save the vbestate at boot (before starting X)
2) save the vbestate before sleeping (which makes (1) pointless) unless vbemode=3
When it comes to the vbemode, I don't understand fully. Comments in prepare.sh explains that VESA modes are vbemode not equal "3".
So in case of vbemode !=3 (VESA)
set mode to 3
save state
(sleep and wake up)
set mode to original mode*
restore state
In case of vbemode =3
(do not save)
(sleep and wake up)
restore state from boot
*For me it sounds more natural to save and restore the state in the same mode, and then switch back to the original mode. But I don't know these things.
For my laptop, the state at booting is 16334 (IIRC). When I comment out the "save state" above, it works correctly, resume restores the state saved at boot, and the consoles are fine. So the problem seems to be that the state is saved in the "3" mode and restored in a non-"3" mode.
Please tell if I can provide more information, but be patient, since the laptop is not on internet...
Changed in acpi-support: | |
assignee: | nobody → mjg59 |
description: | updated |
Changed in acpi-support: | |
status: | In Progress → Fix Released |
You're absolutely right, this is broken. Does it work if you edit resume.sh and change that block to read
# Attempt to restore some video card state
if [ x$SAVE_VBE_STATE = xtrue ]; then
vbetool vbestate restore <$VBESTATE
if [ $VBEMODE != "3" ]; then
vbetool vbemode set $VBEMODE;
fi
fi
? The reason to move back to mode 3 is that it's easier to try to get the card into text mode and work from there than it is to reinitialise directly into the vesa mode.