Monitor frame time in game

Hi everyone,
I'm new to Linux. I'm a gamer. So of course before switching definitely to Linux I wanted to check if my favorites games where running correctly on Linux.

Of course I had a few hurdles to overcome to make my favorite game to even start. Now I have a feeling that the game suffer from micro stutter. I would like to check this by recording frame time.

What I found on the internet is that I should use either GLXOSD or VOGLperf.
When I try to run the game through Steam with: glxosd --steam %command% launch option, the game launches but glxosd does not. So I tried to run the command glxosd glxgears it works.

So of course I tried to start the game using the command: glxosd --steam steam steam://run/611500

But the result is this: ERROR: ld.so: object 'libglxosd-glinject.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

From what I read on the net this could be linked to the fact that steam uses 32bits library and glxosd 64bits. So obviously I went to pamac and tried to build lib32-glxosd-git but there also an error:
curl: (7) Failed to connect to download.nvidia.com port 21: Connection timed out
==> ERROR: Failure while downloading ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-343.36.tar.bz2
Aborting...

Then I tried VOGLperf. Here when I try to run the game from the internet browser windows of VOGLperf I get an error saying that voglperf cannot run as root user. and nothing happens.

Is there an alternative to GLXOSD and VOGLperf. If not does anyone now how to solve one of these issue?

Thanks

Well the file that it needed for the build is here:

https://download.nvidia.com/XFree86/nvidia-settings/

You could edit the build file to point it to that directory. I would assume that would work.

Thanks a lot! It helped me go further. I could build and install the dependency of lib32-glxosd-git but not lib32-glxosd-git itself.
It throw this error:
CMake Error at src/freetype-gl-glxosd/CMakeLists.txt:72 (add_library):
Cannot find source file:

freetype-gl/distance-field.c

Sadly these programs are dead, so dead in fact one person pulled the code for it.
I did find this. Just google freetype-gl and you'll get this:

Just google the error output. Thing is, I don't think this will run even if you do get it built. But I guess there's no harm in trying.

Not a programmer (yet) so I'm unsure about all this. :rofl:

Thanks. for the help.

In this case do you know an alternative to glxosd and voglperf?

I've been looking and all the projects are dead. Sadly I don't have any alternative suggestion.
Pretty much most benchmarking stuff is made for Windows.

I don't know how good it is, but perhaps you can get some telemetry relevant to what your looking for (Not frametime unfortunately). It's a program called GreenWithEnvy. Comes in a couple different flavors. I think Snap and/or Flatpak and I think you can also clone the github page and build it yourself. I'm sure it's probably in the AUR as well.
It's not frametime as I said but maybe it'll be helpful.
Lastly, you might consider running the game benchmark, (if it has one) sometimes the newer ones have frametime stats included in the bench. IIRC, Shadow of the Tomb Raider does. Or maybe I'm high. :smoking:

Wish I could help more!

welcome to the forum, more info here would be helpful for others willing to help.

