240p Corrupt Framebuffer under Linux?

Apologies if this is a little off topic, since it’s not actually a problem with Retroarch, but I really wasn’t sure where else to ask for help…

I’ve been trying for about three weeks (and I mean all day every day) to get Retroarch set up with a 240p CRT, just a regular 4:3 NTSC Consumer TV with component input. Unfortunately I just can’t get it to work, and feel completely defeated at this point. :frowning:

I’m trying to run Retroarch on an X86 system, outputting over HDMI, into a Portta HDMI to component video (YPbPr) transcoder (not a scaler), and from that into the TV. I’m not using CRT Switchres, I’m just trying to run it under XWindows with the Xserver set to a 240p super resolution via xrandr.

I’ve been trying many different configurations: different systems, different video cards, different OS versions (I was trying to use Ubuntu 20.04, then 22.04, and now I’m in the process of installing Windows 7 to see if I can get it to work on the same hardware with CRT Emudriver.) I’ve tried an ancient AMD X300 card, a laptop with a more modern AMD A10 APU, another motherboard with an Nvidia ION GPU, and now a pair of Zotac Mini PCs that I bought just for this, with AMD FX-7600P APUs:

crtcade-zotac:~$ lspci | grep VGA
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics]

I’m getting all kinds of inconsistent results, and none of it makes any sense to me. I’ve run into all kinds of problems with drivers, black screens, and just general nonsense. I’m losing my mind. I honesty have more than 100 hours invested in this now, and just stayed up all night working on it yet again, to no avail. :frowning: Why is this so difficult? Anyway…

  • With the old AMD card I could get things to work at 240p on my LCD monitor, but the CRT would not sync to it (it was literally a sync problem, as if it wasn’t picking up the horizontal sync pulse even though I could see the image, and even though the LCD was clearly indicating it was a 240p/15Khz signal in it’s OSD.) I finally determined that to be a limit of the card after posting here about it and getting some help (the same identical config worked with another card), so I gave up on it. I could not get the AMD drivers to even install on that machine with Windows (the machine would reboot when the Catalyst installer tried to detect the card), plus the card was just ancient, so again, I just gave up on it entirely.

  • With the Nvidia ION motherboard, things actually worked (after putting a tremendous amount of work into getting the Nvidia proprietary drivers to play nice), but that was just a spare motherboard I had laying around to test with, it’s not something I can actually run this on permanently, plus it’s a really slow Intel Atom CPU, but it proved that my transcoder and TV can work with this setup. It also sometimes would get weird when switching back to Emulationstation (almost as if Emulationstation was confused about whether it was in 240p or 480i, and so was displaying every other frame: mad flicker. That could very well be a problem with Emulationstation though; I’ve had no problems with Retroarch on it, all cores seem to run fine at 240p.)

  • Now with the new Zotac mini PCs it will put out a 240p signal and both my LCD and CRT will sync to it. But the image itself is corrupt, as if the framebuffer is being addressed at the wrong bit depth or something? Here’s a photo of it running the 240p Test Suite (lr-genesis-plus-gx core). In this case on the LCD, but it looks exactly the same on the CRT:

So again, with the old AMD X300 card it puts out a 240p signal with a good image, but my CRT won’t sync to it (the Nvidia with the exact same modelines works fine with the CRT though), and with the new mini PCs with R7 graphics, I get the exact opposite: the CRT DOES sync, but the image itself is corrupt.

Here are some of the modelines I’m using. All yield the same results (no sync with the X300 card, corrupt but synced image with the R7 APU, and works fine with the Nvidia ION):

"[email protected]"      50.260 2504 2704 2960 3200 224 236 239 262 -hsync -vsync
"[email protected]" 50.260 2500 2704 2960 3200 224 238 241 262 -hsync -vsync
"[email protected]"    50.260 2504 2656 2912 3200 240 244 247 262 -hsync -vsync
"[email protected]"       50.390 2504 2656 2912 3200 240 244 247 262 -hsync -vsync
"[email protected]"   49.621 2504 2704 2960 3200 224 236 239 262 -hsync -vsync

I’ve also tested with a Raspberry Pi3B, which works, but is too slow to meet all my needs, but again it proves that my transcoder and CRT are working fine.

I even tried with a Raspberry Pi 4. Let’s not even talk about that. :smiley: (Hint: it didn’t go well… the Pi 4 definitely has issues that make it not well suited to driving a CRT, still.)

Any suggestions on what I should try next? I’m really out of ideas (although as I said, I’m currently installing Windows on one of the mini PCs. I figured I might as well go down that rabbit hole, even though I’d rather run this on Linux. Maybe it will work?)

Thanks!

yeesh, what a drag.

I don’t have a whole lot to add except: I played around with an hdmi-to-component box and my RPi was able to display properly with it but my laptop never was, even using identical modelines, so a similar situation to what you’ve described.

You know, after all this I really don’t want to speak too soon, but I think I may have just figured it out… :smiley: I was staring at that corrupt screen and realized it looked like the pixels were being split apart into their component colors and spread out, but overlapping… almost like maybe something in the card was having trouble keeping up. So on a hunch I upped my horizontal resolution to 3840, something I couldn’t even do on the old cards or the raspberry pi, thus giving a higher pixel clock, and bam! just like that, it came up. It was slightly out of sync on the CRT at first because I was using arcade monitor timing, but when I adjusted it to NTSC it synced right up.

So I guess this APU has issues with lower pixel clocks, and bumping it up to a higher super resolution fixes it.

Basically, I’ve pounded my head against the wall for weeks trying to get all this to work, then I figured it out an hour after asking for help, lol. Yup, sounds like me. :smiley:

This is the modeline I’m using now, that works perfectly with the new card and the component to CRT setup btw, in case anyone else is having similar issues:

“TESTMODE2” 72.87 3840 3952 4296 4640 240 244 247 262 -hsync -vsync

1 Like

that’s great! 3840 is preferable anyway, since it’s integer for more resolutions.