Weird behavior of nvidia driver while logged out

When I install nvidia akmod driver my Fedora 38 system starts behaving weirdly. Just before starting write this I decided to uninstall it and reinstall to describe what happens when I do so. After first reload system just boots perfectly fine except for one additional unknown 13.3’’ VGA display appearing in settings and os taking very long time to boot. I can easily log into both wayland and x11 sessions of gnome.

Here are two strings that take the most time while loading to complete:

        Starting dracut-pre-pivot.uacut pre-pivot and cleanup hook…..
[ *** ] Job systemd-udevd.service/stop running (28s / no limit): Shutting down...

Before reboot I disable unknown display in gnome setting and in nvidia X settings. The second reboot also takes a long time getting stuck on

[ OK ] Reached target basic.target - Basic System.

It can take 60-80 seconds to move on. Then, when I finally get to the lock screen, I see normal user selection in low a resolution for a fraction of a second and then my displays get set to their native resolutions but the user selection is gone and both screens are grey. I can still press enter, enter password and log in, so I assume that it is on that third screen.

When I just log out of an account without rebooting everithing works fine. Also while being logged in in both wayland and x11 everithing is fine and additional screen is disabled.

I’ve tried saving screen configuration in config file in /etc/x11 through nvidia x settings which seemed to remove that screen from x settings, but didn’t help with fixing the main issue

When I uninstall the driver everything works fine, but this way I can’t set my first monitor to 144hz, it just gets black. But the boot times are still quite long, though it may be due to me installing driver just after removing it and rebooting

Also there is one more thing that confuses me. The x settings app doesn’t show that 13.3’’ display in a list of physical connections

I don’t know what additional information I can provide, so just ask me. I want to fix both wrong screen and long boot time, but if it won’t work I would appreciate even if you just told me how to get rid of that 3rd screen

My PC:
RTX 2080 S
i9 9900kf
32 gb ram
monitor 1: 1440:3440 144 hz connected through dp
moninor 2: 1080:1920 60 hz connected through hdmi

Please post the output of inxi -Fzxx and dnf list installed '*nvidia*'

Any time the user installs the nvidia drivers and/or there is a kernel update it takes several minutes for the new driver modules to be compiled and installed. It is necessary to wait for that to complete before rebooting.

here’s the output

[fin@fedora ~]$ inxi -Fzxx
System:
  Kernel: 6.2.14-300.fc38.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.39-9.fc38 Desktop: GNOME v: 44.1 tk: GTK v: 3.24.37 wm: gnome-shell
    dm: GDM Distro: Fedora release 38 (Thirty Eight)
Machine:
  Type: Desktop System: Gigabyte product: Z390 AORUS MASTER v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: Z390 AORUS MASTER-CF v: x.x
    serial: <superuser required> UEFI: American Megatrends v: F10
    date: 10/15/2019
Battery:
  ID-1: hidpp_battery_0 charge: 94% condition: N/A volts: 4.1 min: N/A
    model: Logitech G502 LIGHTSPEED Wireless Gaming Mouse serial: <filter>
    status: discharging
