R3.2, xfce, resume and changing resolution issues

174 views
Skip to first unread message

yaqu

unread,
Nov 6, 2016, 5:34:15 PM11/6/16
to qubes-users
Hello,

When I work on laptop with lid closed and external monitor connected,
and when I suspend Qubes, reconnect it to another docking station with
different monitor, and wake it up, then screen on external monitor has
old resolution, not matching resolution of currently connected monitor.

Is it possible to force (or politely convince) xfce4 to autodetect
resolution after wake up from suspend? Just like it used to work on KDE?

As a workaround I use custom script in /usr/lib/systemd/system-sleep/
that executes on wake up:

xrandr --output HDMI1 --auto --output HDMI2 --auto

It works, but maybe there is a better solution?

And there is a second issue with changing screen resolution. When I
change resolution from lower to higher, some icons in tray at the
bottom of the screen are not accessible - no tooltip on hoover, no
response to click. It looks like only icons of appVM apps are affected
(NetworkManager, Psi, Remmina, KeePass...), and icons of dom0 apps work
correctly (volume control, power manager, qubes manager). Tray needs to
be on bottom of screen, of course.

I have found out that to make these icons work again, I have to switch
on or off any of connected displays.

This issue can be reproduced even without external monitors. Assuming
laptop's LCD is on LVDS1, one needs to switch it to some low resolution
and then back to default:

[user@dom0 ~]$ xrandr --output LVDS1 --mode "800x600"; sleep 3; xrandr
--output LVDS1 --auto

Now icons are not accessible. To fix it one needs to turn LCD off and
on:

[user@dom0 ~]$ xrandr --output LVDS1 --off; xrandr --output LVDS1 --auto


BTW now as I tested it, it looks that not only tray icons are not
accessible. The bottom half of the screen is not clickable for appVM
applications.

Regards,

--
yaqu

Andrew David Wong

unread,
Nov 6, 2016, 10:34:39 PM11/6/16
to yaqu, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2016-11-06 14:34, yaqu wrote:
> Hello,
>
> When I work on laptop with lid closed and external monitor connected,
> and when I suspend Qubes, reconnect it to another docking station with
> different monitor, and wake it up, then screen on external monitor has
> old resolution, not matching resolution of currently connected monitor.
>
> Is it possible to force (or politely convince) xfce4 to autodetect
> resolution after wake up from suspend? Just like it used to work on KDE?
>
> As a workaround I use custom script in /usr/lib/systemd/system-sleep/
> that executes on wake up:
>
> xrandr --output HDMI1 --auto --output HDMI2 --auto
>
> It works, but maybe there is a better solution?
>

Thanks for the report. Tracking:

https://github.com/QubesOS/qubes-issues/issues/2420

> And there is a second issue with changing screen resolution. When I
> change resolution from lower to higher, some icons in tray at the
> bottom of the screen are not accessible - no tooltip on hoover, no
> response to click. It looks like only icons of appVM apps are affected
> (NetworkManager, Psi, Remmina, KeePass...), and icons of dom0 apps work
> correctly (volume control, power manager, qubes manager). Tray needs to
> be on bottom of screen, of course.
>
> I have found out that to make these icons work again, I have to switch
> on or off any of connected displays.
>
> This issue can be reproduced even without external monitors. Assuming
> laptop's LCD is on LVDS1, one needs to switch it to some low resolution
> and then back to default:
>
> [user@dom0 ~]$ xrandr --output LVDS1 --mode "800x600"; sleep 3; xrandr
> --output LVDS1 --auto
>
> Now icons are not accessible. To fix it one needs to turn LCD off and
> on:
>
> [user@dom0 ~]$ xrandr --output LVDS1 --off; xrandr --output LVDS1 --auto
>
>
> BTW now as I tested it, it looks that not only tray icons are not
> accessible. The bottom half of the screen is not clickable for appVM
> applications.
>
> Regards,
>

Thanks. Tracking:

https://github.com/QubesOS/qubes-issues/issues/2421

For now, please try using the qubes-monitor-layout-notify tool as described in the comments on this issue:

https://github.com/QubesOS/qubes-issues/issues/1599

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJYH/ZFAAoJENtN07w5UDAw9oUP/i6rX0tN/H5jAuMghg3EpEXY
zlZ47iFegNydCZvPm1sbdyfK8Ln3RWit+g6jmExwv0MoQUJBZH1hUScFpFx3UmZQ
EEFxesnlZ3teQ7vfKy7GLyJ2wSlkNd2RnNd3tyYizAhTXMBkDhC5CRTRlgInk96T
LAScY9IBgZ3JhDuLAHHQiJyg3fG1SjEGWCTiaDtuw3F5BPR8LbIPSGm5v9oMCXbr
DUIRurhJXx+Zx5X+fAciZOqw0jWIvByGxie0TV1+2zkS4tnjL2kjvU4U81jFcdwp
Ecw+SJWka0MbgwnIX7UYFcQnakkelj+/T8ytQna+kTeimF3AoO6bahvWMJZ2fHeK
VTbjncvKC7m6bzR6/yBZnwrg5zwcERHSO5knP2WxfVlMus65S3JGy8N7O9diCuQy
OL9OH4Z1XAYr20st3q7GyvQi3xbodSAx+kJ2VFp7xNYSL1SE3gCWBQZoTRZzdBOn
AmmIpnpJcq8C8kKGBMr0KAKIIr5JSb2n/fC3zhSV3hFfILObHSqFFOtuEb45PDsJ
cdCMIEWiY86PCD6Vi8hwAZPwqiwxI76uAfks8Cfph1iS+aIyruIXtg2F5vh7ehOB
64V6nW/Ckom3n23c7OQ8WNMDptr6N8H/zllEbWA1xBuyATfrUQirNtMCx04X5IGL
2lsL/k0r6PKBDYKlKW3E
=7jtJ
-----END PGP SIGNATURE-----

