Error: couldn't switch to requested monitor resolution

Hello kind people,
I recently installed Fedora 39 KDE on my laptop, which has a dedicated Nvidia Gtx 1650ti GPU. As I planned to game a fair bit on it, I installed the proprietary Nvidia drivers through rpmfusion and signed them to work with safe boot; both Steam and Heroic Launcher worked flawlessly with every game I tried on default settings; I didn’t even need to switch to X11 as the games I play worked perfectly on Wayland. After a couple days of normal use (installing flatpacks and updating software mainly), almost every game I try to launch since on both platforms gives the following error:

Screenshot_20240404_224652

Additionally, the error pops up on both Wayland and X11 sessions (so I assume it’s not a Wayland-only issue). Searching online I just found some rough fixes like disabling the DXVK/VKD3D options on Heroic and setting PROTON_USE_WINED3D11=1 %command% as a launch option on Steam; these of course aren’t long term solutions (the games work but don’t behave correctly), though they are essentially doing the same thing I think. From my understanding the underlying problem involves Vulkan rendering, but I can’t for the life of me fathom why they were working in the beginning and then just stop functioning properly.
Now, I’m a beginner user (switched full time on Linux just some weeks ago), and don’t have the abilities to dig deeper into this, so I’m asking for help here to not become insane.
I don’t really know which logs would be most useful to inspect, so I will produce and send them upon request. Thank you all

1 Like

You stated that you have done updates.
Doing so while a kernel update is involved has the potential to corrupt the drivers should a reboot be performed too soon after the update is completed.

Please try this and let us know the result.

  1. sudo dnf remove kmod-nvidia-$(uname -r) to remove the problematic drivers
    then
  2. sudo akmods --force to rebuild and reinstall the drivers.
  3. reboot.

Will try. Thank you

Unfortunately it does not work. I let it rest a few minutes to ensure it finished rebuilding everything, but the error persists.

There may be other issues.
Please post the output of inxi -Fzxx and dnf list installed \*nvidia\* as well as cat /proc/cmdline

Certainly.
Output of dnf list installed \*nvidia\*

Installed Packages
akmod-nvidia.x86_64                                    3:550.67-1.fc39              @rpmfusion-nonfree-updates
kmod-nvidia-6.7.11-200.fc39.x86_64.x86_64              3:550.67-1.fc39              @@commandline             
kmod-nvidia-6.8.4-200.fc39.x86_64.x86_64               3:550.67-1.fc39              @@commandline             
nvidia-gpu-firmware.noarch                             20240312-1.fc39              @updates                  
nvidia-modprobe.x86_64                                 3:550.67-1.fc39              @rpmfusion-nonfree-updates
nvidia-settings.x86_64                                 3:550.67-1.fc39              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                             3:550.67-1.fc39              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64                   3:550.67-1.fc39              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64                     3:550.67-1.fc39              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64                        3:550.67-1.fc39              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64                       3:550.67-1.fc39              @rpmfusion-nonfree-updates
ace@HPipboy:~$ cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.8.4-200.fc39.x86_64 root=UUID=7d2ab296-0f7d-4b8c-86e7-cf6dde718fc3 ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau rd.luks.uuid=luks-4981dbb6-df25-425d-bf85-85c3e86f862f rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau

Output of cat /proc/cmdline:

BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.8.4-200.fc39.x86_64 root=UUID=7d2ab296-0f7d-4b8c-86e7-cf6dde718fc3 ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau rd.luks.uuid=luks-4981dbb6-df25-425d-bf85-85c3e86f862f rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau

Output of inxi -Fzxx

System:
  Kernel: 6.8.4-200.fc39.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.40-14.fc39
  Desktop: KDE Plasma v: 5.27.11 tk: Qt v: 5.15.12 wm: kwin_wayland dm: SDDM
    Distro: Fedora Linux 39 (KDE Plasma)
Machine:
  Type: Laptop System: HP product: HP Pavilion Gaming Laptop 16-a0xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 87AE v: 32.31 serial: <superuser required>
    part-nu: 1C4S4EA#ABZ UEFI: AMI v: F.21 date: 03/17/2021
Battery:
  ID-1: BAT0 charge: 44.1 Wh (100.0%) condition: 44.1/44.1 Wh (100.0%)
    volts: 12.8 min: 11.6 model: HP Primary serial: <filter> status: full
CPU:
  Info: 6-core model: Intel Core i7-10750H bits: 64 type: MT MCP
    arch: Comet Lake rev: 2 cache: L1: 384 KiB L2: 1.5 MiB L3: 12 MiB
  Speed (MHz): avg: 1133 high: 4800 min/max: 800/5000 cores: 1: 800 2: 800
    3: 800 4: 800 5: 800 6: 4800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800
    bogomips: 62399
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-9.5 ports: active: eDP-1 empty: none
    bus-ID: 00:02.0 chip-ID: 8086:9bc4
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Ti Mobile]
    vendor: Hewlett-Packard driver: nvidia v: 550.67 arch: Turing pcie:
    speed: 2.5 GT/s lanes: 8 ports: active: none empty: DP-1,HDMI-A-1
    bus-ID: 01:00.0 chip-ID: 10de:1f95
  Device-3: Quanta HP TrueVision HD Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-6:4 chip-ID: 0408:5365
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 23.2.4
    compositor: kwin_wayland driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,nouveau,vesa alternate: nv dri: iris gpu: i915,nvidia
    display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 1 drv: iris
    device: 3 drv: swrast surfaceless: drv: nvidia wayland: drv: iris x11:
    drv: iris inactive: gbm,device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 23.3.6 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel UHD Graphics (CML GT2)
    device-ID: 8086:9bc4 display-ID: :0.0
  API: Vulkan v: 1.3.275 surfaces: xcb,xlib,wayland device: 0
    type: integrated-gpu driver: N/A device-ID: 8086:9bc4 device: 1
    type: discrete-gpu driver: N/A device-ID: 10de:1f95 device: 2 type: cpu
    driver: N/A device-ID: 10005:0000
Audio:
  Device-1: Intel Comet Lake PCH cAVS vendor: Hewlett-Packard
    driver: sof-audio-pci-intel-cnl bus-ID: 00:1f.3 chip-ID: 8086:06c8
  Device-2: NVIDIA vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    pcie: speed: 8 GT/s lanes: 8 bus-ID: 01:00.1 chip-ID: 10de:10fa
  Device-3: Focusrite-Novation Scarlett 2i2 3rd Gen driver: snd-usb-audio
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-2:3 chip-ID: 1235:8210
  API: ALSA v: k6.8.4-200.fc39.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.0.4 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: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: 4000 bus-ID: 03:00.0 chip-ID: 10ec:8168
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter
    vendor: Hewlett-Packard driver: rtw_8822ce v: N/A pcie: speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 04:00.0 chip-ID: 10ec:c822
  IF: wlo1 state: down mac: <filter>
Bluetooth:
  Device-1: Realtek 802.11ac WLAN Adapter driver: btusb v: 0.8 type: USB
    rev: 1.0 speed: 12 Mb/s lanes: 1 bus-ID: 1-7:5 chip-ID: 0bda:b00c
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.1 lmp-v: 10
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 bus-ID: 00:17.0 chip-ID: 8086:282a
Drives:
  Local Storage: total: 476.94 GiB used: 34.75 GiB (7.3%)
  ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKNW512G8H size: 476.94 GiB
    speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 34.9 C
