LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   How can I permanetly fix settings for second monitor (http://www.linuxquestions.org/questions/linux-general-1/how-can-i-permanetly-fix-settings-for-second-monitor-830490/)

bluTaz 09-05-2010 02:10 PM

How can I permanetly fix settings for second monitor
 
OK, so I just bought a 31.5" HDTV and have it connected to my laptop as a monitor. My laptop monitor is cracked and pretty much useless so I would like to be able to keep it turned off and stick with my new monitor. So far, I have managed to accomplish all of this, just one problem, I will need to go through too long a process for every login to set it all up again. I'm hoping someone can help me simplify this and have everything done automatically while Ubuntu is booting or even right after login.

Process:

Code:

$ cvt 1366 768 60
# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00"  85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

Code:

$ xrandr --newmode "1368x768_60.00"  85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
Code:

$ xrandr --addmode "HDMI1" "1368x768_60.00
"
Code:

$ xrandr --output HDMI1 --mode 1368x768_60.00
I then must go into "Monitors" and switch the laptop monitor off, and everything is pretty much near perfect.

Now, as far as I have read so far, I'm imagining that I must go into xorg.conf and change some stuff there, only I'm not sure how to go about it.

Current xorg.conf:
Code:

Section "ServerLayout"
        Identifier    "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath  "/usr/lib/xorg/modules"
        FontPath    "/usr/share/fonts/X11/misc"
        FontPath    "/usr/share/fonts/X11/cyrillic"
        FontPath    "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath    "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath    "/usr/share/fonts/X11/Type1"
        FontPath    "/usr/share/fonts/X11/100dpi"
        FontPath    "/usr/share/fonts/X11/75dpi"
        FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath    "built-ins"
EndSection

Section "Module"
        Load  "dri"
        Load  "record"
        Load  "dbe"
        Load  "extmod"
        Load  "glx"
        Load  "dri2"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
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  "Monitor0"
        VendorName  "Monitor Vendor"
        ModelName    "Monitor Model"
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    "NoDDC"                      # [<bool>]
        #Option    "ShowCache"                  # [<bool>]
        #Option    "XvMCSurfaces"              # <i>
        #Option    "PageFlip"                  # [<bool>]
        Identifier  "Card0"
        Driver      "intel"
        VendorName  "Intel Corporation"
        BoardName  "Mobile GM965/GL960 Integrated Graphics Controller"
        BusID      "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device    "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport  0 0
                Depth    1
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    4
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    8
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    15
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    16
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    24
        EndSubSection
EndSection

Is there anyway that I can have everything done automatically?
Any help will be appreciated guys, and thanks ahead of time.
ohh, in case you ask, using Intel graphics. Ubuntu 10.04

kilgoretrout 09-05-2010 06:26 PM

Try putting your modeline for your monitor in the Monitor section of xorg like so:

Code:

Section "Monitor"
        Identifier  "Monitor0"
        VendorName  "Monitor Vendor"
        ModelName    "Monitor Model"
       
        Modeline "1368x768_60.00"  85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
EndSection



All times are GMT -5. The time now is 04:04 AM.