How to set native resolution via xorg.conf overriding EDID?
The way to override EDID defined configurations at xorg.conf is to add this line in the section "Device":
Option "UseEdid" "False"
So, it is still possible to set the native Display Resolution in Ubuntu by creating and customizing a configuration file for XOrg. Here's a step by step guide:
1)CREATE A NEW xorg.conf file to put in the configuration folder "/etc/X11". If you don't have this file set up, there are a lot of examples in the web, but if you have a nvidia driver it comes with a tool to generate one. Just run
sudo nvidia-xconfig
2)EDIT THIS NEW FILE xorg.conf customizing the sections "Screen" and "Monitor" with the settings for the native resolution of your Display. You should run "sudo gedit" in a terminal in order to be able to save the changes in /etc/X11 system folder. It will be easier if you search the web for some examples and specific options for your monitor such as horizontal and vertical refresh rates. I would suggest to run a search for "1680x1050" (or your native resolution) AND "xorg.conf". Here's an example of the "Monitor" section for a Syncmaster 2043NWX:
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection
3)ADD A LINE TO OVERRIDE EDID, as your native configuration wasn't listed in the EDID data that your drivers retrieved from your Display, and you'll be forcing this resolution through xorg.conf. It's the first line written in this answer.
4)SAVE THE FILE AND LOG OUT. Be sure to save xorg.conf in /etc/X11, and log out of your ubuntu session. If everything was OK, after logout the native resolution should be set and working, even for the login screen, as /etc/X11/xorg.conf is readed by X-Window every time it starts or restarts. If something went wrong, you can temporally rename /etc/X11/xorg.conf as /etc/X11/_xorg.conf and then you should be able to log in with the default resolution. You can check the X-window log at /var/log/xorg.0.log to try to figure out what went wrong with your settings.
Here's a xorg.conf example, generated by nvidia-xconfig, and customized to set the native resolution of a SyncMaster2043nwx:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 304.131 (buildmeister@swio-display-x64-rhel04-16) Sun Nov 8 22:48:17 PST 2015
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "metamodes" "1680x1050_60 +0+0"
Option "NoLogo" "True"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 7050 PV 7 nForce 630a"
Option "UseEDID" "FALSE"
EndSection
Let me thank all Ubuntu community to help me figure out all this through many different posts.
Related videos on Youtube
Nano
Updated on September 18, 2022Comments
-
Nano over 1 year
I have a monitor with a native resolution of 1680x1050 wich is not being detected and so can't be set through nvidia drivers. I've tried with no results to force the resolution with xrandr, as suggested on official ubuntu documentation: https://wiki.ubuntu.com/X/Config/Resolution#Adding_undetected_resolutions So I'm trying to get the resolution set by a manually generated xorg.conf file in /etc/X11, as suggested at the end of the same official page.
I managed to create a custom xorg.conf to set the native resolution and, as I can see at xorg log (/var/log/xorg.0.log) the xorg.conf configuration file is being loaded but custom resolution 1680x1050 is being discarded as it is not listed by "EDID": https://en.wikipedia.org/wiki/Extended_Display_Identification_Data
How to override the Xorg step wich compares custum resolution with EDID listed configurations and discards native resolution for not being listed? Any ideas?
Here's the relevant part of xorg.0.log:
**[ 3448.936] (==) Using config file: "/etc/X11/xorg.conf"** [ 3448.936] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 3448.936] (==) ServerLayout "Layout0" [ 3448.936] (**) |-->Screen "Screen0" (0) [ 3448.936] (**) | |-->Monitor "Monitor0" [ 3448.936] (**) | |-->Device "Device0" [ 3448.936] (**) |-->Input Device "Keyboard0" .......... .............. 3448.959] (II) Loading /usr/lib/xorg/modules/libwfb.so [ 3448.959] (II) Module wfb: vendor="X.Org Foundation" [ 3448.959] compiled for 1.18.3, module version = 1.0.0 [ 3448.959] ABI class: X.Org ANSI C Emulation, version 0.4 [ 3448.959] (II) Loading sub module "ramdac" [ 3448.959] (II) LoadModule: "ramdac" [ 3448.959] (II) Module "ramdac" already built-in [ 3448.959] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32 [ 3448.959] (==) NVIDIA(0): RGB weight 888 [ 3448.959] (==) NVIDIA(0): Default visual is TrueColor [ 3448.959] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0) [ 3448.960] (**) NVIDIA(0): Option "NoLogo" "True" **[ 3448.960] (**) NVIDIA(0): Option "MetaModes" "1680x1050_60 +0+0"** [ 3448.960] (**) NVIDIA(0): Enabling 2D acceleration [ 3449.310] (II) NVIDIA(GPU-0): Display (Samsung SyncMaster (CRT-0)) does not support NVIDIA [ 3449.310] (II) NVIDIA(GPU-0): 3D Vision stereo. [ 3449.311] (II) NVIDIA(0): NVIDIA GPU GeForce 7050 PV / nForce 630a (C68) at PCI:0:18:0 [ 3449.311] (II) NVIDIA(0): (GPU-0) [ 3449.311] (--) NVIDIA(0): Memory: 524288 kBytes [ 3449.311] (--) NVIDIA(0): VideoBIOS: 05.67.32.26.00 [ 3449.311] (--) NVIDIA(0): Interlaced video modes are supported on this GPU [ 3449.311] (--) NVIDIA(0): Valid display device(s) on GeForce 7050 PV / nForce 630a at PCI:0:18:0 [ 3449.311] (--) NVIDIA(0): Samsung SyncMaster (CRT-0) (connected) [ 3449.311] (--) NVIDIA(0): DFP-0 [ 3449.311] (--) NVIDIA(0): Samsung SyncMaster (CRT-0): 350.0 MHz maximum pixel clock [ 3449.311] (--) NVIDIA(0): DFP-0: 155.0 MHz maximum pixel clock [ 3449.311] (--) NVIDIA(0): DFP-0: Internal Single Link TMDS [ 3449.311] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display [ 3449.311] (**) NVIDIA(0): device Samsung SyncMaster (CRT-0) (Using EDID frequencies [ 3449.311] (**) NVIDIA(0): has been enabled on all display devices.) **[ 3449.312] (WW) NVIDIA(0): No valid modes for "1680x1050_60+0+0"; removing.** **[ 3449.312] (WW) NVIDIA(0): Unable to validate any modes; falling back to the default mode [ 3449.312] (WW) NVIDIA(0): "nvidia-auto-select".** [ 3449.312] (WW) NVIDIA(0): [ 3449.312] (II) NVIDIA(0): Validated MetaModes: [ 3449.312] (II) NVIDIA(0): "CRT-0:nvidia-auto-select" [ 3449.312] (II) NVIDIA(0): Virtual screen size determined to be 1600 x 1200 [ 3449.313] (WW) NVIDIA(0): Unable to support custom viewPortOut 1600 x 900 +0 +150 [ 3449.313] (WW) NVIDIA(0): Unable to support custom viewPortOut 1600 x 900 +0 +150 [ 3449.313] (--) NVIDIA(0): DPI set to (99, 98); computed from "UseEdidDpi" X config [ 3449.313] (--) NVIDIA(0): option [ 3449.313] (--) Depth 24 pixmap format is 32 bpp [ 3449.318] (II) NVIDIA(0): Setting mode "CRT-0:nvidia-auto-select"