Bad default video mode for CRT televisions over S-Video

I recently installed Lakka on the PC in my arcade cabinet. The PC is connected to a CRT television via S-Video cable. Previously the PC was running Mint 17 with the binary NVIDIA driver and worked fine on the CRT (1024x768@60Hz). Lakka, however, outputs to the CRT using some odd resolution and/or refresh rate, as it’s grayscale and is rapidly scrolling/flipping vertically like the “vertical hold” (if anyone remembers what that is) is screwed up or something. I tried it with a second CRT television and it does the same thing. I can think of a few ways this could be resolved:

[ol] [li]Correct whatever’s causing the issue (no idea what that is).[/li][li]Allow manually setting the OS/desktop resolution and refresh rate in the Lakka installer with “Automatic” as the default option.[/li][li]Allow modification of the OS/desktop resolution and refresh rate in the Retroarch menu.[/li][/ol]

Most people are probably using LCD displays, but for those of us trying to be legit and recreate a true retro experience this would be extremely useful.

I don’t think this has anything to directly to do with Lakka and is actually an issue with your nvidia driver. Lakka uses the nouveau driver instead of the proprietary driver by default to allow running in KMS instead of an X11 environment, and I think nouveau and the proprietary driver handle TV-out differently.

If your proprietary driver was reporting 1024x768 to the OS, that means it was then crunching that down to 480i, which is the only res you can push to a normal NTSC TV without losing sync, which is what I think you’re describing. It sounds like nouveau might be trying to push the full resolution, which isn’t going to sync on the TV and could potentially damage some…

However, you can enable X11 and the proprietary nvidia driver in the project options, and it should act just like what you had with Mint 17 at that point.

However, you can enable X11 and the proprietary nvidia driver in the project options, and it should act just like what you had with Mint 17 at that point.

Thanks for the info. How can I go about enabling X11 and the proprietary NVIDIA driver in the project options? Do I need to build an installation image from source somehow or can this be done using SSH into a running installation?

Also, I found this post: http://libretro.com/forums/showthread.php?t=3666 which indicates you can SSH in to modify/create an xorg.conf and manually set the resolution. If that is possible, do you think setting the resolution to 640x480 could correct the issue?

Which nvidia graphic card do you have ?

Is it possible you run this command to know which output you are using ? You need to connect by ssh to your device.

After, you can try to add something like this boot parameters depend on the output you got :

 video=TV-1:1024x768@60

If it still doesn’t work please provide a log with

 journalctl | grep nouveau

Thank you.

Hi, and thanks for the suggestions. The S-Video output is listed as “TV-1”. I tried 1024x768@60, 640x480@60 and 320x240@60 using your linked instructions as a reference (long-time Linux user, so no pains there). Also, for anyone else reading this, the default password to SSH in to Lakka is (surprise) “root”. Maybe nouveau needs to somehow be explicitly set to 480i as it lacks the ability to “convert” anything else to a usable/native signal? It’s been my experience that nouveau under anything but perfect conditions is pretty bad, and even then still mostly bad, but I haven’t given up yet.

Some possibly relevant info: The CRT television over S-Video is grayscale and desynced when the PC POSTs, during Lakka installation and while Lakka loads (icon splash screen), and obviously when the Retroarch menu is running. I’ve tried two CRT televisions and two S-Video cables and it only works when the NVIDIA binary driver is installed at resolutions of 1024x768@60, 800x600@60 and 640x480@60.

The output of the log is:

