Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knully Firefly sytematically freezes for 10-60s when trying to enter a system list while using stock ES-ART-BOOK-NEXT theme and connected to Wifi #236

Open
Gregoloco opened this issue Dec 30, 2024 · 26 comments

Comments

@Gregoloco
Copy link

Knulli build version

firefly 2024/12/04 03:10

Your architecture

RG35XX SP

Issue description

Hello, I had a long time nailing the exact configuration (which is the one I'd like to use sadly) which is causing the issue =
Knully Firefly sytematically freezes for 10-60s (= the screen freezes and the only thing I can do is force the shutdown using the power button) in the following case:

  • The device is just switched on (just booted) - Once the issue as occured once, these is no issue until you reboot/turn off the machine again.
  • The device is connected to WiFi (if I disable wifi, I can reboot and use the console with no issue, as it was the case before).
  • The theme is the stock ES-THEME-ART-BOOK-NEXT theme or the downloaded ART-BOOK-NEXT-ES (if I use another theme, this seems to solve the issue).
  • You try to open/enter a system games list from the main menu or you try to switch to a second gamelist if the freeze does not accur with the first list (and once the gamelist finally appears... sometimes after almost a minute... then everything works fine and smoothly untill the next boot of the machine).

This is completly ruining my experience since this issue appeared... I did not notice it during my first days with the latest Knulli Firefly release. But it now seems systematic, and I still have the issue if I delete the 'userdata/system' folder and reconfigure everything from start.

And it seems that some other users are having the same kind of issue (even if some seem to have more luvk = https://www.reddit.com/r/RG35XX_H/comments/1hoe1rh/freezing_for_10secs_knulli/

Detailed reproduction steps

Turn on the console with Wifi on/connected and with the ES-THEME-ART-BOOK-NEXT theme on.
Try to enter a gamelist from the main menu (or if it works the first time then try to in another list, going back to the main menu and choosing another system or simply pushing lest or right).
The console freezez (for about a minute most of the time here).

Details of any attempts to fix this yourself

I tried installing a new Knully clean install by deleting evenything but the roms and bios file on the sd card = same issue
I tried many many many configurations (in order to nail the issue as explained above)...
I'm getting a bit crazy now :-)

Details of any modifications you have made to Knulli.

No modification at all

Logs and data

No response

@Gregoloco
Copy link
Author

I hope you will be able to find a solution to this issue and that you will be able to explain what might happen as it makes no sens on my side (that's what makes me crazy).
And my only solution for now is to turn off wifi completely on my device (it then works flawlessly but I cannot scrap or play with my friends anymore).

@johnolinda
Copy link

I have had similar issues and been doing my best to document my troubleshooting over on Discord, but where things left off last night, I narrowed the issue down to PICO-8 roms. If any are present on my SP or my H, I get the same symptoms you describe. If none are present, I can run normally and be connected to WiFi without issues.

@Gregoloco
Copy link
Author

Hello and thanks a lot for your answer ;-)
I tried to delete my pico8 folder content, with no luck, the issue is still the same (I even tried to delete the last rom folder in which I added some roms, i.e. amstradcpc, for a test, and it did not change anything neither).
Then, I tried reflashing the older Knulli OS version (v40) on my SD Card 1 and it seems to me that everything works fine with the older version (only issue is that it seems to take a bit too long - ~30s - to turn off, with no screen saying that the metadata is being saved, but I don't remember if it was already the case with v40...).
Then, I reflashed the new Firefly on SD Card 1 to see if this could change something, and as soon as I rebooted on SD Card 2, the issue was back (exactly as initially described above)...

@Gregoloco
Copy link
Author

Ok, sorry for all these messages but I really try to find a solution...
So after reflashing, I decided to try to delete the system and saves folder on my SD Card 2 again, to do a fresh reconfiguration.
And I first tried to connect to WIFI (which I can do with no issue it seems, on my internet box as well as on my phone in with connection sharing) and as soon as I did the issue started again.
So my only solution for now, before I get completly crazy ;-), is to reflash the older Knulli version and stay on this version for now as it works correctly with my device.
If you have anymore information too share or test I can perform, I'd be very glad to be able to use Firefly again :-)

@bladeoner
Copy link

Hi @Gregoloco do you experience this with the latest stable build or did you compile the source yourself?

@Gregoloco
Copy link
Author

Gregoloco commented Dec 30, 2024

Hi @Gregoloco do you experience this with the latest stable build or did you compile the source yourself?

I use the latest stable release, downloaded from the GitHub release page and flashed with Rufus as I always do 😊
PS: I initially installed it on December 4 and did not notice the issue at the beginning.

@bladeoner
Copy link

I also experienced some slowdowns with one of my own builds today, and I am also using the ES-THEME-ART-BOOK-NEXT theme but on a RG35XX H device.

What fixed the issue for me, I format the primary sd card and reflash it, after that copy all save and rom folders from the second sd card, format it and copy the save and rom folders back.

@Gregoloco
Copy link
Author

I also experienced some slowdowns with one of my own builds today, and I am also using the ES-THEME-ART-BOOK-NEXT theme but on a RG35XX H device.

What fixed the issue for me, I format the primary sd card and reflash it, after that copy all save and rom folders from the second sd card, format it and copy the save and rom folders back.

When you say slowdowns, do you mean full freezes of about 20 to 60 seconds like I do ? And if so, were they linked to the wifi being on or not (which clearly changes everything on my side) ?
Please answer me when you can as I'm tempted to format and reinstall as you propose but it will take many hours...

PS: I ask because I'm not sure that they the issue that you describe is a freezing issue, always occurring at the same exact moment, like the issue that I (and the guys on Reddit) are facing.
But on any case, thanks a lot for trying to help. 👌

@bladeoner
Copy link

Sorry, yes I mean I also experience freezes, I can confirm that it didn't fix the issue, it really seems to be related to the theme.

I didn't experience it before today, I am using builds based on the latest commits.

It might be related to this change in the theme: anthonycaccese/art-book-next-es@5cbf13d

The commit before that, is something I have added to the theme and didn't run into any issues with it: anthonycaccese/art-book-next-es@f2bf022

@Gregoloco
Copy link
Author

The commit before that, is something I have added to the theme and didn't run into any issues with it: anthonycaccese/art-book-next-es@f2bf022

Could you please help me undersand what you mean by commits etc... ? Is there a way to download an older version of the ES-ART-BOOK-NEXT theme that I can download and that as solved the issue on your side ? That would be wonderful...

@bladeoner
Copy link

Did you try to download the Art-Book-Next theme? If not you can do that by clicking on Updates & Downloads in the system menu, click on Themes and then search for "Art-Book-Next". After installation go back to the themes and select that one.

@johnolinda
Copy link

So it seems that my theory about PICO-8 was incorrect. The freezing issue returned today, so I will investigate the theme as another culprit and see. It'll be great if it isn't P8 because my kids love those.

@Gregoloco
Copy link
Author

Gregoloco commented Dec 30, 2024

Thanks a lot for your help.
I tried using the downloaded version of the themes (= ART-BOOK-NEXT-ES) but the issue is exactly the same on my side, even worth... I then tried the -ES-THEME-CARBON) and it seems to work better (even if it less my taste ^^) but then it takes at least 1 full minute to shut down the device (as if "the freeze" happens at another moment).
What is frustrating with the ES THEME is that after "the freeze" has happened, the device works like a charm until you shut it down... And what is very strange is that is seems to me that the issue started yesterday just as I wanted to use the device as always... with no explanations...

But back to some more testing :
I tried to use another smaller SD Card as SD Card 2, with less games installed... But the issue is exactly the same, so the issue does not seem to be explained by a faulty or too large SD Card 2.
I then tried to flash the Knulli Firefly OS on this smaller SD Card and used it as SD Card 1... But once again, the issue is the same, so it does not seem to be linked to a faulty SD Card 1 neither...

I'm really getting lost at this point and see only 2 solutions currently = use the previous version of Knulli OS which works perfectly (but with less emulation options) OR use the Firefly version but without connecting to the WIFI (but I still have some Amiga games to scrap manually...)...
Keep me informed if you find any solution on your side please and thanks again for your previous answers.

@Gregoloco
Copy link
Author

Gregoloco commented Dec 30, 2024

To end the night... I tried to see if I could find some logs or traces of the issue and in the file wsdd.log, I see events corresponding to the issue happening during my test =
2024-12-30 22:33:51,503:wsdd WARNING(pid 3171): no interface given, using all interfaces
2024-12-30 22:36:12,545:wsdd ERROR(pid 3171): error while sending packet on wlan0: [Errno 22] Invalid argument
2024-12-30 21:51:25,084:wsdd ERROR(pid 3176): error while sending packet on wlan0: [Errno 22] Invalid argument

Does anyone knows what this may be linked to ?

  • For info, I tried to connect from the PC on \KNULLI as soon as I start the device with wifi activated and it connects perfectly (but it does not solve the issue).
  • I just observed 2-3 times while making the tests that if I wait for about one minute and a half after booting the device with WIFI activated, then the issue does not occur anymore and the device is flawless... so it may be linked to a connection issue which resolves about a minute after the OS has been loaded.

For now, I will deactivate the WIFI in the Knulli menu and try to turn it on only when I need to do scrapping...
And right now I will go play Metaphor to keep my sanity :-)

