I have installed Fedora 37 on my new laptop, which has an HDMI port.
I use it to deliver presentations by mirroring my screen.
When I plugin an external monitor/beamer (through the HDMI port), nothing happens. Pressing the keys Fn + F7 does nothing.
When I reboot the laptop, the external monitor works. Pressing the keys Fn + F7 behaves as expected (switch to mirror etc). When I then unplug the HDMI cable and replug, nothing shows up on the external monitor again. Pressing the keys Fn + F7 does nothing again.
It’s using an AMD Radeon™ Graphics / AMD Radeon™ Graphics. How do I fix this?
In an effort to try to fix this issue, I run sudo dnf module install nvidia-driver:latest-dkms earlier this week, but I ran sudo dnf module remove nvidia-driver today because that made no difference, even after reboot.
This new laptop has an AMD Radeon Graphics and NVidia Geforce RTX sticker. Pretty sure I only paid for 1 graphics card though.
Those are your GPUs. The first is running nouveau and it is known that the nouveau driver does not support hardware acceleration.
Please post the output of dnf list installed '*nvidia*'. If you uninstalled the drivers properly it should only show the nvidia-gpu-firmware package.
I also suggest that when installing the nvidia drivers you do so from the rpmfusion repo as instructed here after enabling the repos as shown here.
Once the rpmfusion repo is enabled the command sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda will install and compile the modules. Wait about 5 minutes for the modules to be built then reboot and the nvidia drivers should load.
It is also worth noting that for an unsigned kernel module to load the user must disable secure boot on the system.
Once booted with the nvidia drivers loaded the user should be able to see something like this.
$ sudo dnf install akmod-nvidia
...
Problem: package akmod-nvidia-3:525.78.01-1.fc37.x86_64 requires nvidia-kmod-common >= 3:525.78.01, but none of the providers can be installed
- cannot install the best candidate for the job
- package xorg-x11-drv-nvidia-3:525.78.01-1.fc37.x86_64 is filtered out by modular filtering
sudo dnf install xorg-x11-drv-nvidia-cuda
Last metadata expiration check: 0:16:30 ago on Sun 29 Jan 2023 10:48:48 AM 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
$ sudo dnf module list --enabled
Last metadata expiration check: 0:22:38 ago on Sun 29 Jan 2023 11:06:11 AM CET.
cuda-fedora36-x86_64
Name Stream Profiles Summary
nvidia-driver latest-dkms [d][e] default [d], f Nvidia driver for latest-dkms br
m, ks anch
Clearly, when I wanted to install the NVidia driver, the first link I had on Google was wrong (it wasn’t the rpm nonfree approach) and now my system is screwed.
Not screwed, merely a little twisted and needs cleaned up.
Lets first find out where everything nvidia was installed from. dnf list installed '*nvidia*' '*cuda*'
Please post that before proceeding so we can tell what repo may possibly need to be disabled.
If every repo is either fedora or rpmfusion then proceed. If not please wait until I can reply to ensure the commands below are correct.
Then we can get rid of the currently interfering parts and install the latest drivers.
dnf module remove cuda-fedora "nvidia-driver:latest-dkms"
to remove the interfering modular portions. If there are errors then stop here.
dnf remove '*nvidia*' --exclude=nvidia-gpu-firmware to remove the older version packages that were just installed and leave the required firmware.
dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda to install the newest drivers from rpmfusion including cuda.
That should recover. If there are any errors or questions at any step then stop and lets fix that before proceeding. Blindly proceeding causes more recovery problems.
Note that as far as I can tell, the only repo that at present contains the drivers capable of properly supporting the 3060 and newer nvidia GPUs is rpmfusion. The 520 driver does not. Even the 525.60 driver does not.
Ok, with that info you definitely need to remove everything installed from the cuda-fedora repo. Note that you have packages installed from rpmfusion-nonfree, cuda-fedora36-x86_64, and rpmfusion-nonfree-updates and there are 3 different version numbers installed. All the packages must match in version number and should come from the same repo so they all work together. The one that must remain is the nvidia-gpu-firmware package since that is a fedora update and not a driver package.
The steps I provided above need modified.
dnf module remove cuda-fedora nvidia-driver:latest-dkms or maybe dnf module remove nvidia-driver:latest-dkms then repeat the previous dnf list installed '*nvidia*' command to see what is remaining.
If any nvidia packages (except the firmware) are remaining then remove them with dnf remove '*nvidia*' --exclude=nvidia-gpu-firmware
Once all the nvidia driver remenants are removed then install the nvidia packages from rpmfusion with dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda --disablerepo=cuda-fedora36-x86_64
This should get the latest nvidia drivers (525.78.01) and the matching cuda packages from rpmfusion.
I successfully disabled that cuda repository with dnf --disablerepo cuda-fedora36-x86_64.
Yet, the next steps still fail:
$ sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
Last metadata expiration check: 0:09:46 ago on Mon 30 Jan 2023 08:51:28 PM 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
$ sudo dnf install akmod-nvidia
Last metadata expiration check: 0:07:45 ago on Mon 30 Jan 2023 08:51:28 PM CET.
Error:
Problem: conflicting requests
- package akmod-nvidia-3:520.56.06-1.fc37.x86_64 requires nvidia-kmod-common >= 3:520.56.06, but none of the providers can be installed
- package akmod-nvidia-3:525.78.01-1.fc37.x86_64 requires nvidia-kmod-common >= 3:525.78.01, but none of the providers can be installed
- package xorg-x11-drv-nvidia-3:520.56.06-1.fc37.x86_64 is filtered out by modular filtering
- package xorg-x11-drv-nvidia-3:525.78.01-1.fc37.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages)
Glad you figured out how to disable the modular issue.
I would assume that it now installed the nvidia 525-78-1 driver version?
Is that correct?
If everything installed correctly you should see a screenfull of packages with dnf list installed '*nvidia*' and about 5 lines of output with lsmod | grep nvidia The installed packages should all show the same version.
That command only disables the repo for the current command.
To disable it permanently the command sudo dnf config-manager --disable cuda-fedora36-x86_64 will do so.