Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

How to set persistent External Monitor resolution?

xorg mint resolution xrandr

  • Please log in to reply

#1
brisingr

brisingr

    Member

  • Member
  • PipPipPip
  • 135 posts

Hello,  

 

Its been a while since I was here but I'm majorly struggling. I'm basically a Linux beginner. Trying to figure out how to get my mint 17 system to boot up at the correct resolution on my external display. Its a laptop hooked to a tv with a VGA port. The laptop stays closed when its in use ( i basically just treat it like a desktop) I can make it work for an individual session by running

xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync

xrandr --addmode VGA1 1360x768_60.00

This change is not persisten when i reboot.

 

I read about making an xorg.conf file. I found a tutorial that had me create the file using "xorg-configure". It then had me fill in some blanks. I didn't realize it at the time but apparently the tutorial was for a much older version of mint. I tried reading through the xorg manual but most of it goes right over my head. Anyway... this is what i have...

 

Section "ServerLayout"

Identifier     "X.org Configured"
Screen      0  "Screen0" 0 0
Screen      1  "Screen1" RightOf "Screen0"
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     "built-ins"
EndSection
 
Section "Module"
Load  "glx"
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"
        Modeline "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
VendorName   "Monitor Vendor"
ModelName    "Monitor Model"
EndSection
 
Section "Monitor"
Identifier   "Monitor1"
        Modeline "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
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",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "NoAccel"             # [<bool>]
        #Option     "AccelMethod"         # <str>
        #Option     "Backlight"           # <str>
        #Option     "DRI"                 # <str>
        #Option     "ColorKey"           # <i>
        #Option     "VideoKey"           # <i>
        #Option     "Tiling"             # [<bool>]
        #Option     "LinearFramebuffer"   # [<bool>]
        #Option     "VSync"               # [<bool>]
        #Option     "PageFlip"           # [<bool>]
        #Option     "SwapbuffersWait"     # [<bool>]
        #Option     "TripleBuffer"       # [<bool>]
        #Option     "XvPreferOverlay"     # [<bool>]
        #Option     "HotPlug"             # [<bool>]
        #Option     "ReprobeOutputs"     # [<bool>]
        #Option     "XvMC"               # [<bool>]
        #Option     "ZaphodHeads"         # <str>
        #Option     "VirtualHeads"       # <i>
        #Option     "TearFree"           # [<bool>]
        #Option     "PerCrtcPixmaps"     # [<bool>]
        #Option     "FallbackDebug"       # [<bool>]
        #Option     "DebugFlushBatches"   # [<bool>]
        #Option     "DebugFlushCaches"   # [<bool>]
        #Option     "DebugWait"           # [<bool>]
        #Option     "BufferCache"         # [<bool>]
Identifier  "Card0"
Driver      "intel"
BusID       "PCI:0:2:0"
EndSection
 
Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "NoAccel"             # [<bool>]
        #Option     "AccelMethod"         # <str>
        #Option     "Backlight"           # <str>
        #Option     "DRI"                 # <str>
        #Option     "ColorKey"           # <i>
        #Option     "VideoKey"           # <i>
        #Option     "Tiling"             # [<bool>]
        #Option     "LinearFramebuffer"   # [<bool>]
        #Option     "VSync"               # [<bool>]
        #Option     "PageFlip"           # [<bool>]
        #Option     "SwapbuffersWait"     # [<bool>]
        #Option     "TripleBuffer"       # [<bool>]
        #Option     "XvPreferOverlay"     # [<bool>]
        #Option     "HotPlug"             # [<bool>]
        #Option     "ReprobeOutputs"     # [<bool>]
        #Option     "XvMC"               # [<bool>]
        #Option     "ZaphodHeads"         # <str>
        #Option     "VirtualHeads"       # <i>
        #Option     "TearFree"           # [<bool>]
        #Option     "PerCrtcPixmaps"     # [<bool>]
        #Option     "FallbackDebug"       # [<bool>]
        #Option     "DebugFlushBatches"   # [<bool>]
        #Option     "DebugFlushCaches"   # [<bool>]
        #Option     "DebugWait"           # [<bool>]
        #Option     "BufferCache"         # [<bool>]
Identifier  "Card1"
Driver      "intel"
BusID       "PCI:0:2:1"
EndSection
 
Section "Screen"
Identifier "Screen0"
Device     "Card0"
Monitor    "Monitor0"
SubSection "Display"
Viewport   0 0
Depth     1
        Modes   "1360x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     4
        Modes   "1360x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     8
        Modes   "1360x768"
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
 
Section "Screen"
Identifier "Screen1"
Device     "Card1"
Monitor    "Monitor1"
SubSection "Display"
Viewport   0 0
Depth     1
        Modes   "1360x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     4
        Modes   "1360x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     8
        Modes   "1360x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     15
        Modes   "1360x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     16
        Modes   "1360x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     24
        Modes   "1360x768"
EndSubSection
EndSection
 

 

When i boot computer is pops up a window that basically says it failed to apply new resolution.


  • 0

Advertisements


#2
terry1966

