You are not logged in.

#1 2016-01-28 18:56:52

Algor88
Member
Registered: 2013-04-20
Posts: 16

[workaround]Tv as second Display has an Offset

Hi,
I want to use my Tv as a second Display at my Desktop Pc, but it has an Offset to the left(maybe 50 pixel).
My Configuration is like this:
Nvidia GTX960->AVR (Onkyo Tx-SR608)->Tv (LG 42Lw570S). Everything is connected with HDMI (HDMI-0 on my card).

Im using the newest proprietary nvidia driver from repo. extra.

I want to remove the offset with a modeline, because neither the AVR nor the Tv gives me an option to remove the offset.

I have tried to change the modeline with xvidtune, but i get the error "invalid mode requested".
xvidtune -show gives me the following modeline for the Tv(turned of my other display in nvidia-settings before):

xvidtune -show
"1920x1080"   148.50   1920 2008 2052 2200   1080 1084 1089 1125 +hsync +vsync

Also adding a new mode to HDMI-0 with xrandr does not work:

xrandr --newmode "1920x1080_test"   148.50   1920 2008 2052 2200   1080 1084 1089 1125 +hsync +vsync
xrandr --addmode HDMI-0 "1920x1080_test"
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  18 (RRAddOutputMode)
  Serial number of failed request:  45
  Current serial number in output stream:  46

The modeline should work, because it is the one i get from xvidtune -show.

I have tried to use the solution from this page:
https://www.kubuntuforums.net/archive/i … 62942.html

Therefor i have created the following xorg.conf:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 358.16  (buildmeister@swio-display-x64-rhel04-12)  Mon Nov 16 19:58:01 PST 2015

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

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
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      "Samsung SyncMaster"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "ONKYO Corporation TX-SR608"
    HorizSync       31.0 - 82.0
    VertRefresh     57.0 - 63.0
    Option         "DPMS"
    Option     "UseEDID" "false" 
    Modeline       "1920x1080_shift"   148.50   1920 2000 2044 2200   1080 1084 1089 1125 +hsync +vsync
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 960"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-I-1: nvidia-auto-select +0+0, HDMI-0:  1920x1080_shift+1920+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

The Problem is that the Tv is not turned on if i start X and if i turn it on in nvidia-settings it has the offset again and the mode line i want to use doesn't show up.

How should i setup the xorg.conf so that it does work?
The Tv doesn't have that offset on my notebook(using the same cable). The laptop uses a gt330m and the proprietary nvidia driver(a bit outdated and the nvidia-340xx package). It also shows the same modeline as my Desktop Pc.
Why does the same modeline has different results, depending on the device? Is it a bug in the driver?

I hope some one can help me

Last edited by Algor88 (2016-01-29 22:35:36)

Offline

#2 2016-01-28 19:04:14

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [workaround]Tv as second Display has an Offset

The term for this issue is overscan. I HATE overscan. tongue

I don't think you have to edit "xorg.conf" or modelines or anything. It can be compensated for by using "xrandr". I have a monitor and a TV plugged in to my desktop. I have a single "xrandr" line that runs when I initially start X that sets things up how I want it, then I have a key mapped on my keyboard that uses xrandr to toggle the TV output on and off.

This thread helped me initially. If you still need help, I can post my xrandr commands when I get home. (...actually, I've been meaning to do that for a while.) tongue

Last edited by drcouzelis (2016-01-28 19:04:38)

Offline

#3 2016-01-28 19:36:27

Algor88
Member
Registered: 2013-04-20
Posts: 16

Re: [workaround]Tv as second Display has an Offset

It doesn't work(done following as root):

xrandr --output HDMI-0 --set underscan on
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  11 (RRQueryOutputProperty)
  Serial number of failed request:  49
  Current serial number in output stream:  49

Also i don't think it is Overscan. Changing the label of the Input device on Tv(to be a Pc) fixes Overscan on my Tv. On my previous windows installation and on my Notebook i did not use any underscan and it worked fine.

But now i know how i can fix my problem(black Pixel on the right side and missing one on the left side).
If i activate Overscan on my Tv the black Pixel are gone and with underscan i can fix the rest.
Right now i try to find the correct parameter with nvidia-settings ViewPortOut.
If i can get xrandr to work, i would be intrested to see your scripts. I also would like to turn on/off my tv with a key.

Last edited by Algor88 (2016-01-28 20:38:49)

Offline

#4 2016-01-28 21:29:48

Algor88
Member
Registered: 2013-04-20
Posts: 16

Re: [workaround]Tv as second Display has an Offset

I have activated Overscan and created a black Picture with white Border. I have viewed the Picture in Full-Screen and the best Options for ViewPortOut are: "1838x1055+82+25".
I can see the Border on the left, right and Top. But on the Bottom ~30pixel are missing. So even using Overscan doesn't fix my problem.
Or is there an Option to push only the bottom into the middle?

Last edited by Algor88 (2016-01-28 22:32:13)

Offline

#5 2016-01-29 22:09:11

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [workaround]Tv as second Display has an Offset

"~/.local/bin/tv-enable":

#!/bin/sh

# Enable the TV
xrandr --output DVI-0 --mode 1920x1200 --pos 0x0 --primary --output HDMI-0 --mode 1280x720 --set underscan on --set "underscan hborder" 40 --set "underscan vborder" 25 --pos 1920x0

# Make the TV the default audio device
echo defaults.pcm.card 1 > ~/.asoundrc
echo defaults.pcm.device 3 >> ~/.asoundrc
echo defaults.ctl.card 1 >> ~/.asoundrc

# Reset the wallpaper
sh ${HOME}/.fehbg

"~/.local/bin/tv-disable":

#!/bin/sh

# Disable the TV
xrandr --output DVI-0 --mode 1920x1200 --output HDMI-0 --off

# Disable the TV audio device
\rm -f ~/.asoundrc

# Reset the wallpaper
sh ${HOME}/.fehbg

Then I simply create a keyboard shortcut (Openbox, xbindkeys, whatever...) and / or an "System" menu entry that point to those little scripts. Easy peasy. smile

Offline

#6 2016-01-29 22:35:03

Algor88
Member
Registered: 2013-04-20
Posts: 16

Re: [workaround]Tv as second Display has an Offset

I have found out that i'm affected by a bug in nvidia driver.
I have switched the driver version to 352 (there is a package nvidia-352 for that reason in aur).

Last edited by Algor88 (2016-01-29 22:36:05)

Offline

Board footer

Powered by FluxBB