Project

General

Profile

Emulator Issues #6072

Allow to change refresh rate on fullscreen mode under X11 multimonitor setups

Added by tomman almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Feature request
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

It's nice to see emulators that actually care about multimonitor setups, allowing the user to pick on which display where I want to run the emulator. Also it's nice to see XRandR support on mainstream X11 GPU video drivers to be mostly solid.

However, in my case, a interesting problem arises: My gaming setup is kinda unusual:
- Laptop panel [LVDS1]
- Good ol' CRT TV plugged through a HDMI-to-CVBS converter box, since modern laptops no longer ship with S-Video outputs [HDM11]

The HDMI converter box announces the following supported resolutions:
HDMI1 connected 800x600+1366+0 (normal left inverted right x axis y axis) 160mm x 90mm
1920x1080 60.0 +
1600x1200 60.0

1680x1050 60.0

1280x1024 75.0 60.0

1440x900 75.0 59.9

1280x960 60.0

1280x800 59.8

1152x864 75.0

1280x720 60.0

1024x768 75.1 70.1 60.0

832x624 74.6

800x600 72.2 75.0 60.3* 56.2

640x480 72.8 75.0 66.7 60.0

720x400 70.1

I've set my HDMI output to 800x600@60.3Hz. This converter box in particular has a quite interesting flaw: it only outputs video if set to 60 or 75Hz, and in the case of 800x600, the other two refresh rates cause the box to just output NTSC test colorbars (Blame fly-by-night chinese OEMs, but noone makes HDMI CRT TVs nowadays...).

Now to the point: when I set Dolphin to run on HDMI1 at 800x600, start a game, then go fullscreen, it uses the XRandR extension to pick the proper video mode. After reading X11_Utils.cpp, when Dolphin requests 800x600 to XRandR, it returns a list of supported modes, and picks the first one of the list. In my case, as you can see on my commandline xrandr output, the very first mode is 800x600@72.2Hz... which triggers the bug on my converter box, leading to no video, and therefore no game. The workaround in my case is to manually set the refresh rate using another application (for example, xrandr commandline, or the desktop environment monitor settings applet) after starting the game. Obviously this becomes quite annoying.

My idea would imply to
1) Append the refresh rate (as specified by XRandR) into the supported video modes list on Video Settings, or
2) Include a extra box to select the desired refresh rate independently of the video mode (The emulator should fallback to the nearest rate should the user introduce some out-of-range value for the desired resolution).

Have you searched the issue tracker for a similar issue?
issue 3631 describes a remotely similar case, but the bug reporter most likely was under Windows. Under X11, thanks to XRandR there is no such limitation.

What version of Dolphin were you using?
Git master, built from source

64 or 32 bit Dolphin?
64-bit

What Operating System were you using and what are your hardware
specifications?
Debian Wheezy/testing on a ASUS K53SD:
- Core i5-2450M (Sandy Bridge)
- Intel HD3000 / nVidia GeForce 610M (through bumblebee/Primus)
- 6GB RAM / 750GB HDD
No-name HDMI-to-CVBS converter box plugged to a analog Samsung CRT TV

64 or 32 bit Operating system?
AMD64

Any other relevant information or links to logs:

History

#1 Updated by Billiard26 almost 6 years ago

  • Issue type set to Feature request

#2 Updated by silfong over 5 years ago

I need customizable refresh rate too, I'm using a CRT monitor

#3 Updated by silfong over 5 years ago

other emulators, such as ppsspp and pcsx2, don't require user to set refresh rate explicitly, they use the refresh rate that are currently in use when switching to full screen mode.

#4 Updated by silfong over 5 years ago

Why can't Dolphin act like other emulators, such as PPSSPP and PCSX2? they don't require configuration of screen resolution & refresh rate, but just use the current screen resolution & refresh rate when switch to full screen.

#5 Updated by tomman over 5 years ago

Well, it depends on how the emulator does the switch to fullscreen. It also depends greatly on the monitor specs. As you can see, in the list of supported video modes of my converter box, there isn't a common refresh rate for all modes (most of them do support 60Hz, but some resolutions have slighty different refresh rates, and at least one of the modes don't even support anything near that)

On most modern displays, you get lucky since you have a small array of modes and all of them support the same refresh rate (this is particulary true for laptop panels as they are often locked to a SINGLE refresh rate, 60Hz). But on HDTVs, fancy expensive gamer panels, and good ol' CRTs... well, it becomes messy.

I don't know how PPSSPP/PCSX2 do the switch to fullscreen, but in the case of Dolphin, it takes the "lazy" approach: it simply requests the desired resolution to XRandR, and it switched to the first supported video mode for that resolution. This is not a problem on, say, a laptop panel with a single refresh rate. But on a CRT or crappy HDMI LCD device with wonky EDID data... well, you get any mode but the desired one. There are workarouns for this, but it all boils down to hacked EDIDs or dirty hacks on your Xorg.conf (which goes largely unused these days, so there should be no reason to even touch it if XRandR provides a more comprehensive way to do things right).

The solution proposed here should be simple. Dolphin already enumerate video modes, it just discards the refresh rates. Just list COMPLETE video modes (would make for a longer and potentially messy list of modes, but IMHO it's the "cheapest" solution), or add a separate combo box listing all supported refresh rates, and handle unsupported video modes gracefully (for example, if user requests a unsupported refresh rate for certain mode, fallback to the nearest video mode for the requested resolution).

I would do it, but I have minimal experience with X11 development in general :P

#6 Updated by pauldacheez over 5 years ago

You could just do what we used to do on OS X and switch the fullscreen mode to make a (borderless?) window that covers the whole screen and cares as little about your monitor's resolution/refresh rate as every other app does.

#7 Updated by rachelbryk over 5 years ago

That should be what the auto fullscreen option does.

Also available in: Atom PDF