[SOLVED] RTX 5060 Driver Installation On Ubuntu

EDIT : By using pci=nocrs under GRUB config ( /etc/default/grub ) I managed to eliminate all display drivers and just use TTY for a clean installation. Then, I removed this parameter since it avoids the system control for resource management.

Basically, the error is like the following:

[   38.273335] NVRM: The NVIDIA probe routine failed for 1 device(s).
[   38.273338] NVRM: None of the NVIDIA devices were initialized.
[   38.274301] nvidia-nvlink: Unregistered Nvlink Core, major device number 238
[   38.516692] nvidia-nvlink: Nvlink Core is being initialized, major device number 238
[   38.516703] NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
               NVRM: BAR0 is 0M @ 0x0 (PCI:0000:26:00.0)
[   38.525116] nvidia 0000:26:00.0: probe with driver nvidia failed with error -1

As you can see the system can’t load the drivers.

I’m using Ubuntu 24.04 and Gigabyte Windforce RTX 5060 and I have tried the following methods to install GPU drivers:

  • Ubuntu Service: sudo ubuntu-drivers install nvidia:580 # or 570
  • PPA : sudo add-apt-repository ppa:graphics-drivers/ppa
  • Nvidia Runfile : sudo ./NVIDIA-Linux-x86_64-570.195.03.run

Neither proprietary nor open versions worked for me. Also, changing BIOS settings to support 4G Decoding made Windows 11 not booting at all and Secure Boot is not activated.

Here are some other logs:

azeer@azeer:~$ dpkg -l | grep -i nvidia
ii  libnvidia-cfg1-580:amd64                      580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-580                          580.95.05-0ubuntu1                       all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-580:amd64                   580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA libcompute package
ii  libnvidia-decode-580:amd64                    580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-egl-wayland1:amd64                  1:1.1.17-0ubuntu0~gpu24.04.1             amd64        Wayland EGL External Platform library -- shared library
ii  libnvidia-encode-580:amd64                    580.82.09-0ubuntu0~gpu24.04.1            amd64        NVENC Video Encoding runtime library
ii  libnvidia-extra-580:amd64                     580.82.09-0ubuntu0~gpu24.04.1            amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-580:amd64                      580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-580:amd64                        580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  nvidia-compute-utils-580                      580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA compute utilities
ii  nvidia-dkms-580-open                          580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA DKMS package (open kernel module)
ii  nvidia-driver-580-open                        580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA driver (open kernel) metapackage
ii  nvidia-firmware-580-580.82.09                 580.82.09-0ubuntu0~gpu24.04.1            amd64        Firmware files used by the kernel module
ii  nvidia-kernel-common-580                      580.82.09-0ubuntu0~gpu24.04.1            amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-580-open                 580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA kernel source package
ii  nvidia-prime                                  0.8.17.2                                 all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                               510.47.03-0ubuntu4                       amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-580                              580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                       0.18.3ubuntu0.24.04.1                    all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-580                 580.82.09-0ubuntu0~gpu24.04.1            amd64        NVIDIA binary Xorg driver
azeer@azeer:~$ lspci -vvv -s 26:00.0
26:00.0 VGA compatible controller: NVIDIA Corporation Device 2d05 (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Gigabyte Technology Co., Ltd Device 41a2
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 78
	IOMMU group: 14
	Region 1: Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Region 3: Memory at f0000000 (64-bit, prefetchable) [size=32M]
	Region 5: I/O ports at e000 [size=128]
	Expansion ROM at f4000000 [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

Windows 11 drivers are working with no problems, so I’m not suspecting any hardware issue. I have also tried Ubuntu 22.04 but that also didn’t work.

Thanks for your suggestions.

1 Like

Hi @azeer , thanks for reporting this issue.
Could you try once with the kernel commandline param pci=realloc=off and enable 4GB decoding to check if it works, thanks.

1 Like

Thanks for your response.
While the new kernel parameter works, when I enable 4G decoding my Windows 11 won’t boot at all.

Motherboard : MSI B450 GAMING PLUS MAX
CPU : Ryzen 7 2700X
GPU : GIGABYTE Windforce RTX 5060 8G
RAM : 16GB 3000Mhz
PSU : Cooler Master 600W

Hi Azeer, which driver succeeds with your ubuntu 22.04 after you corrected the above mentioned kernel parameter and the bios setting ?

I’m currently using 24.04 not 22.04

The driver is 570 which is quite old. I recommend trying 580 or so first.

1 Like

Thanks, I already tried 580 but unfortunately doesn’t work with 5060 ti. May be I’ll try 575 as well as I found some posts confirmed it was working with Ubuntu 22.04.

What a shame!
I switched to Nvidia card in the hope of not fighting with drivers again.
I guess I was too optimistic.

Hi @azeer , could you please help to attach a bug report here when you see the issue.

I am having the same issue, it seems I go around in a circle. I cannot solve on my 5060 ti either nor do I see an actual solution to the driver mismatch. Failed to initialize NVML: Driver/library version mismatch

NVML library version: 580.95

2e:00.0 VGA compatible controller: NVIDIA Corporation Device 2d04 (rev a1) (prog-if 00 [VGA controller])

Subsystem: PNY Device 1440

Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-

Latency: 0, Cache Line Size: 64 bytes

Interrupt: pin A routed to IRQ 16

IOMMU group: 17

Region 0: Memory at 50000000 (32-bit, non-prefetchable) [size=64M]

Region 1: Memory at 4800000000 (64-bit, prefetchable) [size=16G]

Region 3: Memory at 4610000000 (64-bit, prefetchable) [size=32M]

Region 5: I/O ports at 3000 [size=128]

Expansion ROM at 54000000 [disabled] [size=512K]

Capabilities:

Kernel driver in use: nvidia

Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

Is only the solution the workarounds? Added: I did also upgrade to Ubuntu Server 25.

Hi @mahdness , thanks for reporting the issue.
Could you please help to attach a bug report here when you see the issue.