You are not logged in.

#1 2017-05-08 09:33:32

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 387

[SOLVED]HandleLidSwitch ignored by logind

It looks like logind ignored it's configuration somehow on my AlienWare 13 R3

/etc/systemd/logind.conf:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=ignore
#HandleHibernateKey=ignore
#HandleLidSwitch=ignore
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#UserTasksMax=33%

But when I close the lid, the laptop suspend anyway.

Here is the journalctl of the suspend resume cycle:

-- Logs begin at Mon 2017-05-01 15:12:04 CEST, end at Mon 2017-05-08 13:25:27 CEST. --
May 08 13:24:57 violet systemd-logind[363]: Lid closed.
May 08 13:24:57 violet systemd-logind[363]: Suspending...
May 08 13:24:57 violet systemd[1]: Reached target Sleep.
May 08 13:24:57 violet systemd[1]: Starting Suspend...
May 08 13:24:57 violet systemd-sleep[1420]: Suspending system...
May 08 13:24:57 violet kernel: PM: Syncing filesystems ... done.
May 08 13:24:57 violet kernel: PM: Preparing system for sleep (mem)
May 08 13:24:57 violet kernel: bbswitch: enabling discrete graphics
May 08 13:25:17 violet kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
May 08 13:25:17 violet kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
May 08 13:25:17 violet kernel: PM: Suspending system (mem)
May 08 13:25:17 violet kernel: Suspending console(s) (use no_console_suspend to debug)
May 08 13:25:17 violet kernel: wlp61s0: deauthenticating from f4:ca:e5:e8:3b:b8 by local choice (Reason: 3=DEAUTH_LEAVING)
May 08 13:25:17 violet kernel: ACPI : EC: event blocked
May 08 13:25:17 violet kernel: PM: suspend of devices complete after 1735.247 msecs
May 08 13:25:17 violet kernel: PM: late suspend of devices complete after 17.856 msecs
May 08 13:25:17 violet kernel: ACPI : EC: interrupt blocked
May 08 13:25:17 violet kernel: xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
May 08 13:25:17 violet kernel: PM: noirq suspend of devices complete after 43.278 msecs
May 08 13:25:17 violet kernel: ACPI: Preparing to enter system sleep state S3
May 08 13:25:17 violet kernel: ACPI : EC: EC stopped
May 08 13:25:17 violet kernel: PM: Saving platform NVS memory
May 08 13:25:17 violet kernel: Disabling non-boot CPUs ...
May 08 13:25:17 violet kernel: smpboot: CPU 1 is now offline
May 08 13:25:17 violet kernel: smpboot: CPU 2 is now offline
May 08 13:25:17 violet kernel: smpboot: CPU 3 is now offline
May 08 13:25:17 violet kernel: smpboot: CPU 4 is now offline
May 08 13:25:17 violet kernel: smpboot: CPU 5 is now offline
May 08 13:25:17 violet kernel: smpboot: CPU 6 is now offline
May 08 13:25:17 violet kernel: smpboot: CPU 7 is now offline
May 08 13:25:17 violet kernel: ACPI: Low-level resume complete
May 08 13:25:17 violet kernel: ACPI : EC: EC started
May 08 13:25:17 violet kernel: PM: Restoring platform NVS memory
May 08 13:25:17 violet kernel: Suspended for 15.173 seconds
May 08 13:25:17 violet kernel: Enabling non-boot CPUs ...
May 08 13:25:17 violet kernel: x86: Booting SMP configuration:
May 08 13:25:17 violet kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
May 08 13:25:17 violet kernel: [Firmware Bug]: TSC ADJUST differs: Reference CPU0: -1419021048 CPU1: 0
May 08 13:25:17 violet kernel:  cache: parent cpu1 should not be sleeping
May 08 13:25:17 violet kernel: intel_pstate: Disabling energy efficiency optimization
May 08 13:25:17 violet kernel: CPU1 is up
May 08 13:25:17 violet kernel: smpboot: Booting Node 0 Processor 2 APIC 0x4
May 08 13:25:17 violet kernel: [Firmware Bug]: TSC ADJUST differs: Reference CPU0: -1419021048 CPU2: 0
May 08 13:25:17 violet kernel:  cache: parent cpu2 should not be sleeping
May 08 13:25:17 violet kernel: CPU2 is up
May 08 13:25:17 violet kernel: smpboot: Booting Node 0 Processor 3 APIC 0x6
May 08 13:25:17 violet kernel: [Firmware Bug]: TSC ADJUST differs: Reference CPU0: -1419021048 CPU3: 0
May 08 13:25:17 violet kernel:  cache: parent cpu3 should not be sleeping
May 08 13:25:17 violet kernel: CPU3 is up
May 08 13:25:17 violet kernel: smpboot: Booting Node 0 Processor 4 APIC 0x1
May 08 13:25:17 violet kernel: [Firmware Bug]: TSC ADJUST differs: Reference CPU0: -1419021048 CPU4: 0
May 08 13:25:17 violet kernel:  cache: parent cpu4 should not be sleeping
May 08 13:25:17 violet kernel: CPU4 is up
May 08 13:25:17 violet kernel: smpboot: Booting Node 0 Processor 5 APIC 0x3
May 08 13:25:17 violet kernel: [Firmware Bug]: TSC ADJUST differs: Reference CPU0: -1419021048 CPU5: 0
May 08 13:25:17 violet kernel:  cache: parent cpu5 should not be sleeping
May 08 13:25:17 violet kernel: CPU5 is up
May 08 13:25:17 violet kernel: smpboot: Booting Node 0 Processor 6 APIC 0x5
May 08 13:25:17 violet kernel: [Firmware Bug]: TSC ADJUST differs: Reference CPU0: -1419021048 CPU6: 0
May 08 13:25:17 violet kernel:  cache: parent cpu6 should not be sleeping
May 08 13:25:17 violet kernel: CPU6 is up
May 08 13:25:17 violet kernel: smpboot: Booting Node 0 Processor 7 APIC 0x7
May 08 13:25:17 violet kernel: [Firmware Bug]: TSC ADJUST differs: Reference CPU0: -1419021048 CPU7: 0
May 08 13:25:17 violet kernel:  cache: parent cpu7 should not be sleeping
May 08 13:25:17 violet kernel: CPU7 is up
May 08 13:25:17 violet kernel: ACPI: Waking up from system sleep state S3
May 08 13:25:17 violet kernel: acpi LNXPOWER:16: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:15: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:14: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:13: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:12: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:11: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:10: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:0f: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:0e: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:0d: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:0c: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:0b: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:0a: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:09: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:08: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:07: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:06: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:05: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:04: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:03: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:02: Turning OFF
May 08 13:25:17 violet kernel: acpi LNXPOWER:00: Turning OFF
May 08 13:25:17 violet kernel: ACPI : EC: interrupt unblocked
May 08 13:25:17 violet kernel: xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI
May 08 13:25:17 violet kernel: PM: noirq resume of devices complete after 33.312 msecs
May 08 13:25:17 violet kernel: PM: early resume of devices complete after 10.965 msecs
May 08 13:25:17 violet kernel: ACPI : EC: event unblocked
May 08 13:25:17 violet kernel: rtc_cmos 00:02: System wakeup disabled by ACPI
May 08 13:25:17 violet kernel: [drm] GuC firmware load skipped
May 08 13:25:17 violet kernel: xhci_hcd 0000:00:14.0: port 4 resume PLC timeout
May 08 13:25:17 violet kernel: xhci_hcd 0000:00:14.0: port 0 resume PLC timeout
May 08 13:25:17 violet kernel: usb 1-5: reset full-speed USB device number 3 using xhci_hcd
May 08 13:25:17 violet kernel: psmouse serio1: synaptics: queried max coordinates: x [..5668], y [..4756]
May 08 13:25:17 violet kernel: psmouse serio1: synaptics: queried min coordinates: x [1274..], y [1098..]
May 08 13:25:17 violet kernel: usb 1-7: reset high-speed USB device number 4 using xhci_hcd
May 08 13:25:17 violet kernel: usb 1-1: reset full-speed USB device number 5 using xhci_hcd
May 08 13:25:17 violet kernel: [drm] RC6 on
May 08 13:25:17 violet kernel: PM: resume of devices complete after 2270.310 msecs
May 08 13:25:17 violet kernel: usb 1-5:1.0: rebind failed: -517
May 08 13:25:17 violet kernel: usb 1-5:1.1: rebind failed: -517
May 08 13:25:17 violet kernel: PM: Finishing wakeup.
May 08 13:25:17 violet kernel: Restarting tasks ... done.
May 08 13:25:17 violet systemd[1]: Time has been changed
May 08 13:25:17 violet dhcpcd[986]: wlp61s0: carrier lost
May 08 13:25:17 violet systemd[1]: Starting Load/Save RF Kill Switch Status...
May 08 13:25:17 violet systemd-logind[363]: Lid opened.
May 08 13:25:17 violet systemd[1]: Started Load/Save RF Kill Switch Status.
May 08 13:25:17 violet systemd[1]: bluetooth.target: Unit not needed anymore. Stopping.
May 08 13:25:17 violet systemd[1]: Stopped target Bluetooth.
May 08 13:25:17 violet kernel: Bluetooth: hci0: using rampatch file: qca/rampatch_usb_00000302.bin
May 08 13:25:17 violet kernel: Bluetooth: hci0: QCA: patch rome 0x302 build 0x138, firmware rome 0x302 build 0x111
May 08 13:25:17 violet systemd[1]: Reached target Bluetooth.
May 08 13:25:17 violet kernel: Bluetooth: hci0: using NVM file: qca/nvm_usb_00000302.bin
May 08 13:25:17 violet dhcpcd[986]: wlp61s0: deleting default route via 192.168.0.254
May 08 13:25:17 violet dhcpcd[986]: wlp61s0: deleting route to 192.168.0.0/24
May 08 13:25:17 violet kernel: video LNXVIDEO:00: Restoring backlight state
May 08 13:25:17 violet kernel: video LNXVIDEO:01: Restoring backlight state
May 08 13:25:17 violet kernel: bbswitch: disabling discrete graphics
May 08 13:25:17 violet kernel: ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160930/nsarguments-95)
May 08 13:25:17 violet systemd-sleep[1420]: System resumed.
May 08 13:25:17 violet systemd[1]: Started Suspend.
May 08 13:25:17 violet systemd[1]: sleep.target: Unit not needed anymore. Stopping.
May 08 13:25:17 violet systemd[1]: Stopped target Sleep.
May 08 13:25:17 violet systemd[1]: Reached target Suspend.
May 08 13:25:17 violet systemd-logind[363]: Operation 'sleep' finished.
May 08 13:25:17 violet systemd[1]: suspend.target: Unit is bound to inactive unit systemd-suspend.service. Stopping, too.
May 08 13:25:17 violet systemd[1]: Stopped target Suspend.
May 08 13:25:22 violet kernel: wlp61s0: authenticate with f4:ca:e5:e8:3b:b8
May 08 13:25:22 violet kernel: wlp61s0: send auth to f4:ca:e5:e8:3b:b8 (try 1/3)
May 08 13:25:22 violet kernel: wlp61s0: authenticated
May 08 13:25:22 violet kernel: wlp61s0: associate with f4:ca:e5:e8:3b:b8 (try 1/3)
May 08 13:25:22 violet kernel: wlp61s0: RX AssocResp from f4:ca:e5:e8:3b:b8 (capab=0x411 status=0 aid=1)
May 08 13:25:22 violet kernel: wlp61s0: associated
May 08 13:25:22 violet dhcpcd[986]: wlp61s0: carrier acquired
May 08 13:25:22 violet dhcpcd[986]: wlp61s0: IAID d0:60:22:b3
May 08 13:25:22 violet dhcpcd[986]: wlp61s0: rebinding lease of 192.168.0.29
May 08 13:25:22 violet dhcpcd[986]: wlp61s0: probing address 192.168.0.29/24
May 08 13:25:27 violet dhcpcd[986]: wlp61s0: leased 192.168.0.29 for 43200 seconds
May 08 13:25:27 violet dhcpcd[986]: wlp61s0: adding route to 192.168.0.0/24
May 08 13:25:27 violet dhcpcd[986]: wlp61s0: adding default route via 192.168.0.254

So we can see this is indeed logind handling the suspend (and not acpid or some other power manager)

Nothing more appears in dmesg, except for this during boot-up :

ACPI : button: The lid device is not compliant to SW_LID.

But I couldn't find anything helping with this on google.

I found a workaround here
whit this command :

systemd-inhibit --what=handle-lid-switch sleep 1000d

But it is not clean at all.

Last edited by GloW_on_dub (2017-05-08 13:21:45)

Offline

#2 2017-05-08 10:18:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,588
Website

Re: [SOLVED]HandleLidSwitch ignored by logind

You need to uncomment the line if you want it to have any effect.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-05-08 13:21:20

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 387

Re: [SOLVED]HandleLidSwitch ignored by logind

I feel so stupid right now.

Thanks.

Offline

Board footer

Powered by FluxBB