Lakka:~ # journalctl | grep nouveau May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: NVIDIA G72 (246300b1) May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: bios: version 05.72.22.76.00 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: fb: 256 MiB DDR2 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: VRAM: 253 MiB May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: GART: 512 MiB May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: TMDS table version 1.1 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: TMDS table script pointers not stubbed May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB version 3.0 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB outp 00: 01000300 00000028 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB outp 01: 02011310 00000028 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB outp 02: 01011312 00000020 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB outp 03: 020223f1 00c0c083 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB conn 00: 0000 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB conn 01: 1130 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB conn 02: 0210 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB conn 03: 0211 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: DCB conn 04: 0213 May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: Saving VGA fonts May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: 0xC65E: Parsing digital output script table May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: MM: using M2MF for buffer copies May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: Setting dpms mode 3 on TV encoder (output 3) May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: Load detected on output B May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: allocated 320x240 fb: 0x9000, bo ffff88007c010400 May 27 05:05:26 Lakka kernel: fbcon: nouveaufb (fb0) is primary device May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: Setting dpms mode 0 on TV encoder (output 3) May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: Output TV-1 is running on CRTC 0 using output B May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: DRM: Load detected on output B May 27 05:05:26 Lakka kernel: nouveau 0000:02:00.0: fb0: nouveaufb frame buffer device May 27 05:05:26 Lakka kernel: [drm] Initialized nouveau 1.3.1 20120801 for 0000:02:00.0 on minor 0 May 27 05:05:27 Lakka kernel: nouveau 0000:02:00.0: DRM: Load detected on output B May 27 05:05:27 Lakka kernel: nouveau 0000:02:00.0: DRM: Load detected on output B May 27 05:05:27 Lakka kernel: nouveau 0000:02:00.0: DRM: Setting dpms mode 3 on TV encoder (output 3) May 27 05:05:27 Lakka kernel: nouveau 0000:02:00.0: DRM: Setting dpms mode 0 on TV encoder (output 3) May 27 05:05:27 Lakka kernel: nouveau 0000:02:00.0: DRM: Output TV-1 is running on CRTC 0 using output B

Are there still potentially viable options for attempting to get nouveau to work, or at this point should I attempt to get X11 and the NVIDIA binary driver working? I have no idea how to do the latter, but now that I can SSH in and make OS modifications I’m feeling pretty confident.

Hmm. 320x240 should be accepted as an NTSC-compatible signal… Can you try this modeline? Modeline “1920x240@59” 31.94 1920 1952 2072 2104 240 245 248 253 It’s what I use on my arcade monitor.

Also, is it possible to test with boot parameters tv_norm.

How do you test/add the modeline parameter? @gouchi, when you say “tv_norm” how should this be entered? video=TV-1:tv-norm?

tv_norm is a nouveau module parameter so something like nouveau.tv_norm=XXX

@kevinfishburne dunno how to do it in Lakka. I just assumed you already knew how, since you had tested 320x240 res.

Usually it would be through xrandr, which requires X, so at that point you may as well just use the proprietary driver; or through a custom EDID, but Lakka’s read-only filesystem puts a damper on that one, too.

[QUOTE=hunterk;39834]Hmm. 320x240 should be accepted as an NTSC-compatible signal… Can you try this modeline? Modeline “1920x240@59” 31.94 1920 1952 2072 2104 240 245 248 253 It’s what I use on my arcade monitor.[/QUOTE]

Just saw your reply after I posted this so am editing it, sorry about that.

I can SSH into the Lakka box and enable the filesystem as read/write, which I’ve been doing to set the boot parameters. Is it possible to install/enable X11 and the proprietary NVIDIA driver over SSH?

After over an hour of trying different settings and running up and down the stairs from my workstation to my arcade cabinet I finally got the damn thing working. I can barely believe it.

IF ANYONE ELSE IS HAVING THIS PROBLEM (Lakka + Nouveau + S-Video + CRT = Shit), here are instructions for fixing it:

[ol] [li]Install Lakka onto the PC as usual (pen drive, app to make it bootable using the downloaded Lakka .img file).[/li][li]Connect the Lakka PC to your network/LAN.[/li][li]SSH into the Lakka PC from your workstation using the command “ssh [email protected]” where “a.b.c.d” is the Lakka PC’s IP address. The default password is “root”.[/li][li]Make the filesystem read/write using the command “mount -o remount,rw /flash”.[/li][li]Edit the boot parameters using the command “nano /flash/extlinux.conf”.[/li][li]Add the following text to the end of the line beginning with “APPEND”: “nouveau.tv_norm=NTSC-M video=TV-1:1024x768@60i”[/li][li]Save the file and exit the text editor by pressing Ctrl-O, Enter, Ctrl-X.[/li][li]Make the filesystem read-only again using the command “mount -o remount,ro /flash”.[/li][li]Reboot the Lakka PC using the command “reboot” (this will disconnect your SSH session).[/li][li]Play some games on your glorious 15 year-old CRT television before the fucking thing burns out on you.[/li][/ol]

