User:UNiversal
uNiversal | |
---|---|
Error! Out of Memory | |
Forumite & Wikifier | |
System Details: | Linux.2.7~Custom |
Brain Version: | Positronic 2.0 |
Power Matrix: | Hybrid/Biologic |
Ctrl+Alt+Del |
Resolution configuration xorg.conf
95% Completed
Xorg: Resolution configuration xorg.conf • Xorg Modelines • Minimal NVidia xorg.conf |
Outline
The xorg.conf is a integral part of running XBMC in X via for e.g. xinit in some controllable manner. While in recent Linux the device drivers have improved considerably and deem xorg.conf unneeded, it still has its niche.
If you ever had problems getting the correct resolution or correct modelines on your HTPC this is an easy guide. You can also use this guide to tweak 23.976p and 24p modelines for smoother playback..
Introduction
This instructions and methods outlined here should be quite "generic", use this guide on your own risk. if you end up without a picture on your screen restore the backup xorg.conf or rename existing if no backup exists. References[1][2][3]
Preparing xorg.conf for tweaking
Backing up any existing xorg.conf is a integral step in assuring your can revert any errors.
1 | cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak Then generate a new clean xorg.conf to have a base which to build on later, Note: You probably can use this for other non-NVidia systems, this is something you need to research how-to generate a xorg.conf for ATI or Intel and if you need one to begin with. feel free to update this guide. |
---|---|
2 | sudo nvidia-xconfig -s --no-logo --no-composite --no-dynamic-twinview --force-generate --output-xconfig=/etc/X11/xorg.conf |
3 | Now we need to edit the new xorg.conf to add some options.
sudo nano /etc/X11/xorg.conf then add the following lines in the correct section of that file: Section "monitor" Option "ExactModeTimingsDVI" "true" Option "DPI" "96 x 96" Option "DPMS" "false" |
4 | The validation lines vary from setup to setup and depend very much on how well your TV handles EDID,
Telling xorg to ignore EDID may result in low resolution being shown in xbmc, if you dont offer correct and valid modelines for xbmc-xandrc to pick from. In this example we are not disabling EDID data. We definitely dont want vesa modes or xserver modes
Section "Device" Option "ModeValidation" "NoVesaModes, NoXServerModes" Note: Some difficult TV/AVR Edid can be turned off by appending |
Refresh rate & Modelines values
These are very important values to get right.
1 | Now we need to figure out what kind of HorizSync/VertRefresh and resolution your TV/AVR supports by its EDID info:
Kill xbmc if it's running by sudo stop xbmc Then we need to setup a logfile which logs your TV/AVR EDID modes: cd ~ sudo X -verbose 6 > ~/xlog.txt 2>&1 This process needs interrupting via Ctrl+C In the root of your home directory you will find a xlog.txt |
---|---|
2 | Open the (/home/xbmc/xlog.txt) file and browse until you see something like this section:
(II) NVIDIA(0): Frequency information for SAMSUNG (DFP-0): (II) NVIDIA(0): HorizSync : 26.000-76.000 kHz (II) NVIDIA(0): VertRefresh : 23.000-61.000 Hz (II) NVIDIA(0): (HorizSync from EDID) (II) NVIDIA(0): (VertRefresh from EDID) Write Down or make a note of the HorizSync and VertRefresh values. |
3 | Browse further on (/home/xbmc/xlog.txt) and find all the validated modes. Like the example below:
(II) NVIDIA(GPU-0): Validating Mode "1920x1080": (II) NVIDIA(GPU-0): 1920 x 1080 @ 24 Hz (II) NVIDIA(GPU-0): Mode Source: EDID (II) NVIDIA(GPU-0): Pixel Clock : 74.16 MHz (II) NVIDIA(GPU-0): HRes, HSyncStart : 1920, 2558 (II) NVIDIA(GPU-0): HSyncEnd, HTotal : 2602, 2750 (II) NVIDIA(GPU-0): VRes, VSyncStart : 1080, 1084 (II) NVIDIA(GPU-0): VSyncEnd, VTotal : 1089, 1125 (II) NVIDIA(GPU-0): H/V Polarity : +/+ (II) NVIDIA(GPU-0): Viewport 1920x1080+415+22 (II) NVIDIA(GPU-0): Horizontal Taps 0 (II) NVIDIA(GPU-0): Vertical Taps 0 (II) NVIDIA(GPU-0): Base SuperSample x1 (II) NVIDIA(GPU-0): Base Depth 32 (II) NVIDIA(GPU-0): Distributed Rendering 1 (II) NVIDIA(GPU-0): Overlay Depth 32 (II) NVIDIA(GPU-0): Mode is valid. Note: Make sure that the "(II)NVIDIA(0): Mode is valid." line exists on the one you pick. |
4 | To create a modeline from this is easy. From my example above the first line would be "1920x1080" and then 74.25 and then 1920 2008 and 2052 2200 and so on. you just read the values from top to bottom.
So in this example the modeline that section gives me would be: ModeLine "1920x1080_24" 74.16 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
|
Assembling your xorg.conf
Now that we got both HorizSync and VertRefresh and a working modeline lets put it in our xorg.conf.
1 | Issue from terminal:
sudo nano /etc/X11/xorg.conf |
---|---|
2 | Then add from what you wrote down earlier.
Section "Monitor" HorizSync 15 - 50 VertRefresh 48 - 62 ModeLine "1920x1080" 74.25 1920 2008 2052 2200 1080 1084 1094 1124 +hsync +vsync Interlace (or edit the ones there already if your xorg.conf already contains some modelines) SubSection "Display" Modes "1920x1080" IMPORTANT: This line must match the modeline you created ! In my case it was "1920x1080", However "1280x720" Modelines are also ok if your TV is only HD Ready |
3 | Now close and save the file by hitting Ctrl+X on your keyboard. Then press Y followed by ↵ Enter |
4 | Start xbmc by running it:
sudo xbmc start You should get a nice correct screen, make sure to go into settings - screen and calibrate/adjust your new resolution. If not try another modeline using same methods and see if that works. Note: Almost ready to use xorg.conf to get you started see Minimal NVidia xorg.conf |
Discussion
See the HOW-TO setup XBMC and Linux with correct resolution for discussion and more information. |
References
New Page EDID page
Outline
If your machine has a black screen only when you boot it up before TV or AMP, follow this guide.
On some combinations of equipments (AVR/TV/XBMC) in rarer cases you may find that the order you power on your equipment matters. This is obviously inconvenient but can be easily fixed.
The root cause of this issue is the EDID (Extended display identification data) handshake. Xorg may not correctly handshake with AV equipment after boot. Typically this results in a black screen and a full system shut down and restart to rectify.
In this guide we will show you how to trick Xorg into thinking your AV equipment is connected and powered on at all times. This locks on your install to one monitor/AVR (port specific) and should stop all handshake issues.
This example is for a nVidia GPU, other GPUs will have a similar approach but are not covered here.
Introduction
There are other tools for acquiring EDID information from Xorg.0.log, in this page we use a defer to nvidia-xconfig which is reliable and has been reported that the resulting information is more reliable using this tool, even for ATI GPU's.
You'll need:
- SSH access.
- Nano installed or your editor of choice.
- Reading glasses.
- nvidia-xconfig
You should be running as normal user while following this guide, i.e. not as root Any further references to "root" are meant to be interpreted as base directory not the user.
Note: nvidia-xconfig is already installed on Ubuntu and variants if you have the nvidia-current drivers installed via the Ubuntu packaging or Xswat ppa. It is not intend to instruct users on full use of this tool.
Generating & using EDID.bin
First make sure your install is in a working state, powered on in the correct order so that you can see the GUI.
Open an SSH session to your machine and backup any existing xorg.conf.
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
type:
sudo nvidia-xconfig -s --no-logo --no-composite --no-dynamic-twinview --force-generate --output-xconfig=/etc/X11/xorg.conf
We need a verbose log from X to generate the edid.bin from the raw data.
Kill xbmc if it's running by:
sudo stop xbmc cd ~ sudo X -verbose 6 > ~/xlog.txt 2>&1
This process needs interrupting via Ctrl+C after a few seconds.
In the root of your home directory you will find a xlog.txt (/home/xbmc/xlog.txt)
cd ~/
Now we work out the Assigned Display Device DFP number
type:
cat /home/xbmc/xlog.txt | grep ConnectedMonitor |cut -f2 -d\"
you should see message like the following:
ConnectedMonitor DFP-0 DFP-0
Take a note of the DFP number in this example "DFP-0". Your number may vary.
Now that all the precursors are setup we can extract the RAW binary EDID information to a file.
Extracting EDID binary
type for 32bit and 64bit:
sudo nvidia-xconfig --extract-edids-from-file=/home/xbmc/xlog.txt --extract-edids-output-file=/etc/X11/edid.bin
You should see something like the following:
Found 1 EDID in "/home/xbmc/xlog.txt". Wrote EDID for "SAMSUNG (DFP-0)" to "/etc/X11/edid.bin" (256 bytes)..
Configure xorg to read from EDID
Now edit the xorg.conf you created again and find Section "Device" And add the following
Option "ConnectedMonitor" "DFP-0" Option "CustomEDID" "DFP-0:/etc/X11/edid.bin" Option "IgnoreEDID" "false" Option "UseEDID" "true"
In the end your config will look something like the example below.
Section "Device" Identifier "nvidia" Driver "nvidia" Option "DynamicTwinView" "False" Option "NoFlip" "false" Option "NoLogo" "true" Option "ModeValidation" "NoVesaModes, NoXServerModes" Option "ConnectedMonitor" "DFP-0" Option "CustomEDID" "DFP-0:/etc/X11/edid.bin" Option "IgnoreEDID" "false" Option "UseEDID" "true" EndSection
Since we have created a new xorg.conf file in a location the OS knows to use as default, no further changes need made to make this permanent. If at a later date you need to undo this work simple rename the config file and reboot to revert to default.
If all has went to plan when you reboot everything will just work and the order of powering equipment up will not matter anymore.
Note: If your equipment is coupled to a receiver that has broader HDMI capabilities than your TV, you should edit your xorg.conf so that the section "Screen" looks like this:
Section "Screen" Identifier "screen" Device "nvidia" DefaultDepth 24 Option "ColorRange" "Full" Option "ColorSpace" "RGB" SubSection "Display" Depth 24 Modes "1280x720" EndSubSection EndSection
Edid Library
Use the Legend below as a guide to fill in new entries onto the edid.bin table.
Legend | |||
---|---|---|---|
N/A | ? | Other | |
{{NA}} | {{?}} | Other |
Below is an area that the general community can share their edid.bin and relevant information with other users.
Feel free to update and share your experience below.
TV Brand | AVR Brand | Model | GPU Brand/Model | Download |
---|---|---|---|---|
Samsung | N/A | Series 5 | Nvidia ION | http://this-file-download.com |
? | ? | ? | ? | http://this-file-download.com |
Credits
The edid instructions are adapted from the Openelec wiki, credit to original authors[1]
References
templates to be
NOTICE: {{{1}}} |