gaasedelen / titan

Xbox Kernel Patches for Extended Storage
MIT License
151 stars 11 forks source link

XBMC4XBOX FREEZING ON FILEMANAGER #7

Open Supah736 opened 2 years ago

Supah736 commented 2 years ago

Issue is that whenever user opens file manager in xbmc4xbox clean install it freezes the xbox when opening file manager from within xbmc4xbox with titan bios. It just gets stuck saying working then becomes unresponsive.

Supah736 commented 2 years ago

It works when I use add source in xbmc4xbox and filemanager works in unleash x just not the native file manager xbmc4xbox.

gaasedelen commented 2 years ago

The short answer is that this is a bug that needs to be fixed in XBMC.

The longer answer is that the higher UDMA speeds are exposing some of the bad assumptions and unsafe practices within XBMC's codebase. This is sort of similar to the temp issues when using an XboxHD+

Specifically, I think there's probably race conditions where XBMC fails to read the correct DVD drive state on startup which is causing the File manger to get confused and hang (or crash).

I kind of hint at this in the Titan README:

DVD drive status can be flakey in XBMC under higher UDMA modes (SMBus issues? most likely)

If you were to eject your DVD drive or try going to the system info tab before opening the system file manager, I assume it'll work just fine because XBMC will re-fetch the DVD drive state.

Alternatively you could try lowering your UDMA speed to 4, or possibly even trying a different revision of DVD drive in the Xbox which 'might' have just enough difference in response times to avoid the race.

The correct longterm solution is that one of us technical contributors will probably have to go and formally update XBMC to start rectifying these modern edgecases on behalf of the community.

Supah736 commented 2 years ago

I can confirm that loading the system info then going back does indeed fix the issue for the filemanager in xbmc. It only pops up again when restarting xbox then I have to go back into system info to fix it. Using the eject button caused it to freeze as well except this time it froze with the rol blinking as if it's reading a disk. Even when I build with udma 2 flag same thing it freezes.

gaasedelen commented 2 years ago

Please try to file separate issues for separate problems, it makes it easier to track and fix things as applicable.

I was able to reproduce your issue with the file manager 'freezing' tonight, specifically only after swapping a Samsung-605B into the Xbox I primarily developed and tested Titan on. With a Thompson drive in this system, there are no issues with XBMC or File Manger. With a Samsung 605B, it's behaving similar to how you describe (but eject/sys info seems to help workaround the issue).

Practically speaking Titan doesn't touch or modify anything in the kernel that has to do with the DVD drive, so it's definitely a bit odd. The Xbox kernel also makes zero special-casing for the different types of DVD drives.

I'm surprised the UDMA change didn't have any effect but I'm still confident that XBMC is partially at fault here. It's also possibly aggravated by the fact that many Samsung drives have begun to fall out of spec and ultimately fail (error 12, etc.) over the past couple of years.

TL;DR: I will still look into root-causing this issue, but Thompson drives do not seem to experience this with XBMC.

Thanks for the report!

PS: Also can you share info about your hardware / setup? Eg. Xbox version, SATA Adapter, SATA Drive Type, DVD Drive Type, Modchip

Supah736 commented 2 years ago

Hardware V1.4 Startech sata adapter 80 wire ide cable upgrade. It's tsoped flashed no modchip needed here. 4tb sata hgst drive. 0406222309 0406222310 0406222310a

Supah736 commented 2 years ago

Good thing is xbmc4xbox gamers edition fixes the filemanager issue

gaasedelen commented 2 years ago

Just as an additional comment, I tested with an unmodified version of M8+ and Samsung 605B with a 10TB HDD in the system and I got the same file manager 'hanging' problem. So it isn't an issue introduced by the Titan patches. It's some sort of artifact between a 'big' HDD versus a slow DVD drive?

I looked briefly at the DVD drive initialization logic during bootup. The kernel will wait for up to 1 second for the DVD drive to initialize itself and reach a 'ready' state before it gives up and continues through the boot process. I'm assuming that my Samsung 605B and your Philips are failing to complete their media detect / initialization during this window.

I could try patching it to be a bit longer (say 5 seconds) just as a quick test and 'dirty' solution, but it doesn't exactly explain why a DVD drive would be slower to initialize or report its status as ready with a 'bigger' HDD in the system. It's a bit of an odd issue, for sure.

Supah736 commented 2 years ago

Idk now that I have everything running The only thing I hate that doesn't work is IGR which is very annoying to always have to turn off xbox. Please make that a priority over everything as that is the main feature of a tsop that is actually very useful. I was even able to get xiso working with ur latest bios and a on the fly kernel patcher for dashloader and xiso loading very cool.

Supah736 commented 2 years ago

FIX IGR FOR NEXT RELEASE.

Supah736 commented 2 years ago

I resolved all my issues by switching to the far superior cerbios now that it support v1.4 and I'm never looking back this will be the last time I have to rip my hdd out my xbox to backup everything to reformat it for a special bios.

TheTimeWalker commented 2 years ago

If you can't appreciate somebody volunteering their free time to implement such features and open sourcing this, then you shouldn't be here in the first place. If you're happy with a different solution, like the mentioned Cerbios, then more power to you. But you're not doing any favors and just wasting time if you think that such kind of messages would be in any kind helpful. You didn't pay for anything for this and the project is explicitly marked "highly experimental". Nobody owes you anything and nobody forced you to install this on your Xbox.

webodan commented 1 year ago

this issue is biting me hard as well, and for me, it is a major annoyance.

It would be awesome if someone could fix it, in my case it just shows empty, but whenever I run a donglefree dvd playback app, the movie plays fine, so the DVD drive is not the culprit. Going to the system info tap or ejecting the drive while in any version of XBMC other than XBMC4Gamers doesn't fix it. but sadly XBMC4Gamers has no multimedia support at all. So I don't know of any way to get XBMC to play DVD movies while using Titan.

If nobody bothers to fix it at all I'll just have to use Cerbios or something else. I'm willing to have UDMA5 instead of 6 since Titan boots so much faster and it looks much more stock than the mess that Cerbios is upon boot (I prefer having a boot animation as stock as possible). But this DVD thing is so, SO annoying to not be able to play movies anymore due to it. I don't want to discredit the work: thanks for the hard work on these kernel patches but this DVD issue needs fixing so it's awesome for me.

kaosengr commented 1 year ago

this issue is biting me hard as well, and for me, it is a major annoyance.

It would be awesome if someone could fix it, in my case it just shows empty, but whenever I run a donglefree dvd playback app, the movie plays fine, so the DVD drive is not the culprit. Going to the system info tap or ejecting the drive while in any version of XBMC other than XBMC4Gamers doesn't fix it. but sadly XBMC4Gamers has no multimedia support at all. So I don't know of any way to get XBMC to play DVD movies while using Titan.

If nobody bothers to fix it at all I'll just have to use Cerbios or something else. I'm willing to have UDMA5 instead of 6 since Titan boots so much faster and it looks much more stock than the mess that Cerbios is upon boot (I prefer having a boot animation as stock as possible). But this DVD thing is so, SO annoying to not be able to play movies anymore due to it. I don't want to discredit the work: thanks for the hard work on these kernel patches but this DVD issue needs fixing so it's awesome for me.

I don't think multimedia support has been removed. However, there is simply no menu tab to select/play multimedia files.

IIRC, you can still play a DVD by going through the File Manager in XBMC4Gamers. In the File Manager, select the DVD to play it.