terry1966

    Member 1K

  • Member
  • PipPipPipPip
  • 1,142 posts

sorry not a mint user and don't have a laptop to test with either so no exact step by step guide and what i think should work may not, but this is what i would do.

 

first delete that xorg.conf file, then because it is a laptop your using which has to be open in the first place to start it up i would go into mint's settings and set it up as a dual display with the correct resolutions for each screen you want. this should then always remember those settings, set the tv as the default/main monitor.

now when you close the laptop the tv should always keep it's set resolution and also be the default screen on boot up.

 

:popcorn:

 

if that doesn't work or do what you want then this should :- http://www.gregfreem...ux-mint-ubuntu/


Edited by terry1966, 22 October 2014 - 11:57 PM.

  • 0

#3
brisingr

brisingr

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 135 posts
No offense... And I appreciate your help... But what do you think the chances are that I would go through all the hassle of creating a new modeline for the resolution if I hadn't tried to set the correct resolution in the system settings. I have to manually add the modeline via terminal each time I boot... Clearly if the resolution was available (or if the change was persistent) I wouldn't be going through this.

Edited by brisingr, 22 October 2014 - 11:53 PM.

  • 0

#4
terry1966

terry1966

    Member 1K

  • Member
  • PipPipPipPip
  • 1,142 posts

made an edit you may have missed in last post,

 

sorry you never said the screen resolution you wanted to set wasn't actually listed in your choices.

 

i have that problem with 1 of my monitors too, so unless i create an xorg.conf file then the max resolution shown for it is 1024x768 yet it's true resolution is 1280x1024.

 

so to get around that i need to create an xorg.conf file and add this.

Section "Monitor"
    # HorizSync source: xconfig, VertRefresh source: xconfig
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-1"
    HorizSync       30.0 - 65.0
    VertRefresh     43.0 - 75.0
    Option         "DPMS"
EndSection

can't remember exactly now (been a long time since i created it and have a bad memory) but i think the higher the HorizSync number the higher/more resolution options you get in monitor display settings.

 

if the link in above post doesn't help you, see if this one does :- http://www.thinkwiki.../Xorg_RandR_1.2

 

if still no joy in getting things to work as you want then, i'll get more info from you and see if we can't create a working xorg.conf together for you.

 

:popcorn:


  • 0

#5
brisingr

brisingr

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 135 posts

I stuck this at the end of /etc/mdm/init/Default. (Right before Exit 0) Not sure if its the perfect way to achieve the goal but it seems to be working. 

 

 

mode="$(xrandr -q|grep -A1 "VGA1 connected"| tail -1 |awk '{ print $1 }')"
if [ -n "$mode" ]; then
  xrandr --output LVDS1 --off
  xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
  xrandr --addmode VGA1 1360x768_60.00
  xrandr --output VGA1 --primary --mode 1360x768
fi

 

Laptop boots with the native screen off like I wanted and the external screen turn displays the correct resolution.

 

That tutorial you first sent was good but I think it assumed that the resolution was available by default.  I edited the script to both add and apply the new modeline.

 

Success!!    :D

 

Thank you so much for setting me in the right direction.  The person I asked on the linuxfornoobs reddit page basically told me I was a lazy idiot for not wanting to read and decifer the entire xorg manual. 


  • 0

#6
terry1966

terry1966

    Member 1K

  • Member
  • PipPipPipPip
  • 1,142 posts

well done. :spoton:

 

like most things, there's more than one way to do things, don't forget to delete that xorg.conf file too.

 

am curious about a couple of things tho, does your laptop actually have 2 graphics cards? and is 1360x768 (720p) your tv's natural resolution?

 

:popcorn:


Edited by terry1966, 23 October 2014 - 07:32 PM.

  • 0

#7
brisingr

brisingr

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 135 posts

No my laptop doesn't have 2 graphics cards. Unless im very much mistaken.  Just the intel corp mobile GM956/GL960 Integrated Graphics Controller.  Its pretty terrible.   

 

Im 95 percent sure the screens native res is 1360x768.  I think I looked it up in the booklet that came with it.  If your curious here is a link to the product manual.  Page 17 lists the resolutions and aspect ratios.http://www.manualowl...0/Manual/132644


Edited by brisingr, 23 October 2014 - 10:35 PM.

  • 0

#8
terry1966

terry1966

    Member 1K

  • Member
  • PipPipPipPip
  • 1,142 posts

yes 1366x768 is it's native/natural screen res.

 

reason i asked about dual cards is because your xorg.conf had been set up for each monitor to be connected to separate graphics cards which i thought was incorrect at the time.

Identifier  "Card0"
Driver      "intel"
BusID       "PCI:0:2:0"
Identifier  "Card1"
Driver      "intel"
BusID       "PCI:0:2:1"

doesn't make any difference now because you have everything working correctly and you don't need that xorg.conf file anyway, but my curiosity was just to great to overcome and needed to ask. :D

 

:popcorn:


Edited by terry1966, 23 October 2014 - 11:10 PM.

  • 0






Similar Topics


Also tagged with one or more of these keywords: xorg, mint, resolution, xrandr

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP