Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My current setup is:
* Dual GTS 250 video cards
* 3 Monitors
* Used nvidia-settings to run each monitor as a separate x session
* This is all running on Linux Mint Debian Edition

When running games (Starcraft II) in Wine via PlayOnLinux, I've found that the mouse does not get locked. I already tried various solutions littered across the web and none work so I'd rather just disable my other two monitors while playing. Does anyone know of a method where I can turn off my other two monitors (not my primary monitor) while running Wine and then turn then back on afterwards? I don't mind having to manually run a script before and after gaming. Thanks.

@new123456
Thanks for the suggestion but I've already attempted that route. Perhaps you may be able to help figure out why I couldn't get it to work. This is the output of my xrandr for each of my monitors (I get a different xrandr depending on which X session (i.e. monitor) I try xrandr on):

Primary Monitor

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 320 x 175, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm
   1920x1080      50.0*    51.0     52.0     53.0     54.0     55.0     56.0     57.0  
   1680x1050      58.0     59.0     60.0  
   1600x1024      61.0  
   1440x900       62.0  
   1400x1050      63.0     64.0     65.0     66.0  
   1360x768       67.0     68.0  
   1280x1024      69.0     70.0     71.0  
   1280x960       72.0     73.0  
   1280x800       74.0  
   1280x720       75.0     76.0     77.0  
   1152x864       78.0     79.0     80.0     81.0     82.0     83.0     84.0  
   1024x768       85.0     86.0     87.0     88.0     89.0     90.0     91.0  
   960x720        92.0     93.0     94.0  
   960x600        95.0  
   960x540        96.0  
   928x696        97.0     98.0  
   896x672        99.0    100.0  
   840x525       101.0    102.0    103.0    104.0    105.0  
   832x624       106.0  
   800x600       107.0    108.0    109.0    110.0    111.0    112.0    113.0    114.0    115.0    116.0  
   800x512       117.0  
   720x576       118.0    119.0  
   720x480       120.0    121.0  
   720x450       122.0  
   720x400       123.0  
   700x525       124.0    125.0    126.0    127.0  
   680x384       128.0    129.0  
   640x512       130.0    131.0    132.0  
   640x480       133.0    134.0    135.0    136.0    137.0    138.0    139.0  
   640x400       140.0  
   640x350       141.0  
   576x432       142.0    143.0    144.0    145.0    146.0    147.0    148.0  
   512x384       149.0    150.0    151.0    152.0    153.0  
   416x312       154.0  
   400x300       155.0    156.0    157.0    158.0    159.0  
   360x200       160.0  
   320x240       161.0    162.0    163.0    164.0  
   320x200       165.0  
   320x175       166.0  

Second Monitor

xrandr: Failed to get size of gamma for output default
Screen 1: minimum 320 x 240, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
   1280x1024      50.0*    51.0  
   1280x960       52.0  
   1152x864       53.0     54.0     55.0     56.0  
   1024x768       57.0     58.0     59.0     60.0  
   960x600        61.0  
   960x540        62.0  
   840x525        63.0     64.0     65.0  
   832x624        66.0  
   800x600        67.0     68.0     69.0     70.0  
   720x450        71.0  
   700x525        72.0     73.0  
   680x384        74.0     75.0  
   640x480        76.0     77.0     78.0     79.0     80.0  
   640x400        81.0  
   640x360        82.0  
   512x384        83.0     84.0  
   400x300        85.0  
   320x240        86.0     87.0  

Third Monitor

xrandr: Failed to get size of gamma for output default
Screen 2: minimum 320 x 175, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
   1280x1024      50.0*    51.0     52.0  
   1280x960       53.0  
   1152x864       54.0     55.0     56.0     57.0     58.0     59.0  
   1024x768       60.0     61.0     62.0     63.0     64.0     65.0     66.0  
   960x720        67.0  
   960x600        68.0  
   960x540        69.0  
   928x696        70.0  
   896x672        71.0     72.0  
   840x525        73.0     74.0     75.0     76.0     77.0  
   832x624        78.0  
   800x600        79.0     80.0     81.0     82.0     83.0     84.0     85.0     86.0     87.0     88.0  
   800x512        89.0  
   720x450        90.0  
   720x400        91.0  
   700x525        92.0     93.0     94.0     95.0  
   680x384        96.0     97.0  
   640x640        98.0  
   640x512        99.0    100.0    101.0  
   640x480       102.0    103.0    104.0    105.0    106.0    107.0    108.0    109.0  
   640x400       110.0  
   640x350       111.0  
   576x432       112.0    113.0    114.0    115.0    116.0    117.0    118.0  
   512x384       119.0    120.0    121.0    122.0    123.0  
   416x312       124.0  
   400x300       125.0    126.0    127.0    128.0    129.0  
   360x200       130.0  
   320x240       131.0    132.0    133.0    134.0  
   320x200       135.0  
   320x175       136.0  

I could not figure out from the above outputs what I should be using for the --output flag. I assumed it was default and tried the following:

~ $ xrandr --output default --off
xrandr: Failed to get size of gamma for output default

but as you can see, it didn't work. Additionally, since all three xrandr outputs list the monitor as default, I wouldn't know how to turn my other monitors back on afterwards (if the command did work). Do you know what might be wrong in my nvidia-settings or what else I could try?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Reading your question again, its apparent why xrandr didn't work.

You may want to just kill your additional Xorg sessions when you want to play the game - you can do this by running

ps ax | grep "X"

which will output something like this:

2449 tty7     Ss+    2:58 /usr/bin/X :0 -audit 0 -auth /var/state/gdm/:0.Xauth -nolisten tcp vt7

In this case, you'll want to kill anything that doesn't have an :0 in the output (it will instead have :1, :2, etc.).


You can then do whatever, and bring them back up later by running:

xinit -- :1 &
xinit -- :2 &

This uses the default X session (found in ~/.xinitrc) on the other two monitors.

share|improve this answer
    
I added some more detail on my setup. I've already tried this and it didn't work but perhaps you can point out what I might have done wrong. Thanks. –  Michael Cheng Feb 26 '11 at 18:01
    
Thanks this works though I did something slightly different. Once you pointed out that I could actually kill the process, I decided to create another X session as a regular user that I could switch to with Ctrl+Alt+F8. Then I'd just run the game here and kill this new session once I didn't need it anymore. That way I didn't have to kill any of my normal sessions, and I could switch back to my normal session with Ctrl+Alt+F7. –  Michael Cheng Feb 28 '11 at 17:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.