PDA

View Full Version : [ubuntu] Nvidia ModeLines and Twinview? Fix Overscan



NateMan
June 15th, 2009, 03:18 AM
I've been attempting to use ubuntu to display videos on my my hdtv. My tv is a panasonic pt-43lc14, connected through hdmi. I'm using twinview to display on both screens, since it is helpful being able to pull video from one screen to another. It is working great except for a few little issues. The first issue is video tearing during movies or compiz animations moving on this screen. The second is overscan on this monitor. It is rather bad when watching movies, and this is a fairly common problem with linux and hdtvs. I've attempted to use modelines as can be seen in this post here:
http://ubuntuforums.org/showthread.php?t=1003099
I can't seem to get this working with twinview however. I have pulled a working modeline from my xlog, setup the modeline, and attempted to setup the rest of the xorg file. This doesn't seem to work once I tell it not to use my tv's edid. It just appears that the tv is getting no signal, while my second monitor works fine. This is the xorg.conf file I've attempted to use for this:


# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@crested) Sun Feb 1 20:25:37 UTC 2009


Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection

Section "ServerFlags"
Option "Xinerama" "0"
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"

# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "DELL P1130"
HorizSync 30.0 - 130.0
VertRefresh 48.0 - 170.0
Option "DPMS" "FALSE"
EndSection

Section "Monitor"
Identifier "PANASONIC-MMD"
VendorName "Unknown"
ModelName "PANASONIC-MMD"
HorizSync 15.0 - 46.0
VertRefresh 59.0 - 61.0
ModeLine "1280x720" 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync
#ModeLine "1280x720" 74.25 1180 1390 1430 1650 620 725 730 750 +hsync +vsync
Option "ExactModeTimingsDVI" "TRUE"
Option "DPMS" "FALSE"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8800 GTS"
Option "ModeValidation" "NoEdidModes"
EndSection

Section "Screen"

# Removed Option "metamodes" "CRT: 2048x1536_60 +1280+0, DFP: 1280x720_60 +0+0"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "NoLogo" "true"
Option "CursorShadow" "true"
Option "MigrationHeuristic" "greedy"
Option "TripleBuffer" "true"
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "CRT-1"
Option "metamodes" "CRT: 2048x1536_60 +1280+0, DFP: 1280x720_60 +0+171"
SubSection "Display"
Depth 24
Modes "1280x720"
EndSubSection
EndSection

Here is the part of my xlog I used to generate my modeline:



Panasonic
HorizSync : 15.000-46.000 kHz
VertRefresh : 59.000-61.000 Hz

(II) NVIDIA(0): Validating Mode "1280x720":
(II) NVIDIA(0): 1280 x 720 @ 60 Hz
(II) NVIDIA(0): For use as DFP backend.
(II) NVIDIA(0): Mode Source: EDID
(II) NVIDIA(0): Pixel Clock : 74.25 MHz
(II) NVIDIA(0): HRes, HSyncStart : 1280, 1390
(II) NVIDIA(0): HSyncEnd, HTotal : 1430, 1650
(II) NVIDIA(0): VRes, VSyncStart : 720, 725
(II) NVIDIA(0): VSyncEnd, VTotal : 730, 750
(II) NVIDIA(0): H/V Polarity : +/+
(II) NVIDIA(0): Mode is valid.


I would really like to get this working and post a good way to fix this, since I'm sure many people have the same problem, including a few I know. I think that perhaps the problem is in how I'm telling it what modeline to use. Once I get the default modeline working, I can then attempt to tweak it to fix my overscan problems. If there is any more info I can give, just let me know, I'll be glad to provide it. I would greatly appreciate any help. Thanks in advance!

pedja_portugalac
June 15th, 2009, 04:25 AM
I have the latest Nvidia driver on my computer and Sony full HD screen (TV). When I want to watch my movies on Sony I fist turn off both. Then power on the TV and set it to right HDMI input channel. Then I power on my computer. After logging in I open, only first time, Nvidia X server settings but from the command line:

sudo nvidia-settings
Then I play under X server display configuration applying my settings to see what that do. When I find good settings I save it to X configuration file, and that's all. I do that only one time as the Nvidia remember the setting for the next time. In my experience tween view were the best choice but I had to change settings of power management so when I close my lap-tops lid it do nothing and I can watch the movie on giant screen. With some .mkv movies at very high rate it's freezie for me to and no sound at all (on TV). Some say try to change the HDMI cable the side from computer you put in TV and the one who was on TV you put into computer. It seems that it solved problems for some people, both using windows or Linux. I have to say now and here I have better experience using HD connection with Ubuntu then using Vista (my PC is dual boot).

