Bug 420169

Summary: KScreen does not change the screen resolution of QEMU/QXL/Spice VM
Product: [Plasma] KScreen Reporter: bobby
Component: commonAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: hujq, rikmills, subdiff, tagwerk19, tdhj744ra03u
Priority: NOR    
Version: 5.18.4   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: journalctl | grep Kscreen

Description bobby 2020-04-16 19:37:45 UTC
Created attachment 127596 [details]
journalctl | grep Kscreen

SUMMARY
I tried Kubuntu 20.04 daily build (and beta) in a VM with qemu/QXL(Paravirtual graphic card). I cannot change the screen resolution.

STEPS TO REPRODUCE
1. download last kubuntu 20.04.
2. install in a qemu VM with the QXL video.
3. try to change the screen resolution.

OBSERVED RESULT
It goes back to 1024x768

EXPECTED RESULT
resolution changed to 1920x1080

SOFTWARE/OS VERSIONS
Linux 5.4.0-21-generic x86_64
Linux/KDE Plasma:Ubuntu Focal Fossa 20.04 (development branch)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
it works with qemu / VGA instead of QXL.
it works with kubuntu 18.04 and others ubuntu flavours (gnome & mate).
it's X11 and not wayland.
Comment 1 Rik Mills 2020-04-16 19:49:56 UTC
Different VM, but quite likely the same issue as https://bugs.kde.org/show_bug.cgi?id=420169
Comment 2 bobby 2020-04-16 20:13:42 UTC
(In reply to Rik Mills from comment #1)
> Different VM, but quite likely the same issue as
> https://bugs.kde.org/show_bug.cgi?id=420169
you mean https://bugs.kde.org/show_bug.cgi?id=407058 ?
Comment 3 Rik Mills 2020-04-16 20:15:34 UTC
yes
Comment 4 Roman Gilg 2020-04-16 20:35:56 UTC

*** This bug has been marked as a duplicate of bug 407058 ***
Comment 5 bobby 2020-04-17 11:59:37 UTC
with the systemd spice-vdagentd (service and socket), the resolution can be set automatically to fit the window of the host though not possible via system settings or xrandr.
this trick works at arbitrary resolution up to fullscreen 1920x1080.

However, reading #407058 and #415648, this issue is quite serious for VMs, reaching many KDE for VMware, VirtualBox and Qemu, one might consider changing priority ? For kubuntu 20.04LTS, expected 23 april, I guess it will be too late.
Please let me know if you need my support to test on QEMU.

lspci  -nnk  |   grep VGA -A 3
00:02.0 VGA compatible controller [0300]: Red Hat, Inc. QXL paravirtual graphic card [1b36:0100] (rev 04)
        Subsystem: Red Hat, Inc. QEMU Virtual Machine [1af4:1100]
        Kernel driver in use: qxl
        Kernel modules: qxl
Comment 6 Roman Gilg 2020-04-17 12:23:58 UTC
You should post this information in the bug report, that this one has been marked to be a duplicate of, since not many people will read it hear.
Comment 7 Rik Mills 2020-04-17 13:56:37 UTC
(In reply to bobby from comment #5)
> For kubuntu 20.04LTS, expected 23 april, I guess it will
> be too late.

Kubuntu 20.04 will continue to get Plasma bugfix releases during it's life
Comment 8 tagwerk19 2020-04-17 18:36:12 UTC
Referring to some rather old notes...

Observed with KVM, Fedora 29 KDE spin. Was able to preset the screen size by creating a:

        /etc/X11/xorg.conf.d/50-monitor.conf

config file containing

        Section "Monitor"
            Identifier   "Virtual-0"
            Option "PreferredMode" "1440x900"
        EndSection

This config option works for me with Fedora 30 and 31 KDE spins (as KVM host and guest)

With Neon: /usr/share/X11/xorg.conf.d/50-monitor.conf
Comment 9 tagwerk19 2020-04-17 18:39:18 UTC
Again with KVM (Fedora 30 and 31 host KDE spins, Fedora 30, 31 and Neon guests)

Possible to change the Video setting for the KVM guest to be "Virtio" rather than "QXL".

It is then possible to change the size of the "Virtual 1" display in the guest.

That did not change the display size used by SDDM but was remembered once logged in...
Comment 10 tagwerk19 2023-05-09 08:43:44 UTC
See also:
    https://bugzilla.redhat.com/show_bug.cgi?id=2196435

For Fedora 38, you additionally need to edit /etc/sddm.conf and add:

    [General]
    DisplayServer=x11

to "push" SDDM to use X11