Centos 5.4 with Guest Additions has only 800x600 resolution

Discussions about using Linux guests in VirtualBox.
Post Reply
gregdavisfromnj
Posts: 14
Joined: 13. Oct 2009, 16:49
Primary OS: MS Windows Vista
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: lots

Centos 5.4 with Guest Additions has only 800x600 resolution

Post by gregdavisfromnj »

Bottom Line, how do you configure the X resolution on a CentOS guest with Guest Additions loaded to be arbitrary (albiet statically defined in an xorg.conf)?

Skulking around, I've found that dynamic resizing doesn't work in xserver less than 1.3, and the latest CentOS (5.4 as of this) uses 1.1.1. The GA installer informs me of this, changes the xorg.conf nonetheless, and my xserver tries to restart. It fails, without a reason. The video driver is set to vboxvideo, and there are no errors or warnings in the Xorg.0.log file.

So I try to change the Xorg video driver to "vesa". This lets the xserver start, but the display is limited to a resolution of 800x600, or 800x600 in a viewport that is 640x480. This is quite annoying. The Xorg.0.log file in this case complains about not being able to use DDC, and the VESA driver seems to be aware that the guest is in fact running in VirtualBox, but no errors. I added some Modes higher than 800x600 to the xorg.conf Screen section, but these are ignored. At least, they might be out of the guessed hsync/vsync range by the vesa driver.

I tried wierd things like resizing the window containing the guest before restarting X, so that it might guess at a bigger screen geometry. I tried some strange voodoo incantations using VBoxManage and "GUI/MaxGuestResolution" or setvideomodehint. No change.

I can't be the only person in the world that wants to run CentOS 5.4 as a guest with a resolution higher than 800x600.

Thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Centos 5.4 with Guest Additions has only 800x600 resolution

Post by Perryg »

Edit the /etc/X11/xorg.conf and add something like this.

Code: Select all

Section "Screen"
       Identifier "Screen0"
       Device     "Videocard0"
       DefaultDepth     24
       SubSection "Display"
               Viewport   0 0
               Depth     24
               Modes    "1750x1090" "1600x1200" "1600x1024" "1440x900" "1400x1050" "1280x1024" "1280x960" "1280x800" "1152x864" "1152x768" "1024x768" "800x600" "640x480"
       EndSubSection
EndSection
gregdavisfromnj
Posts: 14
Joined: 13. Oct 2009, 16:49
Primary OS: MS Windows Vista
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: lots

Re: Centos 5.4 with Guest Additions has only 800x600 resolution

Post by gregdavisfromnj »

It looks like you are suggesting adding the Modes line. I tried that, and it is either ignored, or the modes outside of the virtual monitor's range are ignored. What should the Monitor and Device sections look like?

Thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Centos 5.4 with Guest Additions has only 800x600 resolution

Post by Perryg »

Here is my working xorg.conf (complete)

Code: Select all

# VirtualBox generated configuration file
# based on /etc/X11/xorg.conf.
# Xorg configuration created by pyxf86config

# Section "ServerLayout"
# 	Identifier     "Default Layout"
# 	Screen      0  "Screen0" 0 0
# 	InputDevice    "Keyboard0" "CoreKeyboard"
# EndSection

# Section "InputDevice"
# 	Identifier  "Keyboard0"
# 	Driver      "kbd"
# 	Option	    "XkbModel" "pc105"
# 	Option	    "XkbLayout" "us"
# EndSection

# Section "Device"
# 	Identifier  "Videocard0"
# 	Driver      "vesa"
# EndSection

# Section "Screen"
# 	Identifier "Screen0"
# 	Device     "Videocard0"
# 	DefaultDepth     24
# 	SubSection "Display"
# 		Viewport   0 0
# 		Depth     24
# 	EndSubSection
# EndSection

