LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Resolution problems with Slackware as VirtualBox guest (http://www.linuxquestions.org/questions/slackware-14/resolution-problems-with-slackware-as-virtualbox-guest-662867/)

zoran119 08-14-2008 06:04 PM

Resolution problems with Slackware as VirtualBox guest
 
Hi everyone,

I have some problems with the resolution on a slackware 12.1 install in VirtualBox (Windows XP host).

I have installed the guest additions and the mouse integration is working but the display is stuck at 1024x768. I have modified xorg.conf to include the additional resolutions but the machine boots to 1024x768 screen.

BUT, I can change to other resolutions that I have put into xorg.conf only through KDE control center. The machine goes back to 1024x768 at reboot. There is a checkbox to "keep these settings" but that is only effective if you use KDE, and I'm using fluxbox.

Another thing I have done is to only include the resolution I want to xorg.conf (1500x900) but it still boots to 1024x768. There are no references to 1500 or 900 in /var/log/Xorg.0.log or dmesg. It seems like it is not reading the xorg.conf! (but it is because the resolutions I entered come up in KDE control center)

Other things you might want to know: it is using the "vboxvideo" driver and I'm using xdm as the login manager.

Does anyone know what might be the problem?

Thanks in advance.

urka58 08-16-2008 04:55 AM

Often the video drivers do not support natively certain resolutions, so you must give the driver a "hint" in order it can send the monitor the correct lines.
Xorg comes with a little utility that can help you to determine what lines should the driver send to the monitor @ a defined frequency. The following is just an example
Code:

gtf 1440 900 60

  # 1440x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 106.47 MHz
  Modeline "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync

As you understand the above parameters are respectively HSync, VSync and refresh rate.
So now it is just a matter of putting the line

Code:

Modeline "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync
in the section "Monitor" of your xorg.conf file. This way

Code:

Section "Monitor"
    Identifier  "ASUS P193W LCD"
    HorizSync  30-81
    VertRefresh 55-76
    Modeline "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync
EndSection



The next step is you add the Modeline to the "Screen" section like this
Code:

Section "Screen"
    Identifier  "Screen 1"
    Device      "GeForce FX 5200 AGP"
    Monitor    "ASUS P193W LCD"
    DefaultDepth 24
        Subsection "Display"
        Depth      8
        Modes      "1440x900_60.00" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth      16
        Modes      "1440x900_60.00" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth      24
        Modes      "1440x900_60.00" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection

Check your Monitor manual first, of course
Hope this helps
Ciao

zoran119 08-17-2008 11:10 PM

Hi urka58,

I tried your sugesstion but the problem still exists... Thanks for mentioning the gtf utility! It's handy!

I don't think that there is a problem with the monitor support because I can change to the wanted resolution through KDE control center. What puzzles me is that out of all the available resolutions (1440x900, 1024x768, 800x600) X chooses 1024x768 at startup. How do I say "start with 1440x900 please"?

urka58 08-18-2008 05:02 AM

That should work... can you post your /etc/X11/xorg.conf?
Ciao

zoran119 08-18-2008 06:34 PM

Here is my xorg.conf. I have taken away all the comments so that it is more readable (they were only comments that come with default install of slackware).

Thank you for your help.

Code:

# **********************************************************************
# Module section -- this  section  is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
#
Section "Module"

# This loads the DBE extension module.

    Load        "dbe"          # Double buffer extension

# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
    SubSection  "extmod"
      Option    "omit xfree86-dga"  # don't initialise the DGA extension
    EndSubSection

# This loads the font modules
    Load        "type1"
    Load        "freetype"
    #Load        "speedo"

# This loads the GLX module
    Load      "glx"

EndSection

# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************

Section "Files"

    RgbPath        "/usr/share/X11/rgb"

    FontPath  "/usr/share/fonts/local/"
    FontPath  "/usr/share/fonts/misc/"
    FontPath  "/usr/share/fonts/OTF/"
    FontPath  "/usr/share/fonts/TTF/"
    FontPath  "/usr/share/fonts/Type1/"
    FontPath  "/usr/share/fonts/CID/"
    FontPath  "/usr/share/fonts/Speedo/"
    FontPath  "/usr/share/fonts/75dpi/:unscaled"
    FontPath  "/usr/share/fonts/100dpi/:unscaled"
    FontPath  "/usr/share/fonts/75dpi/"
    FontPath  "/usr/share/fonts/100dpi/"
    FontPath  "/usr/share/fonts/cyrillic/"

# ModulePath can be used to set a search path for the X server modules.
# The default path is shown here.

#    ModulePath "/usr/lib/xorg/modules"

EndSection

# **********************************************************************
# Server flags section.
# **********************************************************************

Section "ServerFlags"


EndSection

# **********************************************************************
# Input devices
# **********************************************************************

# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************

Section "InputDevice"

    Identifier        "Keyboard1"
    Driver        "kbd"


EndSection


# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************

Section "InputDevice"

# Identifier and driver

    Identifier        "Mouse1"
    Driver      "vboxmouse"
    Option      "CorePointer"

    Option "Protocol"    "PS/2"

# The mouse device.  The device is normally set to /dev/mouse,
# which is usually a symbolic link to the real device.

    Option "Device"      "/dev/mouse"


EndSection


# **********************************************************************
# Monitor section
# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor"

    Identifier  "My Monitor"
    HorizSync  31.5 - 50.0
    VertRefresh 40-90
    Modeline "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync

EndSection


# **********************************************************************
# Graphics device section
# **********************************************************************

# Any number of graphics device sections may be present

Section "Device"
    Identifier  "VESA Framebuffer"
    Driver      "vboxvideo"
    #VideoRam    4096
    # Insert Clocks lines here if appropriate
EndSection

# **********************************************************************
# Screen sections
# **********************************************************************


Section "Screen"
    Identifier  "Screen 1"
    Device      "VESA Framebuffer"
    Monitor    "My Monitor"

# If your card can handle it, a higher default color depth (like 24 or 32)
# is highly recommended.

#  DefaultDepth 8
#  DefaultDepth 16
  DefaultDepth 24
#  DefaultDepth 32


    Subsection "Display"
        Depth      8
        Modes "1440x900_60.00" "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth      16
        Modes "1440x900_60.00" "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth      24
        Modes "1440x900_60.00" "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth      32
        Modes "1440x900_60.00" "1024x768" "800x600" "640x480"
    EndSubsection

EndSection

# **********************************************************************
# ServerLayout sections.
# **********************************************************************

Section "ServerLayout"

    Identifier  "Simple Layout"

    Screen "Screen 1"

    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"

EndSection


urka58 08-19-2008 05:23 AM

Hi Zoran, your /etc/X11/xorg.conf looks fine....so, have you tried starting the system on runlevel 3 (no xdm)?
Ciao

zoran119 08-19-2008 05:56 AM

Yeah, runlevel 3 is running at 1024x768.

So no one knows why KDE (and only KDE) can change the resolution to 1440x900?

zoran119 08-25-2008 08:40 PM

Shameful bump :-(


All times are GMT -5. The time now is 11:23 PM.