yaqu

unread,
Nov 7, 2016, 5:04:37 AM11/7/16
to qubes...@googlegroups.com
On Sun, 6 Nov 2016 19:34:30 -0800, Andrew David Wong <a...@qubes-os.org>
wrote:

> > Now icons are not accessible. To fix it one needs to turn LCD off
> > and on:
> >
> > [user@dom0 ~]$ xrandr --output LVDS1 --off; xrandr --output LVDS1
> > --auto
[...]
>
> For now, please try using the qubes-monitor-layout-notify tool as
> described in the comments on this issue:
>
> https://github.com/QubesOS/qubes-issues/issues/1599

Thanks, executing qubes-monitor-layout-notify works as a workaround - it
is much cleaner solution than hack with switching displays off and on :)

--
yaqu

Marek Marczykowski-Górecki

unread,
Nov 13, 2016, 4:23:13 PM11/13/16
to yaqu, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Actually this tool is called automatically when monitor layout is
changed (see watch-screen-layout-changes process). The problem is a race
condition - it is called before new configuration is actually applied,
so it sends the old configuration again... I haven't found yet any way to
receive notification _after_ new configuration is applied. Any idea?

Source code of the tool is in
https://github.com/QubesOS/qubes-gui-daemon screen-layout-handler
directory.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYKNm8AAoJENuP0xzK19cstWUH+wT3YjafSDqbsSxB6KdmPScA
oBUdLDctcRnihqUQvVwoIqCE+JC6jnjdPE2SHZZzz9+Mz6Yy6EdAd3J9eeNTLbp9
9S4vDlgzzQUGL4cn5C0c3aMNAH8jSK2PnNH0a79NRukh09vXRzmlWKYlEc3Djt6z
GrwcPczqtH7DiqwfiUlhAo7CpkQPfu36GSuO81t9r3lso/volUNbDvNbpxdpqfjz
liNWDKcvv6TMgeGaCGZbIGJz35vpdWtNVAzaoYKcx/ogqH+8Y61feKvJY0GNAiLb
9Zm8h4Xrp2UBDiZL2lUyn9M95JKIgm0+bpI7/WYbWwRt3J5tTCSs6IVfb3hjbw0=
=4rAT
-----END PGP SIGNATURE-----

yaqu

unread,
Nov 18, 2016, 9:52:42 AM11/18/16
to qubes...@googlegroups.com
On Sun, 13 Nov 2016 22:23:08 +0100, Marek Marczykowski-Górecki
<marm...@invisiblethingslab.com> wrote:

> > Thanks, executing qubes-monitor-layout-notify works as a workaround
> > - it is much cleaner solution than hack with switching displays off
> > and on :)
>
> Actually this tool is called automatically when monitor layout is
> changed (see watch-screen-layout-changes process). The problem is a
> race condition - it is called before new configuration is actually
> applied, so it sends the old configuration again... I haven't found
> yet any way to receive notification _after_ new configuration is
> applied. Any idea?

Monitoring relevant X Window events with xev in dom0:

$ xev -root -event randr -event structure

and changing display settings, shows that after increasing resolution
XRROutputChangeNotifyEvent is not sent (only RRScreenChangeNotify,
XRRCrtcChangeNotifyEvent and ConfigureNotify), at least on my machine
(R3.2, Intel gfx and Xfce).

Watch-screen-layout-changes monitors only OutputChange events, and
that's why it doesn't detect change and doesn't execute
qubes-monitor-layout-notify.

I think it would be better to monitor RRScreenChangeNotify event, as it
is always sent after changing display settings and it's supported in any
randr version (no need to use ConfigureNotify).

I have prepared a fix and a pull request.

--
yaqu

Marek Marczykowski-Górecki

unread,
Nov 18, 2016, 12:37:13 PM11/18/16
to yaqu, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Thanks, this indeed looks like a good idea.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYLzxCAAoJENuP0xzK19csvK8H/ig2+Sx0ZQlVlSMrNuJmHD2y
faZF4PcIRBjmqLgKCtXqH5vAR6HLTqjdiCepGtF83KOGhujTpSv0EMPfIOlMg6cp
FYL52oOe2e4iKZLjBo3nk6KwjmWVChvyCp96xIUVpCAeGn6yoxFmfluzRrNDrLvf
syBA17JQlFzEn7KMq7O95VVv4vi+rMcstNpw+ChzZGT/M7xrQPNrAcwVgghrt3XH
7XpmpSwiqpnZNWwjA2BLVNgz+gLF63MNkrdpJoMjEuXp949HlXN4Q5ch3oBE1tAz
eJq5wef0xTtSGNS5GO9Zv5JYwT16RqANk3Ln19pzliPpX2VbJSdjR4XJoxLyteA=
=FB2U
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages