You are not logged in.

#1 2020-02-28 14:55:27

krystiancha
Member
Registered: 2020-02-28
Posts: 15

Lid close wakes from s2idle

@EDIT
Never mind, it was HoldoffTimeoutSec in /etc/systemd/logind.conf as pointed out by Heftig in Talk:Dell XPS 13 2-in-1 (7390)

Hi.

I have a problem with s2idle on my Dell XPS 7390 2in1.

Most of the time when I close the lid or press the power button it goes to sleep normally and wakes up when i open the lid.
However, every so often (especially when i just woken up the PC and want to put it to sleep again) when I close the lid, the screen just flickers once and stays on.

dmesg shows nothing, journalctl prints just:

Feb 28 15:38:37 userpc systemd-logind[620]: Lid closed.
Feb 28 15:38:38 userpc systemd-logind[620]: Lid opened.
Feb 28 15:38:45 userpc wpa_supplicant[661]: wlp0s20f3: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-64 noise=9999 txrate=26000

Also, when activating sleep mode with the power button, closing the lid makes the laptop wake up.
I tried disabling the lid switch by

echo "PNP0C0D:00" | sudo tee /sys/bus/acpi/drivers/button/unbind

And the lid does not trigger sleep, but it still wakes up the laptop when opening it. Seems like a firmware issue.

Is there anything more I can try?

PS
I can't use S3 or hibernation due to kernel panics on S3/hib/shutdown/reboot.
Looks like https://bbs.archlinux.org/viewtopic.php?id=253157 but in my case the capslock led blinks.

PS2
There is no option in BIOS to disable the lid switch.

Last edited by krystiancha (2020-02-28 17:49:51)

Offline

#2 2020-02-28 15:34:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: Lid close wakes from s2idle

What desktop environment are you using?  Some *cough* Gnome *cough* adjust things to their own liking.
Are you using systemd mechanisms, or are you using acpid ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2020-02-28 16:02:52

krystiancha
Member
Registered: 2020-02-28
Posts: 15

Re: Lid close wakes from s2idle

I'm using GNOME and systemd. You inspired me to try to reproduce this issue without a desktop environment and i discovered something.

It doesn't matter if it is GNOME or just the virtual console without a desktop environment, I can't put my PC to sleep earlier than about 25 seconds after last wake.
It's consistently true. It stays with screen on if I close it earlier than 25 seconds after last lid open and sleeps otherwise.

Of course now that I discovered that, it is no longer a problem, but I'm still curious about why it is that way.
I'll now be paying attention if the laptop sleeps properly in daily use and will update the thread if I encounter further problems.

@EDIT
Another thing is that even if I don't wait those 25 seconds and close the lid earlier, the laptop goes to sleep when this time passes.

Last edited by krystiancha (2020-02-28 17:23:03)

Offline

#4 2020-03-04 09:11:21

edoars
Member
Registered: 2020-01-02
Posts: 7

Re: Lid close wakes from s2idle

I have the same problem since forever on my Dell XPS 7390 2-in-1.
I'm using bspwm, so no desktop environments mechanism should be involved. Setting HoldoffTimeoutSec to 0 in /etc/systemd/logind.conf didn't solve it.

/etc/systemd/logind.conf:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=ignore
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no
HoldoffTimeoutSec=0
IdleAction=ignore
IdleActionSec=15min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

Some, maybe relevant, log from journalctl:

