I have a dual Arch and Fedora with Wayland setup and have been trying to install NVIDIA drivers and cuda through official sources and multiple discussion forums but face this error using nvidia-smi [nvidia-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running] .
I was able to install them previously on an only Fedora machine. It seems that the issue might be two different kernels (6.5 in Fedora and 6.8 in Arch) where I use the grub installed in Arch to boot into all the operating systems. Please let me know if there is someway to debug this issue.
On Fedora use the RPMFusion nvidia drivers for your GPU: Howto/NVIDIA - RPM Fusion
We do not recommend the drivers from the nvidia web site as people have issues with them.
The rpmfusion drivers are based on the nvidia driver code and are known to work well.
You will need to ask Arch folks how they recommend nvidia GPU is supported.
I would not expect dual boot to be an issue, unless one OS is leaveing the GPU is a state the other OS cannot reset. In which case always cold boot into the OS of choice, avoid reboot without powerdown.
You should be able to experiment to find out if the reboot is in fact the issue.
Do a full upgrade on fedora with sudo dnf upgrade
before attempting to install any drivers. The installation of nvidia drivers from rpmfusion as suggested above will require the newest kernel as well as that you remove all traces of nvidia drivers from other sources before installing the latest drivers from rpmfusion.
The latest kernel in fedora at this time is the 6.8.4 kernel.
This might be a problem ?
You are using Arch 's Grub to boot both Fedora and Arch. I have my doubts, I use DKMS to build the drivers and in the past this was the way we could get this type of configuration going. Also, understanding that you need a Nvidia driver that is compatible with both kernel versions.
I’m not too familiar with how akmods handles this which is the generally supported way of installing Nvidia drivers here.
Hi Barry, thank you for your response. I have followed the guide multiple times but I still end up with the same error. I have not booted into Arch OS during the whole process but I think the use of GRUB with different kernel version might be causing an issue
Hi Jeff, thank you for your response. I have updated my system. To remove traces of old nvidia installations I use this command sudo dnf remove **nvidia** --exclude=nvidia-gpu-firmware cuda-drivers
.
I have checked the kernel version after upgrading using uname -r
and it shows 6.5.6-300.fc39.x86_64 while the 6.8 kernel module package is also installed which I found out using rpm -qa kernel\*
. If it helps I can try changing the kernel version manually but I do not care about the drivers working with Arch Linux as long as they work on Fedora for now.
I was not aware that driver installation was linked to which OS grub I am using. I can try shifting to the Fedora GRUB. I was only using this setup due to a few customizations in my Arch GRUB. I do not care about NVIDIA drivers on Arch. Can this change help in installing the drivers ?
Reboot to load the newer kernel before installing the drivers.
Note that if you are booting using the arch grub that may not work properly, but hopefully by doing the upgrade within fedora it fixed the arch grub interference.
Please show us the output of lsblk -f
and efibootmgr
when booted into fedora
i have rebooted my OS multiple times but the kernel version remains 6.5
Here is the output for lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 ext4 1.0 Backup 29f966db-87ea-4a9d-82d3-0a57006390ad
├─sda2 ext4 1.0 Data e743d9c6-fe05-4eca-a8b4-3db535140c19 419.5G 4% /mnt/data
└─sda3 ntfs Media 03ED132A4178689F
sdb
├─sdb1 vfat FAT32 0541-C695
├─sdb2 ext4 1.0 c3e125ab-487b-4d28-9bf5-0226fae62b82
├─sdb3 vfat FAT32 763A-D931 1003M 2% /boot/efi
├─sdb4 ext4 1.0 a08bdfea-f5ed-43c9-aa75-1bb5b4f3c2f2 523.7M 39% /boot
├─sdb5 ext4 1.0 20869899-f4fb-45a9-9da4-e89a9146d10a 169.8G 8% /
└─sdb128 swap 1 46acd20c-e699-45ff-bd21-d81815aef295 [SWAP]
sr0
zram0 [SWAP]
Here is the output for efibootmgr
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001,0006,0002,0003,0004
Boot0000* GRUB HD(1,GPT,05b96dc6-0a9b-4f19-885f-cabfc0087e63,0x800,0x200000)/\EFI\GRUB\grubx64.efi
Boot0001* Fedora HD(3,GPT,1ceadda7-4960-4345-b639-ffadfddc106e,0x19200800,0x200000)/\EFI\FEDORA\SHIMX64.EFI
Boot0002* UEFI:CD/DVD Drive BBS(129,0x0)
Boot0003* UEFI:Removable Device BBS(130,0x0)
Boot0004* UEFI:Network Device BBS(131,0x0)
Boot0006* UEFI OS HD(3,GPT,1ceadda7-4960-4345-b639-ffadfddc106e,0x19200800,0x200000)/\EFI\BOOT\BOOTX64.EFI0000424f
Boot0000 appears to be the efi for Arch and is the one you booted from.
Boot0001 appears to be the efi for fedora.
You can try 2 different ways to boot from the fedora efi.
sudo efibootmgr -n 0001
followed by a reboot should boot from the fedora efi partition.
This is only for the next boot but should use the fedora grub and boot with the latest kernel.- Reset the boot order so it always used the fedora efi and grub with
sudo efibootmgr -o 0001,0000,NNNN,NNNN
etc using the numbers for the boot entries in the order you wish the system to select them for booting. If the first fails it would then try the second, etc.
Note that whenever you boot and update arch that involves modifying grub for booting it will take over the boot again. Dual booting linux OSes on the same system requires some finess to keep one OS in charge of booting all the time.