@johnolinda
Copy link

Fascinating. I did the same test with the Wi-Fi disabled and got the same results. No slowdown or freezing. I'm going to add the PICO-8 roms back in and see if it continues to perform well. I can live without Wi-Fi, especially since I went ahead and used EXFAT this time around so I can load roms on by plugging in.

@Gregoloco
Copy link
Author

Gregoloco commented Dec 31, 2024

@bladeoner I saw your new request, but please note that on my side, downloading the theme via the menu and changing to ART-BOOK-NEXT-ES did not change anything about my 'one time 30-60sc freezing after booting with wifi activated' issue :).
And I also experiment freezing or stability issues when using the CARBON theme with Wifi activated.
Everything works perfectly and flawlessly as before when I turn off WiFi in the Knulli settings.
So I think the issue is more likely linked to a wifi/wsdd calls error.

@johnolinda
Copy link

I can also confirm that when Wi-Fi is left on, and the device is left alone for several minutes after booting, there is no lag or freezing when navigating the systems. So it seems like something is happening after boot (as you logs suggested) that is causing the freezing behavior if the user is using the interface at the same time.

@DPhill22
Copy link

@Gregoloco, thank you for posting about this issue! I just got my RG35xxH two days ago and immediately installed Knully firefly (fresh flash to new SD card via Balena). I have been experiencing the exact same freezing issue. Your post has 1.) helped me not feel like I'm going crazy, and 2.) saved me hours of testing to try ruling out my handheld hardware and the SD card and installation.

