You are not logged in.

#1 2012-05-14 07:15:16

Narga
Member
From: Hải Phòng, Việt Nam
Registered: 2011-10-06
Posts: 60
Website

When use battery, my laptop suspend after 1s inactive

My laptop is Acer 4738, I've installed ArchLinux since 10 months ago and use AC Line almost time. Today, I'm using battery but it't become suspend too short, just 1s after system inactived. I've installed acpid only. Here is my cat /var/log/pm-suspend.log

[narga@ARCH-NARGA ~]$ cat /var/log/pm-suspend.log 
disabled, not active

/usr/lib/pm-utils/sleep.d/01laptop-mode resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub resume suspend:

/usr/lib/pm-utils/sleep.d/01grub resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave resume suspend:

/usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging resume suspend:

/usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
Sat May 12 09:46:12 ICT 2012: Finished.
Initial commandline parameters: 
Sat May 12 23:21:00 ICT 2012: Running hooks for suspend.
Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:
Linux ARCH-NARGA 3.3.5-1-ARCH #1 SMP PREEMPT Mon May 7 19:57:51 CEST 2012 x86_64 Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz GenuineIntel GNU/Linux
Module                  Size  Used by
snd_hda_codec_hdmi     24120  1 
snd_hda_codec_realtek   114123  1 
arc4                    1410  2 
iwlwifi               253205  0 
snd_hda_intel          23989  4 
snd_hda_codec          92713  3 snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
uvcvideo               67853  0 
i915                  432462  3 
videobuf2_vmalloc       2276  1 uvcvideo
videobuf2_memops        2182  1 videobuf2_vmalloc
videobuf2_core         20415  1 uvcvideo
acer_wmi               19581  0 
videodev               83373  1 uvcvideo
mac80211              391455  1 iwlwifi
joydev                  9991  0 
sparse_keymap           3056  1 acer_wmi
snd_hwdep               6556  1 snd_hda_codec
snd_pcm                74812  3 snd_hda_codec,snd_hda_intel,snd_hda_codec_hdmi
snd_page_alloc          7217  2 snd_pcm,snd_hda_intel
snd_timer              19222  1 snd_pcm
snd                    59656  15 snd_timer,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
i2c_algo_bit            5359  1 i915
drm_kms_helper         26947  1 i915
intel_agp              10872  1 i915
i2c_i801                8116  0 
v4l2_compat_ioctl32     8348  1 videodev
iTCO_wdt               12877  0 
media                  10469  2 videodev,uvcvideo
intel_gtt              14007  3 intel_agp,i915
drm                   204375  4 drm_kms_helper,i915
soundcore               6082  1 snd
cfg80211              176857  2 mac80211,iwlwifi
atl1c                  32966  0 
iTCO_vendor_support     1929  1 iTCO_wdt
i2c_core               20593  6 drm,i2c_i801,drm_kms_helper,i2c_algo_bit,videodev,i915
serio_raw               4653  0 
evdev                   9402  19 
rfkill                 15604  2 cfg80211,acer_wmi
processor              26144  2 
mxm_wmi                 1425  0 
wmi                     8475  2 mxm_wmi,acer_wmi
thermal                 7959  0 
ac                      2376  0 
video                  11243  1 i915
battery                 6485  0 
button                  4502  1 i915
pcspkr                  1835  0 
psmouse                69539  0 
coretemp                5622  0 
vboxdrv              1792230  0 
fuse                   68162  16 
ext4                  424467  2 
crc16                   1359  1 ext4
jbd2                   71704  1 ext4
mbcache                 5977  1 ext4
usbhid                 36142  0 
hid                    84549  1 usbhid
sd_mod                 28059  10 
sr_mod                 14823  0 
cdrom                  35744  1 sr_mod
uhci_hcd               23372  0 
ahci                   20261  10 
libahci                19999  1 ahci
libata                167083  2 libahci,ahci
scsi_mod              133422  3 libata,sr_mod,sd_mod
ehci_hcd               44072  0 
usbcore               146847  5 ehci_hcd,uhci_hcd,usbhid,uvcvideo
usb_common               954  1 usbcore
             total       used       free     shared    buffers     cached
Mem:       3982356    3858152     124204          0     185576     353924
-/+ buffers/cache:    3318652     663704
Swap:      4169752     880728    3289024

/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:

/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub suspend suspend:

/usr/lib/pm-utils/sleep.d/01grub suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/01laptop-mode suspend suspend:

