Return to

Looking glass and kde effects

I have been using looking-glass for a while now. I just realized that kde’s visual effects (transparency, edge glow) stop working when I run the look-glass client and resume when I close the client. Is there a reason for this? Bug? Necessary? It’s not a huge issue, but I was curious about it.

Dr. C

LG sets the XAtom NETWM_BYPASS_COMPOSITOR which disables desktop composition. Without this the render pipeline is buffered and guest mouse cursor updaes lag behind a frame or two. This is because LG has to composit the mouse cursor instead of relying on hardware cursor support. So in short, not a bug, a feature :slight_smile:

If you really want to disable this, comment out or remove lines 1202 to 1217 in main.c in the client, however you likely will find the application performance suffers.

1202       Atom NETWM_BYPASS_COMPOSITOR = XInternAtom(
1205         False);
1207       unsigned long value = 1;
1208       XChangeProperty(
1212         XA_CARDINAL,
1213         32,
1214         PropModeReplace,
1215         (unsigned char *)&value,
1216         1
1217       );

How does this affect the full composition setting in the Nvidia driver? Does the driver still do composition or does the driver then skip composition?

It’s up to the window manager and the driver to decide, it’s implementation specific.

Thanks so much for the explanation! :slight_smile: I am guessing that this matters for gaming. I mainly use LG for adobe lightroom and access to a windows only EMR system. I wonder if I would notice. Would it ever make sense to have a command line option to disable the disabling of the compositor?

No, it’s not just for gaming, its for the cursor. If you leave compositiing enabled there is very noticible input lag for the cursor. 1-2 frames usually, which at 60FPS equates to 33.3ms. This doesn’t seem like much until you use it.

Thanks, that does seem like it would be noticeable.

Disabling the compositor causes tearing and disables hot corners on KDE.

In my case the mouse delay is not noticeable (maybe because I disabled pointer precision on Windows) if I keep the compositor enabled.

Wouldn’t it make sense to add a flag to optionally keep the compositor enabled?

In addition to preventing the aforementioned KDE issues, some other scenarios that come to my mind (even if there is a mouse delay) are: using an additional mouse or gamepad through an USB dongle directly connected to the VM