在不添加 VirtualBox 來賓的情況下提高 VirtualBox 來賓中的螢幕解析度?

在不添加 VirtualBox 來賓的情況下提高 VirtualBox 來賓中的螢幕解析度?

如果沒有安裝 VirtualBox 來賓附加功能,唯一的螢幕解析度是 640x480:

$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 640 x 480, maximum 640 x 480
default connected primary 640x480+0+0 0mm x 0mm
   640x480       73.00* 

例如,如何將解析度設定為 1280x1024?無需添加 VirtualBox 來賓。

來賓是Fedora系統。

我試過添加一個Xorg 配置文件,如 Whonix 文章所述,它什麼也沒做。

使用 cvt 為 xrandr 獲取新的 modeline 似乎也不起作用:

$ cvt 1280 1024
# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
$ xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr: Failed to get size of gamma for output default
$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 640 x 480, maximum 640 x 480
default connected primary 640x480+0+0 0mm x 0mm
   640x480       73.00* 
  1280x1024_60.00 (0x1bd) 109.000MHz
        h: width  1280 start 1368 end 1496 total 1712 skew    0 clock  63.67KHz
        v: height 1024 start 1027 end 1034 total 1063           clock  59.89Hz
$ xrandr --addmode default 1280x1024_60.00
xrandr: Failed to get size of gamma for output default
$ xrandr --output default --mode 1280x1024_60.00
xrandr: Failed to get size of gamma for output default
xrandr: Configure crtc 0 failed

答案1

1)停止XOrg

 stop REPLACEWITHNAMEOFXORGSERVICE

2)開啟控制台

CTRL-ALT-F1

3)創建預設的xorg.conf,它不存在

X -configure

4) 移動 xorg.conf.new 以便系統使用設定文件

mv xorg.conf.new /etc/X11/xorg.conf

5)重啟

reboot

6)修改xorg.conf,添加

Section "Monitor"
...
 HorizSync 1.0 - 1000.0
 VertRefresh 1.0 - 1000.0
 Option "MinClock" "1.0"
 Option "MaxClock" "10000.0"
 Option "Primary" "True"
 Option "PreferredMode" "1920x1080"
...
EndSection

7) 重啟

reboot

8) 系統設定>顯示>“選擇任意-4:3-解析度”

9) 啟用寬螢幕

Host:VBoxManage setextradata "YOURGUEST" "CustomVideoMode1" "1920x1080x32"

相關內容