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.
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.
f41 is much better on wayland and few have had problems with nvidia and external monitors when using the drivers from rpmfusion
Your output shows all nvidia packages installed from cuda-fedora37. That is a very old repo and is not at all compatible with rpmfusion.
This is to be expected when using drivers from cuda-fedoraXX.
My (very strong) suggestion.
Update the system fully with sudo dnf upgrade --refresh
Remove all nvidia drivers that are currently installed. sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware
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
Attempt the installation again. sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
If this fails then perform the following
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.
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 ~]$
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!