LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-06-2009, 10:10 AM   #1
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 635

Rep: Reputation: 35
Configuring xorg.conf for external monitor


I just got an external monitor for my laptop. The laptop is Lenovo X200 with Chipset Mobile Intel® GM45 Express Chipset video controller. External monitor connected to RGB.

System is vanilla Slackware-current with unaltered X.org.

The laptop LCD display is 1280x800 while external monitor is 1920x1200.

What I am trying to achieve is simply getting the external monitor to be the main screen when it is connected, and the laptop screen to function when external not connected.

Right now its configured so that both monitors are active, but there's a huge "virtual gap" between the external monitor and the internal one (ie I miss half my firefox window inbetween the two (and no, moving the screens closer together doesn't work :-) )), and the system is unstable.

xrandr gives the following output:
Code:
Screen 0: minimum 320 x 200, current 3840 x 1200, maximum 3840 x 1920
VGA connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200      60.0*+
   1920x1080      60.0     59.7  
   1600x1200      59.9  
   1680x1050      60.0  
   1280x1024      75.0     71.9     59.9  
   1440x900       75.0     59.9  
   1024x768       75.1     70.1     60.0  
   800x600        72.2     75.0     60.3  
   640x480        75.0     72.8     65.4     60.0  
   720x400        70.1  
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm
   1280x800       60.0*+   50.0  
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9
The xorg.conf is currently as follows:

Code:
Section "ServerLayout"
        Identifier      "Lenovo X200 - Asterix"
        Screen          0       "Screen0"       RightOf "Screen1"
        Screen          1       "Screen1"       LeftOf "Screen0"
        Option          "StandbyTime"   "20"
        Option          "SuspendTime"   "40"
        Option          "OffTime"       "60"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath      "/usr/lib/xorg/modules"
        FontPath        "/usr/share/fonts/TTF"
        FontPath        "/usr/share/fonts/OTF"
        FontPath        "/usr/share/fonts/Type1"
        FontPath        "/usr/share/fonts/misc"
        FontPath        "/usr/share/fonts/100dpi/:unscaled"
        FontPath        "/usr/share/fonts/75dpi/:unscaled"
EndSection

Section "Module"
        Load            "GLcore"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbLayout" "no"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier      "ThinkVision"
        VendorName      "LEN"
        ModelName       "1145"
        Option          "DPMS" "True"
        Option          "RightOf" "Internal"
EndSection

Section "Monitor"
        Identifier      "Internal"
        VendorName      "LEN"
        ModelName       "4010"
        Option          "DPMS" "True"
        Option          "LeftOf" "ThinkVision"
EndSection

Section "Monitor"
        Identifier      "HDMI-1"
        Option          "Ignore" "True"
EndSection

Section "Monitor"
        Identifier      "HDMI-2"
        Option          "Ignore" "True"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"                   # [<bool>]
        #Option     "SWcursor"                  # [<bool>]
        #Option     "ColorKey"                  # <i>
        #Option     "CacheLines"                # <i>
        #Option     "Dac6Bit"                   # [<bool>]
     #   Option     "DRI"                       # [<bool>]
     #   Option      "AccelMethod"  "EXA"
     #   Option      "MigrationHeuristic" "greedy"
        #Option     "NoDDC"                     # [<bool>]
        #Option     "ShowCache"                 # [<bool>]
        #Option     "XvMCSurfaces"              # <i>
        #Option     "PageFlip"                  # [<bool>]
        # Option      "AccelMethod" "UXA"
        Identifier  "Card0"
        Driver      "intel"
        VendorName  "Intel Corporation"
        BoardName   "Mobile Integrated Graphics Controller"
        Option          "monitor-VGA"   "ThinkVision"
        Option          "monitor-LVDS"  "Internal"
        BusID       "PCI:0:2:0"
        Option "monitor-HDMI-1" "HDMI-1"
        Option "monitor-HDMI-2" "HDMI-2"
EndSection

