Please test: Random Game selection/launch via Video Screensaver
-
@__Scannigan__ Hm.
The only reference I get to that error seems to be related to video memory, and in the code, it seems to be related to the Texture handling to avoid the WSOD problems. In particular, it means out of video memory.
The tips in that answer I linked to point to the raspi-config Video split, which seem to suggest that this is the wiki page that could help you, specifically for heavier themes which seems to be your case. However, from the text, I'm unsure this still applies and how, given that it states we currently override that setting? I infer that you'd open your config.txt file and edit the amount of memory for video:
sudo nano /boot/config.txt
then find the override for gpu_mem_1024 (should state 256) and maybe increasing it to 384 or even 512 will help for heavier themes. @dankcushions (sorry for adding you here - please let me know if this is not adequate forum etiquette :/ ) will certainly correct me if that's not the case, but he seems to be the main participant in several memory split posts here in the community as well as on the wiki page, and as such I wouldn't want to be the one giving you incorrect information. Well, not any more than what I already do :)
I'm not sure if it would help, given that I did not work on the WSOD fix myself, but could you also try increasing VRAM and see if it also helps? Maybe trying that first, and if not, then going for the memory split.
Either way, I'm curious as to what do you do before this actually happens. If it's after some use (how long?), then maybe there's a memory leak on the whole texture mapping rearchitecture, but I would not be keen in jumping the gun on that without learning more. Would you have used the previous WSOD-fixed build for long periods of time navigating/using ES without any such issues, I imagine? Or were your ES interactions briefer than now, given the screensaver?
Thanks for testing it out.
-
Before the screen saver, the original WSOD fix wasn't throwing up any errors and was working very well, i've got the ES VRAM limit to 1000 and vid split to 128 if I recall
-
@__Scannigan__ Thx. Rendering the videos will certainly make use of GPU memory, likely more than with the previous VLC build as that was all CPU processed, so it may be that, with the current heavy theme and textures and videos, it runs out of memory at occasion. Would love to learn when it happened, though - can you share more details? Screensaver? Navigation in ES? Were you using it for long? Short time?
What Pi are you on? Your split is probably 256 at least if you're on a Pi 2 or 3. I'd certainly not oppose increasing it to 384 or 512 the way I described earlier, for testing at least.
I'm unsure about the 1000 for VRAM, as the Pi 3 would have 1024MB available memory - i.e. wondering what implications are there for that. Anyway, I'm not the right person to comment on that particular setting. Let me loop in the right person.
@fieldofcows - I'm reading your code on the TextureDataManager and TextureData, in particular where glGetError() is called, and I am unsure whether I am reading it right, so please forgive my naivety here.
On the Texture load function, it seems we're only releasing memory if the memory the loaded textures are currently taking up more memory than the value we have manually set for it, is that correct?
Is it possible that the user can "designate" more memory for VRAM than the one that the system will effectively be able to allocate to it, and we'll end up trying to load or render a texture but running out of memory? Would love your perspective.
I'm thinking that the limit for the slider is 1GB, and that's the max memory for a Pi 2 and 3. Wondering if it should also have a comparison with the actual available memory, or if the system actually handles it correctly by swapping.
Please ignore and push back if that is incorrect or a non-factor. I certainly don't want to be bothering people for no reason, but I'd love your input here.
EDIT: it might also be that the troubleshooting I'm doing is throwing us in the wrong direction. I'm just not sure OMXPlayer uses OpenGL in any way, so - even though I certainly imagine it can contribute to running out of video memory faster - the error seems to end up being on the ES rendering pipeline.
Thanks!
-
@pjft Disabling overscan fixed it! I didn't proceed with the further steps but I can if it will help in some way. Right now I'm just enjoying the show on my pi :) FYI, I'm running it on a Pi 3 with VRAM limit set to 200mb using the Carbon theme.
-
Here are the output results for the commands you had listed above:
-
@pjft the base emulation station has been updated to allow us to run themes with video and without video in the same build, ie I can have standard carbon as well as carbon with video as theme options and a single gameslist that includes video in it. Carbon will now just show the image file and carbon video will run the video. This is a great update, anyway that your great work on the video screensaver and OMXPlayer can be incorporated into the new ES release? Here is the thread on the update to ES. https://retropie.org.uk/forum/topic/8485/how-to-stop-themes-from-seeing-video-mp4-files Thanks!
-
@pjft Nope wasn't using it for long, initial system view loads just fine, select a system and video previews load just fine, upon switching to another system, video preview will play fine, when selecting another game video will not populate, then if you come back out to system view system icons are white blocks and background is white, I'll ramp up the mem split and see what happens
-
@incunabula oh - that's underwhelming :P So much effort into trying to troubleshoot, haha. I'm glad you sorted it out on your end - I do imagine that the overscan layer will effectively add to the rendering pipeline, and now that you disabled it it can render the subtitles with little difficulty (it's yet another layer). Hope you enjoy it and have fun :)
I'd still rather have this fixed for everyone, but truth be told if we're not going to use OMX Player for the long run, it's probably fine for now. When we have FFmpeg support, then we'll fix things as they come.
@Scannigan Thanks for the detail, this is great.
Before you actually touch the memory split, just one more thought, if I may: could you actually check whether you really have the maximum set to 1000? If you do, could you try lowering it to 200, restarting ES, and then seeing if it loads the system view and a game list, and see how it goes? Then, if it doesn't work, to 250, restart ES, 300, restart ES gradually until you find a value where the theme actually effectively loads correctly and you can navigate back and forth with ease.
The train of thought is, following my previous comment on memory management, that the VRAM may need to be set as high as needed for the theme to load, but not a lot higher as it's that limit that forces the textures to be unloaded and refreshed. My assumption is that, if it is too high, you will eventually run out of memory just the same - but I am making an assumption, I can't tell for sure. This test would be very helpful as if there is indeed a problem with the memory management here it can be fixed in the main branch. The video may certainly be taking up video memory that is no longer available.
Thank you very much for looking into this! I do appreciate you taking the time here and trying to help figure this out for everyone.
@TMNTturtlguy Thank you for the encouraging words. Just to be clear, almost all of this work is actually @fieldofcows 's! He deserves all the credit. The only thing I actually did was to implement a few things on top of it - namely launching the game from the screensaver, being able to select a different random game with the controller, quickly, and the game name and system name on the screensaver video. Truly, he's the one to get all the credit for everything - I'm just putting together a proof of concept for the user experience, on top of his work, and following @Zigurana 's ideas around random game selection.
The long term goal is certainly for this to go to the base emulationstation. That being said, this is built on top of @fieldofcows 's work around video screensaver and video player implementation, so ultimately it depends on that to be integrated with the base emulationstation before my changes can be. I will not be adding to the base emulationstation other people's work, I don't feel it's correct. :)
As soon as the base emulationstation gets random video screensaver support from @fieldofcows , I'll be on top of it to implement these. Until then, there's no such chance.
He's also investigating using a different HW accelerated player (FFMpeg), so these OMXPlayer tweaks are just temporary. They're good for now, they do have known limitations - particularly in regards to not allowing overlays, which are key for themes - but if people want to use them for now, I provided this build for that purpose, and for people to test the interaction and see if it improves the experience in any way for them.
I received some valid comments around allowing the same for game images, as not everyone has videos, and that will certainly make it into the base emulationstation when this gets there. I may implement that as well on an experimental build later, as it is definitely a good idea. It just needs time, which I'm currently lacking :)
Anyway, thanks for the note, and rest assured, I do want this to make it to the base ES branch - provided that the community things it adds to the experience, otherwise I doubt it will be accepted. That's why it's critical that people test it out, use it, and validate that it is a positive addition, so that ultimately the RetroPie project owners (BuZz and herb_fargus, I believe) approve of the change.
Hope this clears it :)
-
@pjft thanks for the great info in your response. Can't wait to see what @fieldofcows and you come up with. In the mean time, is there anyway that you could incorporate the new ES updates into your code for the screen saver? I would take a stab at it myself, but i am not sure i can find any repository on the work that you and @fieldofcows have done to the base ES text files, and I am sure it is a lot of work! Thanks again.
-
@TMNTturtlguy Unsure. Certainly incorporating the new ES updates as a whole into this is quite similar in effort to incorporating this into the base ES :)
However, if you're just referring to allowing themes without video to not completely break if the gamelists have a video tag but the theme doesn't support it, I suspect that's more manageable. Is that what you're referring to?
Is it this particular change? @jdrassa - this seems to be fairly self contained. Any unforeseen dependencies from this particular code, or do you think it's fine for me to cherry-pick it and import it over to my test branch?
-
@pjft Yes, i am just referring to allowing themes without video to not break. Jdrassa posted an accepted fix 5 days ago in the thread you sent, however the code for that change was never published.
-
@TMNTturtlguy sure. If it's that, I'll send you a build later today for testing if you're willing to try it out. Would you be keen on testing my build with that change - if it's the small one I sent earlier?
Thanks.
-
@pjft you bet! let me know when you get it completed and i will test it out. Thanks
-
@TMNTturtlguy Here.
https://github.com/pjft/EmulationStation/releases/download/0.5themefix/emulationstation
Use the previous instructions in this post but use this link instead of the 0.4 one.
Let us know how it goes. I did NOT test it, just built it and sending it over. I'm assuming that was the right code to merge here, but it may not be the full story so hope this works.
-
@pjft Great! Thanks - I am in the middle of finishing up some final details on my current build, and then will back it up, and then install this and let you know. Unfortunately I am off to work, so I won't be able to get back to you right away. Thanks for putting this together.
-
Hi all,
I've updated the binary to include a few changes from the folder metadata fixes I've done for the main ES as well.
https://github.com/pjft/EmulationStation/releases/download/0.6-ssctl/emulationstation
Nothing major.
The next update on this front will be using random images for screensavers, but that should take some time - I have other things on my plate at the moment, some of them ES related, that are more pressing or interesting, hopefully. :)
I'll keep everyone up to date.
Have a great Sunday!
-
@pjft Thanks! Installed and everything appears to be working great. I love the screen saver, the temps are running nicely and i have no issues with screen savers, text, or video previews.
Thank you for your hard work and to @fieldofcows for this addition to ES!
-
@pjft Just wanted to let you know that I updated to retropie 4.2 and then installed ES 0.6-ssctl and everything is still working perfectly! Thanks
-
Did someone say testing?
-
@itsnitro sorry, it's a typo. I'm sure it's meant to be "tasting" :)
Welcome aboard.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.