Hi? I’m trying to force to use AMD GPU on my laptop and can’t do this.
In my system I have 2 cards:
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Mars [Radeon HD 8670A/8670M/8750M / R7 M370]
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) (prog-if 00 [VGA controller])
I already tried to block kernel module i915, but it dosen’t work - Gnome just won’t boot up:
boot.blacklistedKernelModules = [“i915”];
In my hardware-configuration.nix I add two rows:
boot.initrd.kernelModules = [ “amdgpu” ];
boot.kernelParams = [ “radeon.cik_support=0” “amdgpu.cik_support=1” ];
I think in your case you can just switch between the two using PRIME. When set up correctly, all you have to do to open apps using the AMD GPU is prefix the command with the DRI_PRIME=1 env variable.
Hey have you figured it out how to do it mine is also similar to you please provide the steps of you find it I’m pretty much noob in this kind of things
Since my laptop uses two Intel and AMD graphics cards, I need to use PRIME, but first I need to specify in the NixOS configuration files to use the amdgpu driver.
In configuration.nix, you must specify the driver for applications that use the X server:
services.xserver.videoDrivers = [ "amdgpu" ];
In the hardware-configuration.nix file, specify the use of the amdgpu module:
boot.initrd.kernelModules = [ "amdgpu" ];
Now we need to find out the ID of the video card. In the terminal, enter the command, remembering to install the lshw package beforehand:
Hey thanks I followed your steps and everything is setup now but if I want to launch a game from steam what should I do like I don’t know the game executable file so how should I use DRI_PRIME=1 to launch it
I think you should add a variable DRI_PRIME=pci-0000_01_00_00_0 before launching game. It might been doing in game setting in Steam. Something like this:
To add the variable DRI_PRIME=pci-0000_01_00_00_0 when launching a game from Steam, you need to edit the game’s launch options. Here’s how you can do it:
Open the Steam client and find the game you want to launch with the DRI_PRIME=pci-0000_01_00_00_0 variable.
Right-click on the game in your Steam library and select “Properties”.
In the Properties window, go to the “General” tab and find the “Set Launch Options” button.
In the launch options window that appears, enter the following command:
DRI_PRIME=pci-0000_01_00_00_0 %command%
Click “OK” to save the changes.
Now, when you launch the selected game from Steam, it will use the DRI_PRIME=pci-0000_01_00_00_0 variable.