Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Suspend on lid-close not working

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
potuz
Guru
Guru
Posts: 378
Joined: Sat Jan 30, 2010 2:00 am

Suspend on lid-close not working

  • Quote

Post by potuz » Mon Aug 05, 2013 5:46 pm

Hello list. This is a newly installed Samsung laptop. When I just installed it the laptop would suspend on closing the lid. That doesn't happen anymore. ACPI does recognize the button but when I close the lid it does not send the event:

Code: Select all

$ sleep 3 && sudo cat /proc/acpi/button/lid/LID0/state 
state:      open
Also, if I unplug the computer, gnome-power-manager does not recognize it. It tells me that the battery is not fully charged, but it doesn' t recognize it's on battery power instead of AC. I suppose I'm not getting ACPI events, so it might be a case of this other thread http://forums.gentoo.org/viewtopic-t-920352.html but I did not want to pollute that topic.

I am not sure when this started happening, but this machine was installed on June 30th and the first time I installed something after that was

Code: Select all

Mon Jul  8 15:25:03 2013 >>> dev-java/oracle-jre-bin-1.7.0.25
Mon Jul  8 23:43:58 2013 >>> sys-fs/fuse-2.9.2
Mon Jul  8 23:44:06 2013 >>> sys-fs/sshfs-fuse-2.4
Tue Jul 16 00:47:45 2013 >>> media-fonts/liberation-fonts-2.00.0-r1
Tue Jul 16 00:47:53 2013 >>> www-plugins/adobe-flash-11.2.202.291
Sun Jul 28 17:53:04 2013 >>> app-editors/vim-7.3.762
So I suppose it was after those installations that this may have started.

The system is

Code: Select all

$ uname -a
Linux birra 3.8.13-gentoo #4 SMP Mon Aug 5 14:15:51 BRT 2013 x86_64 Intel(R) Core(TM) i7-3517U CPU @ 1.90GHz GenuineIntel GNU/Linux
Top
potuz
Guru
Guru
Posts: 378
Joined: Sat Jan 30, 2010 2:00 am

  • Quote

Post by potuz » Mon Aug 05, 2013 6:14 pm

Some update cause I'm trying to debug this problem. It seems that ACPI does indeed read the battery and AC adapter well on the /sys system (instead of the deprecated /proc I was trying) When I unplug the computer I see

Code: Select all

# cat /sys/class/power_supply/ADP1/online 
1
birra linux # cat /sys/class/power_supply/ADP1/online 
0
It seems that the gnome-power-manager has a bug that requires the /proc system to be present to read the battery and AC info,
But can't find info on the close lid problem.
Top
deper29
n00b
n00b
Posts: 7
Joined: Thu Nov 01, 2012 4:14 pm

  • Quote

Post by deper29 » Tue Aug 06, 2013 6:21 am

Hey, I recently started having this problem as well. I'm not sure when it started happening and I haven't been able to resolve it so far. Have you solved this yet?
Top
deper29
n00b
n00b
Posts: 7
Joined: Thu Nov 01, 2012 4:14 pm

  • Quote

Post by deper29 » Tue Aug 06, 2013 7:01 am

So, I solved it shortly after. I emerged in acpid-2.0.19, and here is my lid section of /etc/acpi/default.sh. Hope it helps you.

Code: Select all

 lid)
                                if [ `cat /proc/acpi/button/lid/LID/state | awk '{print $2}'` = "closed" ]
                                        then
                                                pm-suspend
                                fi
                                ;;
Top
potuz
Guru
Guru
Posts: 378
Joined: Sat Jan 30, 2010 2:00 am

  • Quote

Post by potuz » Tue Aug 06, 2013 9:41 am

deper29 wrote:So, I solved it shortly after. I emerged in acpid-2.0.19, and here is my lid section of /etc/acpi/default.sh. Hope it helps you.

Code: Select all

 lid)
                                if [ `cat /proc/acpi/button/lid/LID/state | awk '{print $2}'` = "closed" ]
                                        then
                                                pm-suspend
                                fi
                                ;;
