Extremely slow when used with external monitors

I’ve recently upgraded my setup, and I’m using a Dell Latitude 7320 docked to a WB19TB docking station (via a thunderbolt 4 port) , which has 2 external monitors connected via DisplayPort.

Qubes works as expected on the laptop, but its performance is abysmal when the external displays are connected. I’ve been experiencing terrible lags, and dom0’s cpu usage (as reported by xentop) constantly balloons to well over 100%. The system slows to a crawl when videos are played, rendering it completely unusable. I have a video showcasing the issue, but I’m not allowed to upload it (new users cannot upload attachments).

I’ve tried experimenting with xorg configurations, updating to the latest kernel, etc, to no avail.

Would anyone be able to assist?

You have neglected to say what the external monitors are, and what
resolution you are using on them.
Does this happen with any video? Is the effect mitigated if you
reduce the size of the video window?
Do other applications perform as normal? (Terminal windows, office
apps, etc.)
What are the “terrible lags”? You instance video. What about (e.g.)
mouse movement, key press?

I never presume to speak for the Qubes team. When I comment in the Forum or in the mailing lists I speak for myself.

I’m using 2 Dell QHD monitors (P2423D), which are connected to a WB19TB dock, which is in turn connected to one of my laptop’s thunderbolt 4 ports. I’m able to use both of the displays at 1440p on Qubes.

Dom0’s cpu usage constantly spikes to well over 100% at times, and terrible performance can be observed. There’s noticeable lag when moving windows around, with mouse movements, scrolling, keyboard input takes a while to show up, etc, which applies to all of the applications, including the ones in dom0.

It happens with any video, probably because the system already lags like hell. Reducing the video quality and window size does not appear to mitigate the issue.

I’ve uploaded a video showcasing the issue. Do note that it leads to an external link as I’m unable to upload mp4 files as attachments here.

When I’m using my laptop on its own, none of the issues are present.

I had a similar problem with a Latitude 7300. It was responsive when using the laptop’s display by itself. The system lagged a bit when using a 1900x1200 monitor and a 1600x1200 monitor (and the internal display). It lagged even more—almost unusably so—with a 2560x1440 monitor and a 1600x1200 monitor.

The problem went away after I switched the VMs to a newer kernel based on the instructions on the Managing qube kernels page. Specifically, I installed the kernel-latest-qubes-vm package then used the Qube Manager program to change the default VM kernel to the newly-installed 6.3 series kernel.

Everything’s been great on the new kernel.

Well, everything wasn’t great on the new kernel. Over time the lag returned.

When the system is laggy, I often see lots of CPU usage across several of my VMs, even though nothing particularly computational should be running. Firefox seems to often use a lot of CPU, as do other GUI programs that update their windows frequently. I can often get the system back to usability by closing Firefox if I’ve got something else with a lot of graphical updates going.

But this only happens when I’m using external monitors. When running just on the laptop’s built-in display, the exact same programs will not cause any lag at all. When using just one external monitor and the internal display, there’s periodically some lag. When using two external monitors the lag can at times render the system unusable.

Things seem a little worse when I’m at the desk with the 2560x1440 monitor is in use, as opposed to when I’m at the desk with the 1920x1200 monitor. So I hypothesize that the issue is related to the total size of the X virtual framebuffer. At its largest, when I’m using the larger external monitors and the internal display, the virtual framebuffer is 5420x1440.

At the moment, I’m working around the problem by using only my two external monitors, without the internal display. That puts me in the “only sometimes lag” zone like using a single external monitor plus the built-in display.

For troubleshooting purposes:

This is on a Dell Latitude 7300. The GPU is an Intel UHD Graphics 620, integrated into the CPU (an Intel i7-8665U). I’m running Qubes 4.1.2, with no separate display VM (so X is running in dom0). If I understand the Xorg log properly, X is using a generic driver, but it’s using DRI, so it should be making use of the i915 kernel module that’s loaded.

I have 32 GiB RAM. With my normal complement of VMs running, about 20% of that is unallocated, so every VM is getting its maximum amount of RAM.

The CPU has four cores. Hyperthreading is disabled, so four cores are all that’s available.

I use i3 as my window manager, with windows spread across 6–10 workspaces.

I’ve set the default VM video RAM before starting any VMs with qvm-features dom0 gui-videoram-min $((5420 * 1440 * 4 / 1024)).

And, I guess

qvm-features dom0 gui-videoram-overhead 0

after setting min RAm doesn't help too?