Nvidia perfomance config fix...maybe

Hello to this beautiful community, and let me preface this with saying I have no idea what I’m talking about.

I recently switched from Windows to EndeavourOS after haven’t used any form of linux in a decade. This last week, I was very tempted to turn back due to the headache of trying to get good performance out of games and other things. Now that I have it fixed, I felt obligated to write a straight forward guide to help future me when I break my computer again.

For reference specs:
Lenovo Legion Pro 7i
Intel i9 13900hx
Nvidia RTX 4090 - 175w

1st issue: PC hard locks anywhere from at login screen to several hours into the night
2nd issue: Less than half the avg FPS compared to windows in games
3rd issue: Random stutters, window lag scrolling or dragging
4th issue: Gysnc/Adaptive refresh not working well

Here’s the steps I took to seemingly fix all this from start to finish,

Clean EndeavourOS install, non nvidia version using Systemd instead of Grub. I setup the manual partitions to preserve my /home/ directory in case I have to reinstall in the future. This will save your steam library and there are plenty of guides on how to do it.

I also set my GPU to “nvidia only” in my bios and enabled all the factory overclock and undervolt options

Make a TKG 6.10 RC2 kernel with some custom stuff. (I switched to X11 at the login screen for this)

  1. Open the terminal and type

git clone https://github.com/Frogging-Family/linux-tkg.git

  1. Go to /home/YOURNAME/linux-tkg/ and edit line 251 in customization.cfg to look like,

_custom_commandline=“nvidia_drm.modeset=1 nvidia.NVreg_EnableGpuFirmware=0 intel_pstate=active kernel.split_lock_mitigate=0”

  1. In the terminal,

cd linux-tkg
makepkg -si

  1. When it asks, select “0” for version 6.10-rc2, and “0” (i.e. default) for the rest.

  2. All the build options should be left at default. And be sure to know your CPU family name. Mine is Raptor Lake (or “44” when it asks)

It will take it’s time building and installing. Hopefully it doesn’t lockup during the install…

Without rebooting, in the terminal put

yay -Syu nvidia-open-beta-dkms nvidia-utils-beta lib32-nvidia-utils-beta nvidia-settings-beta

Let the installer run through by spamming enter a few times and sudoing when asked. When it’s finished, go ahead and reboot. Making sure you select the new TKG bios option in the boot menu

Logging into x11, open the terminal, and “sudo nvidia-settings”. Under the display config box, select “Advanced settings” and force the full compisition pipeline as well as “enable gysnc for non gsync monitor” if it’s there too.

The above shouldn’t be needed if you’re just gonna use wayland, but I am, after all, an idiot

In the terminal again,

sudo touch /etc/systemd/do-not-udevadm-trigger-on-update
sudo pacman -S power-profiles-daemon
sudo nvidia-smi -pm ENABLED
systemctl enable nvidia-powerd

Reboot and you should be good to setup all the good stuff. Here’s some quick commands for future me,

sudo pacman -S steam
sudo pacman -S steam-native-runtime
sudo pacman -S lutris
yay -S protonup-qt

This was the one that fixed my bluetooth not enabling,

sudo systemctl start bluetooth.service

I don’t think I missed anything, but if someone using this runs into issues lmk. I did so much troubleshooting so maybe I forgot a step.

Games are running at near or better Windows levels now, and after 24hrs… I haven’t crashed…

1 Like

As a quick update, in the last 24hrs my computer stayed idling after without crashing. There was a couple hours of gaming in between. It also went into sleep and resumed without issue just a few minutes ago.

Upon further investigation, forcing splitlock off in the kernel might not be for the best but can’t argue with success

Lastly, if the game has any freezing issue in either Wayland or X11, switch to the other. Never had to reboot for this, just terminate the busted program and logout and back in

Beatiful act of sharing of what you learned! So refreshing :slight_smile:

What I would do, is first check if all changes / parameters help (including those boot params), without need to install custom kernel. Custom kernels help but not as much as you could imagine.

Also - RC kernel - release candidate - no, we do not do this. Too many things can go bad. Everyday Endevour OS people stick to what was released.

In the end - this particular kernel - harder to maintain - you need to manually rebuild from time to time.

Anyway, welcome to the circus!

Thank you for the welcome and advice. I can’t thank this community enough for all the help. I’m simply regurgitating a bunch of stuff I’ve found here.

I had a update to post here because I had to rebuild the kernel funny enough. As well, I experienced why it is very ill advised to run the RC and beta drivers 99% of the time. This method is not for the faint of heart, and I again recommend the home drive being on a separate partition

That said, I think the proof is in the pudding here

Over 2 whole days with on and off gaming and locking/unlocking and screen timeouts with steam downloading in the background. Not one freeze or lockup. I tried the stock and LTS kernels with the beta drivers and was still getting freezes. Idk what’s in the release channel but it helps for my hardware

So… instead of building the new RC3 with that custom config, I built it with the default config and learned how to add the launch parameters to the SystemD.

sudo nano /efi/loader/entries/WHATEVERTHEKERNELISCALLED.conf

And at the end of options add,

nvidia_drm.modeset=1 intel_pstate=active kernel.split_lock_mitigate=0

Modeset is to make Wayland work

Intel pstate is what allows it to run in it’s factory performance mode. I haven’t tested it set to passive yet

50/50 on if you wanna force split lock off. I did and I haven’t run into a issue. Gamemode should toggle it but you have to be sure to add your self as a user

sudo usermod -aG gamemode USERNAMEHERE

I’d love to hear if anyone else with similar hardware has tried any of this or nailed down a even better fix. I’ve found most performance to be close or better than windows. But ray tracing is oddly heavy sometimes.

Hitman 3 runs at 100+ FPS at 4k DLSS Bal, but turning on RT drops it to 50fps regardless DLSS setting or resolution. 720p native w/ RT, 50FPS. 4k native w/ RT, 48fps. Can’t recall what windows perf was but it was better than that.

Dying Light 2 however, RT on vs off only hits the FPS by 15% at 4k DLSS Perf and is affected greatly by resolution settings

Thanks for an interesting read, I have been thinking of trying out the TKG Kernel or do some customizing of settings with standard Kernel.

When I have some time off from work I do some more research.

Thanks for sharing! I’ve tried different kernels over the years, never tried TKG but I’ve never noticed a noticable difference with how my games ran when switching between different kernels. How did you actually notice you got better performance with the TKG kernel?