qemu:设置或强制高于 640x480 的屏幕分辨率

And*_*Dog 13 resolution qemu

我使用 qemu-system-arm(ARM 仿真)设置了一个运行 Debian 挤压的虚拟机。现在我遇到的问题是,在“监视器”首选项中,我只能选择 640x480 作为分辨率。

尝试了所有不同的-vga 选项(cirrus、std、vmware),但没有成功。是否有任何技巧,也许使用 xorg 配置(如何做到这一点,最近的 Debian 版本不再有 xorg.conf)?

一开始,任何高于 800x600 的分辨率都可以。

Wya*_*ard 3

我没有使用过 qemu arm,但我认为这应该有效:

为了兼容,将图形设置为-vga std.

启动后,在 X 服务器中打开一个终端并尝试运行,例如:
cvt 1024 768 60

这应该输出类似:

# 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
Run Code Online (Sandbox Code Playgroud)

复制第二行(以“modeline”开头的行)上的所有内容,但“modeline”一词本身除外。所以你会复制

"1024x768_60.00"   63.50  1024 1072 1176 1328  768 771 775 798
Run Code Online (Sandbox Code Playgroud)

然后,输入xrandr --newmode并粘贴。所以它看起来像:

xrandr --newmode "1024x768_60.00"   63.50  1024 1072 1176 1328  768 771 775 798
Run Code Online (Sandbox Code Playgroud)

如果失败,我需要知道它是如何失败的,但这表明存在一些我不知道的问题。它应该适用于任何标准 (VESA) 分辨率 - 不,1366x768 不是 VESA 标准,可能会失败。1024x768 是一个不错的选择,1280x1024、1900x1200、1920x1080 等许多其他分辨率也是如此。1360x768 也符合标准。

如果它有效,现在xrandr不带任何参数键入,您将获得可用显示的列表。它可能会列出多个显示器 - 您想要选择一个显示connected <resolution>,例如

VGA1 connected 1600x900+1280+0 (normal left inverted right x axis y axis) 443mm x 249mm
Run Code Online (Sandbox Code Playgroud)

您的标签可能有所不同,并且可能会显示为 640x480。

取出第一个单词(在我的例子中VGA1)并复制它。现在输入xrandr --addmode <output name> <the part in quotes from the modeline you calculated earlier, with quotes removed>,例如:

xrandr --addmode VGA1 1024x768_60.00
Run Code Online (Sandbox Code Playgroud)

如果成功,您可以从 UI 设置显示模式(可能),或者如果失败,请键入

xrandr --output VGA1 --mode 1024x768_60.00
Run Code Online (Sandbox Code Playgroud)

(当然,替换你的价值观)

为了使这些在重新启动后能够幸存,您可以在启动时运行 xrandr 内容(如果将其放入显示管理器设置脚本中,请确保它返回零,否则启动之间的变化可能会导致您的 DM 挂起或不断重新启动!),或者你可以在 xorg.conf 或 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
Run Code Online (Sandbox Code Playgroud)

请告诉我这些是否有帮助:)