Problem with display remaining black after resume

From ThinkWiki
Revision as of 04:09, 15 April 2006 by Wyrfel (Talk | contribs)
Jump to: navigation, search

There has been a problem encountered where the display stays black on resuming from suspend.

The symptom might have you think first that your system hang up, but you will realize that your ThinkPad works and you can even reset it via CtrlAltDel.

Affected Models

Affected Operating Systems

  • Linux (it's a kernel issue)

Solutions

Solution for ThinkPads with ATI graphic chips

One solution may be to provide the acpi_sleep=s3_bios kernel parameter in your kernel parameter line.

For grub this can look like this:

title           Linux, kernel 2.6.11-1-686
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.11-1-686 root=/dev/hda1 ro acpi_sleep=s3_bios
initrd          /boot/initrd.img-2.6.11-1-686
savedefault
boot

For lilo it can look like this:

image=/boot/vmlinuz
    append="acpi_sleep=s3_bios"

Additionally, in Ubuntu or Kubuntu it might be necessary modify /etc/default/acpi-support. Check to make sure that ACPI_SLEEP and SAVE_VBE_STATE are both uncommented and set to true. (If you are using this trick with Intel graphics chips, as suggested below, make sure that nothing with respect to VBE state is done--don't repost the video, don't save the VBE state.)

Otherwise see the example script below.

Another one solution will be to use vbetool. If you are using Debian with hibernate package just uncomment "EnableVbetool yes" in /etc/hibernate/hibernate.conf (or /etc/hibernate/ram.conf)

Solution for ThinkPads with Intel Extreme Graphics 2

NOTE!
On X40s/X41s - even with Intel Extreme Graphics - and for R52s with Intel Graphics Media Accelerator 900 the solution for ATI graphics chips above is reported to work. In this case, make sure no changes to VBE are made, especially no state saves and no reposts.

The following solution should work on 865G, 865GV, 855GM, 855GME, 852GME chipsets.

  • First of all, do not use the acpi_sleep=s3_bios kernel parameter.
  • Second, completely remove framebuffer support from your kernel. If it's built as modules, it is important that they do not get loaded at all.
  • Before suspending, change to a console and safe the video state with # cat /proc/bus/pci/00/02.0 > /tmp/video_state.
  • On resume, restore the video state with # cat /tmp/video_state > /proc/bus/pci/00/02.0 and change back to X.

The following example /etc/acpi/actions/sleep.sh script shows how to integrate the according lines.

#!/bin/bash

# change to console 1
FGCONSOLE=`fgconsole`
chvt 6

# safe video state
cat /proc/bus/pci/00/02.0 > /tmp/video_state

# sync filesystem
sync

# sync hardware clock with system time
hwclock --systohc

# go to sleep
echo -n 3 > /proc/acpi/sleep

# waking up
# restore system clock
hwclock --hctosys

# restore video state
cat /tmp/video_state > /proc/bus/pci/00/02.0

# change back to X
chvt $FGCONSOLE

# clean up behind us
rm /tmp/video_state

Solution for ThinkPads with Intel I830 Chipset

The following solution worked for me on an X30 with I830M chipset with kernel >= 2.6.16.

  • this works with vesafb and also with intelfb frambuffer support.

The following example /etc/acpi/actions/sleep.sh script shows how to integrate the according lines.

#!/bin/bash

FGCONSOLE=`fgconsole`
chvt 8
sync
hwclock --systohc

echo -n "mem" > /sys/power/state

hwclock --hctosys
vbetool post

if [ "$FGCONSOLE" -ge "7" ] ; then
  chvt $FGCONSOLE
else
  chvt 7
  chvt $FGCONSOLE
fi



FOOTNOTES [Δ]
  1. If you have this problem with R50e and the above solution doesn't work, try switching to console first. An example sleep script can be found here.