Hi!
My quest for setting up a dedicated Apollo Lake based RetroArch system using Ubuntu 16.10 with KMS continues. My aim with this system is to basically set everything up and be done with it. I plan on using different TVs and monitors with the system (for example when bringing it to friends), so different resolutions need to be handled well. Without further ado, here’s the particular “issue” I have:
This system is 4K capable and the Intel video driver will output 4K if it detects such a screen on HDMI. The problem here is that I don’t want it to run in 4K, ever. I suspect I’m not alone in this. There are some drawbacks with 4K and they’re pretty much all related to performance. Everything from rendering to framebuffer handling in the driver slows down. This may be an issue for 3D rendered games, but it’s also an issue for the 2D consoles if one wants to reduce input lag by using performance sensitive settings such as max_swapchain_images and frame_delay. Besides, there really is very little point in using 4K with these old consoles/games.
So, why not just use the existing video_fullscreen_x/video_fullscreen_y settings in RetroArch? The problem with that solution is that it hardcodes the resolution. It’s also a problem for lower resolution screens that can take higher resolution content and scale it down. For example, my Samsung plasma has a native resolution of 1360x768, but also accepts 1920x1080. When I boot the system, the Intel driver correctly identifies the native 1360x768 resolution and uses it for the command line. However, with video_fullscreen_x/video_fullscreen_y set to 1920x1080, RetroArch will force this resolution when starting. The problem with that is twofold: 1) it actually usually looks worse than running at the lower native resolution and 2) it adds a couple of frames of input lag since the picture now needs to be passed through the TV’s built-in scaler before it can be shown.
I think two new video settings would be useful to handle this case: max_video_fullscreen_x and max_video_fullscreen_y
The way I see it working is:
From what I’ve seen, RetroArch normally applies the same resolution as the system is currently using for the display. The new settings max_video_fullscreen_x/y would have no effect at all for system resolutions equal to or lower than the one configured in these settings. However, if the system is currently using a resolution higher than the one used in these settings, RetroArch would constrain itself to the configured max resolution.
For my system, I would set max_video_fullscreen_x=1920 and max_video_fullscreen_y=1080. For any monitor or TV with 1920x1080 resolution or below, the system would behave exactly as today. For any higher resolution screen, such as 4K TVs, RetroArch would constrain itself to 1920x1080.
These settings are probably mostly interesting in the Linux/KMS case, which is what you’re most likely to use when setting RetroArch up in a console-like installation (meaning you don’t have access to a GUI/desktop and keyboard + mouse).
By the way, this is pretty much a continuation of the discussion held in this recent thread and suggests a way to handle this automatically instead of using manual re-configuration. I can also mention that I haven’t been able to find any automatic way of handling this directly in Linux.