Opened 3 years ago

Closed 16 months ago

Last modified 4 months ago

#7129 closed defect (outdated)

Cannot run ScummVM full screen on a single XRandR output

Reported by: SF/rrt Owned by: csnover
Priority: normal Component: Port: Linux
Keywords: Cc:


FAQ 5.18 documents how to run ScummVM on a single screen (I've submitted some improvements to the answer in bug #7128).

However, this tip does not work for GNOME 3, or other systems that only have one X screen for multiple outputs (monitors).

It would be nice to have a fix for this, but I guess that is a matter for SDL? If so, I'm happy to submit a suitable bug report/feature request to SDL.

In the mean time, it would be nice to document this problem, for example, by adding to the FAQ answer:

Note that if you use GNOME 3, or another system that combines multiple outputs (monitors) into a single X screen, this fix won't work.

Of course, it would be even better to offer a workaround. Unfortunately, it's a bit tedious: the best way I can find is to switch off all but one display, then start ScummVM, then after quitting ScummVM, switch the other displays back on, and assign them their correct relative positions in the X screen.

I wrote a script to automate this process, which I append below:

#!/usr/bin/env python3
# Run a command on a single display output
# (Working around the lack of a way to ask SDL for a single output)
# © Reuben Thomas 27th April 2016
# Distributed under the GNU General Public License version 3, or (at
# your option) any later version. There is no warranty.

import sys
import re
import subprocess

# Get XRandR outputs, and identify the primary
# FIXME: read and set rotation too
primary_output = None
other_outputs = []
other_positions = []
for line in subprocess.check_output(['xrandr']).splitlines():
    m = re.match('^([^ ]+) connected (primary)?.*\+([^+]+)\+([^ ]+)', str(line, 'UTF_8'))
    if m:
        if != None:
            primary_output =
            other_positions.append( + 'x' +

if primary_output == None:
    raise ValueError('No primary output found')

# Construct XRandR command to switch off other monitors
off_cmd = ['xrandr']
on_cmd = ['xrandr']
for i, output in enumerate(other_outputs):
    off_cmd += ['--output', output, '--off']
    on_cmd += ['--output', output, '--auto', '--pos', other_positions[i]]

# Run given command wrapped with monitor switching commands
#print (off_cmd, on_cmd)

Ticket imported from: bugs/7129.

Change History (2)

comment:1 Changed 16 months ago by csnover

Owner: set to csnover
Resolution: outdated
Status: newclosed

This looks to be related to old SDL1 stuff. SDL2 uses desktop fullscreen and processes Xinerama information by default so should not have Xinerama problems, so I am closing this ticket as outdated. If this is not the case please write on this ticket and it can be reopened.

comment:2 Changed 4 months ago by digitall

Component: Port: Linux
Note: See TracTickets for help on using tickets.