Windows don't receive mouse clicks after docking the laptop into a docking station

After docking my laptop and thus switching to an external display (laptop display off), all windows of qubes that had been running before docking have this problem:
Mouse clicks are not reaching the apps, ie are lost, IF the window is to the right or the bottom of the external screen. Restarting the qube solves the problem.

It looks like the running qubes somehow are left with the “viewport” (dimensions) of the internal laptop screen. As long as the window stays within those dimensions on the external screen (from top left) they do behave normally. When you move outside, they don’t receive any mouse clicks anymore.

How can I fix that without restarting all Qubes (annoying)?

1 Like

Are you using xfce or did you switch to a different desktop?

Could you share the output of xrandr -q before and after connecting the dock? (From dom0)

1 Like

I’m using the default XFCE and all dom0 elements like QubesManager and window decorations work fine. So I can click the minimize button on the window of an affected qubes successfully, but can’t click the contents of that window.

I’ve made an interesting observation:
Inside an afftected Qube, after docking the Qube’s DUMMY0 output still has the old laptop resolution (1680x1050) instead of the external screen’s resolution (5120x1440):

Screen 0: minimum 64 x 64, current 1680 x 1050, maximum 32767 x 32767
DUMMY0 connected 1680x1050+0+0 0mm x 0mm
   QB1680x1050   47.40*+
   QB5120x1440   59.96

Fixing this inside the qube is not possible, the larger mode is not accepted by xrandr (same for the display settings UI):

xrandr --output DUMMY0 --mode QB5120x1440
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  7 (RRSetScreenSize)
  Serial number of failed request:  96
  Current serial number in output stream:  97

From dom0, undocked:

Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 16384 x 16384
eDP-1 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 300mm x 190mm
   2880x1800    120.00 +  60.00 +
(removed unused modes for brevity)
   1680x1050     60.00* 
(removed unused modes for brevity)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)

From dom0, after docking (which turns the laptop panel eDP-1 off, as configured in the display settings UI in dom0):

Screen 0: minimum 320 x 200, current 5120 x 1440, maximum 16384 x 16384
eDP-1 connected (normal left inverted right x axis y axis)
   2880x1800    120.00 +  60.00 +
(removed unused modes for brevity)
   1680x1050     60.00  
DP-1 connected primary 5120x1440+0+0 (normal left inverted right x axis y axis) 1200mm x 340mm
   5120x1440     59.98*+  29.98  
(removed unused modes for brevity)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
1 Like

See GUI configuration | Qubes OS

3 Likes

Awesome, that was the solution!

qvm-features dom0 gui-videoram-min $(($WIDTH * $HEIGHT * 4 / 1024))
qvm-features dom0 gui-videoram-overhead 0
2 Likes