Older 8-bit and 16bit systems, or arcade systems from the 80s and 90s were using 4:3 CRT screens. Modern displays are now 16:9 or wider, and can go up to 4K, i.e. 2160 pixels high (compared to 480 or 546 at the time!).

Having so many pixels to render on the screen is impactful on the system performance. When you have a 4K screen or an ultra-wide screen, Batocera will limit the resolution by default to HD 1920×1080. It's more than enough to render emulators, even the most recent one. However, when you have an ultra-wide monitor, display is stretched.

For 4K monitors, because the resolution is by default resized to 1920×1080, you might see a screen that looks like this one - actually it's what 1920×1080 is, centered in a 3840×2160 screen:

In order to cover the whole screen, the best solution is to set the VIDEO MODE to 1920×1080 – you can do that on a system-by-system basis in the PER SYSTEM ADVANCED CONFIGURATION screen.

Another use case is when you have a 1280×720 TV, for example, and you want to use bezels that are designed for 1920×1080. Batocera can automatically resize the bezels, but sometimes you need to force the VIDEO MODE to take your 1280×720 resolution.

If you absolutely want to use the 4K resolution for whatever reason (shaders looking better, you have a non-standard wide format on your TV/monitor…), you can force the STRETCH BEZEL option too. Same thing, this is something you can do on a system-by-system basis. Warning: this has an impact on the emulation performance.

There are some SBC + TV combinations where EmulationStation feels sluggish (default theme seems to be lagging behind, with a refresh rate like 10 FPS). It's really depending on your own configuration, but we have reproduced this with a Raspberry Pi4 and a couple 4K TV models. By default, ES should negotiate with your TV to fix its resolution to 1080p, but sometimes your TV brand doesn't accept it and stays at 4K/2160p resolution.

To force 1080p in those cases, in Batocera 31+ edit /boot/batocera-boot.conf and put:

es.resolution=max-1920x1080

This means that Batocera will take the most suitable resolution with a maximum of 1920×1080.

Don't forget that, in order to edit /boot/batocera-boot.conf, you need to remount the file system in read/write mode.

You can get the list of all supported resolution by typing batocera-resolution listModes. If you want to force an exact resolution, you can put es.resolution=1280×800 for instance.

Warning: for earlier versions of Batocera (v29 and v30), you need to edit batocera.conf and add a line:

system.es.maxresolution=1920x1080

This shouldn't be necessary for most TVs, though, and the default mode can be set back with es.maxresolution=0 (or just comment out or remove the line in batocera.conf or /boot/batocera-boot.conf).

1. On Batocera 31, know what are the resolutions available on your system + TV combination by entering the command batocera-resolution listModes:

 # batocera-resolution listModes
 max-1920x1080:maximum 1920x1080
 max-640x480:maximum 640x480
 1280x720:1280x720
 4096x2160:4096x2160
 3840x2160:3840x2160
 1920x1080:1920x1080
 1920x1080i:1920x1080i
 1600x1200:1600x1200
 1680x1050:1680x1050
 1400x1050:1400x1050
 1280x1024:1280x1024
 1440x900:1440x900
 1280x960:1280x960
 1366x768:1366x768
 1360x768:1360x768
 1280x800:1280x800
 1280x768:1280x768
 1024x768:1024x768
 800x600:800x600
 720x576:720x576
 720x576i:720x576i
 720x480:720x480
 720x480i:720x480i
 640x480:640x480

2. Then, choose the mode from the list that is the one you want to force to RetroArch. For example, if I want to force 1024×768 for the emulators, I can add in my /boot/batocera-boot.conf:

 es.resolution=1024x768

Emulators will then all select the same mode from the list above as their screen resolution. If I want to select a specific resolution only for a specific emulator, I can do that with from EmulationStation.

Batocera 5.27 and later will automatically resize 1920×1080 bezels to ultrawide by adding black borders on the sides. It will also resize full HD 1080 bezels to HD-ready 720p, or any resolution with an aspect ratio >= 16:10 – yes, 16:9 > 16:10 ;-)

3. If you ask for a 4K 3840×2160 resolution, but with a bezel that is HD 1920×1080, by default Batocera will add black borders around the bezel, like on the picture above. If you want your display to be full screen, you can either:

  1. switch to a lower resolution (like 1920×1080)
  2. add a line mame.bezel_stretch=1 in your batocera.conf for each emulator you want to stretch. Or global.bezel_stretch=1 if you want to enable stretching to your native 4K resolution. WARNING this has an impact on the emulation performance.

This section is for PC x86 and x86_64, not for SBCs like Raspberry Pi or Odroid, and mostly outdated as most cases should be handled with the section above.

This tutorial is useful if you have display issues, for instance if you need to rotate your screen, or anything else.

For example, I have a 4k UHD TV, Batocera will display the highest display resolution available on my screen, but 4k isn't good for emulation: it's lagging. So, I need to force a smaller resolution.

First of all, you need to connect on your Batocera through SSH. You can find a “How to” by following this link.

Okay, now you're connected on your Batocera, let's begin.

# cp /etc/X11/xinit/xinitrc ~/.xinitrc
# export DISPLAY=:0.0
# xrandr

If you have an error message telling you “can't open display :0.0”, you need to physically log onto your Batocera system with the graphic display on. On a PC from EmulationStation, press F1 and then launch a terminal from there (F4).

Search this section on xrandr :

Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767
LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 290mm x 160mm
1366x768 60.03*+ 40.03
1024x768 60.00
1024x576 60.00
960x540 60.00
800x600 60.32 56.25
864x486 60.00
640x480 59.94 

Here's the available display resolution for your screen. This is an example with an old 4/3 screen, but this is the same principle for other screens.
The current resolution is marked with a “ * ”. I want to change it, so let's use vi - or any other text editor you are familiar with :

# vi ~/.xinitrc

You'll see a section with:

#####################
## CUSTOMISATIONS ###
# to customize your display, you can copy this file to ~/.xinitrc and then modify it

# rotate the screen
# xrandr -o left
# xrandr -o right
# xrandr -o inverted

# change the resolution
# xrandr -s 640x480

# change the resolution and the Hz
# xrandr -s 640x480 -r 60

#####################
#####################

Just uncomment the corresponding line. In my case, I want to force the 64×480 mode, so I just remove the first # character to:

...
# change the resolution
xrandr -s 640x480

# change the resolution and the Hz
...

Let's save and quit ([Esc]:wq for vi).
Actually, your Batocera's display isn't in full screen yet. You must see it only partially, so you have to enter the following commands into your SSH session:

# exec emulationstation --windowed

Then restart Emulstation :

# /etc/init.d/S31emulationstation stop
# /etc/init.d/S31emulationstation start

Batocera should be in full screen with the right resolution.
/!\ BUT /!\ if you reboot the Batocera system, you'll have to do this again, the resolution is forced just for this boot, next boot, resolution will be reset to the highest available again.
We need to force it for every boot.
As you can see at the beginning of this tutorial, we copied the xinitrc file to a temporary folder.
We need to erase the current xinitrc file with our modified version. It is the same as the first code block, but reversed:

# cp ~/.xinitrc /etc/X11/xinit/xinitrc
# batocera-save-overlay

Now, reboot your Batocera system, the display resolution should be good.
Also, xrandr can do screen rotation: very useful for old vertical screen arcade machines !

Hope this was easy for all.

  • display_issues.txt
  • Last modified: 4 weeks ago
  • by lbrpdx