Gnome crashing when external monitor wakes

Hi, for some time I have problems when for example I lock screen, external monitor goes off and then I wake that monitor up. Also happens when just monitor goes to sleep after inactivity and then I move mouse for example. Every time monitor wakes up or gets powered on, gnome crashes, logs me off and returns me back to gdm login screen. Sometimes happens right after boot and login and sometimes gdm no longer display possibility to login to wayland session, only to x11. Can someone help me, tell me what is wrong? Happens on other distros as well, not only Fedora. Tried arch and pop os.

This is my log: http://0x0.st/Hy9Y.txt
I logged in, at 9:23 I turned monitor off and on again, no problem. At 9:24 I turned off monitor, waited a little and in 9:24:10 I turned monitor back again and everything crashed.

Thanks a lot

My suspected cause is Nvidia, but I don’t actually see anything useful in the logs, it’s just a guess. If you run ABRT, do you see any crash (from that exact time) reported? Does this happen even if you use an X11 session instead of Wayland? If you boot an F39 Workstation Live image, which uses nouveau instead of the proprietary nvidia driver, does it crash as well?

I see this in the log, which would indicate your laptop is one that has a gpu supported by the nvidia-powerd service.

Oct 30 09:21:50 fedora NetworkManager[1377]: <info>  [1698654110.7758] Loaded device plugin: NMBluezManager (/usr/lib64/NetworkManager/1.44.0-1.fc39/libnm-device-plugin-bluetooth.so)
Oct 30 09:21:50 fedora systemd[1]: Started nvidia-powerd.service - nvidia-powerd service.
Oct 30 09:21:50 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-powerd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Oct 30 09:21:50 fedora /usr/bin/nvidia-powerd[1083]: Dbus Connection is established
Oct 30 09:21:50 fedora NetworkManager[1377]: <info>  [1698654110.7785] Loaded device plugin: NMTeamFactory (/usr/lib64/NetworkManager/1.44.0-1.fc39/libnm-device-plugin-team.so)

I see nothing else that points to anything directly related to nvidia, and this is a notification, not an error.

However it would be helpful if you were to post the outputs of both inxi -Fzxx and dnf list installed \*nvidia\* so we could see more detail.

inxi:

System:
  Kernel: 6.5.6-300.fc39.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.40-13.fc39 Desktop: GNOME v: 45.0 tk: GTK v: 3.24.38 wm: gnome-shell
    dm: GDM Distro: Fedora release 39 (Thirty Nine)
Machine:
  Type: Laptop System: Acer product: Predator PH315-54 v: V1.12
    serial: <superuser required>
  Mobo: TGL model: QX60_TLS v: V1.12 serial: <superuser required>
    UEFI: Insyde v: 1.12 date: 06/07/2022
Battery:
  ID-1: BAT1 charge: 49.3 Wh (100.0%) condition: 49.3/58.8 Wh (83.9%)
    volts: 17.1 min: 15.4 model: SMP AP18E7M serial: <filter> status: full
