Emulator Issues #6072
Allow to change refresh rate on fullscreen mode under X11 multimonitor setups
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 +
1280x1024 75.0 60.0
1440x900 75.0 59.9
1024x768 75.1 70.1 60.0
800x600 72.2 75.0 60.3* 56.2
640x480 72.8 75.0 66.7 60.0
I've set my HDMI output to firstname.lastname@example.orgHz. 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 email@example.comHz... 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?
What Operating System were you using and what are your hardware
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?
Any other relevant information or links to logs:
#5 Updated by tomman over 7 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