References: [ol] [li]http://libretro.com/forums/showthread.php?t=5899 (this thread)[/li][li]https://nouveau.freedesktop.org/wiki/KernelModuleParameters/#tv_norm[/li][li]http://distro.ibiblio.org/fatdog/web/faqs/boot-options.html[/li][/ol]

I’ve tried 1024x768, 800x600, 640x480 and 320x240 and they all work, HOWEVER, these settings may be being ignored as they all look the same on the CRT and show the same frame rate (30 FPS) in the Retroarch menu. I tried several NES games which exhibit different behavior than the Retroarch menu in that they do not overscan as they should, and as the Retroarch menu does. I’m currently experimenting with different settings and will report back with my findings. Thanks everyone for your help, and thanks for a truly great project.

Glad it works ! And thank you for your tests !

No problem. This is a slightly different issue, but using the default aspect ratio setting (set by core) results in NES and SNES (and probably other systems) failing to overscan and having black borders. The only way I could (mostly) fix this is by setting the aspect ratio to 3:2. Interestingly 3:4, and every other setting I tried, only made it worse. So if anyone else has this issue, set the aspect ratio to 3:2.

[QUOTE=kevinfishburne;39949]After over an hour of trying different settings and running up and down the stairs from my workstation to my arcade cabinet I finally got the damn thing working. I can barely believe it.

IF ANYONE ELSE IS HAVING THIS PROBLEM (Lakka + Nouveau + S-Video + CRT = Shit), here are instructions for fixing it:

[ol] [li]Install Lakka onto the PC as usual (pen drive, app to make it bootable using the downloaded Lakka .img file).[/li][li]Connect the Lakka PC to your network/LAN.[/li][li]SSH into the Lakka PC from your workstation using the command “ssh [email protected]” where “a.b.c.d” is the Lakka PC’s IP address. The default password is “root”.[/li][li]Make the filesystem read/write using the command “mount -o remount,rw /flash”.[/li][li]Edit the boot parameters using the command “nano /flash/extlinux.conf”.[/li][li]Add the following text to the end of the line beginning with “APPEND”: “nouveau.tv_norm=NTSC-M video=TV-1:1024x768@60i”[/li][li]Save the file and exit the text editor by pressing Ctrl-O, Enter, Ctrl-X.[/li][li]Make the filesystem read-only again using the command “mount -o remount,ro /flash”.[/li][li]Reboot the Lakka PC using the command “reboot” (this will disconnect your SSH session).[/li][li]Play some games on your glorious 15 year-old CRT television before the fucking thing burns out on you.[/li][/ol]

References: [ol] [li]http://libretro.com/forums/showthread.php?t=5899 (this thread)[/li][li]https://nouveau.freedesktop.org/wiki/KernelModuleParameters/#tv_norm[/li][li]http://distro.ibiblio.org/fatdog/web/faqs/boot-options.html[/li][/ol]

I’ve tried 1024x768, 800x600, 640x480 and 320x240 and they all work, HOWEVER, these settings may be being ignored as they all look the same on the CRT and show the same frame rate (30 FPS) in the Retroarch menu. I tried several NES games which exhibit different behavior than the Retroarch menu in that they do not overscan as they should, and as the Retroarch menu does. I’m currently experimenting with different settings and will report back with my findings. Thanks everyone for your help, and thanks for a truly great project.[/QUOTE] This is great. Maybe open an issue on github to add your fix?

I have done this but it doesnt seem to have any affect. My screen shows up but its all black and white!