NateMan
June 15th, 2009, 05:38 AM
I don't think changing where I plug the hdmi cable into will matter. The problem is in how my xorg.conf is configured. I need to be able to tell it to use my custom modeline when I turn off automatic edid usage. In fact, there are no controls at all in nvidia-settings to allow me to adjust my overscan. Overscan is when the desktop displayed is larger than the area seen on the screen. It has to do with how pixals are rendered on hdtvs. I want to be able to see all of my desktop. I've found a good guide on how to accomplish this, however it doesn't detail its usage with Twinview, nvidia's version of Xinerama. I do agree that even with the overscan and tearing, displaying on my hdtv is better in ubuntu. Vista had numerous problems with it disconnecting if I switched inputs and had horrible black borders around the edge of my display due to underscan.

pedja_portugalac
June 17th, 2009, 02:24 AM
I don't think changing where I plug the hdmi cable into will matter. The problem is in how my xorg.conf is configured. I need to be able to tell it to use my custom modeline when I turn off automatic edid usage. In fact, there are no controls at all in nvidia-settings to allow me to adjust my overscan. Overscan is when the desktop displayed is larger than the area seen on the screen. It has to do with how pixals are rendered on hdtvs. I want to be able to see all of my desktop. I've found a good guide on how to accomplish this, however it doesn't detail its usage with Twinview, nvidia's version of Xinerama. I do agree that even with the overscan and tearing, displaying on my hdtv is better in ubuntu. Vista had numerous problems with it disconnecting if I switched inputs and had horrible black borders around the edge of my display due to underscan.
This is maybe 4th Nvidia driver version I am using and the 3 last with ubuntu 8.10 and 9.04 make overscan even with my TV. Just lil bit but still. I remember when I was using ubuntu 8.04 and Nvidia 174 image perfectly fit on TV. I didn't try to twick newest Nvidia driver 185.18.14 or even to connect my lap-top on TV screen (I have now one HDef hard drive player)but whatever you change you can save your X configuration only if you start nvidia-settings from command line with root privilege par example like this:

sudo nvidia-settings

NateMan
June 17th, 2009, 04:33 PM
This is a fresh install of 9.04, I have never tried it with older versions, however I feel that I would get similar results most likely. I also understand that unless nvidia-settings is run as root, it cannot overwrite a directory that requires root privileges. I'm not really looking for a nvidia-settings type solution, since I can just edit my xorg.conf in the same way that nvidia-settings only modifies a few files itself. Again the issue is really just trying to tell a twinview configured xorg.conf to notice that I've added a custom modeline when I tell it not to use any edids. Maybe you should try to hook your laptop up to your screen and see if it overscans now. This would probably help me more with diagnosing the problem since I would know that an older version of the driver worked, while a new one did not. Also if you have a working hdtv configuration with twinview, perhaps you could also post your xorg.conf so I can see what worked and what didn't. Also the manufacturer of the tv, and its video processor heavily influences the overscan/underscan of the tv with certain signals.

chaanakya_chiraag
August 9th, 2010, 02:34 AM
Did you ever fix this issue? I ran into it with Lucid, and will try the custom modeline.

oobe-feisty
February 5th, 2011, 08:28 AM
I had the exact same problem with a little trial and error i fixed it the same day by making a modeline based on my tv specs in my xlog created using the same method in the thread posted by the OP here is my working xorg.conf with no overscan and working modelines



#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 "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
ModulePath "/usr/lib/xorg/modules/extensions"
ModulePath "/usr/lib/xorg/modules/dri"
FontPath "/usr/lib/X11/fonts/misc/:unscaled"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/misc/"
FontPath "/usr/lib/X11/fonts/Type1/"
FontPath "/usr/lib/X11/fonts/Speedo/"
FontPath "/usr/lib/X11/fonts/100dpi/"
FontPath "/usr/lib/X11/fonts/75dpi/"
FontPath "/usr/lib/X11/fonts/cyrillic/"
FontPath "/usr/lib/X11/fonts/TTF/"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
EndSection

Section "InputDevice"

# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection


Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "HPC VIVO47FHD"
HorizSync 15.0 - 94.0
VertRefresh 28.0 - 88.0
ModeLine "Modded" 138.50 1920 1968 2000 2080 1080 1082 1087 1111 +Hsync -Vsync
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 30.0 - 84.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection


Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection

Section "Screen"

#adding this section from old config
# Option "UseEdidFreqs" "False"
# Option "VideoOverlay" "on"
#end old config
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "NoLogo" "True"
# Option "UseEdidDpi" "FALSE"
Option "UseEDID" "True"
Option "ExactModeTimingsDVI" "True"
Option "DPI" "130 x 130"
Option "TVStandard" "HD1080p"
Option "TripleBuffer" "True"
# Option "NVAGP" "0" #commented out to fix white screen
Option "UseEvents" "True" #changed to false to fix white screen
Option "HWCursor" "True"
# Option "CustomEDID" "DFP-0:/etc/X11/edid.bin"
Option "TwinView" "True"
# Option "MetaModes" "nvidia-auto-select, nvidia-auto-select"
Option "TwinViewOrientation" "LeftOf"
SubSection "Display"
Depth 24
Modes "Modded" "Testing"
EndSubSection
EndSection