Using external monitor in addition to laptop screen

I apologize in advance if I have overlooked something obvious, but this used to work (mostly without a hitch) on my venerable Lenovo X220 under Qubes 3.2, and on a Lenovo T560 under Qubes 4.0 and 4.1.

Since I cannot run qubes in my workplace, I use it only as a secondary OS and have gotten a bit rusty. Today, I actually tried for the first time to attach an external monitor to my NovaCustom NV41 (3840x2160 resolution). Setting scaling to 0.9 makes text nicely readable. Extending the screen worked after a bit of trial and error, but I noted two shortcomings, which I don’t remember, at least not in this sincerity:

  1. Windows from a debian based application qube already running when attaching the 2nd monitor can be moved to the external display, but do not accept mouse or keyboard input there. If I move them back to the laptop, all is fine.

If I start the qube fresh with the 2nd monitor already attached, all is well.

  1. Now I have worked on both screens (with windows scattered around) and I detach the 2nd monitor. All windows that were displayed on the 2nd monitor are just gone (the applications still run), but I found no way to make them (re)appear on the laptop screen.

If anyone has suggestions and/or (partial) workarounds, these would be much appreciated.

seems your monitor layout change is not ‘announced’ properly.
I’m used to have a script to store some ‘preset’, and I was always calling this after any change:
qvm-start-gui --notify-monitor-layout --all

However ‘recently’ (not sure about the version, and can be years ago) the XFCE Display settings also works ‘out of the box’ and can keep my custom setups.

Try to run that command above, and if that fix your issue, then you ‘just’ have to find outh why it is not happens automaticaly…

This sounds like a problem with VRAM. Please look at this and try the recommendation:

As for the second problem, it sounds like the hardware is detached, and the software isn’t getting the memo. Try running xrandr both connected and unconnected. If there’s no large change, the software isn’t getting the memo.

1 Like

Does this look like your first problem:

?

Edit:
– It’s not an exact match … but it’s about windows in area beyond the geometry when the qube was started. I guess/assume you have the external monitor to the right of the laptop?

:slight_smile:

This is the solution to your problem: Windows don't receive mouse clicks after docking the laptop into a docking station - #4 by marmarek

Reason for not accepting mouse clicks: Your qube calculated the needed VRAM and added 8 MB (I think) as buffer when starting. Your external monitor is big enough so that 8 MB are not enough VRAM to serve the external display.

The docs about the buffer:

By default, it is as much as needed for the current display and an additional full HD (FHD) display (1920×1080 8 bit/channel RGBA). This logic fails when the machine has primary display in FHD resolution and, after starting some qubes, a 4K display is connected.

Thank you all! I meanwhile discovered the thread about reserving more VRAM; will explore.

Follow-up: I updated the VRAM settings for dom0 and the qube I most often use; this time, windows reacted on the secondary display as expected. So, the VRAM trick seems to have helped; thanks again.

I will keep the various xrandr commands in mind to try to fix things if something misbehavesl

I still see windows “stranded in nowhere” when I detach the secondary monitor (and the window was completely there). I guess it’s just something to beware of; once in a while this happens even on my Windows laptop …