Fedora 43 KDE goes to sleep fine, but wakes up after a few seconds

Fedora 43 KDE goes to sleep fine, but wakes up after a few seconds.

Looking for logs, I see this on journalctl

journalctl -b 0 | grep -i "wakeup\|wake\|suspend"


ene 13 20:55:24 asrock-linux systemd-sleep[233812]: System returned from sleep operation 'suspend'.
ene 13 20:55:24 asrock-linux bluetoothd[1307]: Controller resume with wake event 0x0
ene 13 20:55:24 asrock-linux kernel: PM: suspend exit
ene 13 20:55:26 asrock-linux systemd[1]: systemd-suspend.service: Deactivated successfully.
ene 13 20:55:26 asrock-linux systemd[1]: Finished systemd-suspend.service - System Suspend.
ene 13 21:06:27 asrock-linux bluetoothd[1307]: Controller resume with wake event 0x0
ene 13 21:06:27 asrock-linux kernel: PM: suspend exit
ene 13 21:06:29 asrock-linux systemd[1]: systemd-suspend.service: Deactivated successfully.
ene 13 21:06:29 asrock-linux systemd[1]: Finished systemd-suspend.service - System Suspend.
ene 13 21:06:29 asrock-linux audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
ene 13 21:06:29 asrock-linux audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
ene 13 21:06:29 asrock-linux systemd[1]: systemd-suspend.service: Consumed 1.733s CPU time, 3.9M memory peak.
ene 13 21:06:29 asrock-linux systemd[1]: Reached target suspend.target - Suspend.
ene 13 21:06:29 asrock-linux systemd-logind[1415]: Operation 'suspend' finished.
ene 13 21:06:29 asrock-linux systemd[1]: Stopped target suspend.target - Suspend.
ene 13 21:06:29 asrock-linux NetworkManager[1721]: <info>  [1768356389.3246] manager: sleep: wake requested (sleeping: yes  enabled: yes)
ene 13 21:06:29 asrock-linux suspend[236288]: nvidia-resume.service
ene 13 21:06:29 asrock-linux logger[236288]: <13>Jan 13 21:06:29 suspend: nvidia-resume.service
cat /proc/acpi/wakeup | grep enable
RP05	 S4	*enabled   pci:0000:00:1c.0
RP19	 S4	*enabled   pci:0000:00:1b.0
PXSX	 S4	*enabled   pci:0000:01:00.0
RP21	 S4	*enabled   pci:0000:00:1b.4
GLAN	 S4	*enabled   pci:0000:00:1f.6
XHC	 S4	*enabled   pci:0000:00:14.0
AWAC	 S4	*enabled   platform:ACPI000E:00
fastfetch
             .',;::::;,'.                 sergio@asrock-linux
         .';:cccccccccccc:;,.             -------------------
      .;cccccccccccccccccccccc;.          OS: Fedora Linux 43 (KDE Plasma Desktop Edition) x86_64
    .:cccccccccccccccccccccccccc:.        Kernel: Linux 6.18.3-200.fc43.x86_64
  .;ccccccccccccc;.:dddl:.;ccccccc;.      Uptime: 1 day, 11 hours, 5 mins
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.     Packages: 4012 (rpm), 54 (flatpak)
.:ccccccccccccc;KMMc;cc;xMMc;ccccccc:.    Shell: bash 5.3.0
,cccccccccccccc;MMM.;cc;;WW:;cccccccc,    Display (LG FULL HD): 1920x1080 @ 60 Hz in 22" [External]
:cccccccccccccc;MMM.;cccccccccccccccc:    DE: KDE Plasma 6.5.4
:ccccccc;oxOOOo;MMM000k.;cccccccccccc:    WM: KWin (Wayland)
cccccc;0MMKxdd:;MMMkddc.;cccccccccccc;    WM Theme: CatppuccinFrappe-Classic
ccccc;XMO';cccc;MMM.;cccccccccccccccc'    Theme: Darkly (VinylRedDark) [Qt], Breeze [GTK3/4]
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;     Icons: Papirus [Qt], Papirus [GTK3/4]
ccccc;0MNc.ccc.xMMd;ccccccccccccccc;      Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK3/4]
cccccc;dNMWXXXWM0:;cccccccccccccc:,       Cursor: Vinyl-Black (32px)
cccccccc;.:odl:.;cccccccccccccc:,.        Terminal: kitty 0.43.1
ccccccccccccccccccccccccccccc:'.          Terminal Font: BitstreamVeraSansMono-Roman (12pt)
:ccccccccccccccccccccccc:;,..             CPU: Intel(R) Core(TM) i7-10700 (16) @ 4.80 GHz
 ':cccccccccccccccc::;,.                  GPU: NVIDIA GeForce GTX 1650 SUPER [Discrete]
                                          Memory: 14.32 GiB / 31.22 GiB (46%)
                                          Swap: 5.06 GiB / 16.00 GiB (32%)
                                          Disk (/): 221.78 GiB / 276.61 GiB (80%) - ext4
                                          Disk (/home): 137.78 GiB / 313.11 GiB (44%) - btrfs
                                          Disk (/mnt/xxx-BACKUP): 1.90 TiB / 3.64 TiB (52%) - fuseblk
                                          Disk (/mnt/xxx-DIARIO): 569.29 GiB / 931.51 GiB (61%) - fuseblk
                                          Local IP (eno1): 192.168.3.11/24
                                          Locale: es_PE.UTF-8