CPU:
  Info: 8-core model: Intel Core i9-9900KF bits: 64 type: MT MCP
    arch: Coffee Lake rev: D cache: L1: 512 KiB L2: 2 MiB L3: 16 MiB
  Speed (MHz): avg: 4565 high: 4801 min/max: 800/5000 cores: 1: 4800 2: 4800
    3: 4788 4: 4746 5: 4800 6: 3600 7: 4800 8: 3600 9: 4800 10: 3600 11: 4767
    12: 4800 13: 4801 14: 4761 15: 4800 16: 4790 bogomips: 115200
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2080 SUPER] vendor: Gigabyte
    driver: nvidia v: 530.41.03 arch: Turing pcie: speed: 8 GT/s lanes: 16
    ports: active: none off: DP-1,HDMI-A-1 empty: DP-2,DP-3,Unknown-2
    bus-ID: 01:00.0 chip-ID: 10de:1e81
  Device-2: Logitech BRIO Ultra HD Webcam type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-4:2 chip-ID: 046d:085e
  Display: wayland server: X.Org v: 22.1.9 with: Xwayland v: 22.1.9
    compositor: gnome-shell driver: X: loaded: nvidia
    gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 5360x1440 s-dpi: 96
  Monitor-1: XWAYLAND0 pos: primary,left res: 3440x1440 dpi: 109
    diag: 865mm (34.07")
  Monitor-2: XWAYLAND1 pos: right res: 1920x1080 dpi: 81
    diag: 690mm (27.15")
  API: OpenGL v: 4.6.0 NVIDIA 530.41.03 renderer: NVIDIA GeForce RTX 2080
    SUPER/PCIe/SSE2 direct-render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Gigabyte driver: snd_hda_intel
    bus-ID: 1-4:2 v: kernel chip-ID: 046d:085e bus-ID: 00:1f.3
    chip-ID: 8086:a348
  Device-2: NVIDIA TU104 HD Audio vendor: Gigabyte driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f8
  Device-3: Logitech BRIO Ultra HD Webcam type: USB
    driver: snd-usb-audio,uvcvideo
  Device-4: Logitech G560 Gaming Speaker type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-5:3 chip-ID: 046d:0a78
  API: ALSA v: k6.2.14-300.fc38.x86_64 status: kernel-api
  Server-1: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:a370
  IF: wlo1 state: down mac: <filter>
  Device-2: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15bc
  IF: eno2 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: tun0 state: unknown speed: 10000 Mbps duplex: full mac: N/A
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
    driver: btusb v: 0.8 bus-ID: 1-14:9 chip-ID: 8087:0aaa
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 3.17 TiB used: 75.48 GiB (2.3%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 1TB
    size: 931.51 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 49.9 C
  ID-2: /dev/sda vendor: Kingston model: SA400S37480G size: 447.13 GiB
    speed: 6.0 Gb/s serial: <filter>
  ID-3: /dev/sdb vendor: Toshiba model: HDWD120 size: 1.82 TiB
    speed: 6.0 Gb/s serial: <filter>
Partition:
  ID-1: / size: 441.65 GiB used: 75.18 GiB (17.0%) fs: btrfs
    dev: /dev/nvme0n1p7
  ID-2: /boot size: 973.4 MiB used: 291.2 MiB (29.9%) fs: ext4
    dev: /dev/nvme0n1p6
  ID-3: /boot/efi size: 598.8 MiB used: 17.4 MiB (2.9%) fs: vfat
    dev: /dev/nvme0n1p5
  ID-4: /home size: 441.65 GiB used: 75.18 GiB (17.0%) fs: btrfs
    dev: /dev/nvme0n1p7
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 40.0 C pch: 55.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 0
Info:
  Processes: 451 Uptime: 3h 9m Memory: 31.26 GiB used: 4.67 GiB (14.9%)
  Init: systemd v: 253 target: graphical (5) default: graphical Compilers:
  gcc: 13.1.1 Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 47
  Shell: Bash v: 5.2.15 running-in: gnome-terminal inxi: 3.3.26
[fin@fedora ~]$ dnf list installed '*nvidia*'
Installed Packages
akmod-nvidia.x86_64                       3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.2.14-300.fc38.x86_64.x86_64 3:530.41.03-1.fc38 @@commandline      
nvidia-gpu-firmware.noarch                20230404-149.fc38  @updates           
nvidia-settings.x86_64                    3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686             3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64           3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64          3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver

i didn’t know that compiling takes additional time after dnf finished its job, thank you for telling

Those outputs look perfectly normal to me. If you are using apps that need cuda you could also install xorg-x11-drv-nvidia-cuda which would support cuda on that GPU. It also would provide the nvidia-smi command which gives info about the GPU as well.

I am not sure I understand your issue, or what you did in trying to save the screen settings.
I have an older (GTX 1050 Ti) card and only one monitor, and never have had any issues with either the default nouveau driver or the nvidia drivers.

I am on gnome with the workstation release. There is nothing I have manually configured for graphics under /etc/X11. It was all done for me and has remained unchanged since installation.

You might already be aware but settings in that location are only used when running xorg and not used when using wayland for the DE.

My recommendations that seem to work for most is to do the install of the nvidia drivers from rpmfusion (as you have done) then wait for about 5 minutes before rebooting.

I do note that your UEFI firmware is quite old (10/15/2019). Although certainly new enough to support that GPU, I have to wonder if the newer kernels might not benefit from an update of the bios. The firmware also contains security updates in the F11 release November 2021.