Steam for Linux

Steam for Linux

Not enough ratings
Linux gaming with Fedora 31 - 37 on a laptop (optimus)
By PdGgM
Hello there,
because a couple of things in Windows are really bugging me and I know more about Linux than I do about Windows, I have decided to move to Linux.
I have a NVIDIA GTX1050, a i7 7700HQ and 16GB of RAM on my Laptop!
This guide will show how I get to play games on my favorite distribution Fedora [getfedora.org] ! This guide is for all who also want to move to Linux but play games on a laptop where linuxgaming is not so easy like on a normal computer.
This guide works for Fedora 31 - 37 (Tested on my own). Note for Fedora upgrades: I had to remove the nvidia driver to upgrade my Fedora system and reinstalled it on the new fedora version, still works fine!
   
Award
Favorite
Favorited
Unfavorite
Getting started
I assume that a new functioning Fedora is already installed!
First we need to update the system to the newest version:

sudo dnf update

Provided that a kernel update was installed, reboot once!
Initially it shout be checked if the system knows the graphics card respectively the graphics card is connected:

/sbin/lspci | grep -e VGA

Optional it can be ensured that NVIDIA Optimus is active and can be used:

/sbin/lspci | grep -e 3D

Now the system is ready to install the driver!
Installing the driver
Now the NVIDIA driver can be installed from the RPM Fusion Nonfree Repo [docs.fedoraproject.org] :

sudo dnf install akmod-nvidia

Optional additionally:

sudo dnf install xorg-x11-drv-nvidia-cuda

Done! After a reboot the driver can be used!
Additional capitalization of the driver / Troubleshooting
If the nvidia-settings do not work or your games are not runing with the driver perhaps this will help.
First check if nouveau is not loaded:

lsmod | grep nouveau

If it is, I recommend to shut down the X-Server for the next step (go to runlevel 3). Press Ctrl + Alt + F3, login and issue:

systemctl isolate runlevel3.target

Than remove the nouveau module:

rmmod nouveau

Additional to that, it can be necessary to load the nvidia module manually in a special mode:

modprobe nvidia "NVreg_DynamicPowerManagement=0x02"

Now reboot, the driver should work now!
The special mode for the driver is for Optimus on a laptop.
How to use?
On fedora it is not necessary and also not recommended to use bumblebee! The system can use Optimus out of the Box! To inform the system witch grafic drivers should be used for a game, just add this to the start options for a game that works with VulkanAPI [en.wikipedia.org] :

__NV_PRIME_RENDER_OFFLOAD=1 %command%

For other games who doesn‘t support VulkanAPI yet, add this to the start options:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%

Since the Proton version 6.3-1 (maybe also 5.13-6) and kernel version 5.11 (i guess Proton is to blame) games which run with it will use the first vulkan-driver they find. To force Proton to use the nvidia driver, it is necessary to add a new start option:

__VK_LAYER_NV_optimus=NVIDIA_only
1 Comments
Houtworm Apr 20, 2020 @ 6:32pm 
Nice guide :)