i brought an old Lenovo T540p Thinkpad. Everything works good with Garuda so far. But when I start games, it utilizes the inbuild Graphic chip from the i7. I would like to run the system on the nVidia chip. Could someone give me an Idea how to disable the INTEL GPU?
Garuda-Inxi:
Please go through the wiki atleast once it clearly explains how to offload a program to your nvidia GPU.
The reason we don't recommend always using your dedicated GPU is that nvidia cards are known to often cause issues with linux. There is a reason linux community hates nvidia. If you don't wanna someday suddenly boot up to blank screens bcoz of nvidia driver issue it's best to use your integrated graphics card for normal tasks and offload graphics heavy tasks like games to nvidia.
You can view your nvidia card usage and the processes running on it with
nvidia-smi
in terminal. It will output something like this when no processes are running on it
nvidia-smi output
Sat Jul 22 23:41:47 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.86.05 Driver Version: 535.86.05 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce MX330 Off | 00000000:01:00.0 Off | N/A |
| N/A 48C P8 N/A / ERR! | 4MiB / 2048MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 812 G /usr/lib/Xorg 4MiB |
+---------------------------------------------------------------------------------------+
PS: In future please post full output of garuda-inxi even if you think it's not necessary.
I just noticed but why have you blacklisted nvidia drivers as well? I understand that nouveau and nvidia_drm are blacklisted by default otherwise they will conflict with nvidia but why have you blacklisted nvidia? unless there is a specific reason please un-blacklist it so that prime offloading works.
Maybe not blacklisted–quite likely just the incorrect drivers have been installed.
This is right, there is a lot of missing information here. Please post the rest of the output. Please also identify the driver you installed, and explain your process for installing it.
Hi,
thank you both for the answers. I have tried a lot internet tutorials before I posted here, some of them only means: Take this endless long console command and execute it, than this, than this.. and so on. So I cannot be entirely sure that there wasnt a "disable nvidia" command. Simply because the fact, that I dont know how such a command look like, so I wouldn´t know if I see it.
As noticed, I may have installed the wrong driver. To correct this, I downloaded the official driver from the NVIDIA website again, along with the kernel headers.
The installation of the driver using sh started, uninstalled the old (apparently wrong) graphics driver, but then aborted after 60% of the installation. The error message stated that the driver could not be built for the kernel. After that, I ran sudo garuda-update. Interestingly, the update routine then installed the driver successfully.
Unfortunately, in games, only the Intel chip is still being used. Also, nvidia-smi immediately throws an error again, saying it cannot communicate with the driver.
Furthermore, I have looked into how to manually remove drivers from the blacklist. The internet suggests the same solution every time. Edit the file '/etc/modprobe.d/blacklist.conf' and comment out the desired drivers. However, this file does not exist in my system. The folder is empty. Any advice on this would be greatly appreciated.
Installing drivers off of the Nvidia website is not recommended. Even if the installation were successful (which is really a long shot), Pacman can’t update the drivers and they will just break when the kernel takes an update. See the ArchWiki Nvidia article:
Warning: Avoid installing the NVIDIA driver through the package provided from the NVIDIA website. Installation through pacman allows upgrading the driver together with the rest of the system.
An easy way to figure out what drivers to install is to compare the GPU model against the guidance on the ArchWiki Nvidia article.
First, go ahead and remove the driver you installed from the Nvidia website according to whatever method is available for that. If you can’t figure out how to remove it, you can always just boot to a snapshot from before the installation effort, restore the snapshot, reboot, then bring your system fully up to date with garuda-update. (See here: Restoring snapshots to get the system back to working state | Garuda Linux wiki)
Next, install the package:
sudo pacman -S nvidia-470xx-dkms
If you run into any issues during the installation, copy the full input/output of the commands you are running and paste into the thread so we can see what is happening.
Once you have the driver installed, read through this document (posted by @NaN above) for guidance on how to make sure it is getting used when you want it to be (i.e. for games and such):
Thank you very much for the help. It works fine now.
By the way, if someone have similar issues, you can uninstall the proprietary driver by the command sudo sh NVIDIA-Linux-x86_64-390.157.run --uninstall.