Site Tools


start:overclockgwe

This page is out of date - need to find a workable solution for wayland and update it - Pete @ 14/09/2023

I only have Nvidia cards so cant show how team red users do it :( sorry I dont really play games that much. Maybe someone else can create a section for team red :)

Green team: Nvidia drivers introduced a bug recently (like a year ago?) where you can only overclock if xorg is running with root privileges. This is a significant security issue so you should carfully decide if overclocking is worth the security risk.

However you do have 2 alternatives depending on your level of how important gaming is to you.

1) Modify /etc/X11/Xwrapper.config so that the file has the following lines edited/added:

allowed_users=anybody
needs_root_rights=yes

This option allows green with envy to run normally and edit the gpu and memory offset itself as you wish.

2) (very inconvenient option) once you are booted into your desktop, you can change to a console using ctrl-alt-f5 for example and login as user 'root'. You can then run 'startx' on the cli and then login to a gdm session as root user. Opening Nvidia X server Settings will then allow you to edit values under powermizer (type a value and press enter). And you can then logout at the settings will stick and change back to your logged in user (ctrl-alt-f2).

This second method is very inconvenient as either you leave the session running if wanting to be able to change and test multiple values, which consumes some resources, or when you logout you are now stuck with the gpu and memory offsets unless you login again and change them back to 0. However as you do only login for a short time as root it is more secure, potentially, possibly. It is also inconvenient in that you must perform this action every single boot of your PC. GreenWithEnvy is pointless with this method so you dont need to install it.

For this reason I will show you how to complete the overclock using method 1, however if you really want to login as root every time you turn on your pc and run startx then change the settings and logout and switch back to your regular user account, you are indeed free to do so. For me this is very uncool while method 1 required only editing a single file which can be later reverted if the Nvidia driver is fixed or simply changed if you dont need to game with an overclock present.

With this in mind you can follow along if you make the edits for method 1 above (to revert remove the needs_root_rights line and change allowed_users to 'console').

Yes if you no longer need the overclocking capabilities you should revert back to the more secure option. I dont really game so while I did leave the setup in this way during the test I did revert once done. However xorg did used to run under root a while ago and some display managers still do (eg: lightdm and probably some others I never use) so its not such a major security risk that you will immediately die or anything, Im just saying an improvement was introduced a few years ago where gdm changed to rootless and its been like that ever since and other display managers will eventually also run rootless, so yeah, it was fine for years under the old way, and might be fine still but every time you chink away at the armor of your system it becomes just a little bit less secure so…

Once that file is edited you will need to also need to create a file and add some info to it:

sudo nano /usr/share/X11/xorg.conf.d/10-nvidia.conf

Add the following text:

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "Coolbits" "12"
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

You will need to reboot for coolbits to take effect at this point. A value of 12 is fairly safe but there are other values you can specify that might be unsafe (eg: overvoltage etc). 12 simply allows changing of fans speed and overclocking the cpu cores which if set too high simply crash the system and you have to reboot.

Next we install green with envy. This uses flatpak so we type:

sudo apt-get install flatpak
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub com.leinardi.gwe
flatpak update
flatpak run com.leinardi.gwe

You can also run gwe from the apps menu in gnome rather than the cli.

The app itself if pretty simple, you make an overclock profile and apply it. I didnt bother changing the fan settings but you can if you want to.

In my test I overclocked the GPU by a value of 272 or increased it from 1911 to 2176 which is about a 13.8% improvement. For memory I used 1000 and it increased the memory clock from 3504 to 4504. It seems like you can just max that out and nothing bad happens.

When choosing values you should find a value where the system crashes then reduce it by like 20 or more. I found It crashed at like 295 so reduced it down to 272. The memory it seemed you can just set it really high at least for me (to the max). If games are unstable at that value keep reducing it by like 10 until games n longer crash while playing. If you temper your expectations to be around 10% then you will be fine.

I do imagine an improvement of around 10% is or can be expected on average but could be card dependent. I dont really game as I mentioned so this is just what I found.

I have an old card so not really much I can do but here is the before and after in Apex legends where I found an area that was taxing on the card with lots on screen:

No increase: (frames 42)

Overclocked: (frames 49, or around 15% increase)

Dont forget you can pass cool options to steam so if you install the gamemoderun package and wanted to limit the game to 60fps so you dont need to use gsync you could add this to the steam options:

DXVK_FRAME_RATE=60 gamemoderun %command%

eg:

Other options you can try are “-novid” and “DXVK_ASYNC=1”. Novid apparently skips the into and if you use proton ge apparently the DXVK setting improves stutter. My personaly feeling is too many options could cause more harm than good so I didn't bother. To add them you would do something like:

DXVK_FRAME_RATE=60 DXVK_ASYNC=1 gamemoderun %command% -novid

But you can google around and try some other options if you really want to.

start/overclockgwe.txt · Last modified: 2023/09/14 20:19 by peter