Re: [qubes-users] R3.2, xfce, resume and changing resolution issues

2016-11-18 Thread Marek Marczykowski-Górecki
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Fri, Nov 18, 2016 at 03:52:25PM +0100, yaqu wrote:
> On Sun, 13 Nov 2016 22:23:08 +0100, Marek Marczykowski-Górecki
>  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.

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-

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20161118173706.GT1145%40mail-itl.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] R3.2, xfce, resume and changing resolution issues

2016-11-18 Thread yaqu
On Sun, 13 Nov 2016 22:23:08 +0100, Marek Marczykowski-Górecki
 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

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20161118145240.E97CE2079C6%40mail.openmailbox.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] R3.2, xfce, resume and changing resolution issues

2016-11-13 Thread Marek Marczykowski-Górecki
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Mon, Nov 07, 2016 at 11:04:20AM +0100, yaqu wrote:
> On Sun, 6 Nov 2016 19:34:30 -0800, Andrew David Wong 
> 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 :)

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-

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20161113212308.GD1839%40mail-itl.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] R3.2, xfce, resume and changing resolution issues

2016-11-06 Thread Andrew David Wong
-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-

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/7d510a82-7044-a53a-b980-ca3718cab0cf%40qubes-os.org.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] R3.2, xfce, resume and changing resolution issues

2016-11-06 Thread yaqu
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

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20161106223414.10544103B33%40mail2.openmailbox.org.
For more options, visit https://groups.google.com/d/optout.