Can't wake up from suspend when nvidia is the PrimaryGPU

  1. When AMD GPU is the primary GPU
    (1) Use Type-C to DP to connect the external monitor, the external monitor cannot be found after resuming from suspend, and the monitor can be recognized after replugging the Type-C
    (2) Use HDMI to connect an external monitor, the external monitor can be recognized after resuming from suspend
  2. When NVIDIA GPU is the primary GPU
    Trying to wake up after suspend, sometimes screen mosaics, sometimes Gnome freezes or crashes

nvidia-bug-report.log.gz (701.4 KB)

~ » systemctl is-enabled nvidia-resume.service   
enabled
~ » systemctl is-enabled nvidia-suspend.service
enabled
~ » systemctl is-enabled nvidia-hibernate.service
enabled
~ » cat /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "true"
    Option "ForceFullCompositionPipeline" "true"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

System:
  Kernel: 5.17.3-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    Desktop: GNOME v: 42.0 Distro: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82JQ v: Lenovo Legion R9000P2021H
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0L77769 WIN
    serial: <superuser required> UEFI: LENOVO v: GKCN53WW date: 02/25/2022
CPU:
  Info: 8-core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 3 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
Graphics:
  Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 510.60.02 bus-ID: 01:00.0
  Device-2: AMD Cezanne vendor: Lenovo driver: amdgpu v: kernel
    bus-ID: 06:00.0
  Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1 driver: X:
    loaded: amdgpu,nvidia unloaded: modesetting
    gpu: amdgpu,nvidia,nvidia-nvswitch resolution: 1: 3840x2160~60Hz
    2: 2560x1600~165Hz
  OpenGL: renderer: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.60.02 direct render: Yes
Audio:
  Device-1: NVIDIA driver: snd_hda_intel v: kernel bus-ID: 01:00.1
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: N/A bus-ID: 06:00.5
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 06:00.6
  Sound Server-1: ALSA v: k5.17.3-arch1-1 running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.50 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel port: 2000 bus-ID: 03:00.0
  IF: eno1 state: down mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 04:00.0
  IF: wlp4s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-4:2
  Report: rfkill ID: hci0 rfk-id: 12 state: up address: see --recommends