Results 1 to 7 of 7

Thread: Set Resolution in Karmic at boot to 1366x768

  1. #1
    Join Date
    Oct 2005
    Location
    Western Canada
    Beans
    146
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Set Resolution in Karmic at boot to 1366x768

    Hi I'm looking to set the resolution of X in Ubuntu 9.10 as the system starts up. I have the problem that the screen defaults to 800x600 unless I tell it to use the native resolution of 1366x768 with the following xrandr commands:

    Code:
    xrandr --newmode "1368x768" 85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
    xrandr --addmode VGA1 1368x768
    xrandr -s 1368x768
    I have tried putting these commands in a few places, all of which work... but no matter what I do the resolution is initially 800x600 and only changes to the correct setting *after* X has started. I want it to use 1366x768 right from the start. Any idea in what file I should put those commands?

    Hint: it's not
    ~/.xprofile (that's way too late in the game)
    or /etc/gdm/PreSession/Default
    or even /etc/gdm/Init/Default

    all of those options, though they work, don't change the resolution until late in the game and lots of unnecessary flickering and stretching occurs. This is bad, especially since this particular ubuntu is powering a HDTV that will be seen by many many people...

    any help is appreciated.
    I like cheese upon crackers. Liver upon crackers, however, is disgusting.

  2. #2
    Join Date
    Oct 2007
    Beans
    473

    Re: Set Resolution in Karmic at boot to 1366x768

    Have you tried adding the resolution into xorg.conf?

  3. #3
    Join Date
    Aug 2005
    Location
    Adelaide
    Beans
    196
    Distro
    Ubuntu Development Release

    Re: Set Resolution in Karmic at boot to 1366x768

    Have you tried to set that resolution in grub?

    http://ubuntuforums.org/showpost.php...7&postcount=17

  4. #4
    Join Date
    Oct 2005
    Location
    Western Canada
    Beans
    146
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Set Resolution in Karmic at boot to 1366x768

    thanks for the grub suggestion, I'll give it a try and let you know how it goes. As far as editing xorg.conf goes, it doesn't exist in karmic anymore...
    I like cheese upon crackers. Liver upon crackers, however, is disgusting.

  5. #5
    Join Date
    Mar 2007
    Beans
    649
    Distro
    Ubuntu Development Release

    Re: Set Resolution in Karmic at boot to 1366x768

    xorg.conf exists and is used if its generated. its essential for my nvidia setups.

  6. #6
    Join Date
    Sep 2006
    Location
    Southern Indiana, USA
    Beans
    1,644
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Set Resolution in Karmic at boot to 1366x768

    Quote Originally Posted by nanog View Post
    xorg.conf exists and is used if its generated. its essential for my nvidia setups.
    Can you confirm, I don't see it in a native (clean) install.
    Ubuntu 12.04 LTS (& Windows XP-SP3 for Flight Sim only) - (1) 3.4 G/3G RAM/NVIDIA GT630, 2048VRAM/SB AudigySE Audio (2) 2.9 G/2G RAM/NVIDIA 9500GT,1024VRAM/SB Audio (3) 2.3 G/2G RAM/NVIDIA FX1500M,256VRAM/Sigmatel Audio

  7. #7
    Join Date
    Oct 2005
    Location
    Western Canada
    Beans
    146
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Set Resolution in Karmic at boot to 1366x768

    Alright, I got it to work. It turns out that an xorg.conf file can be used if you need one.

    I did the following:

    1. switch to a console with Ctrl+Alt+F1
    2. after logging in, stop X with:
    Code:
    sudo service gdm stop
    3. generate an xorg.conf.new with
    Code:
    sudo Xorg -configure
    This places a file xorg.conf.new in your home directory.
    4. copy the file to /etc/X11/xorg.conf
    Code:
    sudo cp ~/xorg.conf.new /etc/X11/xorg.conf
    5. edit /etc/X11/xorg.conf to your needs, in my case (for 1366x768 ) it looks like this:
    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"
    EndSection
    
    Section "Module"
    	Load  "dri2"
    	Load  "record"
    	Load  "glx"
    	Load  "extmod"
    	Load  "dri"
    	Load  "dbe"
    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"
    	ModeLine     "1368x768" 85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
    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 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
    	BusID       "PCI:0:2:0"
    EndSection
    
    Section "Screen"
    	Identifier "Screen0"
    	Device     "Card0"
    	Monitor    "Monitor0"
    	SubSection "Display"
    		Modes "1368x768"
    		Viewport 0 0
    		Depth     24
    	EndSubSection
    EndSection
    6. I'm not sure if this is 100% necessary, but I did it anyway, and this is to tell X to use the new xorg.conf. To this end I edited the file
    /etc/X11/xinit/xserverrc to read:
    Code:
    #!/bin/sh
    
    # $Id: xserverrc 189 2005-06-11 00:04:27Z branden $
    
    exec /usr/bin/X11/X -config /etc/X11/xorg.conf -nolisten tcp
    ...note the -config line.

    7. joy of non-flickering startup


    p.s. I also tried the grub method, but no joy, the settings from grub aren't passed to X.
    Last edited by SqRt7744; June 23rd, 2010 at 10:13 PM.
    I like cheese upon crackers. Liver upon crackers, however, is disgusting.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •