-   Slackware (
-   -   switching a second display on from the command line (

SavoTU 05-20-2013 12:43 PM

switching a second display on from the command line
I have been trying all day to get this to work but am now just going around and around in circles.

I have my computer hooked up to my TV and play media through xbmc and have started writing a script to link to my remote which will turn on the display and start xbmc or give xbmc focus if it has already started.

The only problem i am having is with overscan, before i was using

Option        "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-2: nvidia-auto-select +1920+0 { ViewPortIn=1920x1080, ViewPortOut=1820x1022+50+29 }"
in my xorg.conf which works fine but because i cannot turn twinview on or off from the command line i am having to use xrandr to enable disable the display but i cannot figure out how to get it to use the viewport(in/out)

kingbeowulf 05-22-2013 12:44 AM

From your xorg.conf entry, I assume you are using the Nvidia proprietary drivers and not nouveau. If so, make sure you have nouveau blacklisted (see /extra) and use the 'nvidia-settings' tool. I good idea would be use the nvidia-settings GUI to make sure you get all the modes correct, then use nvidia-settings CLI to set them. See "man nvidia-settings" and the README.TXT in the driver package (complete list: nvidia-settings --query all ). There are more settings there than you can shake a stick at. Thus, I usually use the GUI to fiddle with my displays!!

SavoTU 05-22-2013 05:11 AM

I did use the gui app to set up twin view and just left it on(a recent driver update removed overscan in the gui so i added the viewport option to xorg), but the other day i noticed that it left the card in max performance mode, as i wanted to write a script to focus xbmc with the remote i figured it can not be to difficult to enable/disable the 2nd screen at the same time.

Unfortunately the enable/disable twinview in the Nvidia cli is a read only option (first thing i looked at) so i tried with xrandr which works very well but having looked a bit more could be because its naming the TV HDMI-0 and not DFP-2 like Nvidia.

For now i have set the overscan in xbmc which is a work around because if i decided to start using another app then i will have to comeback to this issue.

mrclisdue 05-22-2013 06:04 AM

In your search for answers, did you happen upon this thread: ?

I have no idea whether it pertains to your particular issue, but I figured it may be helpful.


edit: the original link has a link to this:

SavoTU 05-22-2013 07:08 AM

Thank you i now have it working!

I did read that page after the driver update and again when trying to figure this out but deemed it to be irreverent this time around as i had read that twinview could not be turned on/off with nvidia-settings.

I now don't need the xrandr command as this will work to turn twinview on/off from the command line


nvidia-settings --assign CurrentMetaMode="DFP-0: nvidia-auto-select +0+0, DFP-2: nvidia-auto-select +1920+0 { ViewPortIn=1920x1080, ViewPortOut=1820x1022+50+29 }"

nvidia-settings --assign CurrentMetaMode="DFP-0: nvidia-auto-select +0+0,"
Thanks again


All times are GMT -5. The time now is 10:15 PM.