<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>GPU on Documentation</title><link>https://docs.ayshell.dev/tags/gpu/</link><description>Recent content in GPU on Documentation</description><generator>Hugo -- 0.147.5</generator><language>en</language><lastBuildDate>Mon, 27 Jan 2025 20:32:26 +0530</lastBuildDate><atom:link href="https://docs.ayshell.dev/tags/gpu/index.xml" rel="self" type="application/rss+xml"/><item><title>Switch to NVIDIA GPU on Fedora Linux</title><link>https://docs.ayshell.dev/posts/nvidia/switch-nvidia/</link><pubDate>Mon, 27 Jan 2025 20:32:26 +0530</pubDate><guid>https://docs.ayshell.dev/posts/nvidia/switch-nvidia/</guid><description>&lt;blockquote>
&lt;p>&lt;code>Note&lt;/code>: Make sure to &lt;strong>Disable Secure Boot&lt;/strong>, else whatever you do it won&amp;rsquo;t work :)&lt;/p>&lt;/blockquote>
&lt;h1 id="install--switch">Install &amp;amp; Switch&lt;/h1>
&lt;p>&lt;strong>1. Install the required dependencies&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>sudo dnf install akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>2. Edit the environment configuration file for your shell&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>sudo nano /etc/environment
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>3. Add the following lines to enable the GPU&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>__GLX_VENDOR_LIBRARY_NAME&lt;span style="color:#f92672">=&lt;/span>nvidia
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>__NV_PRIME_RENDER_OFFLOAD&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>__VK_LAYER_NV_optimus&lt;span style="color:#f92672">=&lt;/span>NVIDIA_only
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>4. Restart the system&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>sudo reboot
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;a href="https://github.com/iamyaash/spells/blob/main/content/posts/nvidia/install_nvidia.sh">Download&lt;/a> and execute this script to automate the above process!&lt;/p></description></item></channel></rss>