When I try to suspend my PC, it immediately wakes up and the login screen appears. I tried disabling wake by keyboard / mouse in BIOS but that didn't seem to do anything.
Here some ideas from AI :
Here are several things you can check to identify the wake source:
Check ACPI Wakeup Sources:
Linux keeps a list of devices configured to wake the system via ACPI. Open a terminal and run: cat /proc/acpi/wakeup
Look for devices listed as enabled. Common culprits often have codes like XHC (USB 3.0 controller), EHC (USB 2.0 controller), GLAN or ETH (Network card), LID (Laptop Lid), PWRB (Power Button).
If you see a device other than the power button (PWRB) enabled that you suspect might be the cause (especially USB controllers XHC/EHC or network adapters), you can try disabling it temporarily to test. To disable a device (e.g., XHC), run: sudo sh -c "echo XHC > /proc/acpi/wakeup"(Replace XHC with the actual device code from the list).
Try suspending again. If it stays suspended, you've found the culprit category. You might need to figure out which specific USB device or network setting is causing it. Note: This change is temporary and will reset on reboot. If this works, you'd need to create a script or systemd service to apply the change automatically at boot.
Check Wake-on-LAN (WOL) Settings:
Even if disabled in BIOS, the network card might still be configured by the OS to wake the system.
Identify your network interface name (e.g., eth0, enpXsY) using ip link.
Check WOL status using ethtool. You might need to install it first (sudo apt install ethtool or sudo dnf install ethtool). sudo ethtool <interface_name> | grep Wake-on(Replace <interface_name> with your actual network interface name)
Look at the Wake-on: line. If it shows g (Wake on Magic Packet), it's enabled.
To disable WOL temporarily: sudo ethtool -s <interface_name> wol d
Try suspending again. If this works, you'll need to make the change permanent (how depends on your network manager, e.g., NetworkManager, systemd-networkd).
Investigate USB Devices:
You mentioned disabling keyboard/mouse wake in BIOS, but sometimes USB controllers themselves or other connected devices (webcams, hubs, controllers, external drives) can cause wakes.
Check /proc/acpi/wakeup again for XHC or EHC entries being enabled.
As a test, try unplugging all non-essential USB devices (everything except maybe keyboard/mouse if needed for testing) and see if the system suspends correctly. If it does, plug devices back in one by one, testing suspend each time, to find the offender.
Review BIOS/UEFI Settings Thoroughly:
Go back into your BIOS/UEFI settings. Look carefully for any settings related to waking the system, not just keyboard/mouse. This could include:
Wake on PME (PCI Express)
Wake on Ring (Modem)
Power On By RTC Alarm
Specific Wake on USB settings (sometimes separate from general keyboard/mouse)
Wake on LAN/WLAN (sometimes separate from the OS setting)
Ensure all wake sources you don't explicitly need are disabled.
Check System Logs for Wake Source Hints:
Sometimes, the kernel provides more specific information about the wake event, although not always. You can check the system journal right after a failed suspend attempt: journalctl -b -n 50 (Shows the last 50 lines of the current boot log) Or look specifically around the time of the wake-up: journalctl --since "YYYY-MM-DD HH:MM:SS" --until "YYYY-MM-DD HH:MM:SS" (Use the timestamps from your log, e.g., 2025-04-04 23:49:24 to 2025-04-04 23:49:26)
Look for messages containing "wake", "resume", "ACPI", or device names around the time of the PM: suspend exit message.
System Updates:
Ensure your system is fully updated, including the kernel, systemd, and potentially NVIDIA drivers. Power management issues are sometimes fixed in newer versions.
Check your motherboard manufacturer's website (Gigabyte for your B650 GAMING X AX V2) for any BIOS/UEFI updates, as these often contain ACPI fixes.
Start with step 1 (/proc/acpi/wakeup) as it's often the most direct way to see what the OS thinks can wake the system. Good luck!
EHC2 is not listed when I run cat /proc/acpi/wakeup. Anyways, I tried to suspend again after running that command you posted, and still woke up immediately.
Here's what's listed. Even though it says enabled, I actually disabled one-by-one and suspended my PC to see if it would stay suspended yesterday. My PC still woke up each time, even when everything was disabled. It says enabled since I restarted PC today to share this with you.
Device
S-state
Status Sysfs node
GPP3
S4
*disabled
GPP4
S4
*disabled
GPP5
S4
*disabled
GPP6
S4
*disabled
GP17
S4
*enabled pci:0000:00:08.1
XHC0
S4
*enabled pci:0000:0f:00.3
XHC1
S4
*enabled pci:0000:0f:00.4
PS2K
S3
*disabled
PS2M
S3
*disabled
XHC2
S4
*enabled pci:0000:10:00.0
GPP0
S4
*enabled pci:0000:00:01.1
GPP1
S4
*disabled
GPP2
S4
*disabled
GPP7
S4
*enabled pci:0000:00:02.1
UP00
S4
*enabled pci:0000:02:00.0
DP00
S4
*enabled pci:0000:03:00.0
NV00
S4
*disabled
DP08
S4
*enabled pci:0000:03:01.0
EP00
S4
*disabled
DP10
S4
*enabled pci:0000:03:02.0
WN00
S4
*disabled pci:0000:06:00.0
DP18
S4
*enabled pci:0000:03:03.0
LN00
S4
*disabled pci:0000:07:00.0
DP20
S4
*enabled pci:0000:03:04.0
NV00
S4
*disabled
DP28
S4
*enabled pci:0000:03:05.0
EP00
S4
*disabled
DP30
S4
*enabled pci:0000:03:06.0
EP00
S4
*disabled
DP38
S4
*enabled pci:0000:03:07.0
EP00
S4
*disabled
DP40
S4
*enabled pci:0000:03:08.0
EP00
S4
*disabled
DP48
S4
*disabled
EP00
S4
*disabled
DP50
S4
*disabled
EP00
S4
*disabled
DP58
S4
*disabled
EP00
S4
*disabled
DP60
S4
*enabled pci:0000:03:0c.0
XH00
S4
*enabled pci:0000:0d:00.0
DP68
S4
*enabled pci:0000:03:0d.0
SA00
S4
*disabled pci:0000:0e:00.0
GPP8
S4
*disabled
I'm using Ethernet and not WiFi. I actually unplugged my Ethernet and made sure my WiFi was off before I suspended. My PC still woke up.
My ethernet interface says wake-on: d. So seems like it's disabled.
When I ran cat /sys/kernel/debug/wakeup_sources | grep -i active , I got this.
name active_count event_count wakeup_count expire_count active_since total_time max_time last_change prevent_suspend_time
Doesn't seem to return anything?
My Nvidia card is RTX 3060 Ti 8GB. My driver is:
NVIDIA-SMI 570.124.04 Driver Version: 570.124.04 CUDA Version: 12.8