QEMU / KVM How to change default resolution on GUEST


HOST:
Operating System: openSUSE Tumbleweed 20220210
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.5-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8559U CPU @ 2.70GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Plus Graphics 655


raija@localhost:~> inxi -F
System:    Host: localhost Kernel: 5.16.5-1-default x86_64 bits: 64 Desktop: KDE Plasma 5.24.0
           Distro: openSUSE Tumbleweed 20220210
Machine:   Type: Mini-pc System: Intel Client Systems product: NUC8i7BEH v: J72992-306 serial: <superuser required>
           Mobo: Intel model: NUC8BEB v: J72688-306 serial: <superuser required> UEFI: Intel
           v: BECFL357.86A.0073.2019.0618.1409 date: 06/18/2019
CPU:       Info: Quad Core model: Intel Core i7-8559U bits: 64 type: MT MCP cache: L2: 8 MiB
           Speed: 600 MHz min/max: 400/4500 MHz Core speeds (MHz): 1: 600 2: 600 3: 600 4: 600 5: 600 6: 600 7: 600 8: 600
Graphics:  Device-1: Intel CoffeeLake-U GT3e [Iris Plus Graphics 655] driver: i915 v: kernel
           Display: x11 server: X.Org 1.21.1.3 driver: loaded: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz
           OpenGL: renderer: Mesa Intel Iris Plus Graphics 655 (CFL GT3) v: 4.6 Mesa 21.3.5
Audio:     Device-1: Intel Cannon Point-LP High Definition Audio driver: snd_hda_intel
           Sound Server-1: ALSA v: k5.16.5-1-default running: yes
           Sound Server-2: PulseAudio v: 15.0 running: yes
           Sound Server-3: PipeWire v: 0.3.45 running: yes
Network:   Device-1: Intel Cannon Point-LP CNVi [Wireless-AC] driver: iwlwifi
           IF: wlp0s20f3 state: down mac: 8a:df:2c:8e:39:23
           Device-2: Intel Ethernet I219-V driver: e1000e
           IF: eno1 state: up speed: 100 Mbps duplex: full mac: 1c:69:7a:00:6a:55
           IF-ID-1: virbr0 state: down mac: 52:54:00:8d:11:34
Bluetooth: Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb
           Report: rfkill ID: hci0 state: up address: see --recommends
Drives:    Local Storage: total: 931.51 GiB used: 50.93 GiB (5.5%)
           ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB
Partition: ID-1: / size: 913.35 GiB used: 50.92 GiB (5.6%) fs: ext4 dev: /dev/sda2
           ID-2: /boot/efi size: 511 MiB used: 4.8 MiB (0.9%) fs: vfat dev: /dev/sda1
Swap:      ID-1: swap-1 type: partition size: 2 GiB used: 0 KiB (0.0%) dev: /dev/sda3
Sensors:   System Temperatures: cpu: 48.0 C mobo: 27.8 C
           Fan Speeds (RPM): N/A
Info:      Processes: 273 Uptime: 0h 30m Memory: 7.62 GiB used: 2.07 GiB (27.2%) Shell: Bash inxi: 3.3.07
raija@localhost:~> inxi -G
Graphics:  Device-1: Intel CoffeeLake-U GT3e [Iris Plus Graphics 655] driver: i915 v: kernel
           Display: x11 server: X.Org 1.21.1.3 driver: loaded: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz
           OpenGL: renderer: Mesa Intel Iris Plus Graphics 655 (CFL GT3) v: 4.6 Mesa 21.3.5

GUEST:
mint@mint:~$ inxi -F
System:
  Host: mint Kernel: 5.4.0-99-generic x86_64 bits: 64 
  Desktop: Cinnamon 5.2.7 Distro: **Linux Mint 20.3 Una** 
Machine:
  Type: Kvm System: QEMU product: Standard PC (Q35 + ICH9, 2009) 
  v: pc-q35-6.2 serial: <superuser/root required> 
  Mobo: N/A model: N/A serial: N/A BIOS: SeaBIOS 
  v: rel-1.15.0-0-g2dd4b9b-rebuilt.opensuse.org date: 04/01/2014 
CPU:
  Topology: 2x Single Core model: Intel Core (Skylake IBRS) bits: 64 
  type: SMP L2 cache: 32.0 MiB 
  Speed: 2712 MHz min/max: N/A Core speeds (MHz): 1: 2712 2: 2712 
Graphics:
  Device-1: Red Hat QXL paravirtual graphic card driver: qxl v: kernel 
  Display: x11 server: X.Org 1.20.13 driver: none 
  unloaded: fbdev,modesetting,**vesa resolution: 1024x768~60Hz** 
  OpenGL: renderer: llvmpipe (LLVM 12.0.0 256 bits) v: 4.5 Mesa 21.2.6 
Audio:
  Device-1: Intel 82801I HD Audio driver: snd_hda_intel 
  Sound Server: ALSA v: k5.4.0-99-generic 
Network:
  Device-1: Red Hat Virtio network driver: virtio-pci 
  IF-ID-1: enp1s0 state: up speed: -1 duplex: unknown mac: 52:54:00:b5:e2:9c 
Drives:
  Local Storage: total: 20.00 GiB used: 9.11 GiB (45.5%) 
  ID-1: /dev/vda model: N/A size: 20.00 GiB 
Partition:
  ID-1: / size: 19.07 GiB used: 9.11 GiB (47.8%) fs: ext4 dev: /dev/vda5 
Sensors:
  Message: No sensors data was found. Is sensors configured? 
Info:
  Processes: 185 Uptime: 1m Memory: 3.84 GiB used: 686.1 MiB (17.5%) 
  Shell: bash inxi: 3.0.38 
mint@mint:~$ 

I have installed QEMU / KVM in openSUSE Tumbleweed (HOST) and Linux Mint 20.3 (GUEST) on it. When I start Linux Mint, the screen resolution is set to 1024x768 (4:3) by default. I’d like to change default resolution as 1600x900 (16:9).

What files should I patch and how?

URL: https://paste.opensuse.org/94964203

Hi
On the guest if you use xrandr -s <your resolution> does this change it? If not might want to try some of the other guest graphics driver options.

Try virtio for your guest video. I run that on all my linux/windows guests and it does work well.

The command you enter changes the resolution without any problems, but the configuration does not remain, but is the same as before (1024x768).

Do you mean I’m switching from a Spice screen to a VNC screen? However, I will try that.

I tested that Spice -> VNC switch. Did not work at all.

Hi
There must be a guest desktop setup to define the resolution if xrandr works?

Yes, the resolution can be changed in Desktop, but it won’t be saved (or at least I can’t). When I change the resolution, I get error messages that I don’t understand.
I’ll take a screenshot of the error messages as soon as I can.

Here are the erromessage:

URL: SUSE Paste

asetusten käyttöönotto epäonnistui = settings failed
tuntematon = unknown

Hi
So if xrandr and the settings work but aren’t saved I would suspect the guest is the issue. Might pay to ask on the Mint forums? Else can always add the xrandr -s command to your ~/.profile to set on login, but that’s a workaround, not a fix.

Maybe even adding the settings to boot grub kernel options video=1600x900@60 and rebuild Mint grub may help…

Thank you very much again.

I try to make that patch first and if I don’t make it work, I ask the Mint forum.

No, switch from video QXL to virtio.
https://paste.opensuse.org/2868853

It’s just like you first said. I must be blind!

Now I can define the resolution as I want and the settings will remain over the reset.