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.
My FPS is capped to 60 when vsync is on, even though UPS shows up to 165.
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).
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.
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:
Identifier "Intel Graphics"
Driver "modesetting" ## i tried intel too
Option "TearFree" "true"
But it doesn’t seem to work. Or am I doing something wrong?
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.
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.