Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
display_issues [2020/01/28 20:38] – created genetik57display_issues [2024/02/23 02:17] (current) – [I see the Batocera splash screen, but then it turns black/no input] lbrpdx
Line 1: Line 1:
-~~NOTOC~~ +====== Display Troubleshooting ====== 
-===== Display issues, where xrandr is your friend ===== + 
-This tutorial is useful if you have display issuesfor instance if you need to rotate your screenor anything else.\\ +===== I have no display ===== 
-\\ + 
-For examplehave a 4k UHD TV, Batocera will display the highest display resolution available on my screenbut 4k isn't good for emulation: it's lagging. So, I need to force smaller resolution.\\ +If you know Batocera is booting (the network share is available, you can SSH inyou hear some musicetc.) but you have no displayit could be that Batocera is using a different display than intended. The simple solution to this is to unplug and replug the display, Batocera should automatically switch over to the newest display that was plugged in (sometimes, laptop that is plugged in to its external port will "connect" that first before connecting its internal displaycausing the internal display to be connected "last"). 
-\\ + 
-First of all, you need to connect on your Batocera through SSHlet's use Putty for this!\\ +If that still isn't working, try [[:access_the_batocera_via_ssh|SSH'ing in]] and run the following:
-You can find a "How to" by following [[en:access_the_batocera_via_ssh |this link]].+
  
-Okay, now you're connected on your Batocera, let's begin.\\ 
 <code> <code>
-# cp /etc/X11/xinit/xinitrc ~/.xinitrc +export DISPLAY=:0.0 
-export DISPLAY=:0.0 +batocera-resolution listOutputs 
-# xrandr+batocera-resolution setOutput <your intended output here>
 </code> </code>
-Search this section on xrandr :\\+ 
 +If that //still// isn't working, then it's recommended to skip straight to the [[#my_edid_is_not_working_on_my_raspberry_pi_specifically|advanced display debugging]]. 
 + 
 +==== I see the Batocera splash screen, but then it turns black/no input ==== 
 + 
 +It is possible that the official graphics drivers have not been automatically detected and used, and the fallback open-source alternative driver is not able to provide the display output (typical if on "bleeding-edge" hardware released in the last year). If that's the case, [[:supported_pc_hardware|they can be manually activated]] by editing the ''batocera-boot.conf'' file. 
 + 
 +If the correct drivers are being used and it's still not working, it's possible that the prime switcher also needs to be toggled (common on modern laptops connected to external displays). In case Batocera hasn't been able to automatically detect this for you, [[:supported_pc_hardware#hybrid_optimus_nvidia_laptops|you can manually activate the prime switching]] by editing the ''batocera-boot.conf'' file. 
 + 
 +It can also be the case of a dead USB flash disk. The USB flash drive isn't "dead enough" to prevent from booting, but some there are missing parts in the boot sequence and it just hangs at some point, and we've seen this happening after the splash screen. In doubt, try with another USB flash drive. 
 + 
 +If using a HP EliteDesk specifically, [[:usff_nuc_mini_pcs#hp_mini_micro_small_form_factor_pcs|it may require certain BIOS settings]] or else the GPU might be disabled by the motherboard. 
 + 
 +As a general rule, when you face a black screen during the boot sequence, it can be helpful to [[troubleshooting#verbose_boot|enable verbose boot mode]] for troubleshooting. 
 + 
 +===== The edges of my screen are cut off! ===== 
 + 
 +Most modern TVs come with some sort of setting that slightly zooms in the image. This is normally done to prevent garbage pixels from displaying in broadcasts (remnant of a bygone era). Normally, the TV is meant to turn this off when using an input device like a PlayStation or a computer, but sometimes it fails to recognize this and keeps it on. Usually you can turn it off manually in that case. 
 + 
 +This setting does not have a consistent name between manufacturers. Names to look out for while scouring through your option menus: "Just scan", "Pixel ratio", "Zoom", "Aspect", "Overscan", etc. These may be in either your per-channel settings or your system settings. 
 + 
 +===== My screen keeps blinking ===== 
 + 
 +It could be that the TV reports as supporting a refresh rate it isn't actually tuned for, occasionally slipping outside of the expected range (which cuts off the signal momentarily). In this case, try different "similar" refresh rates, eg. if on a 60Hz display try 59.98Hz. For PCs, first try testing the different resolutions as specified in the [[#display_issues,_when_xrandr_is_your_friend|xrandr]] section below, then [[#force_any_specific_supported_resolution_in_es_instead_of_the_default_maximum_one|save it to apply on boot]]. 
 + 
 +If on a device that uses the DRM service specifically (such as [[:choose_a_single_board_computer#various_android_tv_boxes|Android TV boxes]] and [[:choose_a_single_board_computer|other SBCs]]), as weird as this sounds try booting back into the eMMC Android firmware and set the resolution to the "closest to native" as you can get for that box. For instance, if the box was to support 4K displays, set the resolution to 2160p in Android (this is irrelevant of what resolution you want to use for Batocera itself). When you reboot back into Batocera, the flashing screen problem may be solved. 
 + 
 +===== Emulation with 4K and ultrawide monitors, or problems when your screen is not fully displayed ===== 
 + 
 +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 1920x1080. It's more than enough to render emulators, even the most recent ones. However, when you have an ultra-wide monitor, the display may be stretched.  
 + 
 +For 4K monitors, because the resolution is by default resized to 1920x1080, you might see a screen that looks like this one (actually it's what 1:1 pixel scaled 1920x1080 is, centered in a 3840x2160 screen): 
 + 
 +{{ :minihd_in_4k.png?nolink&500 |}} 
 + 
 +First, check your TV's scaling settings to ensure that it is currently set to "Stretch", "Full screen", "Expand", "Fill" or some terminology similar to that. 
 + 
 +If you've checked for that and the image is still tiny, the best solution is to manually set the resolution to "1920x1080" (or "MAXIMUM 1920x1080") in **MAIN MENU** -> **GAMES SETTINGS** -> **VIDEO MODE** (you can instead do that on a system-by-system basis in the **PER SYSTEM ADVANCED CONFIGURATION** screen). 
 + 
 +{{ :es_video_mode.jpg?nolink&500 |ES's video mode screen shows a list of available resolutions/their alternate modes.}} 
 + 
 +Another use case is when you have a 1280x720 TV, for example, and you want to use bezels that are designed for 1920x1080. Batocera can automatically resize the bezels, but sometimes you need to force the **VIDEO MODE** to take your 1280x720 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...), set the **VIDEO MODE** to "3840x2160" (turn on the **STRETCH BEZEL** option to force the use of bezels designed for 1920x1080 on your 4K resolution, stretching bezels is not available in Batocera **5.27** and lower). As above, this is something you can do on a system-by-system basis instead. 
 + 
 +<WRAP center round important> 
 +Setting the resolution to force 4K has an impact on the emulation performance. 
 +</WRAP> 
 + 
 +==== Everything is appearing too small in the file manager! ==== 
 + 
 +If you use Batocera with a display that provides a high resolution like a 4K monitor, you might have trouble reading the text on the file manager (''[F1]'' on the system list on PC) or the configuration screens of a few emulators. You can change the default DPI settings by editing ''batocera.conf'' and look for the section:  
 + 
 +  ## DPI 
 +  ## Workaround when correct DPI setting is not detected 
 +  ## if fonts are too small, uncomment next line 
 +  #global.dpi=96 
 + 
 +===== When EmulationStation feels sluggish on a 4K TV ===== 
 + 
 +<WRAP center round info> 
 +This shouldn't be necessary for most TVs that provide a proper EDID packet, but is here for those specific situations where they don't. 
 +</WRAP> 
 + 
 +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 Pi 4 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. You can force a particular resolution by [[:edit_boot_partition|editing]] it into ''/boot/batocera-boot.conf''
 + 
 +==== Force 1080p as the maximum resolution despite what the EDID may report ==== 
 + 
 +In Batocera **v31** and higher, the ''max-1920x1080'' resolution is now an option available to select within the standard ''es.resolution'' key in ''/boot/batocera-boot.conf''. To force a maximum resolution of 1920x1080, [[:edit_boot_partition|open the batocera-boot.conf file]] and add/alter the following line: 
 + 
 +<code> 
 +es.resolution=max-1920x1080 
 +</code> 
 + 
 +You can also force a maximum resolution of 640x480 instead for really slow devices: 
 + 
 +<code> 
 +es.resolution=max-640x480 
 +</code> 
 + 
 +<WRAP center round important> 
 +For earlier versions of Batocera (**v29** and **v30**), this option cannot be selected in ''es.resolution'' (it will be ignored). Instead, you must use a different key in ''batocera-boot.conf'': 
 + 
 +<code> 
 +system.es.maxresolution=1920x1080 
 +</code> 
 +</WRAP> 
 + 
 +After this, Batocera will take the most suitable refresh rate for the maximum resolution specified and use that. 
 + 
 +==== Force any specific supported resolution in ES instead of the default maximum one ==== 
 + 
 +You can get the list of all supported resolution modes by running the following commands [[:access_the_batocera_via_ssh|via SSH]]: 
 + 
 +<code> 
 +export DISPLAY=:0.0 
 +batocera-resolution listModes 
 +</code> 
 + 
 +For example: 
 + 
 +{{:new_video_listoutputs.png|SSH session showing a large list of video modes reported by the display's EDID.}} 
 + 
 +Any resolution listed here can be used in the ''es.resolution'' line in ''/boot/batocera-boot.conf''. For example, [[:edit_boot_partition|open the batocera-boot.conf file]] and add ''es.resolution=1280x720.59.94'' to force ES to run at a resolution of 1280x720. 
 + 
 +===== My EDID is not working on my Raspberry Pi specifically ===== 
 + 
 +Certain Raspberry Pis seem to have a hard time parsing the display's EDID information correctly, to the point that it fails to even overwrite it using the above method. The Raspberry Pi can be forced to ignore the faulty EDID to allow Batocera to use whichever resolution it wants. 
 + 
 +Navigate to ''boot/config.txt'' and add the following lines: 
 + 
 +<code ini> 
 +hdmi_ignore_edid=0xa5000080 
 +hdmi_group=1 
 +</code> 
 + 
 +Then any HDMI mode can be used (even ones that your display won't work with, be careful!). Refer to [[https://www.raspberrypi.com/documentation/computers/config_txt.html#video-options|Raspberry Pi's official documentation]] for more information. 
 + 
 +===== Display issues, when xrandr is your friend ===== 
 + 
 +**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 use a lower refresh rate.  
 + 
 +<WRAP center round important> 
 +On Batocera **v30** and lower, Batocera would simply select the highest available resolution + refresh rate your display reports as supported. Obviously, when running Batocera on weak SBCs like the Raspberry Pi connected to a 4K UHD TV, this would cause visual stutter as the SBC isn't powerful enough to output a 4K resolution at 60 FPS. You would need to force a smaller resolution (like 1920x1080) to get better performance in this scenario. 
 + 
 +Fortunately, from Batocera **v31** and higher, Batocera will default to using the 1920x1080 resolution as its maximum (and if you have one of those rare displays that support 120Hz or higher, it will default to that too for silky-smooth menu navigation! But only in EmulationStation, in-game will still be 60Hz by default). You can switch to using a genuine 4K resolution by setting your **VIDEO MODE** in **GAME SETTINGS** to 3840x2160, though even this won't have much a visual difference for most retro-games. 
 +</WRAP> 
 + 
 +First of all, you need to [[:access_the_batocera_via_ssh|connect on your Batocera through SSH]]. Then run the following commands: 
 + 
 +<code> 
 +export DISPLAY=:0.0 
 +xrandr 
 +</code> 
 + 
 +This will output your display's reported "supported resolutions" (the currently used refresh rate will be marked with an asterisk (*) on the line of the current resolution being used). This is an example with an old 4/3 screen, but this is the same principle for other screens: 
 <code> <code>
 Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767 Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767
Line 26: Line 164:
 640x480 59.94  640x480 59.94 
 </code> </code>
-Here's the available display resolution for your screenThis is an example with an old 4/3 screenbut this is the same principle for other screens.\\ + 
-The current resolution is marked with "I want to change itso let's use //vi// - or any other text editor you are familiar with :\\+<WRAP center round help> 
 +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 display onOn PC from EmulationStation, press ''[F1]'' and then launch a terminal from there (''xterm'' from the **Applications** shortcut in the left sidebar). 
 +</WRAP> 
 + 
 +If you'd like to edit the display outputyou can add your modification in a script ''/userdata/system/custom-es-config'' that will be automatically invoked by ''/usr/bin/emulationstation-standalone''.  
 + 
 +You can edit the file from SSH by running the following: 
 <code> <code>
-# vi ~/.xinitrc+nano /userdata/system/custom-es-config
 </code> </code>
-You'll see a section with:+ 
 +and then saving that file to ''/userdata/system/custom-es-config'' with ''[Ctrl]'' + ''[O]''
 + 
 +<WRAP center round important> 
 +For Batocera **v31** and lower, this would be ''nano /userdata/system/.xinitrc'' instead. 
 +</WRAP> 
 + 
 +The most usual customisations are already described in ''/usr/bin/emulationstation-standalone''. If you browse the file and scroll down (using the arrow keys) to the following section: 
 <code> <code>
 ##################### #####################
 ## CUSTOMISATIONS ### ## CUSTOMISATIONS ###
-# to customize your display, you can copy this file to ~/.xinitrc and then modify it +# to customize your display, you can create the file /userdata/system/custom-es-config 
 +# including this kind of commands
 # rotate the screen # rotate the screen
 # xrandr -o left # xrandr -o left
Line 52: Line 205:
 </code> </code>
  
-Just uncomment the corresponding lineIn my caseI want to force the 64x480 modeso I just remove the first # character to:+You can just copy and paste the relevant part (without the first ''#'' character that indicates it is a comment)For example, to just force a resolution of 640x480create a ''/userdata/system/custom-es-config'' file with: 
 <code> <code>
-...+#!/bin/bash 
 # change the resolution # change the resolution
 xrandr -s 640x480 xrandr -s 640x480
 +</code>
  
 +To instead change the resolution to 1280x720 at 120Hz:
 +
 +<code>
 +#!/bin/bash
 # change the resolution and the Hz # change the resolution and the Hz
-...+xrandr -s 1280x720 -r 120
 </code> </code>
-Let's save and quit ([Esc]:wq for //vi//).\\ + 
-Actually, your Batocera's display isn't in full screen yetYou must see it only partially, so you have to enter the following commands into your SSH session:\\+Save the file with ''[Ctrl]'' + ''[S]'' and quit with ''[Ctrl]'' + ''[Q]''
 + 
 + 
 + 
 +<WRAP center round important> 
 +In Batocera **v31** and lower, the original file was at ''/etc/X11/xinit/xinitrc'' and the userdata copy was at ''/userdata/system/.xinitrc'' insteadThere was not such a call from ''emulationstation-standalone'' so you would need to copy the file first with a command like: 
 <code> <code>
-# exec emulationstation --windowed+cp /etc/X11/xinit/xinitrc /userdata/system/.xinitrc
 </code> </code>
-Then restart Emulstation :\\+</WRAP> 
 + 
 + 
 +EmulationStation by default runs in full-screen, and may use the old full-screen resolution even through restarts, cutting off a part of its display. For testing purposes, you can temporarily use windowed mode for the current session with: 
 <code> <code>
-# /etc/init.d/S31emulationstation stop +exec emulationstation --windowed
-# /etc/init.d/S31emulationstation start+
 </code> </code>
-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.\\ +Then restart EmulationStation with the following commands to test your new resolution: 
-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:\\+
 <code> <code>
-# cp ~/.xinitrc /etc/X11/xinit/xinitrc +/etc/init.d/S31emulationstation stop 
-# batocera-save-overlay+/etc/init.d/S31emulationstation start
 </code> </code>
-Now, reboot your Batocera system, the display resolution should be good.\\ + 
-Also, ''xrandr'' can do screen rotationvery useful for old vertical screen arcade machines !\\ +If you were to reboot Batocera at this pointyou'll find that all the settings you just created have been lostIn order to make these settings permanentyou must save the [[:modify_the_system_while_it_s_running|overlay]] with the following command before rebooting: 
-\\ + 
-Hope this was easy for all.\\+<code> 
 +batocera-save-overlay 
 +</code> 
 + 
 +<WRAP center round tip> 
 +''xrandr'' can do screen rotationvery useful for old vertical screen arcade machines! 
 +</WRAP> 
 + 
 +Hope this was easy for all. 
 + 
 +==== My TV isn't respecting that! ==== 
 + 
 +Another method to manually set your output resolution is by utilizing a custom boot script. Replace ''<output>'' with your current output, ''<widthxheight>'' with your intended resolution and ''<refresh-rate>'' with your intended refresh rate in the following file and place it into ''/userdata/system/custom.sh'': 
 + 
 +<file bash custom.sh> 
 +#!/bin/bash 
 + 
 +if test -z "${DISPLAY}" 
 +then 
 +    export DISPLAY=:0.0 
 +fi 
 + 
 +## Manually set resolution 
 +xrandr --output <output> --mode <widthxheight> --rate <refresh-rate> 
 +</file> 
 + 
 +For example: ''%%xrandr --output HDMI-0 --mode 1920x1080 --rate 60%%'' 
 + 
 +Just make sure you remember that you've done this in the future, as it will override any other settings you may have set via any of the above methods. 
 + 
 + 
 +===== What's the current X.Org X Server version installed? ===== 
 + 
 +The current version of Xorg Batocera is using can be checked by running the following: 
 + 
 +<code bash> 
 +head /var/log/Xorg.0.log | grep "X.Org X Server" 
 +</code> 
  • display_issues.1580240312.txt.gz
  • Last modified: 4 years ago
  • by genetik57