Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 05-20-2013, 01:43 PM   #1
Registered: Apr 2005
Distribution: Slackware64 Current
Posts: 162

Rep: Reputation: 23
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)
Old 05-22-2013, 01:44 AM   #2
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.2 Slackware 14.2, Slackware{32,64}-current
Posts: 785
Blog Entries: 3

Rep: Reputation: 275Reputation: 275Reputation: 275
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!!
Old 05-22-2013, 06:11 AM   #3
Registered: Apr 2005
Distribution: Slackware64 Current
Posts: 162

Original Poster
Rep: Reputation: 23
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.
Old 05-22-2013, 07:04 AM   #4
Senior Member
Registered: Dec 2005
Distribution: Slackware -current, 14.2
Posts: 1,085

Rep: Reputation: 195Reputation: 195
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:

Last edited by mrclisdue; 05-22-2013 at 07:07 AM. Reason: added content
1 members found this post helpful.
Old 05-22-2013, 08:08 AM   #5
Registered: Apr 2005
Distribution: Slackware64 Current
Posts: 162

Original Poster
Rep: Reputation: 23
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



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inittab: Command for switching display to tty2/3/4/... chochem Linux - Newbie 2 09-06-2008 12:43 PM
Switching To GUI from command line dexton Linux - Software 3 05-04-2005 01:04 PM
switching from command line to gui mattfritze Linux - Newbie 6 12-06-2003 08:50 PM
switching from command line to gui on 9.2 mattfritze Mandriva 2 12-06-2003 08:43 PM
switching from GUI to command line mariusz007 Linux - Newbie 2 10-13-2003 09:50 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration