UPS is up to 165 but FPS won't go above 60

So, I recently finished my dGPU passthrough and Looking Glass setup. Just for a background, I didn’t want to use a dongle, and my priorities were portability and compactness of my laptop, so, a second monitor was not an option. I found the post called Virtual Display Drivers Knowledge Base and used the driver from there (search for IddSampleDriver) to fake my monitor. I used the exact specs my actual screen has, which is 2650x1600, 165Hz.

Everything seems great, except there are two problems that are mutually exclusive, with regards to turning vsync on/off.

  1. My FPS is capped to 60 when vsync is on, even though UPS shows up to 165.
  2. I experience an unacceptable amount of horizontal tearing when vsync is off, but FPS seems fine.

Can I somehow solve both of these at the same time?

Looking Glass seems like it’s capable of reaching 100+ fps when I’m not using vsync, but tearing is unacceptable. And I doubt lenovo legion 5 pro would have RAM bottlenecks (I mean I could be wrong).

VSync works for locking FPS settings, as means of maintaining visual integrity
Their should be a VSync toggle, to uphold particular FPS value [60, 90, etc.]

I know, as per my understanding, vsync is trying to synchronize monitor and GPU to run at the same framerate. But if both my real monitor on the host and my virtual monitor on the guest are 165 Hz, why is Looking Glass rendering no more than 60 frames per second?

Btw: If I am mistaken about certain things here or anywhere in the future conversation on this topic, I am actually fairly new to VMs, pass-throughs, and Linux as a whole, so, forgive me if I’m wrong too often.

Firstly, we disable vsync for a good reason, the latency it introduces is unacceptable. Look into enabling TearFree or similar in your desktop server.

As for the FPS limit, are you running > 1 monitor? if you are, some GPUs (mainly nvidia) can’t cope with this and limits you to the slowest of all your monitors.

1 Like

The setup I’m using runs the LG window on the same monitor, the laptop one.

Oddly enough, turning on vsync introduces almost no noticeable lag for me.

I have discovered that actually, my host monitor runs in 60Hz mode for some weird reason. The settings show 165Hz but monitor still does not exceed 60. Strange…

I’m running Manjaro KDE

Well this is the issue.

Guaranteed 2-3 frames of latency introduced, at 60hz thats 16.7*3 = 50.1ms, very noticeable when title composites the mouse into the 3d scene.

Again, look into enabling “TearFree”

1 Like

Did you look at the monitors direct settings?

Yes. I also checked xranr, and it does seem to have 165Hz enabled. But when I enable Settings > Workspace Behaviour > Desktop Effects > Show FPS, It shows no more than 60 all the time.

Actually, I found out that this is a frequent issue with my machine - many users like me have had problems with 60Hz Linux (especially on KDE) instead of 165 with legion 5 pro. So far it seems like it has nothing to do with Looking Glass.

What driver should I enable it for? I tried enabling TearFree for intel and modesetting, but it does not seem to solve tearing. I did it by adding 20-intel.conf to /etc/X11/xorg.conf.d/, with the contents of:

Section "Device"
    Identifier "Intel Graphics"
    Driver "modesetting" ## i tried intel too
    Option "TearFree"    "true"
EndSection

But it doesn’t seem to work. Or am I doing something wrong?

The issue disappears If I use Wayland

xrandr --output HDMI-A-0 --set TearFree on
Do this for each output

Likely because you have a compositor running that is doing it for you. If you’re on xorg compton also is good on Intel hardware for preventing tearing as it syncs to v-blank, but doesn’t cause buffering.

1 Like

xrandr command gave me following:

X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  11 (RRQueryOutputProperty)
  Serial number of failed request:  43
  Current serial number in output stream:  43

Everything is fine. I updated to kernel version 5.19, and it solved a handful of problems, both my 60 FPS cap and tearing while having TearFree enabled. I read on the forums that there is an issue with how intel driver reads EDID files, and that’s why the framerate was capped. I don’t know about tearing with TearFree enabled, but it seems to do something with intel driver too. Anyway, issue fixed.

Btw, if anyone wonders, here is a stack exchange site regarding the issue of framerate cap:

Here is its bugtracking site, the issue is resolved in 5.19:

Warning: if you’re like me and you update to kernel 5.19 on intel 11-12 gen processors, here is what you need to know (quick: in /etc/default/grub, in GRUB_CMDLINE_LINUX_DEFAULT, add ibt=off):

Sorry to disturb you again. Although kernel update fixed the issue of framerate cap, I still get 60-70 FPS max at games. When moving windows on the desktop, FPS seems to jump to 120 ish. An actual in-game fps fluctuates between 120 and 240 but the FPS LG shows is 60-70. While this, UPS in games is constantly better than FPS - about 120. I also tested tearing, and it seems like using X11 with kernel 5.19 on Manjaro doesn’t incur any tearing even with TearFree disabled.

Would be interesting to know - what do FPS and UPS actually mean? And what are the stages frame, upload, render and import in ImGui overlay menu? I didn’t find an explanation in the docs.

Edit: I noticed that during gaming sessions, Looking Glass takes about 20% of my dGPU. Is that normal?

Edit: Actually, there is some amount of tearing, it’s just soo non-existent due to the refresh rate of the monitor itself that I didn’t even notice it’s present until I recorded it with a slow-motion camera.