LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-14-2019, 11:27 AM   #1
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 634

Rep: Reputation: 174Reputation: 174
Disabling A Single Monitor


I have two monitors, I have a game that WILL NOT work at all with two monitors active. Yes, I can go through the GUI to disable a monitor.

BUT, I know that I can do this on the command line

I did:

"xrandr --output DVI-I-1 --off"
But that killed the wrong monitor, however
"xrandr --output DVI-I-0 --off"
didn't do squat

What would be the proper commandline with xrandr to kill the proper monitor?

Yeah, I read the man entry, but I can't make heads or tails with it.... sorry...
 
Old 11-14-2019, 08:35 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

are you just guessing that it is called DVI-I-0? Perhaps is is DVI-I-2 or something completely different. You can check with
Code:
xrandr --listmonitors
Evo2.
 
Old 11-14-2019, 09:23 PM   #3
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,827
Blog Entries: 1

Rep: Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069
Quote:
Originally Posted by kevinbenko View Post
"xrandr --output DVI-I-0 --off"
didn't do squat

What would be the proper commandline with xrandr to kill the proper monitor?
I did a test to try to replicate, but you didn't give enough information. Which display does xrandr consider your primary? Is your "proper" display the primary display? Is the display you want the game on on the primary display? Where and how did you go about running xrandr? Which DE or WM are you running? Which DDX are you using? Hopefully what I did following will help you work out xrandr command(s) that will give you what you want.

In Xorg startup script I put the following:
Code:
xrandr --output DVI-I-2 --primary --below DVI-I-1
On session start I opened an X terminal on the DVI-I-1 display and another X terminal on the DVI-I-2 display. Panel (toolbar) appeared on DVI-I-2 (primary) display. I ran
Code:
# xrandr
Screen 0: minimum 320 x 200, current 2560 x 2640, maximum 8192 x 8192
DVI-I-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200     59.95*+
   1920x1080     59.96    59.93
...
DVI-I-2 connected primary 2560x1440+0+1200 (normal left inverted right x axis y axis) 598mm x 336mm
   2560x1440     59.95*+
   1920x1440     60.00
...
# inxi -GxxS
System:    Host: big41 Kernel: 4.19.0-6-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0 Desktop: Trinity R14.0.7 tk: Qt 3.5.0
           wm: Twin dm: startx Distro: Debian GNU/Linux 10 (buster)
Graphics:  Device-1: NVIDIA G84 [GeForce 8600 GT] vendor: XFX Pine driver: nouveau v: kernel bus ID: 01:00.0
           chip ID: 10de:0402
           Display: server: X.Org 1.20.4 driver: modesetting unloaded: fbdev,vesa resolution: 1920x1200~60Hz, 2560x1440~60Hz
           OpenGL: renderer: NV84 v: 3.3 Mesa 18.3.6 direct render: Yes
# xrandr --output DVI-I-2 --off
in the terminal on the output DVI-I-1 display. This caused the terminal and panel to move from the DVI-I-2 display to the DVI-I-1 display and the DVI-I-2 display to go dark - all expected results from xrandr. I then closed the session.

On next session start I again opened an X terminal on the DVI-I-1 display and another X terminal on the DVI-I-2 display. Again the panel appeared on the DVI-I-2 display. I ran
Code:
# xrandr
Screen 0: minimum 320 x 200, current 2560 x 2640, maximum 8192 x 8192
DVI-I-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200     59.95*+
   1920x1080     59.96    59.93
...
DVI-I-2 connected primary 2560x1440+0+1200 (normal left inverted right x axis y axis) 598mm x 336mm
   2560x1440     59.95*+
   1920x1440     60.00
...
# inxi -GxxS
System:    Host: big41 Kernel: 4.19.0-6-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0 Desktop: Trinity R14.0.7 tk: Qt 3.5.0
           wm: Twin dm: startx Distro: Debian GNU/Linux 10 (buster)
Graphics:  Device-1: NVIDIA G84 [GeForce 8600 GT] vendor: XFX Pine driver: nouveau v: kernel bus ID: 01:00.0
           chip ID: 10de:0402
           Display: server: X.Org 1.20.4 driver: modesetting unloaded: fbdev,vesa resolution: 1920x1200~60Hz, 2560x1440~60Hz
           OpenGL: renderer: NV84 v: 3.3 Mesa 18.3.6 direct render: Yes
# xrandr --output DVI-I-1 --off
in the terminal on the output DVI-I-2 display. This caused the terminal to move from the DVI-I-1 display to the DVI-I-2 display and the DVI-I-1 display to go dark - all expected results from xrandr.
 
1 members found this post helpful.
Old 11-15-2019, 02:33 AM   #4
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 634

Original Poster
Rep: Reputation: 174Reputation: 174
Evo2:

Nope the monitors are labelled correctly. I have been doing this with a GUI application for years, and I am getting tired of it. The monitors are DVI-I-0 and DVI-I-1.
 
Old 11-15-2019, 02:35 AM   #5
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 634

Original Poster
Rep: Reputation: 174Reputation: 174
Mrmazda:

You are killing my brain!

I will have to do some actual thinking about this... I will get back with you in a day or two.... thank you for your suggestions, man.....
 
Old 11-15-2019, 08:01 AM   #6
bgstack15
Member
 
Registered: Jul 2017
Distribution: korora
Posts: 90

Rep: Reputation: Disabled
Perhaps you could use program "arandr" to save the settings for when you have the second monitor disabled. This program generates a shell script with the relevant xrandr commands, which you should be able to call from the command line.
 
Old 11-15-2019, 11:50 AM   #7
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 634

Original Poster
Rep: Reputation: 174Reputation: 174
Mrmazda:

You have forced me to think because of your response.
Not going to explain what I had done, but involved much profanity, coffee, and a desire to go for a drive to get away from my computers.

But, in the end, it worked.

Thank you!

We now return to our regularly scheduled chaos.....
 
Old 11-15-2019, 03:05 PM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,827
Blog Entries: 1

Rep: Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069
Quote:
Originally Posted by kevinbenko View Post
Mrmazda:

You have forced me to think because of your response.
That was part of my intent.

Quote:
...in the end, it worked.
That's the other part.

Quote:
Thank you!
You're welcome! Please click the Yes link in the bottom right corner of post #3 to show your appreciation.
 
Old 11-15-2019, 08:04 PM   #9
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 634

Original Poster
Rep: Reputation: 174Reputation: 174
Bugger.... I didn't know where to click to give you more "mojo"......thanks for clearing that up.....
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] KDE dual monitor unable to make a switch to a single monitor brick2 Linux - Desktop 3 07-04-2014 09:28 AM
[SOLVED] Red Hat v5 disabling single user runlevel logan_the_wolverine Linux - Newbie 6 02-21-2012 02:48 AM
disabling flickering of monitor b4 screensaver invocation gnurza Linux - Newbie 4 09-05-2007 08:17 AM
Disabling monitor shut off? R00ts Debian 2 03-14-2006 10:47 AM
Disabling single user when booting carcassonne Linux - Security 6 07-21-2005 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:00 AM.

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