Section "Screen"
        Identifier      "Screen0"
        Device          "Card0"
        Monitor         "ThinkVision"
        DefaultDepth    24
        SubSection "Display"
                Modes   "1920x1200"
        EndSubSection
EndSection

Section "Screen"
        Identifier      "Screen1"
        Device          "Card0"
        Monitor         "Internal"
        DefaultDepth    24
        SubSection "Display"
                Modes   "1200x800"
        EndSubSection
EndSection

Section "dri"
        Mode 0666
EndSection
There are clearly some mistakes here, but whenever I believe to have fixed one thing, I end up breaking something else...

Any insight would be *greatly* appreciated!

-y1
 
Old 04-06-2009, 05:43 PM   #2
rc nai
Member
 
Registered: Jun 2008
Distribution: Slackware 13.37,14
Posts: 73

Rep: Reputation: 18
I have a similar problem as you do, but I have a different video chipset which is Intel Corporation 82852/855GM Integrated Graphics. I'm using the i810 driver by the way and I haven't tried any others. I tried solving it a few weeks ago and reading through many man pages including xorg and xrandr but couldn't get it right and I just gave up. At the moment, my external monitor is at correct resolution(1400x900) but my main one is off position and instead of it being 1280x768 it blows up to 1400x900
Quote:
whenever I believe to have fixed one thing, I end up breaking something else...
Same here...