CPU:
  Info: 8-core model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    arch: Tiger Lake rev: 1 cache: L1: 640 KiB L2: 10 MiB L3: 24 MiB
  Speed (MHz): avg: 1120 high: 2983 min/max: 800/4600 cores: 1: 800 2: 1864
    3: 2983 4: 2417 5: 800 6: 800 7: 801 8: 800 9: 800 10: 800 11: 800 12: 971
    13: 886 14: 800 15: 800 16: 800 bogomips: 73728
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Acer Incorporated ALI
    driver: i915 v: kernel arch: Gen-12.1 ports: active: eDP-1 empty: DP-1,DP-2
    bus-ID: 0000:00:02.0 chip-ID: 8086:9a60
  Device-2: NVIDIA GA104M [GeForce RTX 3070 Mobile / Max-Q]
    vendor: Acer Incorporated ALI driver: nvidia v: 535.113.01 arch: Ampere
    ports: active: none off: DP-3,HDMI-A-1 empty: none bus-ID: 0000:01:00.0
    chip-ID: 10de:249d
  Device-3: Quanta HD User Facing driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-9:3 chip-ID: 0408:a061
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 23.2.1
    compositor: gnome-shell driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,nouveau,vesa alternate: nv dri: iris
    gpu: i915,nvidia,nvidia-nvswitch display-ID: 0
  Monitor-1: DP-3 model: Acer K242HL res: 1920x1080 dpi: 92
    diag: 609mm (24")
  Monitor-2: HDMI-A-1 model: ASUS XG32VC res: 2560x1440 dpi: 93
    diag: 800mm (31.5")
  Monitor-3: eDP-1 model: BOE Display 0x0aa5 res: 1920x1080 dpi: 142
    diag: 395mm (15.5")
  API: OpenGL v: 4.6 Mesa 23.2.1 renderer: Mesa Intel UHD Graphics (TGL GT1)
    direct-render: Yes
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Acer Incorporated ALI
    driver: snd_hda_intel v: kernel bus-ID: 0000:00:1f.3 chip-ID: 8086:43c8
  Device-2: NVIDIA GA104 High Definition Audio vendor: Acer Incorporated ALI
    driver: snd_hda_intel v: kernel bus-ID: 0000:01:00.1 chip-ID: 10de:228b
  API: ALSA v: k6.5.6-300.fc39.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 0.3.80 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi vendor: Rivet Networks
    driver: iwlwifi v: kernel bus-ID: 0000:00:14.3 chip-ID: 8086:43f0
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek vendor: Acer Incorporated ALI driver: r8169 v: kernel
    port: 3000 bus-ID: 0000:2c:00.0 chip-ID: 10ec:2600
  IF: enp44s0 state: up speed: 100 Mbps duplex: full mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-14:5 chip-ID: 8087:0026
  Report: btmgmt ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b
Drives:
  Local Storage: total: 1.86 TiB used: 123.51 GiB (6.5%)
  ID-1: /dev/nvme0n1 vendor: Micron model: 3400 MTFDKBA1T0TFH
    size: 953.87 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 34.9 C
  ID-2: /dev/sda vendor: Milan model: II 1TB size: 953.84 GiB type: USB
    rev: 3.1 spd: 10 Gb/s lanes: 1 speed: <unknown> serial: <filter>
Partition:
  ID-1: / size: 952.25 GiB used: 123.25 GiB (12.9%) fs: btrfs dev: /dev/sda3
  ID-2: /boot size: 973.4 MiB used: 249.7 MiB (25.7%) fs: ext4
    dev: /dev/sda2
  ID-3: /boot/efi size: 598.8 MiB used: 17.4 MiB (2.9%) fs: vfat
    dev: /dev/sda1
  ID-4: /home size: 952.25 GiB used: 123.25 GiB (12.9%) fs: btrfs
    dev: /dev/sda3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  Src: /sys System Temperatures: cpu: 44.0 C mobo: N/A
  Fan Speeds (rpm): N/A
  Power: 12v: N/A 5v: 5 3.3v: N/A vbat: N/A
Info:
  Processes: 463 Uptime: 2m Memory: total: 16 GiB available: 15.14 GiB
  used: 4.47 GiB (29.5%) Init: systemd v: 254 target: graphical (5)
  default: graphical Compilers: gcc: 13.2.1 Packages: pm: rpm pkgs: N/A
  note: see --rpm pm: flatpak pkgs: 24 Shell: fish v: 3.6.1
  running-in: gnome-terminal inxi: 3.3.29

dnf list:

Installed Packages
akmod-nvidia.x86_64                                                                                   3:535.113.01-1.fc39                                                               @rpmfusion-nonfree              
kmod-nvidia-6.5.6-300.fc39.x86_64.x86_64                                                              3:535.113.01-1.fc39                                                               @@commandline                   
nvidia-gpu-firmware.noarch                                                                            20230919-1.fc39                                                                   @fedora                         
nvidia-persistenced.x86_64                                                                            3:535.113.01-1.fc39                                                               @rpmfusion-nonfree              
nvidia-settings.x86_64                                                                                3:535.113.01-1.fc39                                                               @rpmfusion-nonfree              
xorg-x11-drv-nvidia.x86_64                                                                            3:535.113.01-1.fc39                                                               @rpmfusion-nonfree              
xorg-x11-drv-nvidia-cuda.x86_64                                                                       3:535.113.01-1.fc39                                                               @rpmfusion-nonfree              
xorg-x11-drv-nvidia-cuda-libs.i686                                                                    3:535.113.01-1.fc39                                                               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                                                                  3:535.113.01-1.fc39                                                               @rpmfusion-nonfree              
xorg-x11-drv-nvidia-kmodsrc.x86_64                                                                    3:535.113.01-1.fc39                                                               @rpmfusion-nonfree              
xorg-x11-drv-nvidia-libs.i686                                                                         3:535.113.01-1.fc39                                                               @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                                                                       3:535.113.01-1.fc39                                                               @rpmfusion-nonfree              
xorg-x11-drv-nvidia-power.x86_64                                                                      3:535.113.01-1.fc39                                                               @rpmfusion-nonfree  

I do not know if nvidia-powerd.service is supposed to support the RTX 3070 Mobile or not.

To test if that may be the issue, especially since it looks like nvidia-powerd loads during boot and would be active during the sleep/wakeup, it might be worth a test by temporarily disabling nvidia-powerd and see if the crashes are eliminated.

sudo systemctl stop nvidia-powerd.service should halt it for testing purposes during the current boot. If you wish to disable it for longer periods then use sudo systemctl <disable|enable> nvidia-powerd.service to totally disable or enable it. The default is enabled.

Disabling nvidia-powerd.service did not help. Today when I booted to gdm, I had to enter password like 5 times until I finally got into system. In all the attempts, system crashed and returned me back to gdm. Log is here: http://0x0.st/HygJ.txt

The problem is still there even after the month. Today I haven’t been able to even login into wayland session after about 10 tries. Log is here: https://0x0.st/HwDf.txt
Can somebody please see in the log what is wrong? I can also gladly provide any other log you might need. Thanks a lot