Nvidia, Hibernate, and Plasma

I recently got my Linux operating system working for hibernation, which was extremely satisfying, given all the challenges that a Nvidia card can throw at you, especially if you miss something in the Arch Wiki documentation. Most of the problems I experienced over the last few months were due to me not following exactly what is documented. So everything on my glorious machine is almost working perfectly except this: when I return from hibernate and login into my Wayland session, though the apps are as I left them, most of the icons in the task bar are hidden and when I reposition a window, they donā€™t redraw (leaving a duplicate image on the dekstop); a strange effect. But if I hover the cursor over the task bar, the icons reappear. Fortunately, Iā€™m able to correct this state by executing the following:

#!/usr/bin/bash
sleep 5
kquitapp5 plasmashell && kstart5 plasmashell > /dev/null 2>&1

That script restores my desktop to a happy state. The sleep is in the script because I now have that script executed automatically when I login, so all is great. But I want to understand what I might still be missing that requires me to run this script.

Does anyone know what addtional step I may need to add to my configrations so that I have a truly clean restore from hibernate?

My Basic System Information

sudo inxi --filter --verbosity 8

System:
  Kernel: 6.11.2-4-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.11-x86_64
    root=UUID=c6d9cb1e-788c-498f-98f1-adc65fbdabb0 rw quiet splash
    udev.log_priority=3 nvidia_drm.modeset=1 nvidia_drm.fbdev=1
    resume=UUID=c6d9cb1e-788c-498f-98f1-adc65fbdabb0 resume_offset=110727168
    NVreg_PreserveVideoMemoryAllocations=1
  Desktop: KDE Plasma v: 6.1.5 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
    Distro: Manjaro base: Arch Linux
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: N/A
  Mobo: ASUSTeK model: ROG STRIX X670E-E GAMING WIFI v: Rev 1.xx
    serial: <filter> part-nu: SKU uuid: df216d8a-81b2-5aa3-d0f9-107c614082a1
    UEFI: American Megatrends v: 2403 date: 09/24/2024
Battery:
  Message: No system battery data found. Is one present?
Memory:
  System RAM: total: 64 GiB available: 61.94 GiB used: 3.56 GiB (5.7%)
  Array-1: capacity: 128 GiB slots: 4 modules: 4 EC: None
    max-module-size: 32 GiB note: est.
  Device-1: Channel-A DIMM 0 type: DDR5 detail: synchronous unbuffered
    (unregistered) size: 16 GiB speed: spec: 4800 MT/s actual: 3600 MT/s
    volts: curr: 1.1 min: 1.1 max: 1.1 width (bits): data: 64 total: 64
    manufacturer: G Skill Intl part-no: F5-6000J3038F16G serial: <filter>
  Device-2: Channel-A DIMM 1 type: DDR5 detail: synchronous unbuffered
    (unregistered) size: 16 GiB speed: spec: 4800 MT/s actual: 3600 MT/s
    volts: curr: 1.1 min: 1.1 max: 1.1 width (bits): data: 64 total: 64
    manufacturer: G Skill Intl part-no: F5-6000J3038F16G serial: <filter>
  Device-3: Channel-B DIMM 0 type: DDR5 detail: synchronous unbuffered
    (unregistered) size: 16 GiB speed: spec: 4800 MT/s actual: 3600 MT/s
    volts: curr: 1.1 min: 1.1 max: 1.1 width (bits): data: 64 total: 64
    manufacturer: G Skill Intl part-no: F5-6000J3038F16G serial: <filter>
  Device-4: Channel-B DIMM 1 type: DDR5 detail: synchronous unbuffered
    (unregistered) size: 16 GiB speed: spec: 4800 MT/s actual: 3600 MT/s
    volts: curr: 1.1 min: 1.1 max: 1.1 width (bits): data: 64 total: 64
    manufacturer: G Skill Intl part-no: F5-6000J3038F16G serial: <filter>