What can I do ?

Thanks.

I’ll answer my own question.
After struggling with this issue for several days, I found a post on this forum saying that several users were trying Copilot for this, so I did the same.

And after trying to disable each of the devices in wakeup

cat /proc/acpi/wakeup | grep enabl
RP05     S4    *enabled   pci:0000:00:1c.0
RP19     S4    *enabled   pci:0000:00:1b.0
PXSX     S4    *enabled   pci:0000:01:00.0
RP21     S4    *enabled   pci:0000:00:1b.4
AWAC     S4    *enabled   platform:ACPI000E:00

I tried disabling each one, but when I tested the suspension, the problem persisted.
But I noticed that the only one that couldn’t be disabled was the PXSX.

echo PXSX | sudo tee /proc/acpi/wakeup
PXSX

cat /proc/acpi/wakeup | grep enabl
PXSX	 S4	*enabled   pci:0000:01:00.0

So I kept asking Copilot, and it suggested I do this.

grep . /sys/bus/pci/devices/0000:01:00.0/power/wakeup
enabled

And if the value was ENABLED, then I had to change it to Disabled with:

echo disabled | sudo tee /sys/bus/pci/devices/0000:01:00.0/power/wakeup

After doing that, I tried putting the PC to sleep, and this time it never woke up again!
That PXSX was the cause.

So Copilot suggested I create a service to disable it on every reboot.

sudo nano /etc/systemd/system/disable-pxsx-wakeup.service

Add this content:

[Unit] Description=Disable wake-up for VIA USB Controller (PXSX) 
After=multi-user.target 

[Service] Type=oneshot 
ExecStart=/bin/sh -c 'echo disabled > /sys/bus/pci/devices/0000:01:00.0/power/wakeup' 

[Install] 
WantedBy=multi-user.target

After that, save the file, and then:

sudo systemctl daemon-reload 
sudo systemctl enable disable-pxsx-wakeup.service
sudo systemctl start disable-pxsx-wakeup.service

and validate with:

cat /sys/bus/pci/devices/0000:01:00.0/power/wakeup

It should display disabled

cat /sys/bus/pci/devices/0000:01:00.0/power/wakeup
disabled

And the PXSX shouldn’t be as enabled on /proc/acpi/wakeup

cat /proc/acpi/wakeup | grep enabled
RP05	 S4	*enabled   pci:0000:00:1c.0
RP19	 S4	*enabled   pci:0000:00:1b.0
RP21	 S4	*enabled   pci:0000:00:1b.4
AWAC	 S4	*enabled   platform:ACPI000E:00

and that’s all. It worked great.

I’ll try rebooting the PC to see if PXSX is still disabled.

Hello, I am facing the same or a very similar issue on my system. It’s also Fedora 43 KDE, and the behavior is the same (goes to sleep and wakes up after a few seconds).

However, in my case, I have different enabled devices in wakeup:

❯ cat /proc/acpi/wakeup | grep enable
PEG0      S4    *enabled   pci:0000:00:01.0
RP09      S4    *enabled   pci:0000:00:1d.0
RP03      S4    *enabled   pci:0000:00:1c.0
RP04      S4    *enabled   pci:0000:00:1c.3
XHC       S3    *enabled   pci:0000:00:14.0
SLPB      S4    *enabled   platform:PNP0C0E:00

How would you recommend to proceed? Try the “disable each one” method?

Edit: For me, it turned out to be the “XHC” service, so if anyone has services similar to mine, try disabling that one first.