/usr/lib/pm-utils/sleep.d/01laptop-mode suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/11netcfg suspend suspend:

/usr/lib/pm-utils/sleep.d/11netcfg suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend:

/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:

/usr/lib/pm-utils/sleep.d/75modules suspend suspend: success.
Running hook /etc/pm/sleep.d/90alsa suspend suspend:

/etc/pm/sleep.d/90alsa suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:

/usr/lib/pm-utils/sleep.d/90clock suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend:

/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95led suspend suspend:

/usr/lib/pm-utils/sleep.d/95led suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
Kernel modesetting video driver detected, not using quirks.

/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:
kernel.acpi_video_flags = 0

/usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Sat May 12 23:21:02 ICT 2012: performing suspend

It's happend again and again. I can't find the 'cause of this problem. Can you help me?

Last edited by Narga (2012-05-14 07:16:07)

Offline

#2 2012-05-14 14:59:00

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: When use battery, my laptop suspend after 1s inactive

The actions are defined in /etc/acpi/handler.sh . Just look at the action taken when you laptop is on battery and correct it. Note that if you use a complex desktop like Gnome or KDE these ones might do something; I cannot help you about these desktop environments. If you are in doubt, try a simple window manager to see where the problem come from

Last edited by olive (2012-05-14 14:59:44)

Offline

#3 2012-05-15 02:02:10

Narga
Member
From: Hải Phòng, Việt Nam
Registered: 2011-10-06
Posts: 60
Website

Re: When use battery, my laptop suspend after 1s inactive

Here is my /etc/acpi/handler.sh

#!/bin/sh
# Default acpi script that takes an entry for all actions

minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"

set $*

case "$1" in
    button/power)
        #echo "PowerButton pressed!">/dev/tty5
        case "$2" in
            PBTN|PWRF)  logger "PowerButton pressed: $2" ;;
            *)          logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/sleep)
        case "$2" in
            SLPB|SBTN)   echo -n mem >/sys/power/state ;;
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;
    ac_adapter)
        case "$2" in
            AC|ACAD|ADP0)
                case "$4" in
                    00000000)
                        echo -n $minspeed >$setspeed
                        #/etc/laptop-mode/laptop-mode start
                    ;;
                    00000001)
                        echo -n $maxspeed >$setspeed
                        #/etc/laptop-mode/laptop-mode stop
                    ;;
                esac
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    battery)
        case "$2" in
            BAT0)
                case "$4" in
                    00000000)   #echo "offline" >/dev/tty5
                    ;;
                    00000001)   #echo "online"  >/dev/tty5
                    ;;
                esac
                ;;
            CPU0)	
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/lid)
       	case "$3" in
	    close)
		#echo "LID closed!">/dev/tty5
        DISPLAY=:0.0 su -c - narga /usr/bin/slimlock &
        if [[ `cat /proc/acpi/button/lid/LID/state | awk '{print $2}'` = "closed" ]]
        then
		/usr/sbin/pm-suspend
        fi
        ;;
	    open)
		#echo "LID opened!">/dev/tty5
        	;;
	esac
	;;

    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

I'm use XFCE 4.10 and Openbox, not Gnome or KDE. This problem occurring when using AC Line then disconnect or power down. If I use battery from beginning or reboot, it's not happened.

Offline

#4 2012-05-15 06:30:59

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: When use battery, my laptop suspend after 1s inactive

It does not seems to come from this file strangely. I suggest you make some experiments to see where the problem come from. First put

exit 0

at the beginning of /etc/acpi/handler.sh to disable it and see if the problem persists. You can type as root

 acpi_listen 

to see the acpi events. If the problem still persits after having disabled /etc/acpi/handler.sh then it is probably XFCE taking action. To be sure try to boot with a plain window manager like twm (or openbox without xfce). The problem might come from the Bios too but I do not know your laptop model.

Offline

#5 2012-05-15 07:03:38

Narga
Member
From: Hải Phòng, Việt Nam
Registered: 2011-10-06
Posts: 60
Website

Re: When use battery, my laptop suspend after 1s inactive

I've tried as you said, it's still occurred. Sometime, I got the notice about my laptop battery was emptied. May be it's a problem because when I test like you said, the laptop battery has 90%. I've changed the time to put my laptop asleep to 20 minutes, the current setting is never then it's not happened again.
I've installed powertop-git from aur then config all the setting that's can changable. It works like charm. I guess it's not a good solution but now it's works. Thanks for your support.

Offline

Board footer

Powered by FluxBB