Section "InputDevice"
  Identifier   "Keyboard[0]"
  Driver       "kbd"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "us"
  Option       "Protocol" "Standard"
  Option       "CoreKeyboard"
EndSection

Section "InputDevice"
  Identifier  "Mouse[1]"
  Driver      "vboxmouse"
  Option      "Buttons" "9"
  Option      "Device" "/dev/input/mice"
  Option      "Name" "VirtualBox Mouse"
  Option      "Protocol" "explorerps/2"
  Option      "Vendor" "Sun Microsystems Inc"
  Option      "ZAxisMapping" "4 5"
  Option      "CorePointer"
EndSection

Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  InputDevice  "Mouse[1]" "CorePointer"
  Option       "Clone" "off"
  Option       "Xinerama" "off"
  Screen       "Screen[0]"
EndSection

Section "Monitor"
  Identifier   "Monitor[0]"
  ModelName    "VirtualBox Virtual Output"
  VendorName   "Sun Microsystems Inc"
EndSection

Section "Device"
  BoardName    "VirtualBox Graphics"
  Driver       "vboxvideo"
  Identifier   "Device[0]"
  VendorName   "Sun Microsystems Inc"
EndSection

Section "Screen"
  SubSection "Display"
    Depth      24
    Modes    "1750x1090" "1600x1200" "1600x1024" "1440x900" "1400x1050" "1280x1024" "1280x960" "1280x800" "1152x864" "1152x768" "1024x768" "800x600" "640x480"
  EndSubSection
  Device       "Device[0]"
  Identifier   "Screen[0]"
  Monitor      "Monitor[0]"
EndSection
Then after a reboot they become available in the screen resolution section. There you should be able to pick what ever size you want. Add the proper size you want to the list if it is not there and delete the ones you do not need.
Centos5-4-Res.jpg
Centos5-4-Res.jpg (20.21 KiB) Viewed 12886 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Centos 5.4 with Guest Additions has only 800x600 resolution

Post by Perryg »

(In CentOS 5.4) You may need to go into the system->administration->display and define your monitor to be able to use the full range of display.
gregdavisfromnj
Posts: 14
Joined: 13. Oct 2009, 16:49
Primary OS: MS Windows Vista
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: lots

Re: Centos 5.4 with Guest Additions has only 800x600 resolution

Post by gregdavisfromnj »

I am not sure of the magic I performed, but I found that the CentOS Display Resolution tool would edit the xorg.conf file to remove valid modes after I had selected one, and so they were mysteriously disappearing! I also had to have the 800x600 and 640x480 modes in the xorg.conf file, in addition to the ones I actually wanted. Other wise, X wouldn't start.

So to switch resolutions without editing the xorg.conf file, I am hitting left-ctrl + left-alt + '+' or '-' on the numberpad. But, this is just giving me a scrolling viewport.

All this seems like it would be much easier if the Xserver in CentOS supported Xrandr. Maybe when RHEL 6 is released? I digress. Thanks for the help.
shalom938
Posts: 1
Joined: 11. Jul 2010, 21:43
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: centos

Re: Centos 5.4 with Guest Additions has only 800x600 resolution

Post by shalom938 »

The voodoo worked for me with centos 5.5. after reading this post I closed all windows, clicked restart and immediately hit right C+f to resize the vm window. when the vm restarted i had all the possible resolutions in centos.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: Centos 5.4 with Guest Additions has only 800x600 resolution

Post by Technologov »

People - you do something wrong.

RHEL 5.x is fully supported by VirtualBox 3.2.0 -- including dynamic resolution resizing and custom resolutions.

gregdavisfromnj : Please update VBox.
cicoub13
Posts: 1
Joined: 9. Jun 2011, 09:46
Primary OS: Other
VBox Version: OSE other
Guest OSses: RHEL

Re: Centos 5.4 with Guest Additions has only 800x600 resolution

Post by cicoub13 »

Thanks a lot (works for Red Hat Enterprise Linux 6)
Post Reply