Hi guys! I’ve been troubleshooting this for a while so this is going to be an unfortunately long post, please hear me out as I’ve tried a lot of different fixes.
I’m having problems outputting via HDMI to a TV. I have tried this with two different TVs and different HDMI cables and the behavior is identical across every combination. I’m also running Mint off of the same device and it has zero problems outputting with the same method. The laptop I’m using runs discrete nvidia graphics with drivers and prime enabled in .config.
So the issue: leaving the output method on Auto will not display to the TV, regardless of if the cable is connected before or after system bootup. Batocera has no issue detecting the output which is listed as HDMI-1-0. Flicking over to HDMI-1-0 in the GUI results in no output at all - both screens go black and a reboot with the HDMI disconnected is required to fix this.
I have been able to force output to the TV both with xterm and via SSH, both of the following commands work:
export DISPLAY=:0.0
batocera-resolution setOutput HDMI-1-0 OR xrandr --output HDMI-1-0 --preferred
This code will give me a normal display on the TV in xterm and the f1 file browser, which is great. When returning to Emulation Station, however, it will confine the display to the top left quarter of the screen, and when launching a game, no display will be output at all, just a black screen.
I have tried many possible solutions over the past week to troubleshoot this, using both batocera-resolution and xrandr commands. Curiously enough, I’ve found that ‘batocera-resolution’ commands when used via SSH will break the display connection and prevent me from making further changes - ‘Cannot open DISPLAY=:0.0’, whilst issuing the same commands via xterm works completely fine. Xrandr seems to be more SSH friendly, so I’ve spent more time exploring it’s options. I haven’t however, been able to make any progress unfortunately.
All of the meaningful changes I’ve explored result in completely black displays, requiring either a reboot, or if I’m using xrandr via SSH, a command to revert the change and restore the display.
I’ve tried changing to other EDID modes and setting new resolutions using both xrandr and batocera-resolution, and in Xrandr specifically I’ve played with a bunch of other flags: –fb, –fbmm, –scale, –size; all of them result in either no change or a completely black display.
I’ve been trying to create and apply a new mode and have ran into errors when attempting to add a mode to an output, such as:
xrandr --newmode "mynewmode" ****insert whatever I captured using gpt/cvt via copy and paste****
xrandr --addmode HDMI-1-0 "mynewmode"
X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 153 (RANDR) Minor opcode of failed request: 18 (RRAddOutputMode) Serial number of failed request: 29 Current serial number in output stream: 30
I’ve tried different modelines with different names and consistently returned this or a very similar error.
I have some ideas to work around this, such as looking into the ‘AllowNonEdidModes’ flag that allegedly exists, and manually inserting nvidia provided modelines into xorg.conf, but I haven’t tried this yet.
I’ve tried a few other fixes. I’ve read through https://wiki.batocera.org/display_issues and attempted the custom boot script under the ’My TV isn’t respecting that!', which results in a black display after boot. I’ve tried a recommendation I found from dmanlfc suggesting a custom xorg config under /etc/X11/xorg.conf.d/10-gpu.conf with the following code:
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
EndSection
Section "Device"
Identifier "intel"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
This results in a completely black display and I have to remount the boot partition and delete the 10-gpu.conf file to get a display black.
Currently my Batocera install is updating to 36 beta, because I figured it was worth trying and I’m a bit burned out on the troubleshooting.
A few other details: my build is dual boot Mint and Batocera and has taken I’d guess around 30 hours to this point. I was completely new to Batocera when I started, it’s been a journey.
I’d hugely appreciate any ideas guys :)