How to Run Fullscreen Games In Linux With Dual Monitors

Sometimes video games under Linux go crazy and full screen mode starts on totally wrong monitor. And basically there is no way to tell wine which monitor to use.

This work around worked for me

  1. disable monitor which you do NOT want to be used
  2. start game in full screen mode and let window manager/wine/whatever remember it’s position
  3. enable second monitor back
  4. fix display positions


Visual way

On Ubuntu just go to ‘System configuration’/’Displays’, display your monitor you do not want game to use and then run game. After it remembers settings, turn monitor on back again.

Command line way

Some people like it hard way, so here is how to do it from command line.

Step 1

To find our which monitors do you have just run xrandr command

Screen 0: minimum 320 x 200, current 3520 x 1080, maximum 8192 x 8192
LVDS connected primary 1600×900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1600×900 60.1*+
HDMI-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected 1920×1080+1600+0 (normal left inverted right x axis y axis) 510mm x 290mm
1920×1080 60.0*+

You are interested to find display names – they are in bold.

Then issue following command to turn off the monitor

xrandr –output VGA-0 –off

Step 2

Run game as usual in fullscreen mode.

Step 3

Turn monitors back and assign primary/secondary roles

xrandr –output VGA-0 –noprimary –auto
xrandr –output LVDS –primary

–auto argument tells xrandr to fidn mode suitable for monitor best and turn it on.

Step 4

You may need to run ‘System configuration’/’Display’ control panel to fix display mirroring/position.

Afterwards the game should start on correct display.