New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re:Wrong screen resolution (64x64) set for AppVM X server when xrandr unavailable on Dom0 side #1305

Closed
plushambush opened this Issue Oct 9, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@plushambush

It turns out that Issue #998 is not solved (tested on R3.0)
The fix assumes that AppVM gets proper initial screen size upon start and doesn't need further layout updates. But this assumption is wrong because QubesVM.start_guid() method used for initial screen size setup calls the same get_monitor_layout() function which misbehaves (returns nothing) when XrandR is unavailable:
See file /usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py line 1680 (in start_guid() method:

            monitor_layout = qubes.monitorlayoutnotify.get_monitor_layout()
            qubes.monitorlayoutnotify.notify_vm(self,monitor_layout)

As a result:
After AppVM started on a host with XrandR unavailable its screen dimensions are initially set wrong (64x64):

user@Work:~$ xrandr -q
Screen 0: minimum 64 x 64, current 64 x 64, maximum 32767 x 32767
DUMMY0 connected
   QB4240x1050   47.45 +
DUMMY1 disconnected
DUMMY2 disconnected
DUMMY3 disconnected

One has to issue a manual screen setup command inside AppVM to fix this:

user@Work:~$ echo "4240 1050 0 0" | sh /etc/qubes-rpc/qubes.SetMonitorLayout

After that screen resolution becomes OK

user@Work:~$ xrandr -q
Screen 0: minimum 64 x 64, current 4240 x 1050, maximum 32767 x 32767
DUMMY0 connected 4240x1050+0+0 0mm x 0mm
   QB4240x1050   47.45*+
DUMMY1 disconnected
DUMMY2 disconnected
DUMMY3 disconnected
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Oct 9, 2015

Member

Do you know any way to disable xrandr in dom0, preferably without X server restart? I'd like add a test for such case...

Member

marmarek commented Oct 9, 2015

Do you know any way to disable xrandr in dom0, preferably without X server restart? I'd like add a test for such case...

@plushambush

This comment has been minimized.

Show comment
Hide comment
@plushambush

plushambush Oct 9, 2015

I don't know and I don't think it's possible without restarting X server.
May be a stub script returning "RandR extension missing" instead of proper data can help in this?

I don't know and I don't think it's possible without restarting X server.
May be a stub script returning "RandR extension missing" instead of proper data can help in this?

@plushambush

This comment has been minimized.

Show comment
Hide comment
@plushambush

plushambush Oct 9, 2015

BTW qubes-guid in send_xconf() uses XGetWindowAttributes() to get root screen resolution and it works ok.

BTW qubes-guid in send_xconf() uses XGetWindowAttributes() to get root screen resolution and it works ok.

@plushambush

This comment has been minimized.

Show comment
Hide comment
@plushambush

plushambush Oct 9, 2015

Ok found a way to fix it. Making a patch

Ok found a way to fix it. Making a patch

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Oct 11, 2015

Merge remote-tracking branch 'qubesos/pr/7'
* qubesos/pr/7:
  Don't send screen layout to the VM if we haven't received it from xrandr because this breaks proper initial screen layout set by gui-agent Fixes QubesOS/qubes-issues#1305 QubesOS/qubes-issues#998

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Oct 11, 2015

Don't send screen layout to the VM if we haven't received it from xrandr
because this breaks proper initial screen layout set by gui-agent
Fixes QubesOS/qubes-issues#1305 QubesOS/qubes-issues#998

(cherry picked from commit 78c3f40)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment