I have tried everything to my knowledge. In past versions I have got the nvidia driver to work, however after upgrading my distro to 22.10 from 22.04, the additional drivers tab says that I have a driver ‘manually installed’. I cannot select any nvidia drivers.
What I tried:
ubuntu-drivers install – no gpu detected after reboot with nvidia-smi
apt install nvidia-driver-515 – no gpu detected, same as above
I am at a loss here. I have already uninstalled everything with
but the additional drivers tab still wont allow me to select anything!
Additional information: ls -l /usr/lib/x86_64-linux-gnu/libnvidia* returns no files ls -l /usr/lib/x86_64-linux-gnu/libcuda* returns no files dpkg -l | grep nvidia returns nothing
Any help is appreciated, the only other thing I can think of is reinstalling my OS, which I do not want to do. This nvidia driver installation has never been easy for me but usually Ive been able to get it working after a few hours of trying things.
Update. I tried doing some more installs, but now anytime I install a nvidia driver my system no longer boots. I am able to boot fine with nouveau, and the additional software and drivers tab of the software updater still reports I am using a manually installed driver when this cant be possible.
$ neofetch
OS: Linux Mint 21 x86_64
Host: Dell G15 5520
Kernel: 5.15.0-52-generic
Resolution: 1920x1080, 1920x1080
DE: Cinnamon 5.4.12
WM: Mutter
WM Theme: Mint-Y
CPU: 12th Gen Intel i5-12500H (16) @ 4.500GHz
GPU: NVIDIA GeForce RTX 3050 Mobile
GPU: Intel Alder Lake-P
Memory: 1813MiB / 7633MiB
I had the same issue when I went to a kernel higher than 5.15.0-48-generic. I was finding that if I selected recovery mode from grub, then resume, I was able to boot into 5.15.0-52-generic just fine. I found on a redit post (Sorry, didn’t save the link), which said to add “nomodeset” to /etc/default/grub on the GRUB_CMDLINE_LINUX_DEFAULT line at the end of the line:
Neither of these work. It seems only nouveau works for me, which isn’t really an option since I am using this pc for gaming. I am lost at this point as to what to do.
Hi Davide, I will use a reinstall as a last resort. I think I would prefer to wait and see if anyone has a fix for my system as it is, or if ubuntu issues a fix. Thanks for your recommendations, I will try this on my next install
@christianboin > module: x86/modules: Skipping invalid relocation target
Your build system is broken, producing broken kernel modules. Did you install a different linker, e.g. mold instead of gnu ld?
@generix Not that I know of. I had this same error in Ubuntu 22.04, but didnt think anything of it because I was able to get the drivers to work, albeit it was a huge pain.
kernel headers/modprobe, like you said.
dkms to recompile nvidia modules
dkms status
to see what modules are installed, if none, that’s bad
sudo dkms remove nvidia/(version number)
to remove followed by
sudo dkms install nvidia/(version number)
to recompile the modules.
@generix and I should install the driver first obviously, through the additional drivers tab in ubuntu? Then run all your steps, or reboot and then run the steps from the recovery mode (since my desktop GUI will not load)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 3,270 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com/ubuntu kinetic-updates/main amd64 linux-headers-5.19.0-23-generic amd64 5.19.0-23.24 [3,270 kB]
Fetched 3,270 kB in 0s (8,824 kB/s)
(Reading database ... 523239 files and directories currently installed.)
Preparing to unpack .../linux-headers-5.19.0-23-generic_5.19.0-23.24_amd64.deb ...
Unpacking linux-headers-5.19.0-23-generic (5.19.0-23.24) over (5.19.0-23.24) ...
Setting up linux-headers-5.19.0-23-generic (5.19.0-23.24) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 5.19.0-23-generic
...done.
dkms status → returns →
nvidia/520.56.06, 5.19.0-23-generic, x86_64: installed (WARNING! Diff between built and installed module!)
nvidia/520.56.06, 6.0.5-060005-generic, x86_64: installed
openrazer-driver/3.4.0, 5.19.0-23-generic, x86_64: installed
openrazer-driver/3.4.0, 6.0.5-060005-generic, x86_64: installed
sudo dkms remove nvidia/520.56.06
Module nvidia-520.56.06 for kernel 5.19.0-23-generic (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.
nvidia.ko:
- Uninstallation
- Deleting from: /lib/modules/5.19.0-23-generic/
rmdir: failed to remove '': No such file or directory
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
nvidia-modeset.ko:
- Uninstallation
- Deleting from: /lib/modules/5.19.0-23-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
nvidia-drm.ko:
- Uninstallation
- Deleting from: /lib/modules/5.19.0-23-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
nvidia-uvm.ko:
- Uninstallation
- Deleting from: /lib/modules/5.19.0-23-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
nvidia-peermem.ko:
- Uninstallation
- Deleting from: /lib/modules/5.19.0-23-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
sudo dkms install nvidia/520.56.06
Sign command: /usr/lib/linux-kbuild-5.19/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Binary kmod-sign not found, modules won't be signed
Building module:
Cleaning build area...
unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.19.0-23-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.19.0-23-generic/build LD=/usr/bin/ld.bfd CONFIG_X86_KERNEL_IBT= modules..........
Cleaning build area...
nvidia.ko:
Running module version sanity check.
Error! Module version 520.56.06 for nvidia.ko
is not newer than what is already found in kernel 5.19.0-23-generic (520.56.06).
You may override by specifying --force.
nvidia-modeset.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.19.0-23-generic/updates/dkms/
nvidia-drm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.19.0-23-generic/updates/dkms/
nvidia-uvm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.19.0-23-generic/updates/dkms/
nvidia-peermem.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.19.0-23-generic/updates/dkms/
depmod...
sudo modprobe nvidia
modprobe: ERROR: could not insert 'nvidia': Exec format error