Kodi + fbcp
-
@paradadf I'm sorry. I should have mentioned that I tried kodi.videomode=default. It didn't seem to do anything for me.
-
@flavor fbcp ? do you go beyond 25fps ? Coz most chances are you run a SPI screen (which is slow as hell).
Anyway, i don't think kodi would auto set the resolution by itself.
Could you make a support archive ? I'm curious to see a few details
-
@substring Okay. I think I built the support archive. I just SSH'd in and ran /recalbox/scripts/recalbox-support.sh
https://drive.google.com/open?id=1Ra7LsczTmjI1RgOikMINpFs-2NEuW2QKIt does use an SPI screen, but it's only 320x240 so updates are not that intensive. I think you would be surprised with the speed. This machine runs fine with RetroPie, but I am not as familiar with Recalbox.
I will say that someone else has tried running Kodi on RetroPie and may have the same issue. This issue is common to fbcp. fbcp is copying from fb0 to fb1, and it does not like parameters of fb0 to be changed at all. Once that happens, the LCD (fb1) will just freeze. That will happen if you select a custom resolution for an emulator.
It appears that the same thing is happening with Kodi, but the resolution (as reported by 'tvservice -s') doesn't seem to change. That's why I think Kodi (or the scripts that call Kodi) must be resetting the HDMI (even if the same resolution is being used).
I do not think this has anything to do with the LCD's FPS or the SPI clock. The emulators will act the same way if they are allowed to set the resolution. This is a known issue with using fbcp, as far as I know.
Is there a way to tell if Kodi is trying to configure the fb0 resolution? Is there a way to block it?
I'm not opposed to trying a bunch of stuff, but I just don't know where to look. I'm not really much of a Kodi user, so I am not used to it at all.
Thanks for the help!
-
@flavor I was searching for some more info, and I found that I could put tvservice in monitor mode.
# tvservice -M
Starting to monitor for HDMI eventsIf I run any emulators, I won't get any output. I think this is because I have set global.videomode=default
When I run Kodi, I see this output.
[I] HDMI in DVI mode
That's when the LCD (fb1) stops responding.
-
@flavor i'm no kodi dev nor user ... I wouldn't know where to look for that in their massice source code.
I don't remember if kodi is built with omx support, but that could be a lead to the issue.
Regarding fbcp, i would also recommend you try the builtin kernel fbcp, but i have no idea how it works (it's not even compiled in our kernel tbh. But it's not that hard to do it)
-
@substring I get that. Thanks! I was actually thinking that it was something to do with Recalbox and how it starts Kodi, but the further we discuss and the more I search, I think I may need to ask the Kodi experts.
If I can find anything more about Kodi, I will try to remember to report back here.
I will look at the built-in kernel fbcp, too. I actually usually use a modified fbcp that does some other functions (something like overscan and status icons), but I really liked how Recalbox had the ability to just turn on fbcp in the config. There's also another guy that I'm in contact with that is making a fbcp that's specific to the LCD's chipset. That one is expected to be faster, and I hope that it can overcome this resolution issue.
-
New data ( @substring
If fbcp is running while Kodi starts, it will choke and put the LCD in an unusable state. If you kill fbcp and start it a second time, it will still be unusable.
BUT
If you know that starting Kodi will fubar the LCD/fbcp, then you can gracefully exit fbcp, start Kodi, and then restart fbcp. This works.
Now, how do I tell Kodi to start fbcp after Kodi is done with it's HDMI SetNativeResolution changes? To the user, it probably wouldn't even be noticeable.
BTW, I have also posted at https://forum.kodi.tv/showthread.php?tid=329080&pid=2709135#pid2709135 which sparked this idea. I figured I'd also ask the same question here, since maybe it's something you would know how to implement (kill fbcp, start Kodi, restart fbcp).
-
@flavor i thought about a dirty trick ... Create a custom edid for your screen, that would just have the timings of your screen. Kind of complicated, but could be worth a try
-
@flavor lucky you, popcornmix is one of raspberry's engineers he's thenone maintaining gpu and kernel ...
So the trick with recalbox requires to modify the kodi generator of configgen. Problem is : it's monotask, dunno how i'd launch something after kodi ... May as well patch kodi to remive the resolution change as you seem to have found the code part
-
@substring I could try it. The problem is that I think Kodi would still "change" the resolution. In their code it does a DispmanXDestroy (IIRC something like that) and then sets the new resolution, even of the new resolution is the same as the old.
-
@substring Oh, yeah, nice! It's good to get him (popcornmix) involved, then.
The big thing for me would be to publish the info so that other people could easily get Recalbox (and Kodi inside of it) running on their hardware. It kinda blows the idea out of the water if people would need to recompile Kodi. Setting some configs would be acceptable.
-
@flavor Recalbox is open source patch kodi, submit your patch and it's in
-
@substring Would that also work for mk_arcade_joystick_rpi? I have opened another thread about that.