Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.