inxi -Fxxxz
mhwd -li
cat /etc/X11/xorg.conf.d/*.conf

also, you mentioned this is a steam game, linux native? proton? which game is it?

if proton, have you tried selecting different proton versions?
(from the same preferences you set game launch options)

did you try any of the common launch parameters to fix issues like stuttering?
for example PROTON_NO_ESYNC=1 %command% or making sure compositing is disabled when using steam?

[thomot512@big-tower-manj ~]$ inxi -Fxxxz
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = (unset),
        LC_MONETARY = "fr_CH.UTF-8",
        LC_TELEPHONE = "fr_CH.UTF-8",
        LC_MEASUREMENT = "en_DK.UTF-8",
        LC_TIME = "en_GB.UTF-8",
        LC_NUMERIC = "C",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
System:    Host: big-tower-manj Kernel: 5.1.15-1-MANJARO x86_64 bits: 64 compiler: gcc 
           v: 9.1.0 Desktop: KDE Plasma 5.16.2 tk: Qt 5.12.4 wm: kwin_x11 dm: SDDM 
           Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: ROG RAMPAGE VI EXTREME v: Rev 1.xx 
           serial: <filter> UEFI: American Megatrends v: 1603 date: 11/02/2018 
CPU:       Topology: 12-Core model: Intel Core i9-7920X bits: 64 type: MT MCP 
           arch: Skylake rev: 4 L2 cache: 16.5 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
           bogomips: 139263 
           Speed: 1201 MHz min/max: 1200/4200 MHz Core speeds (MHz): 1: 1200 2: 1200 
           3: 1200 4: 1200 5: 1200 6: 1201 7: 1201 8: 1200 9: 1201 10: 1219 11: 1201 
           12: 2896 13: 1200 14: 1201 15: 1201 16: 1200 17: 1199 18: 1200 19: 1200 
           20: 1329 21: 1200 22: 3156 23: 1200 24: 1200 
Graphics:  Device-1: NVIDIA GP102 [TITAN X] driver: nvidia v: 430.26 bus ID: 17:00.0 
           chip ID: 10de:1b00 
           Device-2: NVIDIA GP102 [TITAN X] driver: nvidia v: 430.26 bus ID: 65:00.0 
           chip ID: 10de:1b00 
           Display: x11 server: X.Org 1.20.5 driver: none unloaded: nvidia 
           compositor: kwin_x11 resolution: 3840x1080~144Hz 
           OpenGL: renderer: TITAN X (Pascal)/PCIe/SSE2 v: 4.6.0 NVIDIA 430.26 
           direct render: Yes 
Audio:     Device-1: Intel 200 Series PCH HD Audio vendor: ASUSTeK driver: snd_hda_intel 
           v: kernel bus ID: 00:1f.3 chip ID: 8086:a2f0 
           Device-2: NVIDIA GP102 HDMI Audio driver: snd_hda_intel v: kernel 
           bus ID: 17:00.1 chip ID: 10de:10ef 
           Device-3: NVIDIA GP102 HDMI Audio driver: snd_hda_intel v: kernel 
           bus ID: 65:00.1 chip ID: 10de:10ef 
           Device-4: Cooler Master Sirus Headset type: USB 
           driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-2.4:10 chip ID: 2516:9494 
           Sound Server: ALSA v: k5.1.15-1-MANJARO 
Network:   Device-1: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: 3.2.6-k 
           port: 3000 bus ID: 00:1f.6 chip ID: 8086:15b8 
           IF: eno1 state: down mac: <filter> 
           Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter 
           vendor: ASUSTeK driver: ath10k_pci v: kernel port: 3000 bus ID: 04:00.0 
           chip ID: 168c:003e 
           IF: wlp4s0 state: down mac: <filter> 
           Device-3: Wilocity Wil6200 802.11ad Wireless Network Adapter driver: wil6210 
           v: kernel port: 3000 bus ID: 05:00.0 chip ID: 1ae9:0310 
           IF: wlp5s0 state: down mac: <filter> 
           Device-4: Aquantia AQC107 NBase-T/IEEE 802.3bz Ethernet [AQtion] 
           vendor: ASUSTeK driver: atlantic v: 2.0.4.0-kern port: 3000 bus ID: 06:00.0 
           chip ID: 1d6a:d107 
           IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 5.89 TiB used: 67.46 GiB (1.1%) 
           ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKKW512G8 size: 476.94 GiB 
           speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 004C scheme: GPT 
           ID-2: /dev/nvme1n1 vendor: Intel model: SSDPEKKW512G8 size: 476.94 GiB 
           speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 004C scheme: GPT 
           ID-3: /dev/nvme2n1 vendor: Intel model: SSDPEKKW512G8 size: 476.94 GiB 
           speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 004C scheme: GPT 
           ID-4: /dev/sda vendor: OCZ model: TRION100 size: 894.25 GiB speed: 6.0 Gb/s 
           serial: <filter> rev: 11.2 scheme: GPT 
           ID-5: /dev/sdb vendor: Western Digital model: WD4004FZWX-00GBGB0 
           size: 3.64 TiB speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: 0A81 
           scheme: GPT 
           ID-6: /dev/sdc vendor: Seagate model: ST1000LM014-1EJ164 size: 931.51 GiB 
           speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: SM25 scheme: GPT 
Partition: ID-1: / size: 878.92 GiB used: 67.46 GiB (7.7%) fs: ext4 dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 37.0 C mobo: N/A gpu: nvidia temp: 28 C 
           Fan Speeds (RPM): cpu: 0 gpu: nvidia fan: 0% 
Info:      Processes: 404 Uptime: 7m Memory: 31.09 GiB used: 2.38 GiB (7.7%) 
           Init: systemd v: 242 Compilers: gcc: 9.1.0 Shell: bash v: 5.0.7 
           running in: konsole inxi: 3.0.34 
[thomot512@big-tower-manj ~]$ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2018.08.09               false            PCI


Warning: No installed USB configs!
[thomot512@big-tower-manj ~]$ cat /etc/X11/xorg.conf.d/*.conf
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbModel" "pc105"
EndSection
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "TITAN X (Pascal)"
        BusID          "PCI:101:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "TITAN X (Pascal)"
        BusID          "PCI:23:0:0"

The game is Quake Champions. It is not a linux native game. I'm using proton 4.2-9.
I just tried different version of Proton and it did not change anything. Disabling the compositing does not change anything either.
On the other hand PROTON_NO_ESYNC=1 %command% reduce the stuttering significantly but it also make me loose around 45% of my FPS, I already lost 35% of them by switching to Linux, that becomes a lot. And I still have some less frequent stuttering.
Are there other thing I could try to increase performance and reduce stuttering?

Even if I manage to make the game playable I would like to be able to record frame time, do you know a way?

try this for launch options, it's a bit long

PROTON_NO_ESYNC=1 %command% --set /Config/CONFIG/maxFpsValue 100 --set /Config/CONFIG/isLowResParticles 1 --set /Config/CONFIG/isLowViolence 1

if maxFpsValue 100 gives undesirable performance you can try other values that match your monitor better. start with 100 and change if needed.

for anything you can get on steam, always check www.protondb.com and see what others are using to make it perform better. some games run better with esync, some/most without. PROTON_USE_WINED3D=1 is another common one you could try

vulkan has an overlay that shows all of that but i cant remember how to enable it.

1 Like

Thanks a lot, looking at protonDB, I was able to get almost twice as much FPS as before using gamemoderun. Some people say that playing through Lutris with DXVK 1.2 should help get good performance. I'm going to try that next.

1 Like

i forgot about gamemode. :+1:

lutris also has preconfigured install scripts for most games. you can also install an endless amount of different wine, proton, and dxvk versions among other things. i use it for certain games, hitman: absolution for example, if you look on protondb the steam version is marked as "borked" but the version from gog.com is DRM free and plays perfectly. linux gaming is getting better and better at a pretty good rate.

1 Like

DXVK 1.2 really makes a big difference in this game at least. I can go from medium graphic to ultra and get a 5% increase in FPS and I completely delete the micro stutter.

Now I just need to find a way to overclock the graphic card on Linux.

I really hope it will continue to get better!

In Lutris you need to create an environment variable: DXVK_HUD=frametimes

But I have not yet found a way to log them, just to display them...

I know you have an nvidia card but I'm going to put both nvidia and AMD overclocking utils here for reference to others reading. :slight_smile:

GreenwithEnvy for nvidia and Radeon-profiles for AMD.
Current both are on AUR
version for GWE is gwe 0.12.3-4
For radeon-profile radeon-profile-git 20190211.r0.g52f3ee3-1

you need to enable coolbits, then you can set clocks from nvidia-settings or a 3rd party app like GWE that @SinisterBrain mentioned. just make sure you dont set GWE to enable on startup until your absolutely sure the values you have set are stable or you'll end up with a system that locks up on boot.

to enable coolbits, assuming your using the xorg configuration that MHWD created when you installed the drivers, you can do it like this.

sudo nvidia-xconfig -c /etc/X11/mhwd.d/nvidia.conf -o /etc/X11/mhwd.d/nvidia.conf --cool-bits=24

then you can adjust clock/voltage/fan after a reboot

1 Like

Thanks to both of you!
I manage to overclock but the performance gain in this game is really nonexistent.

a good overclock involves more than just setting gpu/mem clock speeds. adjusting it's ramp profile so it's scaled in a way that the clocks are not going too high too early or too late and so when it reaches it's peak that it remains steady under load which most people overlook in favor of hitting a higher peak to brag about even if that peak lasts 2 seconds before it dives down again, then up, then down, up, down, up, down. you get my point.

also setting your CPU to a "performance" governor should improve a constant steady gaming experience. if i leave my CPU on the normal or powersave governor it causes the cpu clocks to jump up/down constantly and i end up with stuttering sometimes.
cpupower is in manjaro's repo and you can enable it's service or just use it with a command like this

sudo cpupower -c all frequency-set -g performance
1 Like

Temps, temps, temps.
Throttling = bad. :wink:

So temperature is barely hitting the 45 Celsius.
Concerning the stability, I encountered this issue back when I was trying on Windows. I had a point past which the GPU did not crashed or anything but the performance started to go down. I did find this limit and then get a around 5 MHz lower to have some margin and repeated the process with the memory clock.
This time I just copy pasted the one from windows. An according to the graphs from GWE everything seems to works well. I just don't see any difference in-game.

im on an optimus laptop so i dont have the ability to set exact voltages but since your on a desktop you should be able to run something like glxgears_pixmapand tweak settings in real time to see what produces the highest steady fps. make sure compositing is disabled, if it's not you'll end up with a significant loss.

then with glxgears_pixmap running on the screen you can play with voltage/clock's. there are some decent guides out there if you look but it makes a world of difference.

5mhz below the point of instability is not lowering it enough. and in case you didnt notice on GWE the memory clock speeds are halfed. if you set a +400mhz it's actually +800mhz. that rule doesnt apply to the gpu clock speed where 100=100.

for example, i find on my laptop i get the best consistent performance with my CPU governor set to performance, and on the GPU clock +120, MEM clock +1900 (actual). in GWE it's set to 120/950

I might have expressed myself poorly. I did not meant the point where the gpu start to crash or make software crash but the maximum performance point. The point where everything is running perfectly and I get the max performance.

I tried glgears but once again whatever the setting the performance are exactly the same. I started to ask myself if GreenwithEnvy was overclocking both GPU or only one? If it is the later it seems it is overclocking the wrong one.

1 Like