Hi thanks, I was hoping not to emerge acpid, I don't really know much but I thought the kernel should send the acpi events and gnome-power-manager should be able to handle them, it seemed to me that I didn't need to have acpid running and since it did work on this system which never had acpid I thought I might have installed something that screwed things up. Also I see you're using pm-suspend which is part of pm-utils. By the way, I have pm-utils installed pulled-in by upower, and this is because by default upower has the "deprecated" USE on... I'll try to recompile with systemd instead of pm-utils.
Top
potuz
Guru
Guru
Posts: 378
Joined: Sat Jan 30, 2010 2:00 am

  • Quote

Post by potuz » Tue Aug 06, 2013 10:06 am

I think I tracked the problem to upower

Code: Select all

$ sleep 3 && !!
sleep 3 && upower --dump
Device: /org/freedesktop/UPower/devices/line_power_ADP1
  native-path:          /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ADP1
  power supply:         yes
  updated:              Tue Aug  6 06:30:01 2013 (2027 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    online:             no

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C09:00/PNP0C0A:00/power_supply/BAT1
  vendor:               LION
  power supply:         yes
  updated:              Tue Aug  6 07:03:32 2013 (16 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    energy:              5.456 Wh
    energy-empty:        0 Wh
    energy-full:         6.1 Wh
    energy-full-design:  0.001 Wh
    energy-rate:         1.283 W
    voltage:             8.018 V
    time to empty:       4.3 hours
    percentage:          89.4426%
    capacity:            100%
  History (rate):
    1375783412	1.283	discharging
    1375783382	1.385	discharging
    1375783352	1.497	discharging
    1375783322	1.277	discharging

Daemon:
  daemon-version:  0.9.20
  can-suspend:     yes
  can-hibernate:   no
  on-battery:      yes
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  yes
  is-docked:       no
The lid-is-closed is not reporting correclty. I can suspend fine by sending the signal to the dbus so I guess the problem is in recognizing the lid is closed.
Top
potuz
Guru
Guru
Posts: 378
Joined: Sat Jan 30, 2010 2:00 am

  • Quote

Post by potuz » Tue Aug 06, 2013 6:03 pm

Well, I recompiled upower with +systemd and the situation got worse, now upower --dump doesn't even see the lid:

Code: Select all

$ upower --dump
Device: /org/freedesktop/UPower/devices/line_power_ADP1
  native-path:          /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ADP1
  power supply:         yes
  updated:              Tue Aug  6 14:56:40 2013 (375 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    online:             yes

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C09:00/PNP0C0A:00/power_supply/BAT1
  vendor:               LION
  power supply:         yes
  updated:              Tue Aug  6 15:02:48 2013 (7 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    energy:              6.014 Wh
    energy-empty:        0 Wh
    energy-full:         6.1 Wh
    energy-full-design:  0.001 Wh
    energy-rate:         0 W
    voltage:             8.286 V
    percentage:          98.5902%
    capacity:            100%

Daemon:
  daemon-version:  0.9.20
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  no
  is-docked:       no
Top
potuz
Guru
Guru
Posts: 378
Joined: Sat Jan 30, 2010 2:00 am

  • Quote

Post by potuz » Tue Aug 06, 2013 7:14 pm

I think it's an instance of https://bugzilla.kernel.org/show_bug.cgi?id=45461. At least all the symptoms are there. Installed acpid and checked that there are no events being fired by either closing the lid or plugging/unplugging the battery.
Top
d_u_s_t
n00b
n00b
Posts: 8
Joined: Tue Jul 11, 2006 10:05 pm
Location: Berlin

  • Quote

Post by d_u_s_t » Wed Aug 28, 2013 7:32 am

potuz wrote:Well, I recompiled upower with +systemd and the situation got worse, now upower --dump doesn't even see the lid:
The same here for a plain old AC powered system. Problem startet with an update to Upower 0.9.21 build with systemd useflag. Building it with -systemd solves the problem. I'm having sys-apps/systemd-204-r9 installed but I'm not using it for boot (guess that's the cause?):

Code: Select all

~ $ systemd
Trying to run as user instance, but the system has not been booted with systemd.
~ $ ps ax | grep -i systemd
 5382 ?        Ss     0:00 /usr/lib/systemd/systemd-logind
 7056 ?        Sl     0:00 /usr/libexec/systemd-shim
Bettdeckenentzug ist kalter Entzug! -- dustbln
Top
Post Reply

9 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic