Cannot detect external monitor on Fedora40 with X11

Hello everyone!
I am new to the group and I am not very expert in this topic.
I recently moved to fedora40 and I am not able anymore to use my external laptop.
I am using x11. Here the main info that can be helpful.

[sara@mike ~]$ echo $XDG_SESSION_TYPE
x11
[sara@mike ~]$ lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe Graphics] (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation AD107M [GeForce RTX 4050 Max-Q / Mobile] (rev a1)
[sara@mike ~]$ inxi -Fzxx
System:
  Kernel: 6.12.8-100.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-38.fc40
  Desktop: KDE Plasma v: 6.2.5 tk: Qt v: N/A wm: kwin_x11 dm: SDDM
    Distro: Fedora Linux 40 (KDE Plasma)
Machine:
  Type: Laptop System: HP product: Victus by HP Gaming Laptop 15-fa1xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8BB1 v: 63.20 serial: <superuser required>
    part-nu: 8F8X0EA#ABZ UEFI: AMI v: F.10 date: 04/12/2023
Battery:
  ID-1: BAT0 charge: 57.7 Wh (100.0%) condition: 57.7/70.1 Wh (82.4%)
    volts: 17.4 min: 15.4 model: HP Primary serial: <filter> status: full
CPU:
  Info: 14-core (6-mt/8-st) model: 13th Gen Intel Core i7-13700H bits: 64
    type: MST AMCP arch: Raptor Lake rev: 2 cache: L1: 1.2 MiB L2: 11.5 MiB
    L3: 24 MiB
  Speed (MHz): avg: 676 min/max: 400/4800:5000:3700 cores: 1: 676 2: 676
    3: 676 4: 676 5: 676 6: 676 7: 676 8: 676 9: 676 10: 676 11: 676 12: 676
    13: 676 14: 676 15: 676 16: 676 17: 676 18: 676 19: 676 20: 676
    bogomips: 116736
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Raptor Lake-P [Iris Xe Graphics] vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-13 ports: active: eDP-1 empty: DP-1
    bus-ID: 00:02.0 chip-ID: 8086:a7a0
  Device-2: NVIDIA AD107M [GeForce RTX 4050 Max-Q / Mobile]
    vendor: Hewlett-Packard driver: N/A arch: Lovelace pcie: speed: 16 GT/s
    lanes: 8 bus-ID: 01:00.0 chip-ID: 10de:28a1
  Device-3: Quanta HP Wide Vision HD Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-6:4 chip-ID: 0408:5482
  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 24.1.4
    compositor: kwin_x11 driver: X: loaded: modesetting unloaded: fbdev,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96
  Monitor-1: eDP-1 model: BOE Display 0x094d res: 1920x1080 dpi: 142
    diag: 395mm (15.5")
  API: EGL v: 1.5 platforms: device: 0 drv: iris device: 1 drv: swrast gbm:
    drv: iris surfaceless: drv: iris x11: drv: iris inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.1.7 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel Graphics (RPL-P)
    device-ID: 8086:a7a0
  API: Vulkan v: 1.3.296 surfaces: xcb,xlib device: 0 type: integrated-gpu
    driver: N/A device-ID: 8086:a7a0 device: 1 type: cpu driver: N/A
    device-ID: 10005:0000
Audio:
  Device-1: Intel Raptor Lake-P/U/H cAVS vendor: Hewlett-Packard
    driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3 chip-ID: 8086:51ca
  Device-2: NVIDIA AD107 High Definition Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 8
    bus-ID: 01:00.1 chip-ID: 10de:22be
  API: ALSA v: k6.12.8-100.fc40.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.0.9 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: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: AzureWave driver: mt7921e v: kernel pcie: speed: 5 GT/s lanes: 1
    bus-ID: 04:00.0 chip-ID: 14c3:7961
  IF: wlp4s0 state: up mac: <filter>
  Device-2: 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: 3000 bus-ID: 05:00.0 chip-ID: 10ec:8168
  IF: eno1 state: down mac: <filter>
Bluetooth:
  Device-1: IMC Networks Wireless_Device driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 bus-ID: 3-7:5 chip-ID: 13d3:3567
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11
Drives:
  Local Storage: total: 953.87 GiB used: 65.16 GiB (6.8%)
  ID-1: /dev/nvme0n1 vendor: SK Hynix model: PC801 HFS001TEJ9X101N
    size: 953.87 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 40.9 C
Partition:
  ID-1: / size: 930 GiB used: 65.14 GiB (7.0%) fs: btrfs dev: /dev/nvme0n1p3
  ID-2: /boot/efi size: 511 MiB used: 19 MiB (3.7%) fs: vfat
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: partition size: 22.87 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p4
  ID-2: swap-2 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 32.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 2597 fan-2: 2406
Info:
  Memory: total: 16 GiB note: est. available: 15.25 GiB used: 4.64 GiB (30.5%)
  Processes: 436 Power: uptime: 32m wakeups: 0 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm Compilers: gcc: 14.2.1
    Shell: Bash v: 5.2.26 running-in: konsole inxi: 3.3.36

The problem is that I cannot detect the external monitor with HDMI and I already tried to use different HDMI cables, so the cable is not the problem:

[sara@mike ~]$ xrandr 
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080    144.00*+  60.01    59.97    59.96    60.00    59.93  
   1680x1050     59.95    59.88  
   1400x1050     74.76    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       74.76    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   640x400       59.88    59.98    85.08  
   576x432       75.00  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27  
DP-1 disconnected (normal left inverted right x axis y axis)

The same monitor once worked on fedora 39

You do not show a driver loaded for the nvidia GPU so that is probably the cause of this issue.

Have you installed the nvidia drivers from rpmfusion?
Please show the result of dnf repolist and dnf list --installed \*nvidia\*

If the rpmfusion repo is enabled then a simple dnf command should install the nvidia drivers. sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda which should install all the components to provide the necessary drivers.

Wait at least 5 minutes after this command is complete before rebooting.

If you are using secure boot there is one additional series of steps required, but if secure boot is disabled then nothing else should be necessary.

EDIT
I note you are using X11. Is that simply a choice or is there something that requires it?
With the continual improvements in wayland there are very few things that actually require use of X11 and fedora has even removed X11 from a default installation of workstation beginning with f40.

Thank you for the fast reply.

Let me start from the bottom:

  1. X11 vs Wayland
    Actually I chose X11 just because it was the only way to add an additional monitor on Fedora39. Should I migrate to Wayland again?

[sara@mike ~]$ dnf list --installed \*nvidia\*
Installed Packages
kmod-nvidia-latest-dkms.x86_64                                                                     3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-driver.x86_64                                                                               3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-driver-NVML.x86_64                                                                          3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-driver-NvFBCOpenGL.x86_64                                                                   3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-driver-cuda.x86_64                                                                          3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-driver-cuda-libs.x86_64                                                                     3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-driver-devel.x86_64                                                                         3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-driver-libs.x86_64                                                                          3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-gpu-firmware.noarch                                                                         20241210-1.fc40                                                                       @updates             
nvidia-kmod-common.noarch                                                                          3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-libXNVCtrl.x86_64                                                                           3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-libXNVCtrl-devel.x86_64                                                                     3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-modprobe.x86_64                                                                             3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-persistenced.x86_64                                                                         3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-settings.x86_64                                                                             3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
nvidia-xconfig.x86_64                                                                              3:545.23.08-1.fc37                                                                    @cuda-fedora37-x86_64
[sara@mike ~]$ sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
[sudo] password for sara: 
Last metadata expiration check: 2:46:00 ago on Mon 13 Jan 2025 15:13:47 CET.
All matches were filtered out by modular filtering for argument: xorg-x11-drv-nvidia-cuda
Error: Unable to find a match: xorg-x11-drv-nvidia-cuda
[sara@mike ~]$

I think something that I do not understand is going on
And by the way, I installed rpmfusion, but nothing has changed

  1. the secure boot is disabled
  1. f41 is much better on wayland and few have had problems with nvidia and external monitors when using the drivers from rpmfusion

  2. Your output shows all nvidia packages installed from cuda-fedora37. That is a very old repo and is not at all compatible with rpmfusion.

  3. This is to be expected when using drivers from cuda-fedoraXX.

My (very strong) suggestion.

  1. Update the system fully with sudo dnf upgrade --refresh
  2. Remove all nvidia drivers that are currently installed.
    sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware
  3. disable the cuda-fedora37 repo.
    If using dnf5 sudo dnf config-manager setopt cuda-fedora37.enabled=0
    If using dnf4 sudo dnf4 config-manager --set-disabled cuda-fedora37
  4. Attempt the installation again.
    sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
    If this fails then perform the following
  5. dnf module list --enabled If that shows the ‘nvidia-driver’ module then disable it with sudo dnf module disable nvidia-driver and verify with the module list command again.
  6. Following step 5 repeat step 4 which should now properly complete with installing the drivers from rpmfusion.

Wait at least 5 minutes after step 4 completes before rebooting, then try logging in with wayland and see if the external monitor is working properly.

Even if you do not wish to switch to the rpmfusion provided packages, you should, at the very least, upgrade the repo used for cuda-fedora. There are repos for each fedora version in use, including both cuda-fedora40 and cuda-fedora41

I am following what you said, thank you.
This is the output of first command:

[sara@mike ~]$ sudo dnf upgrade --refresh
[sudo] password for sara: 
cuda-fedora37-x86_64                                                                                                                                                           10 kB/s | 3.5 kB     00:00    
cuda-fedora39-x86_64                                                                                                                                                          7.6 kB/s | 3.5 kB     00:00    
Fedora 40 - x86_64                                                                                                                                                             34 kB/s |  27 kB     00:00    
Fedora 40 openh264 (From Cisco) - x86_64                                                                                                                                      2.4 kB/s | 989  B     00:00    
Fedora 40 - x86_64 - Updates                                                                                                                                                  156 kB/s |  25 kB     00:00    
google-chrome                                                                                                                                                                  10 kB/s | 1.3 kB     00:00    
RPM Fusion for Fedora 40 - Free                                                                                                                                                15 kB/s | 7.8 kB     00:00    
RPM Fusion for Fedora 40 - Free - Updates                                                                                                                                      79 kB/s | 7.4 kB     00:00    
RPM Fusion for Fedora 40 - Nonfree                                                                                                                                             72 kB/s | 8.6 kB     00:00    
RPM Fusion for Fedora 40 - Nonfree - Updates                                                                                                                                   19 kB/s | 8.4 kB     00:00    
slack                                                                                                                                                                         1.7 kB/s | 1.8 kB     00:01    
Visual Studio Code                                                                                                                                                             18 kB/s | 1.5 kB     00:00    
Dependencies resolved.

 Problem 1: package nvidia-driver-cuda-3:545.23.08-1.fc37.x86_64 from @System conflicts with xorg-x11-drv-nvidia-cuda provided by xorg-x11-drv-nvidia-cuda-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates
  - cannot install the best update candidate for package cuda-drivers-545.23.08-1.x86_64
  - problem with installed package nvidia-driver-cuda-3:545.23.08-1.fc37.x86_64
 Problem 2: package nvidia-xconfig-3:565.77-1.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia >= 3:565.77, but none of the providers can be installed
  - package nvidia-driver-3:545.23.08-1.fc37.x86_64 from @System conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates
  - installed package nvidia-driver-3:545.23.08-1.fc37.x86_64 obsoletes xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates
  - cannot install the best update candidate for package nvidia-xconfig-3:545.23.08-1.fc37.x86_64
  - problem with installed package nvidia-driver-3:545.23.08-1.fc37.x86_64
 Problem 3: package xorg-x11-drv-nvidia-cuda-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod >= 3:565.77, but none of the providers can be installed
  - problem with installed package cuda-drivers-545.23.08-1.x86_64
  - package kmod-nvidia-3:565.77-1.fc40.x86_64 from rpmfusion-nonfree-updates requires akmod-nvidia = 3:565.77-1.fc40, but none of the providers can be installed
  - package cuda-drivers-545.23.08-1.x86_64 from @System requires nvidia-driver-cuda >= 3:545.23.08, but none of the providers can be installed
  - package akmod-nvidia-3:565.77-1.fc40.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:565.77, but none of the providers can be installed
  - package nvidia-driver-cuda-3:545.23.08-1.fc37.x86_64 from @System requires nvidia-persistenced = 3:545.23.08, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-cuda-3:550.67-1.fc40.x86_64 from rpmfusion-nonfree requires nvidia-modprobe(x86-64) = 3:550.67, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia-libs(x86-64) = 3:565.77-3.fc40, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires libnvidia-glvkspirv.so.565.77()(64bit), but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires libnvidia-gpucomp.so.565.77()(64bit), but none of the providers can be installed
  - cannot install both nvidia-persistenced-3:565.77-1.fc40.x86_64 from rpmfusion-nonfree-updates and nvidia-persistenced-3:545.23.08-1.fc37.x86_64 from @System
  - cannot install both nvidia-modprobe-3:565.77-1.fc40.x86_64 from rpmfusion-nonfree-updates and nvidia-modprobe-3:550.67-1.fc40.x86_64 from rpmfusion-nonfree
  - package nvidia-driver-libs-3:545.23.08-1.fc37.x86_64 from @System conflicts with xorg-x11-drv-nvidia-libs provided by xorg-x11-drv-nvidia-libs-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates
  - installed package nvidia-driver-libs-3:545.23.08-1.fc37.x86_64 obsoletes xorg-x11-drv-nvidia-libs provided by xorg-x11-drv-nvidia-libs-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates
  - cannot install the best update candidate for package nvidia-persistenced-3:545.23.08-1.fc37.x86_64
  - cannot install the best update candidate for package nvidia-modprobe-3:545.23.08-1.fc37.x86_64
  - problem with installed package nvidia-driver-libs-3:545.23.08-1.fc37.x86_64
  - package nvidia-driver-cuda-3:545.23.08-1.fc37.x86_64 from cuda-fedora37-x86_64 is filtered out by modular filtering
  - package nvidia-persistenced-3:545.23.08-1.fc37.x86_64 from cuda-fedora37-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:550.127.05-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:550.127.08-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:550.54.14-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:550.54.15-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:550.90.07-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:550.90.12-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:555.42.02-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:555.42.06-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:560.28.03-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:560.35.03-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-driver-cuda-3:560.35.05-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
==============================================================================================================================================================================================================
 Package                                               Architecture                        Version                                               Repository                                              Size
==============================================================================================================================================================================================================
Upgrading:
 code                                                  x86_64                              1.96.3-1736454428.el8                                 code                                                   137 M
 nvidia-modprobe                                       x86_64                              3:565.77-1.fc40                                       rpmfusion-nonfree-updates                               32 k
 nvidia-settings                                       x86_64                              3:565.77-1.fc40                                       rpmfusion-nonfree-updates                              1.7 M
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 nvidia-modprobe                                       x86_64                              3:550.67-1.fc40                                       rpmfusion-nonfree                                       32 k
 nvidia-persistenced                                   x86_64                              3:565.77-1.fc40                                       rpmfusion-nonfree-updates                               35 k
 xorg-x11-drv-nvidia                                   x86_64                              3:565.77-3.fc40                                       rpmfusion-nonfree-updates                              133 M
 xorg-x11-drv-nvidia-cuda                              x86_64                              3:565.77-3.fc40                                       rpmfusion-nonfree-updates                              2.2 M
 xorg-x11-drv-nvidia-libs                              x86_64                              3:565.77-3.fc40                                       rpmfusion-nonfree-updates                               67 M
Skipping packages with broken dependencies:
 akmod-nvidia                                          x86_64                              3:565.77-1.fc40                                       rpmfusion-nonfree-updates                               40 k
 kmod-nvidia                                           x86_64                              3:565.77-1.fc40                                       rpmfusion-nonfree-updates                               11 k
 nvidia-xconfig                                        x86_64                              3:565.77-1.fc40                                       rpmfusion-nonfree-updates                               93 k
 xorg-x11-drv-nvidia-cuda                              x86_64                              3:550.67-1.fc40                                       rpmfusion-nonfree                                      2.2 M

Transaction Summary
==============================================================================================================================================================================================================
Upgrade  3 Packages
Skip     9 Packages

Total download size: 138 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): nvidia-modprobe-565.77-1.fc40.x86_64.rpm                                                                                                                                99 kB/s |  32 kB     00:00    
(2/3): nvidia-settings-565.77-1.fc40.x86_64.rpm                                                                                                                               2.3 MB/s | 1.7 MB     00:00    
(3/3): code-1.96.3-1736454428.el8.x86_64.rpm                                                                                                                                   50 MB/s | 137 MB     00:02    
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                          43 MB/s | 138 MB     00:03     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                      1/1 
  Upgrading        : code-1.96.3-1736454428.el8.x86_64                                                                                                                                                    1/6 
  Running scriptlet: code-1.96.3-1736454428.el8.x86_64                                                                                                                                                    1/6 
  Upgrading        : nvidia-settings-3:565.77-1.fc40.x86_64                                                                                                                                               2/6 
  Upgrading        : nvidia-modprobe-3:565.77-1.fc40.x86_64                                                                                                                                               3/6 
  Cleanup          : code-1.96.2-1734607808.el8.x86_64                                                                                                                                                    4/6 
  Running scriptlet: code-1.96.2-1734607808.el8.x86_64                                                                                                                                                    4/6 
  Cleanup          : nvidia-settings-3:545.23.08-1.fc37.x86_64                                                                                                                                            5/6 
  Cleanup          : nvidia-modprobe-3:545.23.08-1.fc37.x86_64                                                                                                                                            6/6 
  Running scriptlet: nvidia-modprobe-3:545.23.08-1.fc37.x86_64                                                                                                                                            6/6 

Upgraded:
  code-1.96.3-1736454428.el8.x86_64                                nvidia-modprobe-3:565.77-1.fc40.x86_64                                nvidia-settings-3:565.77-1.fc40.x86_64                               
Skipped:
  akmod-nvidia-3:565.77-1.fc40.x86_64                 kmod-nvidia-3:565.77-1.fc40.x86_64             nvidia-modprobe-3:550.67-1.fc40.x86_64              nvidia-persistenced-3:565.77-1.fc40.x86_64         
  nvidia-xconfig-3:565.77-1.fc40.x86_64               xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64     xorg-x11-drv-nvidia-cuda-3:550.67-1.fc40.x86_64     xorg-x11-drv-nvidia-cuda-3:565.77-3.fc40.x86_64    
  xorg-x11-drv-nvidia-libs-3:565.77-3.fc40.x86_64    

Complete!
[sara@mike ~]$

second command:

[sara@mike ~]$ sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware
Dependencies resolved.
==============================================================================================================================================================================================================
 Package                                             Architecture                     Version                                                      Repository                                            Size
==============================================================================================================================================================================================================
Removing:
 kmod-nvidia-latest-dkms                             x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                 70 M
 nvidia-driver                                       x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                194 M
 nvidia-driver-NVML                                  x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                1.9 M
 nvidia-driver-NvFBCOpenGL                           x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                135 k
 nvidia-driver-cuda                                  x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                1.1 M
 nvidia-driver-cuda-libs                             x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                221 M
 nvidia-driver-devel                                 x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                193  
 nvidia-driver-libs                                  x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                351 M
 nvidia-kmod-common                                  noarch                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                2.7 k
 nvidia-libXNVCtrl                                   x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                 59 k
 nvidia-libXNVCtrl-devel                             x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                254 k
 nvidia-modprobe                                     x86_64                           3:565.77-1.fc40                                              @rpmfusion-nonfree-updates                            51 k
 nvidia-persistenced                                 x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                 73 k
 nvidia-settings                                     x86_64                           3:565.77-1.fc40                                              @rpmfusion-nonfree-updates                           4.3 M
 nvidia-xconfig                                      x86_64                           3:545.23.08-1.fc37                                           @cuda-fedora37-x86_64                                271 k
Removing dependent packages:
 chromium                                            x86_64                           131.0.6778.264-1.fc40                                        @updates                                             262 M
 cuda-drivers                                        x86_64                           545.23.08-1                                                  @cuda-fedora37-x86_64                                  0  
Removing unused dependencies:
 chromium-common                                     x86_64                           131.0.6778.264-1.fc40                                        @updates                                              62 M
 egl-wayland                                         x86_64                           1.1.18~20241210git0c6f823-1.fc40                             @updates                                              83 k
 libcxx                                              x86_64                           18.1.8-1.fc40                                                @updates                                             1.0 M
 libcxxabi                                           x86_64                           18.1.8-1.fc40                                                @updates                                             235 k
 opencl-filesystem                                   noarch                           1.0-20.fc40                                                  @fedora                                                0  

Transaction Summary
==============================================================================================================================================================================================================
Remove  22 Packages

Freed space: 1.1 G
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                      1/1 
  Erasing          : cuda-drivers-545.23.08-1.x86_64                                                                                                                                                     1/22 
  Erasing          : nvidia-driver-devel-3:545.23.08-1.fc37.x86_64                                                                                                                                       2/22 
  Erasing          : nvidia-driver-cuda-3:545.23.08-1.fc37.x86_64                                                                                                                                        3/22 
  Erasing          : chromium-131.0.6778.264-1.fc40.x86_64                                                                                                                                               4/22 
  Erasing          : nvidia-libXNVCtrl-devel-3:545.23.08-1.fc37.x86_64                                                                                                                                   5/22 
  Erasing          : chromium-common-131.0.6778.264-1.fc40.x86_64                                                                                                                                        6/22 
  Erasing          : libcxx-18.1.8-1.fc40.x86_64                                                                                                                                                         7/22 
  Erasing          : nvidia-driver-NvFBCOpenGL-3:545.23.08-1.fc37.x86_64                                                                                                                                 8/22 
  Erasing          : nvidia-settings-3:565.77-1.fc40.x86_64                                                                                                                                              9/22 
  Erasing          : nvidia-xconfig-3:545.23.08-1.fc37.x86_64                                                                                                                                           10/22 
  Erasing          : opencl-filesystem-1.0-20.fc40.noarch                                                                                                                                               11/22 
  Running scriptlet: nvidia-driver-3:545.23.08-1.fc37.x86_64                                                                                                                                            12/22 
Failed to disable unit: Unit file nvidia-fallback.service does not exist.

  Erasing          : nvidia-driver-3:545.23.08-1.fc37.x86_64                                                                                                                                            12/22 
  Running scriptlet: nvidia-driver-3:545.23.08-1.fc37.x86_64                                                                                                                                            12/22 
  Running scriptlet: kmod-nvidia-latest-dkms-3:545.23.08-1.fc37.x86_64                                                                                                                                  13/22 
  Erasing          : kmod-nvidia-latest-dkms-3:545.23.08-1.fc37.x86_64                                                                                                                                  13/22 
  Running scriptlet: nvidia-kmod-common-3:545.23.08-1.fc37.noarch                                                                                                                                       14/22 
Failed to disable unit: Unit file nvidia-fallback.service does not exist.

  Erasing          : nvidia-kmod-common-3:545.23.08-1.fc37.noarch                                                                                                                                       14/22 
  Running scriptlet: nvidia-kmod-common-3:545.23.08-1.fc37.noarch                                                                                                                                       14/22 
  Erasing          : nvidia-driver-libs-3:545.23.08-1.fc37.x86_64                                                                                                                                       15/22 
  Erasing          : egl-wayland-1.1.18~20241210git0c6f823-1.fc40.x86_64                                                                                                                                16/22 
  Erasing          : nvidia-driver-cuda-libs-3:545.23.08-1.fc37.x86_64                                                                                                                                  17/22 
  Erasing          : libcxxabi-18.1.8-1.fc40.x86_64                                                                                                                                                     18/22 
  Erasing          : nvidia-libXNVCtrl-3:545.23.08-1.fc37.x86_64                                                                                                                                        19/22 
  Erasing          : nvidia-driver-NVML-3:545.23.08-1.fc37.x86_64                                                                                                                                       20/22 
  Running scriptlet: nvidia-persistenced-3:545.23.08-1.fc37.x86_64                                                                                                                                      21/22 
  Erasing          : nvidia-persistenced-3:545.23.08-1.fc37.x86_64                                                                                                                                      21/22 
  Running scriptlet: nvidia-persistenced-3:545.23.08-1.fc37.x86_64                                                                                                                                      21/22 
  Erasing          : nvidia-modprobe-3:565.77-1.fc40.x86_64                                                                                                                                             22/22 
  Running scriptlet: nvidia-modprobe-3:565.77-1.fc40.x86_64                                                                                                                                             22/22 

Removed:
  chromium-131.0.6778.264-1.fc40.x86_64              chromium-common-131.0.6778.264-1.fc40.x86_64         cuda-drivers-545.23.08-1.x86_64                egl-wayland-1.1.18~20241210git0c6f823-1.fc40.x86_64 
  kmod-nvidia-latest-dkms-3:545.23.08-1.fc37.x86_64  libcxx-18.1.8-1.fc40.x86_64                          libcxxabi-18.1.8-1.fc40.x86_64                 nvidia-driver-3:545.23.08-1.fc37.x86_64             
  nvidia-driver-NVML-3:545.23.08-1.fc37.x86_64       nvidia-driver-NvFBCOpenGL-3:545.23.08-1.fc37.x86_64  nvidia-driver-cuda-3:545.23.08-1.fc37.x86_64   nvidia-driver-cuda-libs-3:545.23.08-1.fc37.x86_64   
  nvidia-driver-devel-3:545.23.08-1.fc37.x86_64      nvidia-driver-libs-3:545.23.08-1.fc37.x86_64         nvidia-kmod-common-3:545.23.08-1.fc37.noarch   nvidia-libXNVCtrl-3:545.23.08-1.fc37.x86_64         
  nvidia-libXNVCtrl-devel-3:545.23.08-1.fc37.x86_64  nvidia-modprobe-3:565.77-1.fc40.x86_64               nvidia-persistenced-3:545.23.08-1.fc37.x86_64  nvidia-settings-3:565.77-1.fc40.x86_64              
  nvidia-xconfig-3:545.23.08-1.fc37.x86_64           opencl-filesystem-1.0-20.fc40.noarch                

Complete!
[sara@mike ~]$

I think something wrong is written here, could you please type again?

[sara@mike ~]$ sudo dnf config-manager setopt cuda-fedora37.enabled=0
usage: dnf config-manager [-c [config file]] [-q] [-v] [--version] [--installroot [path]] [--nodocs] [--noplugins] [--enableplugin [plugin]] [--disableplugin [plugin]] [--releasever RELEASEVER]
                          [--setopt SETOPTS] [--skip-broken] [-h] [--allowerasing] [-b | --nobest] [-C] [-R [minutes]] [-d [debug level]] [--debugsolver] [--showduplicates] [-e ERRORLEVEL] [--obsoletes]
                          [--rpmverbosity [debug level name]] [-y] [--assumeno] [--enablerepo [repo]] [--disablerepo [repo] | --repo [repo]] [--enable | --disable] [-x [package]]
                          [--disableexcludes [repo]] [--repofrompath [repo,path]] [--noautoremove] [--nogpgcheck] [--color COLOR] [--refresh] [-4] [-6] [--destdir DESTDIR] [--downloadonly]
                          [--comment COMMENT] [--bugfix] [--enhancement] [--newpackage] [--security] [--advisory ADVISORY] [--bz BUGZILLA] [--cve CVES] [--sec-severity {Critical,Important,Moderate,Low}]
                          [--forcearch ARCH] [--save] [--add-repo URL] [--dump] [--dump-variables] [--set-enabled | --set-disabled]
                          [section ...]
Command line error: one of the following arguments is required: --save --add-repo --dump --dump-variables --set-enabled --enable --set-disabled --disable

also with dnf4:

[sara@mike ~]$ sudo dnf4 config-manager --set-disabled cuda-fedora37
Error: No matching repo to modify: cuda-fedora37.

thanks a lot!

EDIT: i was able to run the command, I rebooted, now black screen , what should I do?

Ok, you rebooted before I was able to get back and respond.
Now you will need to boot to a command line. This means that when you get to the login screen (or on the black screen) press ctrl-alt-F3 which should then provide a text login screen.

Please look at the output of dnf repolist before doing anything else.
If it shows any cuda-fedora repos in that list then run
sudo dnf4 config-manager --set-disabled cuda-fedoraNN (replace the NN with the number shown in the repolist output.)

In general when following a series of commands, each of which expects proper completion of the command before, you should not just blindly continue. Errors usually must be corrected before continuing.

Since you rebooted without completing the install of the drivers from rpmfusion it caused the black screen.

The list of packages removed by dnf when removing the nvidia drivers shows various package names and versions as well as some from f37, some from f38, and some from f40. Some from rpmfusion, some from cuda-fedora37 and some from cuda-fedora39. Having versions mismatched as well as using the different repos like that is certain to cause problems.

Please let us know when you are booted and have the cuda-fedora repos disabled. Nothing else can be done until that is completed.

I noticed some package with names beginning with cuda as well. We should remove them also, and you can give me the list after being able to boot and log in.

Hello Jeff, thanks for your reply and sorry for my late reply.
I solved the problem following what you said. Now everything works fine. Thanks a lot again!

1 Like