qemu: Set or force higher screen resolution than 640x480

12

3

I set up a virtual machine using qemu-system-arm (ARM emulation) running Debian squeeze. Now I have the problem that in the "Monitors" preferences, I can only select 640x480 as resolution.

Tried all different -vga options (cirrus, std, vmware) with no luck. Are there any tricks, maybe with xorg configuration (how to do that, recent Debian versions don't have the xorg.conf anymore)?

Anything higher than 800x600 would be okay for the beginning.

AndiDog

Posted 2012-01-11T19:55:22.850

Reputation: 438

still no luck?… – poige – 2012-04-16T09:23:18.383

@poige: No, I did not find a solution yet. Ubuntu can run the most recent version of qemu-system-arm, which solved another issue for me, but right now I don't have the time to try a recent version. – AndiDog – 2012-04-16T13:20:54.707

1

check this thread: http://forums.debian.net/viewtopic.php?f=10&t=45373

– iby chenko – 2012-08-09T14:48:48.230

Answers

3

I have not used qemu arm,but I think this should work:

For the sake of compatibility, set the graphics to -vga std.

Once booted, open a terminal in your X server and try running, for example:
cvt 1024 768 60

this should output something like:

# 1024x768 59.92 Hz (CVT 0.79M3) hsync: 47.82 kHz; pclk: 63.50 MHz
Modeline "1024x768_60.00"   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync

Copy everything on the second line (the one that starts with 'modeline') except for the word 'modeline' itself. So you'd copy

"1024x768_60.00"   63.50  1024 1072 1176 1328  768 771 775 798

Then, type xrandr --newmode and paste after that. So it'd look like:

xrandr --newmode "1024x768_60.00"   63.50  1024 1072 1176 1328  768 771 775 798

If this fails, I will need to know how it fails, but it denotes some problem I am not aware of. It should work with any standard (VESA) resolution - no, 1366x768 is not a VESA standard and may fail. 1024x768 is a good one to try, as are 1280x1024, 1900x1200, 1920x1080, and many others. 1360x768 is compliant with the standard as well.

If it worked, now type xrandr without any arguments and you'll get a list of available displays. It may list multiple displays - you want to select one that says connected <resolution>, such as

VGA1 connected 1600x900+1280+0 (normal left inverted right x axis y axis) 443mm x 249mm

Yours may be labeled differently, and will probably read 640x480 instead.

Take the first word (in my case VGA1) and copy it. Now type xrandr --addmode <output name> <the part in quotes from the modeline you calculated earlier, with quotes removed>, such as:

xrandr --addmode VGA1 1024x768_60.00

If this succeeds, you can set the display mode from the UI (probably), or if that fails by typing

xrandr --output VGA1 --mode 1024x768_60.00

(substituting your values, of course)

To make these survive reboot you can either run the xrandr stuff at startup (make sure it returns zero if you put it in for example your display manager setup scripts, otherwise things changing between boots could cause your DM to hang or constantly restart!), or you can put something in xorg.conf or xorg.conf.d:

Section "Device"
    Identifier    "Configured Video Device"
    Driver        "vesa"
EndSection

Section "Monitor"
    Identifier    "Configured Monitor"
    HorizSync 42.0 - 52.0 
    VertRefresh 55.0 - 65.0 
    Modeline "1024x768" 60.80  1024 1056 1128 1272   768  768  770  796
    Modeline "800x600" 38.21 800 832 976 1008 600 612 618 631
    Modeline "640x480" 24.11 640 672 760 792 480 490 495 50
    EndSection

Section "Screen"
    Identifier    "Default Screen"
    Monitor        "Configured Monitor"
    Device        "Configured Video Device"
    DefaultDepth    24
    Subsection "Display"
        Depth       24
        Modes       "1024x768" "800x600" "640x480"
       EndSubsection
EndSection

Let me know if any of this helped, please :)

Wyatt8740

Posted 2012-01-11T19:55:22.850

Reputation: 943

Did the cvt 1024 768 60 and pasted the resultant info into an xrandr line. What came back was the message xrandr: Failed to get size of gamma for output default. – None – 2016-05-30T06:18:14.120

Actually that seems to happen for all xrandr commands but doesn't affect their actions. However, on the --output ... --mode line, I get xrandr: Configure crtc 0 failed and the resolutions stays at 640x480. – None – 2016-05-30T06:30:37.890

hm, that's weird. I'll look at it now - just got qemu for ARM on here. – Wyatt8740 – 2016-06-03T00:02:33.387

@Wyatt8740's little Xorg conf file works fine here; qemu-system-i386 running on Arch linux x86_64 for an Ubuntu i386 host. – tuk0z – 2017-06-13T22:57:08.920