Problem:
Nouveau drivers do not run, despite being the only compatible video drivers installed. lsmod | grep nouveau
Returns no results, and sudo lshw -c video | grep 'configuration'
tells me I'm not running a different video driver.
Context:
I recently (accidentially) broke my proprietary NVIDIA driver installation, and I had to remove/purge everything. Then, I installed new open-kernel NVIDIA drivers (525-open, proprietary, tested) via the Ubuntu Software GUI. However, These did not run at all, and I had to remove my graphics card from the case so it would boot with iGPU support. I then promptly uninstalled my new NVIDIA driver, switched back to Nouveau, and put everything back together like I had it. I assumed this was a problem with the open kernel drivers, and decided to get official drivers from the NVIDIA website again. But before I could install them, I noticed that lsmod | grep nouveau
returned no results, despite the fact that Software & Updates said I was using Nouveau drivers. I quickly realized that this discrepancy was likely related to my issues with the open kernel NVIDIA drivers.
Attempted Fixes:
I proceeded to follow some online troubleshooting guides for Nouveau drivers: I uninstalled a hefty selection of stray NVIDIA and CUDA packages, purging what was left of the proprietary drivers; I checked lsmod
and the Xorg/Xserver logs for errors or NVIDIA cockroaches hiding in the dark places; I checked for other drivers and things that may interfere with Nouveau and other video drivers; I reinstalled Nouveau and related packages; I even went as far as to reinstall all packages with gl
or video
in the name, which caused Ubuntu to reconfigure a bunch of stuff when I rebooted. Still no luck.
My latest attempt to fix the issue was to run sudo ubuntu-drivers install
(as autoinstall
is depreciated) but that caused ubuntu-drivers
to crash spectacularly. At this point I realized I needed some help. When I couldn't find any relevant results online, I came here to share my problem with the world.
Conclusion:
I suppose what I'm looking for is a solution to get Nouveau running again, so at least I can use my second monitor. If we solve the root problem along the way, and I can install the open kernel NVIDIA drivers, that would be great, as I will soon require using CUDA, CUDNN, PyTorch 2, and TensorRT on a daily basis for work.
Potentially relevant information:
- I am running Ubuntu 22.04 LTS. I have a pending OS update (2023c from 2022g). It is a relatively fresh install, and aside from the drivers, the only fancy graphics software I have manually installed is
cuda
and some nvidia dev tools, both of which I have since purged.
- I am using an NVIDIA GeForce RTX 3070 LHR, a second hand purchase. This particular card has had a long history of crashing and/or freezing on Windows 11. I never fully debugged the problem before switching to Linux, but it seemed to coincide with large memory exchanges (e.g. large writes to VRAM from system memory, such as when starting a videogame) while the GPU was under moderate to heavy load (e.g. streaming, recording, screencasting, CUDA rendering...)
- I am using an Intel Core i3 10th gen with integrated graphics, which I use mostly as a backup for when my graphics drivers break/fail.
- I installed Ubuntu before installing my graphics card, and booted the first few times using integrated graphics.
- I use two monitors of different sizes, protocols, and resolutions (when they both work). One of these supports HDR at QHD 144Hz over DisplayPort I use this as my primary display when my graphics card is installed. The other is a lower DPI display, at FHD 60Hz, over HDMI. I use this as my primary display when using Intel's integrated graphics, as my motherboard does not support DisplayPort.
This is the error and traceback I recieved when running sudo ubuntu-drivers install
:
Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in <module>
greet()
File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/bin/ubuntu-drivers", line 413, in install
command_install(config)
File "/usr/bin/ubuntu-drivers", line 187, in command_install
UbuntuDrivers.detect.nvidia_desktop_pre_installation_hook(to_install)
File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 839, in nvidia_desktop_pre_installation_hook
with_nvidia_kms = version >= 470
UnboundLocalError: local variable 'version' referenced before assignment
I have attached a screenshot of some relevant terminal output, as well as some recent logs from /var/log
:
View Relevant terminal output
Download Logs (.zip)