You are not logged in.

#1 2015-06-26 15:14:02

The_Roach
Member
Registered: 2015-02-12
Posts: 4

[SOLVED] Unable to resize QEMU/KVM window

I recently started using QEMU/KVM on archlinux using an archlinux vm, everything is working so far except for resizing the screen.

I can drag the screen and change the dimensions, but the  resolution stays the same.

Here is the command i am currently using to start qemu:

qemu-system-x86_64 -vga std -boot order=c -drive file=arch2.cow,format=qcow2 -m 4G -enable-kvm -net nic -net bridge,br=br0 

I have tried all the display options for invocation from:
http://wiki.qemu.org/download/qemu-doc. … invocation

The computer i am running this on is a laptop and i am using a second monitor as primary. When starting qemu with the

-full-screen

flag my HDMI monitor is disabled and qemu is run fullscreen on my laptop monitor, but it still doesn't run at the proper resolution.

My end goal is to have QEMU running fullscreen on my second monitory.

If it helps, here are the commands that i use to start the second monitor.

 xrandr --newmode 2560x1440 146.27 2560 2680 2944 3328 1440 1441 1444 1465 -HSync +Vsync
 xrandr --addmode HDMI1 2560x1440
xrandr --output HDMI1 --mode 2560x1440 --primary --output LVDS1 --off

I am using openbox and the intel video drivers which i have installed on my base system and my vm

Any help would be much appreciated.
Thanks!

Last edited by The_Roach (2015-06-27 23:44:52)

Offline

#2 2015-06-27 13:20:54

The_Roach
Member
Registered: 2015-02-12
Posts: 4

Re: [SOLVED] Unable to resize QEMU/KVM window

Update.

I initially thought that the resolution would have to be set by a flag on qemu or something like that. I didn't think that i could just use xrandr inside the virtual machine, it turned out that i can. So i was able to add an undetected resolution.

https://wiki.archlinux.org/index.php/Xr … esolutions

I was also able to get qemu to display this on my second monitor by setting the primary monitor

 xrandr --output HDMI1 --primary 

I don't know why the --pimary flag in my initial commands to set up my monitor did not have the same effect.

I am able to get a resolution of 1920x1080 @ 30Hz to work, however i am unable to get the full resolution of 2560x1440 @ 30 Hz to work. When i set the custom resolution of 2560x1440 via xrandr in qemu  the display stops working, it looks like i get massive amounts of tearing, but i'm not sure. All i know is that it didn't work properly.

I know the -vga std flag for qemu has a maximum resolution of 2560x1600, but that shouldn't be an issue here.

I also have not tried installing any video drivers on the VM, that's what i'm going to be trying next.

Last edited by The_Roach (2015-06-27 13:23:29)

Offline

#3 2015-06-27 23:44:22

The_Roach
Member
Registered: 2015-02-12
Posts: 4

Re: [SOLVED] Unable to resize QEMU/KVM window

Solved it!

the flag

-vga qxl

enabled me to add the full 2560x1440 undetected resolution in the VM.

Though this caused the mouse to become very jittery and almost unusable. This was fixedby adding the flag:

-usbdevice tablet

As seen here
https://wiki.archlinux.org/index.php/QE … ntegration

however setting

SDL_VIDEO_X11_DGAMOUSE=0

had no effect.

My final command to start qemu:

 qemu-system-x86_64 -vga qxl -boot order=c -drive file=arch2.cow,format=qcow2 -m 4G -enable-kvm -net nic -net bridge,br=br0 -display sdl -usbdevice tablet -soundhw ac97 

Offline

#4 2015-07-04 16:29:49

OlafLostViking
Member
From: Lost
Registered: 2013-01-30
Posts: 51

Re: [SOLVED] Unable to resize QEMU/KVM window

Thank you for posting your solution!

Did you also achieve to adjust the resolution transparently just like with VirtualBox/VMWare were you resize the VM window and the VM inside adjusts without user interaction?

Thanks!

Offline

#5 2015-07-04 17:04:59

The_Roach
Member
Registered: 2015-02-12
Posts: 4

Re: [SOLVED] Unable to resize QEMU/KVM window

No problem!

I did not achieve that effect. It may sitll be possible, i didn't look into it further. All i wanted to do was get the VM to work at the same resolution as my screen.

In the end I didn't use KVM/QEMU, but installed multiple OSs in seperate partitions and managed them with rsync.

Sorry i couldn't be of more help.

Offline

#6 2015-07-05 08:13:17

OlafLostViking
Member
From: Lost
Registered: 2013-01-30
Posts: 51

Re: [SOLVED] Unable to resize QEMU/KVM window

Good to hear that you found a solution to your problem :-)

Thank you!

Offline

#7 2015-07-05 09:17:15

OlafLostViking
Member
From: Lost
Registered: 2013-01-30
Posts: 51

Re: [SOLVED] Unable to resize QEMU/KVM window

Okay, what a coincidence. Just after posting this I rebooted my laptop and now, for the first time since I started using KVM, exactly this works! So I can now resize the virt-manager window and the guest adapts! The output device shown by xrandr also changed from Virtual-0 to qxl-0. As I didn't change anything in the host, guest or VM configuration, I guess it's just a new package. There are still some glitches, but I am happy to see that it starts working now smile

Offline

Board footer

Powered by FluxBB