Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150028 - Laptop display power saving is disabled when [dis]connecting power cable (display turned on and stays on forever)
Summary: Laptop display power saving is disabled when [dis]connecting power cable (dis...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-04 00:30 UTC by Erik
Modified: 2009-05-30 16:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik 2006-10-04 00:30:40 UTC
With recent software versions a certain problem has started to occur. I have a laptop (Dell INSPIRON | 8600) with a LCD. When the LCD is turned off and I connect or disconnect the power cable, the LCD is turned on! Then it stays on forever (at least until I do something with the mouse or keyboard and then wait for the timeout). (If the display is already on when the power is connected or disconnected, the same problem occurs.) In KControl under "Peripherals"->"Display"->"Power Control" I have the following settings:
[X] "Enable display power management"
"Standby after:" 1 min
"Suspend after:" 1 min
"Power off after:" 1 min

Package settings:
[ebuild   R   ] sys-kernel/gentoo-sources-2.6.17-r8  USE="-build -symlink (-ultra1)"
[ebuild   R   ] sys-fs/udev-087-r1  USE="(-selinux)"
[ebuild   R   ] x11-base/xorg-server-1.1.1-r1  USE="dri ipv6 nptl sdl xorg -3dfx -debug -dmx -kdrive -minimal -xprint" INPUT_DEVICES="keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -evdev -fpit -hyperpen -jamstudio -joystick -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse -void -wacom" VIDEO_CARDS="radeon -apm -ark -chips -cirrus -cyrix -dummy -epson -fbdev -fglrx -glint -i128 -i740 -i810 (-impact) -imstt -mach64 -mga -neomagic (-newport) -nsc -nv -nvidia -r128 -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vesa -vga -via -vmware -voodoo"
[ebuild   R   ] kde-base/kdelibs-3.5.4-r2  USE="acl alsa arts cups doc fam jpeg2k kdeenablefinal kdehiddenvisibility kerberos openexr spell ssl tiff xinerama zeroconf -debug -legacyssl -lua -noutempter"
[ebuild   R   ] kde-base/kcontrol-3.5.4  USE="arts kdeenablefinal kdehiddenvisibility opengl ssl xinerama -debug -ieee1394 -logitech-mouse"

"/usr/src/linux" points to "linux-2.6.17-gentoo-r8".
Comment 1 Joshua Baergen (RETIRED) gentoo-dev 2006-10-04 07:27:15 UTC
Any guess as to which update broke this?

Also, check dmesg for events when you disconnect your power cable.
Comment 2 Erik 2006-10-04 13:11:10 UTC
No, I do not know which update it was since it has happened for a while. It might have been a kernel update, X or something else. dmesg says nothing special. I used tail -f /var/log/messages:
After disconnect:
Oct  4 22:08:20 localhost logger: ACPI group ac_adapter / action ac_adapter is not defined
Oct  4 22:08:20 localhost logger: ACPI group battery / action battery is not defined
Oct  4 22:08:20 localhost logger: ACPI group processor / action processor is not defined
Oct  4 22:08:23 localhost logger: ACPI group battery / action battery is not defined
Oct  4 22:08:23 localhost logger: ACPI group battery / action battery is not defined


After connect:
Oct  4 22:08:36 localhost logger: ACPI group processor / action processor is not defined
Oct  4 22:08:36 localhost logger: ACPI group ac_adapter / action ac_adapter is not defined
Oct  4 22:08:36 localhost logger: ACPI group battery / action battery is not defined
Oct  4 22:08:40 localhost logger: ACPI group battery / action battery is not defined
Oct  4 22:08:40 localhost logger: ACPI group battery / action battery is not defined
Comment 3 Joshua Baergen (RETIRED) gentoo-dev 2006-12-17 08:30:18 UTC
Sorry for the long wait.

Do you run acpid as part of your boot?  Also, please post your 'emerge --info'.
Comment 4 Erik 2006-12-17 12:50:16 UTC
# rc-update show|grep acpid
               acpid |      default
# emerge --info
Portage 2.1.1-r2 (default-linux/x86, gcc-4.1.1, glibc-2.4-r4, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 Intel(R) Pentium(R) M processor 1.60GHz
Gentoo Base System version 1.12.6
Last Sync: Fri, 15 Dec 2006 04:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/grass60/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/"
LANG="swedish"
LINGUAS="sv de"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/portage_tmpdir"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d a52 aac acl ada alsa apache2 arts athena audiofile authdaemond bash-completion berkdb bitmap-fonts bzip2 canna cdda cddb cdio cdparanoia cli cracklib crypt css cups curl dga dhcp directfb dlloader doc dri dts dvb dvd dvdread elibc_glibc emacs encode expat fam fbcon ffmpeg firebird firefox flac fortran freewnn gcj ggi gif gmp gnutls gpm guile hal howl httpd i8x0 iconv imlib input_devices_keyboard input_devices_mouse ipv6 isdnlog javascript jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kerberos kernel_linux krb4 lcms ldap leim lesstif libg++ libsamplerate linguas_de linguas_sv mad matroska mikmod mjpeg mmx mng mp3 mpeg mule musepack musicbrainz mysql ncurses nls nptl nptlonly nsplugin odbc ogg openexr opengl pam pcmcia pcre pdf perl php physfs png portaudio postgres povray pppd python qt3 qt4 quicktime quotas readline reflection samba sasl sdl session slp sndfile speex spell spl sql sse sse2 ssl stream subversion svg tcpd theora tidy tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l vcd vda video_cards_radeon vorbis wifi win32codecs wmf xanim xface xine xinerama xml xorg xv zeroconf zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 5 Erik 2006-12-18 16:38:02 UTC
Some more information:
I just want 2 simple things; that the display is turned off after 1 minute of inactivity and when the lid button is pressed. And it should stay off until I touch the keyboard or mouse. Neither work. I just waited a minute. The display was turned off as it should. Then I pulled out the power cable and Gentoo immediately turned on the backlight for me!!! That is definitely not what I want. It was just the backlight that went on, not the pixels. That state is totally useless. Why would anyone ever want the backlight on without a picture? I tried it again and the same thing happened. Now I left the power cable disconnected and waited a minute. The display was turned off. When I connected the cable again, the backlight (and only the backlight) was turned on!!!

Then I waited a minute again and the display was turned off. Then I closed the lid (not really, I just pressed the lid button). Even this turned on the backlight for me!!! Then I held down the lid button and waited until the display was turned off. Then I released the lid button and guess what ...? The backlight was turned on (of course)!!!

When I press the lid button I get the following in /var/log/acpid:
[Tue Dec 19 01:20:53 2006] received event "button/lid LID 00000080 0000000e"
[Tue Dec 19 01:20:53 2006] notifying client 6176[0:0]
[Tue Dec 19 01:20:53 2006] executing action "/etc/acpi/default.sh button/lid LID 00000080 0000000e"
[Tue Dec 19 01:20:53 2006] BEGIN HANDLER MESSAGES
[Tue Dec 19 01:20:53 2006] END HANDLER MESSAGES
[Tue Dec 19 01:20:53 2006] action exited with status 0
[Tue Dec 19 01:20:53 2006] executing action "/etc/acpi/actions/lm_lid.sh button/lid LID 00000080 0000000e"
[Tue Dec 19 01:20:53 2006] BEGIN HANDLER MESSAGES
Laptop mode disabled, not active [unchanged].
[Tue Dec 19 01:20:54 2006] END HANDLER MESSAGES
[Tue Dec 19 01:20:54 2006] action exited with status 0
[Tue Dec 19 01:20:54 2006] completed event "button/lid LID 00000080 0000000e"

When I release it again I get this:
[Tue Dec 19 01:20:56 2006] received event "button/lid LID 00000080 0000000f"
[Tue Dec 19 01:20:56 2006] notifying client 6176[0:0]
[Tue Dec 19 01:20:56 2006] executing action "/etc/acpi/default.sh button/lid LID 00000080 0000000f"
[Tue Dec 19 01:20:56 2006] BEGIN HANDLER MESSAGES
[Tue Dec 19 01:20:56 2006] END HANDLER MESSAGES
[Tue Dec 19 01:20:56 2006] action exited with status 0
[Tue Dec 19 01:20:56 2006] executing action "/etc/acpi/actions/lm_lid.sh button/lid LID 00000080 0000000f"
[Tue Dec 19 01:20:56 2006] BEGIN HANDLER MESSAGES
Laptop mode disabled, not active [unchanged].
[Tue Dec 19 01:20:56 2006] END HANDLER MESSAGES
[Tue Dec 19 01:20:56 2006] action exited with status 0
[Tue Dec 19 01:20:56 2006] completed event "button/lid LID 00000080 0000000f"


The last number (0000000e when pressed and 0000000f when released) is just a (hexadecimal) counter that is incremented each time the button is pressed or released, so on the next press it will be 00000010. I looked what "client 6176[0:0]" could possibly meand and "ps ax|grep 6176" shows /usr/bin/X, so X is notified, but it simply does not obey.

In /proc/acpi/button/lid/LID/state the state of the lid button can be observed as "state:      open" or "state:      closed".

Setting in /etc/X11/xorg.conf:
Section "ServerFlags"
	Option "off time" "1"
EndSection

Settings in kcontrol->Peripherals->Display->Power Control:
[X] Enable display power management
Standby after: Disabled
Suspend after: Disabled
Power off after: 1 min

Settings in kcontrol->Power Control->Battery->Laptop Battery->Battery:
[X] Show battery monitor
[ ] Notify me whenever my battery becomes fully charged
[ ] Use blank screen saver when running on battery
Check status every: 20 sec

Kernel configuraion:
--- Power Management support
[ ]   Legacy Power Management API
[ ]   Power Management Debug Support
[*]   Software Suspend

[*] ACPI Support
 [*]   Sleep States
 [ ]     /proc/acpi/sleep (deprecated)
 <M>   AC Adapter
 <M>   Battery
 <M>   Button
 <M>   Video
 < >   Generic Hotkey (EXPERIMENTAL)
 <M>   Fan
 < >   Dock
 <*>   Processor
 <*>     Thermal Zone
 < >   ASUS/Medion Laptop Extras
 < >   IBM ThinkPad Laptop Extras
 < >   Toshiba Laptop Extras
 (0)   Disable ACPI for systems before Jan 1st this year
 [ ]   Debug Statements
 < >   ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)
 < >   Smart Battery System (EXPERIMENTAL)

# cat --number Xorg.0.log|egrep "\(EE\)|\(WW\)|acpid|OffTime"
    13          (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    32  (**) Option "OffTime" "1"
    33  (II) Open ACPI successful (/var/run/acpid.socket)
   522  (WW) RADEON(0): Bad V_BIOS checksum
   565  (WW) RADEON(0): Unknown DDCType 6 found
   566  (WW) RADEON(0): LCD DDC Info Table found!
   590  (WW) RADEON(0): Failed to detect secondary monitor, MergedFB/Clone mode disabled
   783  (WW) RADEON(0): DRI init changed memory map, adjusting ...
   784  (WW) RADEON(0):   MC_FB_LOCATION  was: 0xd7ffd000 is: 0xd7ffd000
   785  (WW) RADEON(0):   MC_AGP_LOCATION was: 0xffffffc0 is: 0xe07fe000
   849  (WW) AIGLX: 3D driver claims to not support visual 0x23
   850  (WW) AIGLX: 3D driver claims to not support visual 0x24
   851  (WW) AIGLX: 3D driver claims to not support visual 0x25
   852  (WW) AIGLX: 3D driver claims to not support visual 0x26
   853  (WW) AIGLX: 3D driver claims to not support visual 0x27
   854  (WW) AIGLX: 3D driver claims to not support visual 0x28
   855  (WW) AIGLX: 3D driver claims to not support visual 0x29
   856  (WW) AIGLX: 3D driver claims to not support visual 0x2a
   857  (WW) AIGLX: 3D driver claims to not support visual 0x2b
   858  (WW) AIGLX: 3D driver claims to not support visual 0x2c
   859  (WW) AIGLX: 3D driver claims to not support visual 0x2d
   860  (WW) AIGLX: 3D driver claims to not support visual 0x2e
   861  (WW) AIGLX: 3D driver claims to not support visual 0x2f
   862  (WW) AIGLX: 3D driver claims to not support visual 0x30
   863  (WW) AIGLX: 3D driver claims to not support visual 0x31
   864  (WW) AIGLX: 3D driver claims to not support visual 0x32
   917  (II) Open ACPI successful (/var/run/acpid.socket)

# grep button /etc/modules.autoload.d/kernel-2.6
button

# lsmod|grep button
button                  4880  0

# uname -a
Linux localhost 2.6.18-gentoo-r4 #2 Tue Dec 19 00:42:42 CET 2006 i686 Intel(R) Pentium(R) M processor 1.60GHz GenuineIntel GNU/Linux
Comment 6 Erik 2006-12-18 17:46:06 UTC
And now it happened again that the display is just not turned off at all! It would stay on indefinitely if i did not go to kcontrol->Peripherals->Display->Power Control, change something, change it back and press Apply. I have to keep the dialog open all the time and do that once in a while.

But why should I have to keep the dialog open all the time and switch to it several times per day just to uncheck a ckeckbox, check it again and press Apply?
Comment 7 Erik 2006-12-26 12:15:43 UTC
Sometimes when the display should have been off, it shows some kind of idle animation. It is a strange looking X at random position and size, on black background. I have never configured it like that. Why is it shown? How do I remove it? I really need to put an end to all this craziness now!
Comment 8 Erik 2006-12-27 04:40:43 UTC
Now I unmerged laptop-mode-tools just to make sure it is not guilty of this. Then I rebooted to be certain that it was not active any more. I logged in and waited until the display was turned off. Then I disconnected the power cable. This turned on the display with the mysterious idle animation (white X on black background). I waited until it was turned off again and connected the power cable. This time only the backlight was turned on, not the idle animation.
Comment 9 Joshua Baergen (RETIRED) gentoo-dev 2007-01-13 18:32:48 UTC
Please unmask media-libs/mesa-6.5.2 and x11-base/xorg-server-1.1.99.903-r1 and give them a try, then re-open this bug with the results.  Thanks!
Comment 10 Erik 2007-01-16 20:28:18 UTC
No, xorg-server-1.1.99.903-r1 did not help. It even locked the system. The display was black and neither Ctrl+Alt+F1 nor Ctrl+Alt+Backspace worked. Ctrl+Alt+Delete worked though. When the system was rebooting again, I pressed I and skipped the service xdm. I looked at /var/log/kdm.log and the last line said:
/usr/bin/X: symbol lookup error: /usr/lib/xorg/modules/extensions//libdri.so: undefined symbol: drmSetServerInfo

I removed the unmasking of xorg-server-1.1.99.903-r1 and emerged. Then I was running the stable xorg-server with mesa-6.5.2. The display backlight problem was still present though. Now I am back with stable mesa also.

The log file reveals something that might be interesting. I typed tail -f /var/log/kdm.log, waited until the display turned off, pulled the power cable (this time I got the idle animation). I moved the mouse to get the desktop back. Then I saw that tail had delivered a few more lines during this excercise:
(**) RADEON(0): RADEONSaveScreen(2)
(**) RADEON(0): RADEONDisplayPowerManagementSet(3,0x0)
(**) RADEON(0): RADEONDisplayPowerManagementSet(0,0x0)

I do not know what these lines mean, or which event caused them.
Comment 11 Erik 2007-01-26 10:31:17 UTC
Normally "xset q" reports:
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 60
  DPMS is Enabled
  Monitor is On

But when the problem with the display occurs I can observe that it reports the following instead:
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 60
  DPMS is Disabled

After reapplying the settings in the kontrollcenter, "xset q" reports that it is all right again. If only I could find out what is messing around with my setting on the sly! Maybe you should add a system service that calls "xset +dpms" every minute? Then I would be able to get something that fights back the madness.
Comment 12 Grzegorz {NineX} Krzystek 2007-01-29 08:23:46 UTC
this is not gentoo specific bug.
see http://bugs.freedesktop.org/show_bug.cgi?id=5665
Comment 13 Grzegorz {NineX} Krzystek 2007-01-29 08:27:23 UTC
this is a xserver error.
xserver interprets all acpi actions as input.
trye this:
startx -- -noacpi
sholud help
Comment 14 Erik 2007-01-29 23:13:01 UTC
(In reply to comment #13)
> this is a xserver error. xserver interprets all acpi actions as input.

Well, not completely. For actual input, it turns on the whole display, not just the backlight. The xserver is apparently scizophrenic; the part that handles the backlight interprets acpi actions as input, but not the part that handles the pixels.


> trye this:
> startx -- -noacpi

This seems to be a workaround, thanks! To make it permanent I had to add Option "NoPM" to xorg.conf (as described at [http://lists.debian.org/debian-x/2006/11/msg00415.html]). Now the backlight does not turn on when I [dis]connect the power cable. I will see if it works reliably during the next time.

Any chance you have a workaround for the lid button problem too? :-) I remember the first Gentoo LiveCD I installed from in late 2004 could handle that (although with some delay), but it never worked on the installed system.
Comment 15 Erik 2007-02-17 12:24:02 UTC
After using it for a while, I can report that the "NoPM" workaround at least keeps the backlight in sync with the display. So no more "backlight only" behaviour. But something is still tampering with the settings on the sly. The display just refuses to turn off sometimes. I check with "xset q" and it says:
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 60
  DPMS is Disabled

I have noticed that executing "xset +dpms" fixes so that "xset q" reports what I expect the setting to be:
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 60
  DPMS is Enabled
  Monitor is On
But unfortunately this does not actually cause the display to turn off! For that I still have to go into kcontrol, change something, change it back and apply.
Comment 16 Erik 2008-10-29 07:48:56 UTC
This may have been caused by the following xorg bugs, which are now fixed:
https://bugs.freedesktop.org/show_bug.cgi?id=13962
https://bugs.freedesktop.org/show_bug.cgi?id=5665