Steam game display is wrong on multi-monitor setup under Linux
I have a multi-monitor setup on a Linux Mint system. My main monitor is 1980x1200 (16:10 ratio) and my secondary monitor stands pivoted (1050x1680) next to it. Steam itself works fine, even in big picture mode, but when I launch a game, it assumes my display is 1980x1680 and I only see the bottom half of the game screen.
Can I do anything about it without switching off my secondary display?
Solution 1:
How to solve your problem and more forever:
Setup a new user. I called mine "steam".
Install openbox. It's small and harmless: "sudo apt install openbox"
You can now select openbox as a login. It is an EXTREMELY lightweight session that opens only to a blank screen. You can right click the blank screen to get a terminal if you need it.
From the terminal or by logging in as that user normally, install steam for that user.
Find the name of the secondary monitor you don't care about by typing "xrandr" and figuring it out from the connector. If you don't have xrandr (I think you will) then "sudo apt install xrandr"
Create and edit a file "/home/steam/.config/openbox/autostart" (Replacing "steam" with whatever you named your user).
Put the following in the startup:
xrandr --output [your monitor] --off
sleep 2
steam &
Replacing your monitor with the one you don't want. Mine was "DVI-I-1" for example. If you're not sure, try the command from a terminal. It won't save it if you screw up, you can just log out.
Now when you want to play games you login as "steam" (or whatever) using the openbox login. Your secondary monitor is shut off and never a problem with anything. Additionally, you have no openGL compositor which can sometimes cause problems, and your system is running extremely lightweight using only 300 or 400 meg or so of RAM.
Solution 2:
I occasionally have to redo this when monitors get reset or something: It's a little similar to the others' answers that suggests xrandr. Run:
xrandr
This should output something similar to my dual monitors setup:
Screen 0: minimum 16 x 16, current 4920 x 2160, maximum 32767 x 32767
XWAYLAND37 connected 1080x1920+0+0 (normal left inverted right x axis y axis) 270mm x 480mm
1080x1920 59.96*+
XWAYLAND38 connected 3840x2160+1080+0 (normal left inverted right x axis y axis) 700mm x 390mm
3840x2160 59.98*+
Steam currently launches on the smaller screen and I want to use the 2nd larger screen, in this example called XWAYLAND38
. So I need to mark that as the primary (again).
xrandr --output XWAYLAND38 --primary
If you launch xrandr
again:
Screen 0: minimum 16 x 16, current 4920 x 2160, maximum 32767 x 32767
XWAYLAND37 connected 1080x1920+0+0 (normal left inverted right x axis y axis) 270mm x 480mm
1080x1920 59.96*+
XWAYLAND38 connected primary 3840x2160+1080+0 (normal left inverted right x axis y axis) 700mm x 390mm
3840x2160 59.98*+
The correct monitor is now marked as primary and games should launch on it.