I have a somewhat newer Dell XPS laptop, April 2022. It has both intel and nvidia gpus. I was experiencing really poor graphic performance on a game I play often so I started doing some investigation. What I discovered was that by default, only the intel gpu was being used for everything, including my game.
I noted that my load configuration was already loading intel and nouveau (open nvidia) drivers.
/etc/mkinitcpio.conf
The config had this line:
MODULES=(crc32c-intel intel_agp i915 amdgpu radeon nouveau)
On the arch wiki, I looked up how to utilize this and found several options. NVIDIA Optimus - ArchWiki
I tried using the Nvidia recommended method which was to call programs you want to use nvidia gpu with using a script wrapper called prime-run
prime-run appname
I updated my games application command in it’s .desktop file to include this in front of the program being called.
Running the program, I found it to be amazingly better than just using the defaults, this completely solved my performance concerns with this game. There were a lot of other possible options outlined, but I this easy answer worked so I didn’t have to try those others.
With running the nvidia gpu, I found that my laptop is getting very hot, after playing my game using the nvidia gpu for a while, the back of the machine gets hot enough that you don’t want to touch it, and I need to look into some options to check on the heat levels and do something about it when it gets too hot.
Next I also wanted to improve general performance on the Intel side, Nvidia takes a lot more power, and it’s noisier since the fans run most of the time when it’s on. My intel was using i915, and there were no extra options set up by default to utilize some of the extra features that could help with performance.
Config for i915 was already in my /etc/mkinitcpio.conf
, so one step down, next I was reading this thread talking about how to improve performance on these chips.
More info here:
https://wiki.archlinux.org/title/Intel_graphics
I have a tigerlake 11th gen, so I created a i915.conf file with the following options, then rebuilt cpio and rebooted.
sudo vi /etc/modprobe.d/i915.conf
options i915 enable_guc=3
options i915 enable_fbc=1
sudo mkinitcpio -P
After the reboot, I noted these options were in fact enabled.
sudo dmesg |grep GuC
[ 1.230889] i915 0000:00:02.0: [drm] GuC firmware i915/tgl_guc_70.1.1.bin version 70.1.1
[ 1.234741] i915 0000:00:02.0: [drm] GuC submission enabled
[ 1.234742] i915 0000:00:02.0: [drm] GuC SLPC enabled
[ 1.235215] i915 0000:00:02.0: [drm] GuC RC: enabled
These options are meant to offload some media decoding functionality from the CPU to the HEVC/H.265 micro (µ) Controller (HuC).