PCI Slots:
  Slot: 0 type: PCIe status: in use length: long volts: 3.3 bus-ID: 00:01.1
    children: 1: 01:00.0 class-ID: 0300 type: display 2: 01:00.1 class-ID: 0403
    type: audio
  Slot: 1 type: PCIe status: available length: long volts: 3.3
    bus-ID: 00:1f.7
  Slot: 2 type: PCIe status: available length: long volts: 3.3
    bus-ID: 00:1f.7
  Slot: N/A type: N/A status: in use info: M.2 length: long volts: 3.3
    bus-ID: 00:01.2 children: 1: 02:00.0 class-ID: 0108 type: mass-storage
  Slot: N/A type: N/A status: available info: M.2 length: long volts: 3.3
    bus-ID: 00:1f.7
  Slot: N/A type: N/A status: available info: M.2 length: long volts: 3.3
    bus-ID: 00:1f.7
  Slot: N/A type: N/A status: available info: M.2 length: long volts: 3.3
    bus-ID: 00:1f.7
  Slot: N/A type: N/A status: in use info: M.2 length: short volts: 3.3
    bus-ID: 07:04.0
CPU:
  Info: model: AMD Ryzen 9 7950X3D socket: AM5 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: 0xA601209
  Topology: cpus: 1x dies: 2 clusters: 2x1 cores: 16 threads: 32 tpc: 2
    smt: enabled cache: L1: 1024 KiB desc: d-16x32 KiB; i-16x32 KiB L2: 16 MiB
    desc: 16x1024 KiB L3: 128 MiB desc: 1x32 MiB, 1x96 MiB
  Speed (MHz): avg: 2982 min/max: 545/5759 boost: enabled
    base/boost: 4200/5750 scaling: driver: amd-pstate-epp governor: powersave
    volts: 1.3 V ext-clock: 100 MHz cores: 1: 2982 2: 2982 3: 2982 4: 2982
    5: 2982 6: 2982 7: 2982 8: 2982 9: 2982 10: 2982 11: 2982 12: 2982
    13: 2982 14: 2982 15: 2982 16: 2982 17: 2982 18: 2982 19: 2982 20: 2982
    21: 2982 22: 2982 23: 2982 24: 2982 25: 2982 26: 2982 27: 2982 28: 2982
    29: 2982 30: 2982 31: 2982 32: 2982 bogomips: 268388
  Flags: 3dnowprefetch abm adx aes amd_lbr_pmc_freeze amd_lbr_v2 aperfmperf
    apic arat avic avx avx2 avx512_bf16 avx512_bitalg avx512_vbmi2
    avx512_vnni avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f
    avx512ifma avx512vbmi avx512vl bmi1 bmi2 bpext cat_l3 cdp_l3 clflush
    clflushopt clwb clzero cmov cmp_legacy constant_tsc cpb cppc cpuid cqm
    cqm_llc cqm_mbm_local cqm_mbm_total cqm_occup_llc cr8_legacy cx16 cx8 de
    decodeassists erms extapic extd_apicid f16c flush_l1d flushbyasid fma fpu
    fsgsbase fsrm fxsr fxsr_opt gfni ht hw_pstate ibpb ibrs ibrs_enhanced ibs
    invpcid irperf lahf_lm lbrv lm mba mca mce misalignsse mmx mmxext monitor
    movbe msr mtrr mwaitx nonstop_tsc nopl npt nrip_save nx ospke osvw
    overflow_recov pae pat pausefilter pclmulqdq pdpe1gb perfctr_core
    perfctr_llc perfctr_nb perfmon_v2 pfthreshold pge pku pni popcnt pse
    pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni
    skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp
    succor svm svm_lock syscall tce topoext tsc tsc_scale umip user_shstk
    v_spec_ctrl v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vnmi
    vpclmulqdq wbnoinvd wdt x2avic xgetbv1 xsave xsavec xsaveerptr xsaveopt
    xsaves xtopology
  Vulnerabilities:
  Type: gather_data_sampling 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; RSB filling; PBRSB-eIBRS: Not affected;
    BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA AD102 [GeForce RTX 4090] vendor: PNY driver: nvidia
    v: 550.120 alternate: nouveau,nvidia_drm non-free: 550.xx+
    status: current (as of 2024-09) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 16
    ports: active: none off: DP-2,HDMI-A-1 empty: DP-1,DP-3 bus-ID: 01:00.0
    chip-ID: 10de:2684 class-ID: 0300
  Device-2: Advanced Micro Devices [AMD/ATI] Raphael vendor: ASUSTeK
    driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm)
    built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 16 ports: active: none
    empty: DP-4,HDMI-A-2,Writeback-1 bus-ID: 12:00.0 chip-ID: 1002:164e
    class-ID: 0300 temp: 41.0 C
  Display: unspecified server: X.Org v: 24.1.2 with: Xwayland v: 24.1.2
    compositor: kwin_wayland driver: X: loaded: nvidia
    gpu: nvidia,nvidia-nvswitch display-ID: :1 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x286mm (40.00x11.26")
    s-diag: 1055mm (41.55")
  Monitor-1: DP-2 note: disabled pos: right model: Sceptre L27
    serial: <filter> built: 2018 res: 1920x1080 hz: 60 dpi: 82 gamma: 1.2
    chroma: red: x: 0.639 y: 0.329 green: x: 0.298 y: 0.600 blue: x: 0.137
    y: 0.059 white: x: 0.314 y: 0.329 size: 598x336mm (23.54x13.23")
    diag: 686mm (27") ratio: 16:9 modes: 1920x1080, 1680x1050, 1600x900,
    1280x1024, 1440x900, 1280x960, 1366x768, 1152x864, 1280x768, 1280x720,
    1024x768, 800x600, 720x576, 720x480, 640x480
  Monitor-2: HDMI-A-1 note: disabled pos: primary,left model: 24N1A
    serial: <filter> built: 2022 res: 1920x1080 hz: 60 dpi: 93 gamma: 1.2
    chroma: red: x: 0.655 y: 0.329 green: x: 0.220 y: 0.682 blue: x: 0.149
    y: 0.051 white: x: 0.310 y: 0.329 size: 527x296mm (20.75x11.65")
    diag: 604mm (23.8") ratio: 16:9 modes: 1920x1080, 1680x1050, 1280x1024,
    1440x900, 1280x720, 1024x768, 800x600, 720x480, 640x480
  API: EGL v: 1.5 hw: drv: nvidia drv: amd radeonsi platforms: device: 0
    drv: nvidia device: 2 drv: radeonsi device: 3 drv: swrast gbm: drv: nvidia
    surfaceless: drv: nvidia x11: drv: zink inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.120
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2
    memory: 23.43 GiB
  API: Vulkan v: 1.3.295 layers: 6 device: 0 type: discrete-gpu
    name: NVIDIA GeForce RTX 4090 driver: nvidia v: 550.120 device-ID: 10de:2684
    surfaces: xcb,xlib device: 1 type: integrated-gpu name: AMD Radeon
    Graphics (RADV RAPHAEL_MENDOCINO) driver: mesa radv v: 24.2.4-arch1.0.1
    device-ID: 1002:164e surfaces: xcb,xlib
Audio:
  Device-1: NVIDIA AD102 High Definition Audio vendor: PNY
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:22ba class-ID: 0403
  Device-2: Advanced Micro Devices [AMD/ATI] Rembrandt Radeon High
    Definition Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 12:00.1 chip-ID: 1002:1640
    class-ID: 0403
  Device-3: ASUSTek USB Audio driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-6:3
    chip-ID: 0b05:1a52 class-ID: 0300
  API: ALSA v: k6.11.2-4-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.2.5 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Wi-Fi 6E AX210/AX1675 2x2 [Typhoon Peak] driver: iwlwifi
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 09:00.0
    chip-ID: 8086:2725 class-ID: 0280
  IF: wlp9s0 state: down mac: <filter>
  Device-2: Intel Ethernet I225-V vendor: ASUSTeK driver: igc v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 port: N/A bus-ID: 0a:00.0
    chip-ID: 8086:15f3 class-ID: 0200
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Info: services: NetworkManager, sshd, systemd-timesyncd
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX210 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-9:3 chip-ID: 8087:0032
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 7 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 3.64 TiB used: 661.47 GiB (17.8%)
  ID-1: /dev/nvme0n1 maj-min: 259:0 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: 47.9 C
    scheme: GPT
  SMART: yes health: PASSED on: 30d 6h cycles: 164
    read-units: 4,295,428 [2.19 TB] written-units: 4,521,231 [2.31 TB]
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 3.64 TiB size: 3.58 TiB (98.40%) used: 661.47 GiB (18.0%)
    fs: ext4 block-size: 4096 B dev: /dev/nvme0n1p2 maj-min: 259:2 label: N/A
    uuid: c6d9cb1e-788c-498f-98f1-adc65fbdabb0
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 296 KiB (0.1%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p1
    maj-min: 259:1 label: N/A uuid: FD1E-CDB6
Swap:
  Kernel: swappiness: 10 (default 60) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: file size: 127 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 1-2:2 info: SINOWEALTH Wired Gaming Mouse type: mouse,keyboard
    driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 12 Mb/s (1.4 MiB/s)
    lanes: 1 mode: 1.1 power: 480mA chip-ID: 258a:1007 class-ID: 0301
  Device-2: 1-9:3 info: Intel AX210 Bluetooth type: bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1
    power: 100mA chip-ID: 8087:0032 class-ID: e001
  Hub-2: 2-0:1 info: super-speed hub ports: 5 rev: 3.1
    speed: 20 Gb/s (2.33 GiB/s) lanes: 2 mode: 3.2 gen-2x2 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-3: 3-0:1 info: hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-4: 3-5:2 info: Realtek 4-Port USB 2.0 Hub ports: 4 rev: 2.1
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 0bda:5420
    class-ID: 0900
  Device-1: 3-6:3 info: ASUSTek USB Audio type: audio,HID
    driver: hid-generic,snd-usb-audio,usbhid interfaces: 8 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 100mA
    chip-ID: 0b05:1a52 class-ID: 0300
  Device-2: 3-7:4 info: ASUSTek AURA LED Controller type: HID
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s)
    lanes: 1 mode: 1.1 power: 16mA chip-ID: 0b05:19af class-ID: 0300
    serial: <filter>
  Hub-5: 4-0:1 info: super-speed hub ports: 5 rev: 3.1
    speed: 20 Gb/s (2.33 GiB/s) lanes: 2 mode: 3.2 gen-2x2 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-6: 4-5:2 info: Realtek 4-Port USB 3.0 Hub ports: 4 rev: 3.2
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 0bda:0420
    class-ID: 0900
  Hub-7: 5-0:1 info: hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-8: 6-0:1 info: super-speed hub ports: 2 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-9: 7-0:1 info: hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 7-2:2 info: Microdia USB Keyboard type: keyboard
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0
    speed: 1.5 Mb/s (183 KiB/s) lanes: 1 mode: 1.0 power: 300mA
    chip-ID: 0c45:7603 class-ID: 0301
  Hub-10: 8-0:1 info: super-speed hub ports: 2 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-11: 9-0:1 info: hi-speed hub with single TT ports: 1 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-12: 10-0:1 info: Linux Foundation 3.0 root hub ports: N/A rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 43.6 C mobo: 43.2 C gpu: amdgpu temp: 42.0 C
  Fan Speeds (rpm): N/A
Repos:
  Packages: pm: pacman pkgs: 1598 libs: 488 tools: pamac pm: flatpak pkgs: 0
  Active pacman repo servers in: /etc/pacman.d/mirrorlist
    1: https://ridgewireless.mm.fcix.net/manjaro/stable/$repo/$arch
    2: https://irltoolkit.mm.fcix.net/manjaro/stable/$repo/$arch
    3: https://mirrors.ocf.berkeley.edu/manjaro/stable/$repo/$arch
    4: https://cofractal-ewr.mm.fcix.net/manjaro/stable/$repo/$arch
    5: https://coresite.mm.fcix.net/manjaro/stable/$repo/$arch
    6: https://nocix.mm.fcix.net/manjaro/stable/$repo/$arch
    7: https://mirror.raiolanetworks.com/manjaro/stable/$repo/$arch
    8: https://mirror.yandex.ru/mirrors/manjaro/stable/$repo/$arch
Processes:
  CPU top: 5 of 532
  1: cpu: 6.6% command: firefox pid: 12596 mem: 747.8 MiB (1.1%)
  2: cpu: 5.8% command: kwin_wayland pid: 12219 mem: 362.5 MiB (0.5%)
  3: cpu: 2.9% command: firefox pid: 13153 mem: 283.8 MiB (0.4%)
  4: cpu: 1.0% command: firefox pid: 13887 mem: 138.0 MiB (0.2%)
  5: cpu: 0.4% command: plasmashell pid: 13253 mem: 507.6 MiB (0.8%)
  Memory top: 5 of 532
  1: mem: 747.8 MiB (1.1%) command: firefox pid: 12596 cpu: 6.6%
  2: mem: 507.6 MiB (0.8%) command: plasmashell pid: 13253 cpu: 0.4%
  3: mem: 362.5 MiB (0.5%) command: kwin_wayland pid: 12219 cpu: 5.8%
  4: mem: 283.8 MiB (0.4%) command: firefox pid: 13153 cpu: 2.9%
  5: mem: 260.7 MiB (0.4%) command: konsole pid: 12700 cpu: 0.0%
Info:
  Processes: 532 Power: uptime: 2h 18m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 24.7 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
    tool: systemctl
  Compilers: clang: 18.1.8 gcc: 14.2.1 alt: 13 Shell: Sudo (sudo) v: 1.9.16
    default: Bash v: 5.2.37 running-in: konsole inxi: 3.3.36

First off

Thats not really how it should be done ā€¦ considering we use Plasma 6 now.

kquitapp6 plasmashell && kstart plasmashell

Or even probably preferable

systemctl restart --user plasma-plasmashell

Or

plasmashell --replace

Then

Um ā€¦ what does this mean?
As far as I know nvidia doesnt really require extra steps for hibernation.
(theres one note about possibly blacklist nvidiafb in certain cases, but not sure thats common)

But what did you do - what have your configurations been?

Given some of your boot options I might think its this:
https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend

Which seems to be for suspend rather than hibernate, and also seems to suggest disabling early KMS.

I actually meant to use kquitapp6 and that got past me because kquitapp5 still exists. I actually found that snippet of code from one of your previous posts, which is why the 5 version was used when I copy/pasted/edited. But even so, it does fix things for me, even if incorrect.

I am referring to Preserve Video Memory After Suspend

I had to enable the suspend, hibernate, and resume services and add the module parameter, NVreg_PreserveVideoMemoryAllocations=1

Alright.
We might be interested in your initram/mkinitcpio configurationā€¦

head -n -0 /etc/mkinitcpio.con{f,f.d/*}

(if you dont have any drop-in files in /etc/mkinitcpio.conf.d you could just show us the contents of the /etc/mkinitcpio.conf file)

cat /etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect kms modconf block keyboard keymap consolefont plymouth filesystems resume fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ā‰„ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

Maybe I should add NVreg_PreserveVideoMemoryAllocations to the nvidia modules?

So a few things.

First ā€¦ if you were trying to follow that instruction you need to disable early KMS.

Thats means removing those nvidia modules from your mkinitcpio.conf file.

:information_source: But Iā€™m still not sure all the advice there is really the correct approach.

I do suggest making edits to this file OR a drop-in file like /etc/mkinitcpio.conf.d/custom.conf

What I would consider is implementing the systemd HOOKS.

You can reference the guide here: https://wiki.archlinux.org/title/Mkinitcpio#Common_hooks

But essentially you want the line to look like

HOOKS=(microcode autodetect systemd kms modconf block keyboard keymap consolefont plymouth filesystems resume fsck)

(note I added microcode, as well as removed unnecessary udev and base, but you may consider removing more like the consolefont if you dont use it, and even resume is likely unrequired due to systemd)

Once that change is made you will want to run

sudo mkinitcpio -P && sudo update-grub

PS for edit

No. Partially because of the first part of this post, and also because it is not a module, so it has no business there.

Okay, thanks for taking a look @cscs. Iā€™ll research what you suggest and follow up here when I finish.

1 Like

Since SDDM gave so many people recently big issue, i would try to evade SDDM. I personally think that my system without SDDM feels snappier and this steps are not needed anyways:

System Settings>session>log out screen: shown, mark it unselected.

Additional i can recommend to remove splash screen also:
System Settings>Colors & Themes>Splash Screen>None

Most Important for you, right now since you face this issues:
System Settings>Screen Locking:

Lock Screen Automatically: Never (You may just want to adjust this Value, if the Lock Screen is important to you)
Lock after waking from sleep: unchecked.

Less features, less bugs = more stability.

I already have lock screen disabled and log out screen ā€œShowā€ unselected. The one thing in your list I have not tried is to set the Splash Screen to none. Iā€™ll see if that has any effect.

@cscs, I have not switched to systemd hooks yet, but I did remove kms and the nvidia modules (even though I added those modules quite awhile back because the Arch Wiki recommended it).
After sudo mkinitcpio -P && sudo update-grub, I allowed system to hibernate and then restored. But I still have the issue mentioned in my first post. Itā€™s minor, but sure, it points to some kind of problem.

Removing this 2 commands from Grub canā€™t hurt also.

It shows your the check list when you boot and shutdown your system.

There is also the widespread (Plymouth bug) issue in relations to this 2 features.

As usual sudo update-grub after you saved the file.

Edit:
In addition you can also remove plymouth hook from /etc/mkinitcpio.conf

Then save the File and use this command:
sudo mkinitcpio -P

Sorry, I was doing an edit while you replied. I will do as you suggest.

1 Like

Tested, but no change. So far the only thing that works consistently is my ā€œbadā€ script that uses the kquitapp5 instead of kquitapp6. Why this works, I have no idea.

I would try cscsā€™s idea to switch to systemd hook, but Iā€™m reluctant to do this without understanding more.

Except for having kms in the hook list, everything else in my configuration was done according to recommendations I read on Arch Wiki. Even the kms hook has a dispute flag on Arch Wiki tips and tricks for nvidia (with regard to whether or not it is a problem for hibernate to work).

Regardless, Iā€™ve now tested with/without those modules and the kms hook, and now also your suggestions.

So research continuesā€¦ :smile:

You are right about the kms hook ā€¦ I overlooked that. It could be a contributor to early-kms, but thats only for ā€˜in-treeā€™ modules, so it should not affect nvidia.

On to the systemd hook ā€¦

I heartily suggest you try this as it does supersede the need for a lot of other configs.
You can add it on its own without removing some of the others as I showed, but to assuage your fears and/or get more full information do check the table at the archwiki:
https://wiki.archlinux.org/title/Mkinitcpio#Common_hooks

Just to get double sureā€¦ did you saw this under Known Issue?

I did see that, but my system does not freeze and I have no trouble logging in.

Solution Summary
I discovered the following in /proc/driver/nvidia/params:

PreserveVideoMemoryAllocations: 0

Which indicates that parameter was still not enabled.

In grub, I had

NVreg_PreserveVideoMemoryAllocationons instead of nvidia.NVreg_PreserveVideoMemoryAllocationons

But even with that correction, the memory allocation parameter was still unset.

So I created /etc/modprobe.d/nvidia-power-management.conf with the following line:

options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp

then

sudo mkinitcpio -P
sudo update-grub

After restarting, I verified that

PreserveVideoMemoryAllocations: 1

That fixed the hidden icons and rendering behavior.

Also, just to make clear to anyone else who might have a similar problem, only my Wayland session was affected by this. Iā€™ve never had this problem with an X11 session.

Post Solution Edits
Iā€™m liking how hibernation is working now, but I did notice some errors in the journal logs. In particular see here for details.

See comment from Seth: Just a hunch but try "nvidia_drm.fbdev=0", the default has recently changed. I had it set to ā€œ1ā€ per Arch Wiki, but the comment may apply to kernels >= 6.11.2, which apparently affected me.

I made the change, and indeed, the error I was seeing, "Flip event timeout on head" vanished.

Maybe this is why @cscs suggests switching to systemd hook?

Iā€™ve also tested with Save Session on Logout and everything is restored nicely on resume :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.