Suspend Freezes After Applying My Config (KDE Plasma Wayland)

Hi all,

I’m running into a suspend issue after a new clean NixOS installation. Suspend works fine on a fresh install, but after applying my personal config, the machine freezes whenever I try to suspend.

What I’ve Tried

  • Clean install: suspend works out of the box.
  • Apply my config: suspend freezes (screen stays on or turns off, but system unresponsive).
  • Switched from unstable to stable channel: no change.

Diagnostics

Here are some commands and their output:

loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type
# Output:
Type=wayland

echo $XDG_CURRENT_DESKTOP $XDG_SESSION_TYPE
# Output:
KDE wayland

busctl --user call org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.DBus.Properties GetAll s org.freedesktop.portal.Power
# Output:
Call failed: No such interface “org.freedesktop.portal.Power”

Additional Info

  • Config repo: https://gitlab.com/bovf/nix-config
  • Tried both unstable and stable channels
  • Desktop: KDE Plasma 6 on Wayland
  • Polkit is enabled
  • No swap configured (if relevant)

Hardware Information

To help, here’s my hardware info:

$ inxi -Fazy
System:
  Kernel: 6.12.31 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: initrd=\EFI\nixos\9bqn9bi9m53pcxk43w2g5rihgjliprib-initrd-linux-6.12.31-initrd.efi
    init=/nix/store/drgl99azx83jxvw86d2r18q431lxrv7l-nixos-system-heavy-25.05.20250602.10d7f8d/init
    loglevel=4 lsm=landlock,yama,bpf
  Desktop: KDE Plasma v: 6.3.5 tk: Qt v: N/A info: frameworks v: 6.14.0
    wm: kwin_wayland vt: 2 dm: SDDM Distro: NixOS 25.05 (Warbler)
Machine:
  Type: Desktop System: ASRock product: X870 Pro RS WiFi v: N/A
    serial: <superuser required>
  Mobo: ASRock model: X870 Pro RS WiFi serial: <superuser required>
    uuid: <superuser required> UEFI: American Megatrends LLC. v: 3.20
    date: 02/21/2025
Battery:
  ID-1: hidpp_battery_0 charge: 87% condition: N/A volts: 4.0 min: N/A
    model: Logitech G502 LIGHTSPEED Wireless Gaming Mouse type: N/A
    serial: <filter> status: discharging
CPU:
  Info: model: AMD Ryzen 7 7800X3D bits: 64 type: MT MCP arch: Zen 4 gen: 4
    level: v4 note: check built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25)
    model-id: 0x61 (97) stepping: 2 microcode: 0xA60120C
  Topology: cpus: 1x dies: 1 clusters: 1 cores: 8 threads: 16 tpc: 2
    smt: enabled cache: L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 8 MiB
    desc: 8x1024 KiB L3: 96 MiB desc: 1x96 MiB
  Speed (MHz): avg: 3600 min/max: 545/5050 boost: enabled scaling:
    driver: amd-pstate-epp governor: powersave cores: 1: 3600 2: 3600 3: 3600
    4: 3600 5: 3600 6: 3600 7: 3600 8: 3600 9: 3600 10: 3600 11: 3600 12: 3600
    13: 3600 14: 3600 15: 3600 16: 3600 bogomips: 134141
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: indirect_target_selection status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow mitigation: Safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB: conditional;
    STIBP: always-on; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Message: Required tool lspci not installed. Check --recommends
  Device-1: Insta360 Link 2 driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-2.1.1:5 chip-ID: 2e1a:4c04
    class-ID: 0102
  Display: wayland server: Xwayland v: 24.1.6 compositor: kwin_wayland
    driver: N/A display-ID: 0 note: no compositor data
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: de: kscreen-console,kscreen-doctor
Audio:
  Device-1: Insta360 Link 2 driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-2.1.1:5 chip-ID: 2e1a:4c04
    class-ID: 0102
  Device-2: Logitech Logi Z407 driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 1.1 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-2.3.1:8
    chip-ID: 046d:0a4c class-ID: 0102 serial: <filter>
  API: ALSA v: k6.12.31 status: kernel-api tools: N/A
  Server-1: PipeWire v: 1.4.2 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pw-cat,pw-cli,wpctl
  Server-2: PulseAudio v: 17.0 status: off (using pipewire-pulse)
    tools: pacat,pactl
Drives:
  Local Storage: total: 4.55 TiB used: 24.3 GiB (0.5%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:1 vendor: Samsung model: SSD 990 PRO 4TB
    size: 3.64 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 4B2QJXD7 temp: 31.9 C
    scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Samsung model: SSD 990 PRO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 4B2QJXD7 temp: 35.9 C
    scheme: GPT
Partition:
  ID-1: / raw-size: 3.64 TiB size: 3.58 TiB (98.40%) used: 24.25 GiB (0.7%)
    fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:6
  ID-2: /boot raw-size: 1024 MiB size: 1022 MiB (99.80%)
    used: 46.6 MiB (4.6%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:5
Swap:
  Alert: No swap data was found.
Sensors:
  Src: /sys System Temperatures: cpu: 39.6 C mobo: 31.0 C
  Fan Speeds (rpm): N/A
  GPU: device: amdgpu temp: 34.0 C device: amdgpu temp: 44.0 C mem: 64.0 C
  Power: 12v: N/A 5v: 4.05 3.3v: N/A vbat: N/A
Info:
  Memory: total: 64 GiB note: est. available: 61.89 GiB used: 4.22 GiB (6.8%)
  Processes: 373 Power: uptime: 0h 24m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 24.75 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 257 default: graphical
    tool: systemctl
  Packages: 2367 pm: nix-default pkgs: 0 pm: nix-sys pkgs: 1594 libs: 351
    pm: nix-usr pkgs: 773 libs: 180 Compilers: gcc: 14.2.1 Shell: Bash v: 5.2.37
    running-in: zellij inxi: 3.3.38

Questions

  • Has anyone seen similar issues with suspend after applying a custom config?
  • Is the missing org.freedesktop.portal.Power interface related?
  • Any ideas for further debugging or config changes?

Any help or pointers would be much appreciated!

Update: Issue Kind of Resolved? (Unclear What Fixed It)

Just wanted to update this thread: the suspend freeze issue is no longer happening, but I’m honestly not sure which change resolved it.

What I did:

  • Switched to boot.kernelPackages = pkgs.linuxPackages_6_14;
  • Added boot.kernelParams = [ "usbcore.autosuspend=-1" ];
  • While running journalctl -e -b, I noticed repeated errors like usb 1-7: device descriptor read/64, error -110—this is tied to the USB 2.0 header on my motherboard(ASROCK x870 RS PRO WiFi).
  • I disabled that USB 2.0 header in the BIOS.
  • Updated BIOS firmware.
  • Did a lot of trial and error with USB devices and unplugged/replugged everything to isolate issues.
  • Noticed that when the USB error didn’t appear in logs, suspend worked fine.

Current status:
Suspend now works somewhat reliably. I’m not sure if it was the kernel upgrade, the kernel parameter, the BIOS update, disabling the USB header, or some combination of these that fixed it. If anyone has insight on which of these (or all together) might have been the root cause, please share your ideas. I’ll continue investigating what’s going on…