Mar 04 09:49:35 xps systemd[1]: Reached target Sleep.
Mar 04 09:49:35 xps systemd[1]: Starting Suspend...
Mar 04 09:49:35 xps kernel: audit: type=1130 audit(1583311775.759:49): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=betterlockscreen@edoars comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 04 09:49:35 xps systemd-sleep[1989]: Suspending system...
Mar 04 09:49:35 xps kernel: PM: suspend entry (s2idle)
Mar 04 09:49:44 xps kernel: Filesystems sync: 0.010 seconds
Mar 04 09:49:44 xps kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
Mar 04 09:49:44 xps kernel: OOM killer disabled.
Mar 04 09:49:44 xps kernel: Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
Mar 04 09:49:44 xps kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Mar 04 09:49:44 xps kernel: wlp0s20f3: deauthenticating from c4:9f:4c:e4:c9:21 by local choice (Reason: 3=DEAUTH_LEAVING)
Mar 04 09:49:44 xps kernel: ACPI: EC: interrupt blocked
Mar 04 09:49:44 xps kernel: ACPI: EC: interrupt unblocked
Mar 04 09:49:44 xps kernel: iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
Mar 04 09:49:44 xps kernel: iwlwifi 0000:00:14.3: FW already configured (0) - re-configuring
Mar 04 09:49:44 xps kernel: OOM killer enabled.
Mar 04 09:49:44 xps systemd-logind[937]: Lid closed.
Mar 04 09:49:44 xps wpa_supplicant[989]: wlp0s20f3: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=0 noise=9999 txrate=0
Mar 04 09:49:44 xps wpa_supplicant[989]: wlp0s20f3: CTRL-EVENT-DISCONNECTED bssid=c4:9f:4c:e4:c9:21 reason=3 locally_generated=1
Mar 04 09:49:44 xps NetworkManager[934]: <warn>  [1583311784.6154] sup-iface[0x564442997900,wlp0s20f3]: connection disconnected (reason -3)
Mar 04 09:49:44 xps wpa_supplicant[989]: wlp0s20f3: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=WORLD
Mar 04 09:49:44 xps kernel: Restarting tasks ... done.
Mar 04 09:49:44 xps NetworkManager[934]: <info>  [1583311784.6192] device (wlp0s20f3): supplicant interface state: completed -> disconnected
Mar 04 09:49:44 xps systemd-sleep[1989]: System resumed.
Mar 04 09:49:44 xps kernel: PM: suspend exit
krystiancha wrote:

I can't use S3 or hibernation due to kernel panics on S3/hib/shutdown/reboot.

For this you can either downgrade to linux-lts or force intel_iommu=off. I'm using the latter and I no longer have kernel panics.

Offline

#5 2020-03-05 23:55:59

krystiancha
Member
Registered: 2020-02-28
Posts: 15

Re: Lid close wakes from s2idle

edoars wrote:

For this you can either downgrade to linux-lts or force intel_iommu=off. I'm using the latter and I no longer have kernel panics.

The intel_iommu=off got rid of those kernel panics. Thanks a lot.

Does the "waking on lid close" problem happen to you when in S3 sleep?
In my case it was only s2idle.

Offline

#6 2020-03-06 11:12:39

edoars
Member
Registered: 2020-01-02
Posts: 7

Re: Lid close wakes from s2idle

krystiancha wrote:

Does the "waking on lid close" problem happen to you when in S3 sleep?
In my case it was only s2idle.

You're right it doesn't happen in S3, but sometimes I find it not very reliable compared to s2idle. I'll try to use it again for a few days.
Do you still have the "lid close" problem with s2idle?

Offline

#7 2020-03-14 23:49:07

krystiancha
Member
Registered: 2020-02-28
Posts: 15

Re: Lid close wakes from s2idle

edoars wrote:

Do you still have the "lid close" problem with s2idle?

Yes, with s2idle closing the lid wakes up the laptop.

Offline

#8 2020-05-06 20:07:58

jlempen
Member
Registered: 2020-05-06
Posts: 1

Re: Lid close wakes from s2idle

edoars wrote:
krystiancha wrote:

I can't use S3 or hibernation due to kernel panics on S3/hib/shutdown/reboot.

For this you can either downgrade to linux-lts or force intel_iommu=off. I'm using the latter and I no longer have kernel panics.

I can confirm that adding the kernel parameter "intel_iommu=off" fixes the kernel panics on shutdown/reboot/S3 sleep with kernels 5.5 and 5.6.

Thanks, edoars!

I've referenced this thread in the wiki for the Dell XPS 13 2-in-1 (7390).

https://wiki.archlinux.org/index.php/De … n-1_(7390)

Last edited by jlempen (2020-05-06 21:23:34)

Offline

#9 2020-07-08 20:10:07

superm1
Member
Registered: 2020-07-08
Posts: 1

Re: Lid close wakes from s2idle

jlempen wrote:
edoars wrote:
krystiancha wrote:

I can't use S3 or hibernation due to kernel panics on S3/hib/shutdown/reboot.

For this you can either downgrade to linux-lts or force intel_iommu=off. I'm using the latter and I no longer have kernel panics.

I can confirm that adding the kernel parameter "intel_iommu=off" fixes the kernel panics on shutdown/reboot/S3 sleep with kernels 5.5 and 5.6.

Thanks, edoars!

I've referenced this thread in the wiki for the Dell XPS 13 2-in-1 (7390).

https://wiki.archlinux.org/index.php/De … n-1_(7390)

See this kernel bug for root cause:
https://bugzilla.kernel.org/show_bug.cgi?id=206571

Offline

Board footer

Powered by FluxBB