You are not logged in.

#1 2015-05-13 15:41:01

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 246

[SOLVED]How to prevent systemd from waking up the system on key press?

Hello guys,

When I suspend my system, from the UI or systemctl suspend, I noticed the system is woken up if a key is pressed on the keyboard; it seems not to be relevant which keys are pressed, though.
What's controlling this behavior? How do I stop it, if possible?

I'm pretty sure it's a systemd setting because, when no DE is running, only through systemd I can suspend the system and thus that's where the issue should lie in.

Solution:  systemd isn't probably responsible for that: the kernel or BIOS might. There might be a specific option to prevent this behavior in the latter, so you should check for it.
In case the BIOS does not appear to be setting that, you can query the ACPI settings with:

 cat /proc/acpi/wakeup 

this will list what events trigger a wake-up. To get a cleaner view,

 grep "enabled" /proc/acpi/wakeup 

. In particular, the codes on the right hand side identify the PCI device which can wake up the system; you can understand what those identifiers refer to with

lspci

.

Last edited by Grant (2015-05-22 11:16:52)

Offline

#2 2015-05-13 15:52:30

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,572
Website

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

Not an Application/Desktop issue, moving to Kernel and Hardware.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2015-05-13 16:10:02

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

What's the output of "cat /proc/acpi/wakeup"?

Offline

#4 2015-05-13 16:31:11

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 246

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

lucke wrote:

What's the output of "cat /proc/acpi/wakeup"?

Device  S-state   Status   Sysfs node
UAR1      S4    *disabled  pnp:00:06
PS2K      S4    *disabled
PS2M      S4    *disabled
RP01      S4    *disabled  pci:0000:00:1c.0
PXSX      S4    *disabled
RP02      S4    *disabled  pci:0000:00:1c.1
PXSX      S4    *disabled  pci:0000:03:00.0
RP03      S4    *disabled
PXSX      S4    *disabled
RP04      S4    *disabled
PXSX      S4    *disabled
RP05      S4    *disabled
PXSX      S4    *disabled
RP06      S4    *disabled
PXSX      S4    *disabled
RP08      S4    *disabled
PXSX      S4    *disabled
RP07      S4    *disabled  pci:0000:00:1c.6
PXSX      S4    *disabled  pci:0000:04:00.0
GLAN      S4    *enabled   pci:0000:00:19.0
EHC1      S4    *enabled   pci:0000:00:1d.0
EHC2      S4    *enabled   pci:0000:00:1a.0
XHC       S4    *enabled   pci:0000:00:14.0
HDEF      S4    *disabled  pci:0000:00:1b.0
PEG0      S4    *disabled  pci:0000:00:01.0
PEGP      S4    *disabled  pci:0000:01:00.0
PEG1      S4    *disabled
PEG2      S4    *disabled

Offline

#5 2015-05-13 16:37:38

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

See if "echo EHC1 >> /proc/acpi/wakeup; echo EHC2 >> /proc/acpi/wakeup" helps.

Offline

#6 2015-05-13 17:02:03

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 246

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

lucke wrote:

See if "echo EHC1 >> /proc/acpi/wakeup; echo EHC2 >> /proc/acpi/wakeup" helps.

Unfortunately it does not.

Offline

#7 2015-05-13 19:45:04

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

Try also XHC and GLAN (make them all disabled),

Offline

#8 2015-05-14 11:06:23

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 246

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

lucke wrote:

Try also XHC and GLAN (make them all disabled),

Yes, it worked. Thanks. smile
Do you think it's something set in the BIOS that automatically makes ACPI wake up on key press?

I'll be trying different combinations and if I can work out a direct solution, I'll post it.

Offline

#9 2015-05-14 13:45:17

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

It might be the Linux kernel that enables by default waking up by USB devices.

Offline

#10 2015-05-14 13:48:11

NoSavvy
Member
From: Dorchester, Dorset, UK
Registered: 2013-01-23
Posts: 127

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

I've had to set mine in the BIOS before, that was an Asus motherboard.

Offline

#11 2015-05-14 19:14:37

Grant
Member
From: Italy
Registered: 2012-12-15
Posts: 246

Re: [SOLVED]How to prevent systemd from waking up the system on key press?

lucke wrote:

It might be the Linux kernel that enables by default waking up by USB devices.

Likely. I've looked in the BIOS for an option to disable that but I couldn't find anything related to that. What I found odd, though, is that the LAN controller, if left enabled, still allows USB wake-ups despite these being disabled.

NoSavvy wrote:

I've had to set mine in the BIOS before, that was an Asus motherboard.

I've got an ASUS motherboard too, will you give me some further detail about what you've done?

Last edited by Grant (2015-05-14 19:28:32)

Offline

Board footer

Powered by FluxBB