Nvidia on Ubuntu: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
Because I wanted to run a local [[Artificial Intelligence]] platform called [[Ollama]], I wanted to ensure that my GPU was fully utilized in the system since GPUs are the particular type of hardware best suited for these [[Vector database|Vector]] calculations. And, I have a 'decent' GPU - [[PC Build 2024#Video Card (GPU)|Nvidia GeForce RTX 4060]] (the best you could get at the time). In trying to install the latest Nvidia driver, I set off on a week's long journey of learning, frustration and perseverance discovering the inner workings of Ubuntu 24.04, Xorg, the Linux kernel and kernel modules, DRM, Secure Boot, initramfs and more.  
Because I wanted to run a local [[Artificial Intelligence]] platform called [[Ollama]], I wanted to ensure that my GPU was fully utilized in the system since GPUs are the particular type of hardware best suited for these [[Vector database|Vector]] calculations. And, I have a 'decent' GPU - [[PC Build 2024#Video Card (GPU)|Nvidia GeForce RTX 4060]] (the best you could get in 2024). In trying to install the latest Nvidia driver, I set off on a week's long journey of learning, frustration and perseverance discovering the inner workings of Ubuntu 24.04, Xorg, the Linux kernel and kernel modules, DRM, Secure Boot, initramfs and more.  


I still do not have the Nvidia driver loaded - even after 40+ reboots and attempts. Instead I'm using the Nouveau driver but at least I have a working system and I believe now that I've finally figured out what needs to be done to disable Nouveau and install Nvidia - a project that I might tackle shortly. I'm just documenting the things that I encountered in this journey so that I can pick it back up at the right time.
I still do not have the Nvidia driver loaded - even after 40+ reboots and attempts. Instead I'm using the Nouveau driver but at least I have a working system and I believe now that I've finally figured out what needs to be done to disable Nouveau and install Nvidia - a project that I am approaching with greater scrutiny now. I'm documenting the things that I encounter in this journey.
 
Why not just continue to use [https://nouveau.freedesktop.org/index.html Nouveau], a project of the [https://www.freedesktop.org/wiki/ freedesktop] community? I mean "if it ain't broke, don't fix it" - right? In principle, I'd very much like to use nouveau. I'm not even sure that any alternative is "better" in any way - especially since '''I am not a gamer'''. My use case is to get the best performance from local LLMs.


== Opposite ==
== Opposite ==
Line 7: Line 9:


== About this System ==
== About this System ==
In your desktop environment, you can access 'System Settings' -> '[[About this System]]' to display basic info about your Software and Hardware environment including the 'graphics processor'. Mine says 'NV197' You can click on 'Show More Information' which reveals a multi-tab dialog with extensive Graphics info for OpenCL OpenGL Vulkan Window Manager and X-Server.
In your desktop environment, you can access 'System Settings' -> '[[About this System]]' to display basic info about your Software and Hardware environment including the 'graphics processor'. Mine says '''NV197''' - which is the codename given to the card by the Nouveau project<ref>https://nouveau.freedesktop.org/CodeNames.html</ref>. You can click on 'Show More Information' which reveals a multi-tab dialog for OpenCL, OpenGL, Vulkan, Window Manager and X-Server with extensive Graphics info.


You can also get details from a variety of CLI commands like glxinfo
Or, you can also get details from a variety of CLI commands like glxinfo, lspci etc.


<code>glxinfo | grep -E "OpenGL version|OpenGL renderer"</code>
<code>glxinfo | grep -E "OpenGL version|OpenGL renderer"</code>
Line 167: Line 169:
* [[{{PAGENAMEE}}/ubuntu-drivers|ubuntu-drivers (command)]]
* [[{{PAGENAMEE}}/ubuntu-drivers|ubuntu-drivers (command)]]


{{Subpages}}


{{References}}
{{References}}