Anyway, looking at your xorg file, I don't see HorizSync and VertRefresh which should be specified in the monitor section. That could be the cause of your "unstable" problem but I'm not sure though.
Quote:
What I am trying to achieve is simply getting the external monitor to be the main screen when it is connected, and the laptop screen to function when external not connected.
Maybe this will help you. Plug in your external monitor(don't reboot) and check if VGA is connected by running xrandr. If your VGA is connected, type this:
Code:
xrandr --output VGA --mode 1920x1200
That command should output your VGA monitor to that resolution.
To turn VGA monitor off and return to your main resolution display:
Code:
xrandr --output VGA --off
And if that doesn't return your main resolution display, try this:
Code:
xrandr --output LVDS --mode 1280x800
For more info:
man xrandr
man xorg.conf
xrandr -help

Here's my xorg if you're interested. Sorry I couldn't help more. Just be careful with this and make backups so you won't lose your settings
Code:
Section "Monitor"

    Identifier  "ACER-VGA"
    DisplaySize	215 215
    HorizSync   24.0-80.0
    VertRefresh 56.0-90.0
EndSection

Section "Monitor"

    Identifier  "lap-LVDS"
    HorizSync   31.5-50.0
    VertRefresh 40.0-60.0
EndSection

Section "Device"
    Identifier	"Intel Corporation 82852/855GM Integrated Graphics Device"
    Driver      "i810"
    Option      "DRI" "true"
    #Option	"MonitorLayout" "CRT,LFP"
    #Option	"Clone" "true"
    #Option	"CloneRefresh" "60"
    BusID	"PCI:0:02:0"
    Screen	0
    #VideoRam    4096
    # Insert Clocks lines here if appropriate
EndSection

Section "Device"
    Identifier	"Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)"
    Driver      "i810"
    Option      "DRI" "true"
    #Option	"Clone" "true"
    #Option	"CloneRefresh" "60"
    BusID	"PCI:0:02:0"
    Screen	0
    #VideoRam    4096
    # Insert Clocks lines here if appropriate
EndSection

Section "Screen"
    Identifier  "Screen 0"
    Device      "Intel Corporation 82852/855GM Integrated Graphics Device"
    Monitor     "ACER-VGA"
    DefaultDepth 16
    Subsection	"Display"
        Depth       16
        Modes	"1440x900" "1280x768" "1024x768" "800x600" "640x480"
	Virtual 1440 1440
	#ViewPort    0 0
    EndSubsection
EndSection

Section "Screen"
    Identifier  "Screen 1"
    Device      "Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)"
    Monitor     "lap-LVDS"
    DefaultDepth 16
    Subsection	"Display"
        Depth       16
        Modes	"1280x768" "1024x768" "800x600" "640x480"
	#Virtual 1440 1440
	#ViewPort    0 0
    EndSubsection
EndSection
# **********************************************************************
# ServerLayout sections.
# **********************************************************************

Section "ServerLayout"

Option "AIGLX" "false"

# The Identifier line must be present
    Identifier  "Dual Layout"

# Each Screen line specifies a Screen section name, and optionally
# the relative position of other screens.  The four names after
# primary screen name are the screens to the top, bottom, left and right
# of the primary screen.  In this example, screen 2 is located to the
# right of screen 1.

    Screen "Screen 0"
    Screen "Screen 1" RightOf "Screen 0"

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

EndSection

# ************
# Section DRI
# ************

Section "DRI"
	Group "video"
	Mode    0660
EndSection
 
Old 04-06-2009, 06:16 PM   #3
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 635

Original Poster
Rep: Reputation: 35
hi,

yeah - part of the problem was that everything worked fine with xrandr --auto and xrandr --output vga --right-of lvds, but wouldn't work out of the box at X launch and thus messed up the login and plasma before even getting to the point where a new xrandr could be launched. Turned out, as almost always, that the problem was in the config file. After a lot of experimenting back and forth, here's a setup that works:

Code:
Section "ServerLayout"                  
        Identifier      "Lenovo X200 - Asterix"
        Screen          0       "Screen0"       0 0
        Option          "StandbyTime"   "20"       
        Option          "SuspendTime"   "40"       
        Option          "OffTime"       "60"       
        InputDevice    "Mouse0" "CorePointer"      
        InputDevice    "Keyboard0" "CoreKeyboard"  
EndSection                                         

Section "Files"
        ModulePath      "/usr/lib/xorg/modules"
        FontPath        "/usr/share/fonts/TTF" 
        FontPath        "/usr/share/fonts/OTF" 
        FontPath        "/usr/share/fonts/Type1"
        FontPath        "/usr/share/fonts/misc" 
        FontPath        "/usr/share/fonts/100dpi/:unscaled"
        FontPath        "/usr/share/fonts/75dpi/:unscaled" 
EndSection                                                 

Section "Module"
        Load            "GLcore"
EndSection
This works like a charm without filling Xorg.0.log or others with errors, and also seems to work every time (fingers crossed).
Should be no major difference for your setup, except the actual Device statement (only one is needed though).

Try that and let me know what happens.

-y1
 
Old 04-06-2009, 08:43 PM   #4
rc nai
Member
 
Registered: Jun 2008
Distribution: Slackware 13.37,14
Posts: 73

Rep: Reputation: 18
Quote:
hi,

yeah - part of the problem was that everything worked fine with xrandr --auto and xrandr --output vga --right-of lvds, but wouldn't work out of the box at X launch and thus messed up the login and plasma before even getting to the point where a new xrandr could be launched.
Sup,

Yea that's the problem here too.

Thanks for the setup that you gave me. That also works too, but what I don't understand is that once the external monitor gets to it's correct resolution, my main display expands off position which causes the desktop panel to disappear. Well technically it doesn't disappear, it just goes lower. Sort of like this:
Code:
external display(1440x900)
#################
#		#
#		#
#		#
#		#
#		#
#################

main display(1280x768) is the smaller box
#################
#	   #	#
#	   #	#
#	   #	#
############	# --> desktop panel (before)
#		#
################# --> desktop panel (after)
Probably you're right, it may be the config. It's not a huge problem for me though. Do yours go like that too?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
External Monitor setting through xorg.conf kagashe Ubuntu 1 04-23-2008 12:46 AM
Configuring xorg.conf galliar Ubuntu 2 09-20-2007 01:01 PM
External screen (xorg.conf) rejeep Linux - Laptop and Netbook 2 05-01-2007 08:53 PM
Needs help configuring /etc/X11/xorg.conf Monitor Refresh Rates itz2000 Linux - Newbie 8 04-08-2007 03:45 AM
xorg.conf in FC2 to support external monitor abarclay Fedora 0 08-31-2004 01:48 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration