Public bug reported:

Some background: this is an Athlon 64 X2 system running Ubuntu Feisty.  Budget 
ECS RS485M-M motherboard with onboard ATI graphics:
  01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 
200]

I've had a rough time getting suspend-to-RAM to work.  First of all, the system 
CRASHES if "vbetool post" is run.  I eventually figured out that I could use 
uswsusp to suspend, provided I execute the following commands:
  /bin/s2ram -f -s # saves and restores VBESTATE
  /usr/sbin/vbetool dpms on # display won't come back on without this

So, I figured that I should be able to make suspend work within the framework 
of the ACPI suspend script (/etc/acpi/sleep.sh) by simply editing a few 
parameters in /etc/default/acpi-support:
  POST_VIDEO=false
  USE_DPMS=true
  SAVE_VBE_STATE=true

To my surprise, this didn't work!  I eventually tracked down the culprit
in the VBE save/restore scripts: /etc/acpi/suspend.d/80-video-vesa-
state.sh and /etc/acpi/resume.d/17-video-restore.sh

Here's the default 80-video-vesa-state.sh script:
> #!/bin/sh
> 
> if [ x$SAVE_VBE_STATE = "xtrue" ]; then
>   # Check if we're in a VESA mode - if so, we need to do things more
>   # awkwardly. Otherwise, just use the state from boot.
>   VBEMODE=`vbetool vbemode get`;
>   if [ $VBEMODE != "3" ]; then
>     vbetool vbemode set 3;
>     vbetool vbestate save >$VBESTATE;
>   fi
> fi

Basically, this script *DOES NOT ACTUALLY SAVE THE VESA STATE* if we are
in VBEMODE=3 (which indicates a non-VESA mode).  Rather, it assumes that
an appropriate state was saved at boot time.  Which is not the case on
*ANY* of my Ubuntu Feisty machines.  So, when the system comes back up
and runs the restore script, there is no saved state to restore!!!  Does
anyone know where the boot-time save is *SUPPOSED TO* occur?

I have fixed this bug with a very slight alteration to 
/etc/acpi/suspend.d/80-video-vesa-state.sh.  I modify the script so that it 
ALWAYS saves the vbestate if SAVE_VBE_STATE=true:
> #!/bin/sh
> 
> if [ x$SAVE_VBE_STATE = "xtrue" ]; then
>   # Check if we're in a VESA mode - if so, we need to do things more
>   # awkwardly. Otherwise, just use the state from boot.
>   VBEMODE=`vbetool vbemode get`;
>   if [ $VBEMODE != "3" ]; then
>     vbetool vbemode set 3;
>   fi
>   vbetool vbestate save >$VBESTATE;
> fi

With this modification, my system suspends and restores flawlessly from
the GNOME menu, or by directly invoking the acpi-support scripts.  How
does it work for others?  I don't think it should break anyone's system,
since at worst it redundantly saved the VBESTATE a second time.

** Affects: acpi-support (Ubuntu)
     Importance: Undecided
         Status: New

-- 
incorrect assumption about saved VESA state
https://bugs.launchpad.net/bugs/128323
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to