Bug 2576 - S3 suspend: LCD ON - Thinkpad X31, A31p, Dell i4000
Summary: S3 suspend: LCD ON - Thinkpad X31, A31p, Dell i4000
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Sleep-Wake (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Venkatesh Pallipadi
URL:
Keywords:
: 3572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-23 01:37 UTC by Anders Karlsson
Modified: 2005-08-31 19:05 UTC (History)
6 users (show)

See Also:
Kernel Version: 2.6.5
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
acpidmp output (230.68 KB, text/plain)
2004-04-23 01:51 UTC, Anders Karlsson
Details
Program to call VBE DPMS code (45.43 KB, application/octet-stream)
2004-11-19 05:11 UTC, Matthew Garrett
Details

Description Anders Karlsson 2004-04-23 01:37:06 UTC
Distribution: Debian Sarge
Hardware Environment: IBM Thinkpad X31 (2672-CDG)
Software Environment: XFree86 4.3, KDE 3.2, Gnome 2.4, all up to date as per
Debian apt-get
Problem Description: When putting the laptop to sleep, the backlight comes on
when the little 'half-moon' symbol starts blinking. The laptop is suspended, and
pressing the power button for a second will make it wake up. But with the
backlight on in suspended mode, it will eat battery much faster.

Steps to reproduce: echo 3 > /proc/acpi/sleep
Comment 1 Anders Karlsson 2004-04-23 01:51:24 UTC
Created attachment 2666 [details]
acpidmp output
Comment 2 Dimitris 2004-08-10 11:00:21 UTC
I can confirm that this problem exists on my A31p. After S3 suspend the
backlight is fully operational (even though the screen is blank) and consumes a
lot of power.
Comment 3 Len Brown 2004-11-03 19:09:23 UTC
*** Bug 3572 has been marked as a duplicate of this bug. ***
Comment 4 Len Brown 2004-11-03 19:14:03 UTC
per comments in bug 3572, does this command in X work?
xset dpms force off
and if so, does the display after that say blank on S3,
or does it get enabled during suspend and then say on?
Comment 5 Manu Thambi 2004-11-03 20:49:43 UTC
On a Dell Inspiron 4000, even if we turn off the display using  
"xset dpms force off" and then go into S3, the backlight comes 
back on when the computer reaches S3.  
Comment 6 Len Brown 2004-11-03 21:35:18 UTC
Consistent observation from Anders Karlsson:
"The xset command is one of the commands I had put in the sleep script.
 The backlight came on when the laptop entered S3 mode, then it stayed
 on. With the backlight on, the battery would drain much faster."
Comment 7 Matthew Garrett 2004-11-19 05:04:06 UTC
The console switch that ACPI performs just before suspend is likely to switch
the screen back on, even if it's blanked in X. Does putting this dpms binary in
PATH and executing 

chvt 12
dpms off 

during the suspend script result in the desired behaviour?
Comment 8 Matthew Garrett 2004-11-19 05:11:50 UTC
Created attachment 4085 [details]
Program to call VBE DPMS code
Comment 9 Manu Thambi 2005-01-04 18:39:19 UTC
Matthew, with the dpms binary you provided, the screen is off after suspend 
on Dell inspiron 4000.  
 
I ran the following command: 
 
chvt 12; dpms off; echo mem >/sys/power/state 
 
This suspends the computer with the display turned off. 
 
When the computer is brought back from suspend, the display remains off, even 
after tapping the keyboard/mouse. I had to use Ctrl-Alt-F7 to bring the 
display back. 
 
Hope this helps.  
Comment 10 Jakob Schi 2005-01-14 07:55:18 UTC
On my IBM Thinkpad T30, the backlight goes out when I close the lid, but once
the computer reaches S3 state, the backlight comes back on.  Sometimes the
screen is then white, sometimes a color, and occationally flashing in a not very
reassuring way :-(

I have tried to turn off the backlight manually with radeontool light off, this
of course turns off the light, but once the machine enters S3 and the half-moon
light comes on, the light comes back on :-(

This is by the way also mentioned on the Thinkpad Wiki, although that page
probably refers to two unrelated bugs, namely this one an bug 3022. 
http://www.thinkwiki.org/Problem_with_high_power_drain_in_ACPI_sleep

Comment 11 Dimitris 2005-01-14 09:36:13 UTC
This isn't a bug really. Linux just doesn't have the support for the special IBM
hardware thats on ThinkPads.

Windoze uses the "IBM PM" driver which does proper backlight switching, as well
as turning off the cpu fan (some of you may have noticed that the fan, once
started, never stops). The same counts for the Fn key combinations, bluetooth
enable-disable, ThinkLight enable-disable, etc.

I think the ibm-acpi project tries to deal with some of these problems, though
currently IBM hasn't released any specs. IBM is a big company and releasing
specs for hardware is a very lengthy process (which usualy never succeeds).

anyone willing to reverse engineer or dissassemble the IBM PM driver from
windoze? :]
Comment 12 Jakob Schi 2005-01-20 06:45:57 UTC
Well, if Windows does something better than Linux, then it is a bug :-)

Anyway, here is a WORKAROUND:

Switching off the backlight with radeontools just before suspending works, if in
text mode, but not when X is running.  I have modified my suspend script to
switch to virtual terminal 1 before suspending, and switch back to vt 7 after
waking up.  It would be even better if I knew a command for getting the current
virtual terminal number :-)

My /etc/acpi/suspend.sh script:

#!/bin/sh
# ACPI script suspending to RAM

logger "suspend.sh called"
logger "Lid `cat /proc/acpi/button/lid/LID/state`"
logger "Software suspend to ram."
sync
/sbin/hwclock --systohc
chvt 1
radeontool light off
	#sleep 1
echo -n 3 >/proc/acpi/sleep
/sbin/hwclock --adjust
/sbin/hwclock --hctosys
logger "Woke up from suspend."
radeontool light on
chvt 7


Speculation:

Perhaps the light is switched back on when the display mode is changed to text
immediately prior to suspending.  If the kernel code did not do this mode
change, the problem *might* be solved.

I use a somewhat dated Thinkpad T30 with a Radeon Mobility 7500.  I do not use
the framebuffer.  The battery consumption is still high, but that must be bug3022 hitting me.
Comment 13 Anders Karlsson 2005-06-04 06:42:23 UTC
Okay.

Same X31 hardware, now running Ubuntu Hoary, updated with all the latest
security fixes. Running custom kernel, 2.6.11.10 from kernel.org, with
swsuspend2 patched in, and the ibm_acpi module updated with the code from their
project pages.

I tried ACPI S3 mode today, and the backlight stays off. I will try a few more
times, but unless I add more comments, it works as intended.

/A
Comment 14 Venkatesh Pallipadi 2005-08-31 19:05:49 UTC
As this seems to be working for Andres with the workaround, I am closing the 
bug.

Thanks.

Note You need to log in before you can comment on or make changes to this bug.