I have my RetroPie system working well except for one issue.
I have a short HDMI extension cable (I use this because I have the Raspberry Pi mounted inside a case).
Whenever I’m using the cable, and I quit an emulator, the screen goes blank. The RPi is still alive, as I can SSH to it.
If I remove the extension cable, and plug in a regular cable only, there is no problem.
I have done some tests with sudo ‘/opt/vc/bin/tvservice -s’, and I have found that the resolution does not change back to 1280×720 when the emulator exits. It stays at 640×480.
If I use the regular cable, I get this:
On boot – state 0x12001a [HDMI CEA (4) RGB lim 16:9], 1280×720 @ 60Hz, progressive
During game – state 0x12001a [HDMI CEA (1) RGB full 4:3], 640×480 @ 60Hz, progressive
After game exits – state 0x12001a [HDMI CEA (4) RGB lim 16:9], 1280×720 @ 60Hz, progressive
If I use the extension, I get:
state 0x120016 [DVI CEA (4) RGB lim 16:9], 1280×720 @ 60Hz, progressive
state 0x12001a [HDMI CEA (1) RGB full 4:3], 640×480 @ 60Hz, progressive
state 0x120016 [DVI CEA (1) RGB lim 4:3], 640×480 @ 60Hz, progressive
I have tried various options in config.txt, but nothing I have found works. HDMI safe mode also gives me a blank screen.
I’ve had this before – use a different HDMI cable.
My extension is 1.3a spec rated (printed) and my HDMI cable didn’t specify anything (an old one). The signal would cut out at random to my monitor and refused to be seen via my HDMI over Ethernet extender to the TV.
I swapped it for a 1.5 metre 1.3 spec rated cable from Amazon and I have no issues now.
In short, I would make sure that the generations of HDMI cable you are using all match – no need to spend ££’s on cables though.