Page MenuHomePhabricator

Track upstream fix for QXL auto resolution bug
Closed, ResolvedPublic

Description

No upstream response to bug report: https://lists.freedesktop.org/archives/spice-devel/2016-April/028133.html

Feature proposal:

Running "xrandr --output Virtual-0 --auto" always readjusts resolution to match window size.

Automating this command as a systemd unit (or something else?) that runs in the background every couple of seconds to compensate for the broken auto-resize feature should be good enough.

Details

Impact
Normal

Event Timeline

Tried making timer for the service with these settings as shown: http://jason.the-graham.com/2013/03/06/how-to-use-systemd-timers

Status: Not working.

#auto-res-kvm.service

[Unit]
Description=Automatically adjusts screen resolution for QEMU-KVM guests running Grsecurity
ConditionVirtualization=kvm

[Service]
Type=simple
ExecStart=/usr/bin/xrandr --output Virtual-0 --auto
#auto-res-kvm.timer

[Unit]
Description=Runs auto-res-kvm.service every 3 seconds

[Timer]
# Time between running each consecutive time
OnUnitActiveSec=3
Unit=auto-res-kvm.service
After=auto-res-kvm.service

[Install]
WantedBy=multi-user.target

Tips from working with systemd before:

https://phabricator.whonix.org/T144
https://github.com/Whonix/shared-folder-help/
https://www.freedesktop.org/software/systemd/man/systemd.timer.html

You're right. I opened it here:

https://bugs.freedesktop.org/show_bug.cgi?id=94920


Another idea is to have a simple bash script running this command at 5 second intervals in an infinite loop. Then have this script started at boot with a simple service file.

nohup (no hangup. Used by daemons. Works even if user logs out):
https://stackoverflow.com/questions/2499187/how-to-run-infinitely-script-in-background-on-linux

watch runs command repeatedly, displaying its output (the first screenfull). This allows you to watch the program output change over time. By default, the program is run every 2 seconds; use -n or --interval to specify a different interval.

watch will run until interrupted.

https://superuser.com/questions/361902/continuously-re-execute-a-command-when-it-finishes-in-bash

HulaHoop triaged this task as Normal priority.Apr 13 2016, 4:02 PM
HulaHoop changed Impact from Needs Triage to Normal.

It's also worth a support request / bug report against grsecurity. It
may be their kernel which is misbehaving, therefore there issue to fix.

HulaHoop added a comment.EditedApr 15 2016, 10:08 PM

Done. Will post link when topic approved on their support forum.

https://forums.grsecurity.net/viewtopic.php?f=3&t=4449

HulaHoop renamed this task from Workaround Feature: Daemon for auto-resolution adjustment on Grsecurity KVM guests to Workaround Feature: Daemon for auto-resolution adjustment on KVM guests.Apr 29 2016, 5:07 AM
HulaHoop closed this task as Wontfix.
HulaHoop claimed this task.

Update:

I tested a vanilla build and it has this bug. It has nothing to do with the Grsec patch set. There is no need to invest time in a workaround for an upstream bug. I am not optimistic about a fix any time soon and the Linux developers are inaccessible for user feedback.

Closing.

HulaHoop renamed this task from Workaround Feature: Daemon for auto-resolution adjustment on KVM guests to Track upstream fix for QXL auto resolution bug.Oct 10 2016, 5:13 PM
HulaHoop reopened this task as Review.
HulaHoop added a comment.EditedOct 10 2016, 5:16 PM

A few months later someone confirmed the QXL bug and explained some workarounds which involve disabling KMS mode which will also require disabling important Grsecurity features.

I filed an upstream ticket to get this fixed so such steps won't be needed.

https://forums.grsecurity.net/viewtopic.php?f=3&t=4449#p16533
https://bugzilla.redhat.com/show_bug.cgi?id=1383425


An unrelated bug also reported with patch form Grsec dev:

https://bugzilla.redhat.com/show_bug.cgi?id=1383435
https://forums.grsecurity.net/viewtopic.php?f=3&t=4544

I tried registering on https://bugs.kde.org/ to create a bug report but it seems to be blocking anonymous users from creating accounts. Patrick can you please open an account and post it on my behalf?

Ticket I wanted to post:

Automatic VM display resolution broken under KDE hosts

This is easy to reproduce. Running any VM guest on a KDE host will prevent it from automatically adjusting its resoltuion to fit the virt-viewer screen.

Related bug reports and suggested solution:

https://forums.whonix.org/t/not-able-to-adjust-display-resolution-in-kvm-and-late-password-prompt-during-login/2798/4

https://bugzilla.redhat.com/show_bug.cgi?id=1383425

The solution is to implement handling of the monitor hotplug event in the window manager of KDE, like GNOME did in mutter and gnome-settings-daemon

Against what product (component)? There is a zillion of them. List here:
https://bugs.kde.org/query.cgi?format=advanced

KDE window manager so that would be the component: kwin

Thanks. Looks like we got a reply from the project lead Martin Gräßlin.

I relayed back his suggestion to the RedHat ticket.

To move things along please post this:

Unfortunately I run Debian Stable and it will be a while before 5.8 lands in the repo. I understand there is a lot going on that you have to handle but please try to prioritize this before the Debian Stretch freeze.

Done, posted.

More answers there.

Great. Looks like the libvirt devs from the other ticket are helping out!

Awesome. The bug has been identified and fixed with backports of the fix coming to the longterm 5.8 series.

This is a good instance of upstream coop.

Thanks Patrick for filing it.

Great!

Want to close this or prefer keep open?

HulaHoop closed this task as Resolved.Nov 20 2016, 4:12 PM

Its done so will close :)