Nvidia on Ubuntu: Difference between revisions

mNo edit summary
Add details about what I did - but I'm not sure what I did that worked and whether it will survive a reboot, and whether I will get my kubuntu desktop back
Line 18: Line 18:


'''OpenGL version''' string: 4.3 (Compatibility Profile) Mesa 24.2.8-1ubuntu1~24.04.1
'''OpenGL version''' string: 4.3 (Compatibility Profile) Mesa 24.2.8-1ubuntu1~24.04.1
Here, <code>lspci</code> shows the same info
<code>lspci | grep VGA</code>
01:00.0 '''VGA''' compatible controller: NVIDIA Corporation AD107 [GeForce RTX 4060] (rev a1)


After the installation of Nvidia drivers fails, you won't have a functioning GPU, since you will no longer have the nouveau driver available either, and so the output of the same glxinfo command will show that "llvmpipe" is the renderer.
After the installation of Nvidia drivers fails, you won't have a functioning GPU, since you will no longer have the nouveau driver available either, and so the output of the same glxinfo command will show that "llvmpipe" is the renderer.
Line 27: Line 33:
LLVMpipe is a software rasterizer within the Mesa 3D graphics library that utilizes the LLVM compiler infrastructure to perform rendering entirely on the CPU. It acts as a software fallback when a dedicated GPU or its drivers are unavailable or malfunctioning, allowing OpenGL applications to run without hardware acceleration. Essentially, LLVMpipe takes over the rendering process when the GPU can't or shouldn't be used.  
LLVMpipe is a software rasterizer within the Mesa 3D graphics library that utilizes the LLVM compiler infrastructure to perform rendering entirely on the CPU. It acts as a software fallback when a dedicated GPU or its drivers are unavailable or malfunctioning, allowing OpenGL applications to run without hardware acceleration. Essentially, LLVMpipe takes over the rendering process when the GPU can't or shouldn't be used.  


If dpkg shows xserver-xorg-video-'''nouveau is installed''', then you can switch to it from e.g. "Driver Manager" in Settings. Although you can view drivers through Synaptic, you won't be able to switch from that interface (you'll get an error message about a lock file).  
If dpkg shows xserver-xorg-video-'''nouveau is installed''', then you can switch to it from e.g. "Driver Manager" in Settings.
 
Synaptic will allow you to view drivers, but you won't be able to switch from that interface (you'll get an error message about a lock file).  
 
Although switching drivers from the system settings interface appears to complete without error, I'm not sure how well it works - if at all.
 
I was getting a broken desktop (single monitor, no good results from things like nvidia-smi) after installing Nvidia drivers, and so I tried switching to nouveau - and it somehow eventually worked.  <pre>
apt-get remove -y --purge '^libnvidia-.*' && apt-get remove -y --purge '^nvidia-*' && apt-get remove -y --purge '*575*' && apt -y autoremove
apt -y autoclean
shutdown -r now
(recovery mode)
vim /etc/default/grub
update-grub
</pre>After doing a couple of reboots changing the boot 'modeline' and 'nosplash' options from a recovery console or the TTY, I didn't seem to get anywhere. But when I issued a 'startX' command, and the system booted into the GNOME desktop instead of KDE (?!!??), then I had dual monitors again. Amazingly nvidia-smi returned results, but glxinfo says now that I'm using onboard graphics from the CPU (not the GPU) but it doesn't say LLVMpipe


<code>lspci | grep VGA</code>
'''OpenGL renderer''' string: Mesa Intel(R) Graphics ('''RPL-S''') 


01:00.0 '''VGA''' compatible controller: NVIDIA Corporation AD107 [GeForce RTX 4060] (rev a1)
'''OpenGL version''' string: 4.6 (Compatibility Profile) Mesa 24.2.8-1ubuntu1~24.04.1<pre>
sudo lsmod|grep -i nvidia
nvidia_uvm          2158592  4
nvidia_drm            139264  5
nvidia_modeset      1736704  6 nvidia_drm
nvidia              11550720  81 nvidia_uvm,nvidia_modeset
ecc                    45056  2 ecdh_generic,nvidia
video                  77824  3 xe,i915,nvidia_modeset
</pre>Grub right now is 'normal'  <pre>
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
</pre>The NVIDIA persistence daemon is running <pre>
systemctl list-units --type service --all | grep nvidia
  nvidia-persistenced.service                          loaded    active    running      NVIDIA Persistence Daemon
</pre>dkms shows that kernel modules are installed for two kernels<pre>
dkms status
nvidia/575.57.08, 6.8.0-60-generic, x86_64: installed (Original modules exist)
nvidia/575.57.08, 6.8.0-62-generic, x86_64: installed (Original modules exist)
</pre>


== GUI is stuck ==
== GUI is stuck ==