Partition:
  ID-1: / size: 475.34 GiB used: 34.35 GiB (7.2%) fs: btrfs dev: /dev/dm-0
    mapped: luks-4981dbb6-df25-425d-bf85-85c3e86f862f
  ID-2: /boot size: 973.4 MiB used: 391.6 MiB (40.2%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 19 MiB (3.2%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 475.34 GiB used: 34.35 GiB (7.2%) fs: btrfs
    dev: /dev/dm-0 mapped: luks-4981dbb6-df25-425d-bf85-85c3e86f862f
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 61.0 C pch: 51.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 0 fan-2: 0
Info:
  Memory: total: 16 GiB available: 15.39 GiB used: 3.96 GiB (25.7%)
  Processes: 409 Power: uptime: 1h 34m wakeups: 0 Init: systemd v: 254
    target: graphical (5) default: graphical
  Packages: pm: flatpak pkgs: 32 Compilers: gcc: 13.2.1 Shell: Bash
    v: 5.2.26 running-in: konsole inxi: 3.3.33

try old kernel from boot grub list hold etc button on boot and select sec or third kernel

I note that the cmdline does not contain the often needed option nvidia-drm.modeset=1.

You might cause the grub menu to display for boot with the command sudo grub2-editenv - unset menu_auto_hide. When you reboot the grub menu should now be displayed.
(You can cause the grub menu to be hidden again with sudo grub2-editenv - set menu_auto_hide=1)

Once the grub menu is displayed it is easy to press the e key to edit the commands for booting for temporary testing.

To test if this option may be helpful you can edit the line that begins with linux and add that option (nvidia-drm.modeset=1) to that line then continue booting.

If it solves the issue with monitor resolution then you could make it permanent by editing the file /etc/default/grub, add that option to the line that begins with GRUB_CMDLINE_LINUX, then run the command sudo grub2-mkconfig -o /boot/grub2/grub.cfg. This should make that option a part of every subsequent boot.

Thank you, I’ll be back tomorrow after testing your suggestions.

I’m very sorry to report that setting nvidia-drm.modeset=1 from grub did not solve the issue. Should I enable permanently the boot command anyways?
Yesterday I also noticed that the issue temporarily solved itself before shutting down the system for the day, but it did so without my intervention whatsoever, while starting the laptop today reverted it to the faulty state. I can include the log of one of the games launching with the error if it is useful in pinpointing the issue.

Good day, I tried booting fedora with kernel 6.7 and the issue persisted. Booting with the previous version (6.5) didn’t load the Nvidia drivers (classic “Kernel module missing” error) and loaded nouveau, in which case the games started up without errors. Considering the nouveau drivers were loaded, I don’t think this really worked. Should I try again after disabling safe boot?

Please check the status of secureboot. mokutil --sb-state should show that clearly.
Also show us the actual kernel in use. uname -r You show a 6.8.4 kernel in the inxi output, you mention a 6.7 kernel in the post just above, and you mention a 6.5 kernel in the same post. F39 has progressed from the 6.5.6 kernel with release in November to the 6.8.4 kernel release in the last week, with a lot of kernel updates over the past 5 months. If you still have the 6.5.6 kernel installed I have to wonder why you have not been routinely performing updates.

We find it difficult to follow symptoms if the system is not running consistently in the same (and most recent) environment, and problems are often solved (or introduced) with system updates. Changing the kernels used to boot presents problems of its own in troubleshooting.

Please boot to the latest kernel then we can perform troubleshooting with the system updated and in a known config. If you cannot be patient while troubleshooting like that then it is almost impossible to analyze the situation.

My apologies for not explaining in a clearer manner. All my considerations since the post has been written were done while on the latest kernel (6.8). I tried booting with older kernels as suggested by user @ledeni just to see if the issue persisted, as explored in my most recent answer: it was not meant to create confusion. Everything I described so far happens on the latest and most recent kernel version that I adopted since it rolled out; from what I can tell, I have performed system updates as soon as they were notified to be available from the update utility.
Output of mokutil --sb-state reports that secure boot is enabled, and uname -r shows the following:

6.8.4-200.fc39.x86_64

Then I would suggest that you add the option noted above as a permanent addition to the kernel command line by editing /etc/default/grub as indicated above and updating the grub.cfg file.

Also check that the nvidia drivers are loaded with lsmod | grep -iE "nvidia|nouveau"

Will do, thank you. lsmod | grep -iE "nvidia|nouveau" seems to list the nvidia drivers as loaded:

nvidia_drm            126976  1
nvidia_modeset       1605632  1 nvidia_drm
nvidia_uvm           6651904  0
nvidia              60370944  7 nvidia_uvm,nvidia_modeset
video                  77824  2 i915,nvidia_modeset

Would one of the games’ error log be of any use?

Exactly the same problem on Fedora 40 KDE…