You are not logged in.

#1 2007-09-19 01:10:35

RobF
Member
Registered: 2006-10-10
Posts: 157

pm-utils - lid closure blanks screen, can't get screen back

My system: Dell Inspiron 6400 laptop with integrated Intel 945GM graphics chipset, i810 driver, slightly edited /etc/X11/xorg.conf and 915resolution patch applied to give me the native resolutioin of 1280x800.

While I used powersave and kpowersave-devel 0.7.2-1 with KDE 3.5.7 the screen would blank when I closed the lid of the laptop and the screen would come back to life when I reopened the lid.  Powersave has been superseded now by pm-utils and cpufrequtils (and acpid), and when I reopen the lid the screen remains blank.  The only way I can bring it back to life is by rebooting.  See below for how I have configured my system.

The default behavior of Macbooks and I believe also Dell laptops with Windows is to put the machine on standby when the lid is closed and to have it resume when the lid is reopened.  Can that be done in Arch with pm-utils and KPowersave in KDE 3.5.7?  One may need to modify the button/lid section in /etc/acpi/handler.sh.  What do I need to put there? 

The strange thing is that after I installed pm-utils but before I made most of the changes listed below that are mandated by the wikis, the lid closure was trapped correctly, I think: lid closure blanked the screen, put the machine on standby (but I'm not sure about that) and reopening the lid revived the screen, presented me with a login & password box and after login restored the system state.

=======================

My power management config:

1. Installed acpid, pm-utils and cpufrequtils.  KPowersave-devel 0.7.2 is also installed.

Hal is already on my list of DAEMONS in /etc/rc.conf, hence acpid doesn't have to be added there.

2. Configured pm-hibernate for suspend2disk:

Edited the kernel line in /boot/grub/menu.lst by adding 'resume=path_to_swap_partition', i.e.

kernel /boot/vmlinuz26 root=/dev/sda2 resume=/dev/sda5 ro vga=791

3. Configured cpufrequtils:

a. Added the driver "acpi-cpufreq" to the MODULES list in /etc/rc.conf.
b. To autoload the governor "on demand" added 'cpufreq_ondemand' to the MODULES list in /etc/rc.conf.
c. In addition, edited /etc/conf.d/cpufreq to include the "on demand" governor and the proper freqs for my dual-core CPU (got these values by running $ cpufreq-info.)

governor="ondemand"
min_freq="1GHz"
max_freq="1.67GHz"

d. Added 'cpufreq' to the list of DAEMONs in /etc/rc.conf (after 'hal').

e. In /etc/pm/config.d/ created a file 'config' and in it listed the modules to be unloaded before suspend, e.g.
SUSPEND_MODULES="button uhci_hcd"

5. Changed the labels for the power and sleep buttons in /etc/acpi/handler.sh, i.e. replaced PWRF with PBTN and SLPB with SBTN.

6. To at least be able to close the lid after I trigger Standby with the Fn-ESC hotkey and have the screen come back to life upon resuming I put the following shell script '000hacks' into /etc/pm/sleep.d/ and made it executable (vbetool is installed):

#!/bin/bash
case $1 in
    suspend)
        chvt 1
        vbetool vbestate save > /tmp/vbe
        ;;
    resume)
        vbetool post
        vbetool vbestate restore < /tmp/vbe
        chvt 7
        ;;
esac

Offline

#2 2007-09-19 04:28:36

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,428
Website

Re: pm-utils - lid closure blanks screen, can't get screen back

I recognize the 000hacks script.... big_smile

I got a bit lost in your description of the problem.  My laptop (Dell Latitude D520) only comes back to life only if it is suspended before I close the lid (using pm-utils via gnome-power-manager).  It does not work if I just close the lid.  Just to be clear, is this the same problem you are having?

Edit:  could you alos paste your pm-utils log file.

Last edited by Allan (2007-09-19 09:27:35)

Offline

#3 2007-09-19 17:50:42

RobF
Member
Registered: 2006-10-10
Posts: 157

Re: pm-utils - lid closure blanks screen, can't get screen back

When I posted the problem, I experienced the following symptoms:

1. When I close the lid the screen blanks and when I reopen the lid the screen remains blank.  I found three ways of bringing the blank screen back to life: a. reboot, b. if I had a root console open and the cursor was in that console, I can blindly type 'vbetool dpms on', followed by <ENTER>, and that'll restore the screen, c. I can hit Fn-ESC (i.e. go into Standby) and then press the power button to Resume, that'll bring the screen back.  Needless to say, this isn't as it should be.

2. When I FIRST go into Standby, then close the lid, then reopen the lid and press the power button to resume, I do get a live screen back.

Hence, my symptoms on both counts were exactly what you experience.

I've since found out how to correct this problem.  It appears that kpowersave (I'm using kpowersave-devel 0.7.2-1) actually has to be running (with the icon present in the task bar) for lid closure/reopening to work correctly.  The Process Table then indicates that kpowersave is running with the switch --force-acpi-check.  When it's not running, I get the symptoms described above.  When it's running, I can close the lid (screen blanks) and when I reopen the lid, I'm presented for 10 seconds with a login box that's on top of the screensaver background.  The box is saying "The session is locked" and it's asking me to login with username and password.  Once logged in, the full screen revives.  The 000hacks script in /etc/pm/sleep.d/ now isn't needed anymore.

I believe the industry standard for laptops with MacOSX and Windows is for the laptop to go into Standby (= Sleep) when the lid is closed and to fully come out of it when the lid is reopened.  I wonder if that can be set up for Arch, with or without kpowersave.

Robert

P.S. I couldn't find a pm-utils.log.  If you want /var/log/pm-suspend.log, here it is:

Wed Sep 19 13:34:56 EDT 2007: running suspend hooks.
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/00clear =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/01grub =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/05led =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/10NetworkManager =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/20video =====
kernel.acpi_video_flags = 0
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/49bluetooth =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/50modules =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/55battery =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/60sysfont =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/65alsa =====
===== Wed Sep 19 13:34:56 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/90clock =====
===== Wed Sep 19 13:34:57 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/94cpufreq =====
===== Wed Sep 19 13:34:57 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/95led =====
===== Wed Sep 19 13:34:57 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/99video =====
Wed Sep 19 13:34:57 EDT 2007: done running suspend hooks.
Wed Sep 19 13:35:23 EDT 2007: running resume hooks.
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/99video =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/95led =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/94cpufreq =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/90clock =====
===== Wed Sep 19 13:35:23 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/65alsa =====
===== Wed Sep 19 13:35:23 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/60sysfont =====
/usr/lib/pm-utils/sleep.d/60sysfont: line 7: setsysfont: command not found
===== Wed Sep 19 13:35:23 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/55battery =====
method return sender=:1.0 -> dest=:1.7
   boolean true
===== Wed Sep 19 13:35:23 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/50modules =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/49bluetooth =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/20video =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/10NetworkManager =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/05led =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/01grub =====
===== Wed Sep 19 13:35:24 EDT 2007: running hook: /usr/lib/pm-utils/sleep.d/00clear =====
Wed Sep 19 13:35:24 EDT 2007: done running resume hooks.

Offline

#4 2007-09-19 20:43:01

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: pm-utils - lid closure blanks screen, can't get screen back

Append this to your kernel line in GRUB's menu.lst:

highres=off nohz=off

This is a bug in the current kernel, something to do with the dynamic tick stuff they've been trying IIRC. Adding those options should make the kernel behave as it used to.

Offline

Board footer

Powered by FluxBB