I took have my handheld connect to Wi-Fi on boot and am using the ES-THEME-ART-BOOK-NEXT theme. My freeze most often comes first thing after booting (as you detailed), although I have also had it freeze at other times (coming out of a game, etc). Also tried the ART-BOOK-NEXT-ES and had the same freezing. I can reproduce the freeze pretty much 100% of the time if I boot and go directly to ports and try to enter/browse my ports system. I just turned the handheld on and did not immediately try to browse any systems. Instead, I let it sit on the theme home screen for like a minute. Then I could browse through systems without having a freeze... Maybe it would happen if I continue trying to use it though.

Your suggestions about wifi sound right though. I downloaded the Alekfull-NX theme and I'm going to test whether or not it happens with another theme. Then also if turning wifi off will cause it to go away.

I really hope the devs see this thread or are aware so they can get to the bottom of this problem. Also, I hope others find this thread before spending hours of frustration reflashing cards and hoping their handheld isn't broken.

I'll post a follow up if I discover anything interesting in my testing and use tonight.

@Gregoloco
Copy link
Author

I'm really happy if I could help some people.
On my side I'm done searching as it seems that the issue is a bit too complicated for me to understand.
I really hope that some of the developers will be able to help us as I really love knulli and have spent months making a Knulli adapted rom library and configuration on my side...
Peace and do not hesitate to post off you have any input or similar issue.

@bladeoner
Copy link

bladeoner commented Dec 31, 2024

I had the same issue, but not anymore, I have installed the ART-BOOK-NEXT-ES, switched off Wifi, switched it on, turned off Retroachievements and turned it on again, switched between themes, and between all steps I have rebooted.

@Gregoloco
Copy link
Author

Gregoloco commented Dec 31, 2024

@bladeoner in this case, it seems that the issue that you are facing is not related to the issue discussed here.
As explained by me and others, our issue is clearly linked to wifi and can be reproduced systematically at the device startup with both the stock and downloadable versions of the ART BOOK theme (and once the 30-60s freeze has happened at startup or if the wifi is deactivated, then there is no issue at all with the device).

EDIT: I'm so sorry.... it makes no sense but it seems that @bladeoner solution worked for me this morning... I booted the device with wifi off, changed the theme to the ART BOOK ES downloaded version, rebooted, tuned on wifi, rebooted, changed back the them to stock ES ART BOOK, rebooted, and it seems that the issue is now gone (which is completely crazy given all the tests and reboots I've done during the past 48 hours).
I will keep you informed after a bit of more tests/ude to confirm if the issue has really disappeared on my side. But thanks a lot @bladeoner.

@bladeoner
Copy link

@Gregoloco I also don't have an explanation why it is working, I just tested again from another sd card, clean installation, connect WiFi, rebooted several times and no issue.

What might be interesting is to see if there are differences in the configuration file (system / batocera.conf) on the sd card, when the issue occurs and when the issue does not occur.

@Gregoloco
Copy link
Author

Yes. But what is really strange is that I did reproduce systematically the exact same issue reinstalling on fresh SD Card yesterday (new install with only configuring the wifi which induced the issue directly).
So this does not make any sense on my side (unless the issue was linked to the dates of 29 and 30 December only 🤣).

@DPhill22
Copy link

Update: I installed and switched to the Alekfull-NX theme and then rebooted to test. I did not see the system freeze as it consistently did before. Then, I switched back to the ES-THEME-ART-BOOK-NEXT theme (never changing any wifi settings) and started rebooting without freezing. So far it seems that the issue has not reoccurred. Time will tell...

@bladeoner
Copy link

@Gregoloco is it still working for you?

@Gregoloco
Copy link
Author

Hello.
I just tried. And everything seems to go fine.... Just like before the unexpected and mysterious issue 😂
Best wishes to you all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants