Posts by swever

    Ok I was able to work with Gemini Pro and it was able to find the possible cause and a possible fix. At least the workaround it suggested works and after that I can now login to the new profile. Here is the issue report:

    Issue: [RK3566] Kodi 22 Alpha3 Segfault on Profile Switch (SQLITE_MISUSE in CTextureDatabase) on Clean Install

    Environment:

    Hardware: Pine64 Quartz64 Model A

    OS: LibreELEC (chewitt) 12.90.1 13.0

    Kernel: Linux ARM 64-bit version 7.0.0

    Kodi Version: 22.0-ALPHA3 (21.90.703)

    Description:

    Kodi suffers a hard segmentation fault when attempting to switch to a newly created profile. This occurs on a completely clean, default installation with no third-party add-ons or custom skins installed.

    When switching to the new profile, Kodi appears to fail to cleanly release or establish locks on the core .db files. The new profile attempts to initialize and cache UI textures, receives an SQLITE_MISUSE (unable to open database file) error, and immediately segfaults while attempting to log the error via dbiplus::DbErrors.

    Subsequent attempts to log into the new profile result in a continuous crash loop because the profile's Textures14.db and Thumbnails directory are left in a corrupted/incomplete state from the initial crash.

    Steps to Reproduce:

    Start with a fresh, default installation of LibreELEC.

    Go to Settings > Profiles and create a new user profile.

    Attempt to switch to or log into the newly created profile.

    Kodi immediately crashes (Segmentation fault).

    Kodi is restarted by systemd, but selecting the new profile on the login screen results in an immediate segfault every time.

    Workaround:

    Stopping the kodi service via SSH, deleting /storage/.kodi/userdata/Database/Textures14.db, and wiping the /storage/.kodi/userdata/Thumbnails/ directory resolves the crash loop and allows the new profile to initialize successfully on the next boot.

    GDB Stack Trace (from kodi_crashlog):

    Possible Fix:

    Looking at the GDB stack trace, this appears to be a two-part issue tied to the profile teardown/startup sequence:

    1. The Root Cause (Race Condition): It seems CJobManager is not fully halting background tasks (specifically CTextureCacheJob) before the profile switch de-initializes the database connections. The background thread attempts to call CTextureDatabase::AddCachedTexture on a database connection that is either closed or in the process of being moved, resulting in the SQLITE_MISUSE error.
    2. The Segfault (Invalid Pointer in Logger): When dbiplus::SqliteDataset::exec catches the misuse error, it attempts to log it via dbiplus::DbErrors::DbErrors. The segfault inside vsnprintf suggests it is being passed a NULL pointer or an invalid memory address for the error string, crashing the application entirely rather than just logging the DB failure.

    Ensuring the cache jobs are blocked/flushed before database teardown, and sanitizing the DbErrors string arguments, should resolve the crash.

    Thanks for the new version! The LibreElec repo now works again.

    I am just having an issue that when I create a new profile and then I switch to that profile, kodi crashes.

    I remember having this issue before and as a workaround I just created the profile in my Android TV's Kodi and then backed it up and restored it into LibreElec's Kodi, but I don't know if this is an issue from LibreElec side that can be fixed?

    Here is the log:

    https://paste.libreelec.tv/cool-pigeon.log

    I also attached the crash log.

    Hello! I dont know if I am the only one, but I am getting an error when trying to open the LibreElec Add-Ons repository on kodi on the latest image for the Quartz64 Model A.

    When I try to open the repository, it shows an error indicating "Could not connect to repository.". Its the only repository with this issue and I saw this thread that talked about this and just wanted to ask if we need a new image with the latest repository? The latest image for this chip is from 02/22/2026.

    swever the images include the latest rtw88/rtw8821a_fw.bin firmware from the upstream linux-firmware repo and nothing has changed with that in the last few months. If you have files in /storage/.config/firmware/rtw88 these override the lastest upstream files so I would suggest removing them and using upstream firmware. If that doesn't fix something; clean boot then "journalctl | paste" and share the log URL so we can look for error messages etc.

    I deleted the firmware directory and the latest image (1/11/2026, 11:05:07 PM) makes the wifi dongle work again! Thanks!

    Thanks for the update!! I was using the firmware rtw8821a for my wifi dongle and after updating to the latest test update, the dongle no longer works. I think it was probably the linux upgrade.

    Would it be possible to add the firmware to LibreElec? I don't know if that could help with this issue. I was using the /storage/.config/firmware/rtw88 directory to manually add the firmware, but that no longer seems to be working. Also, I got the one I am using from this link

    Again, THANK YOU. Haha the CEC now works when I turn my projector back on. And I didn't need to run the getedid command.

    Also, the stuttering went away lol don't know why. I'll stay with your test versions of LE.

    I'll try to test the profile creation again and if it fails I'll send a debug log. I just need a new SD card because I don't want to mess everything I've configured already in this one.

    You're the best!! Thanks again.

    Ok I've been updating constantly to the latest nightly versions and LE has greatly improved it's performance! Now Kodi doesn't crash as easily and everything moves smoother. Thank you!

    Also, so far I've encountered some issues and some of them have been reported and fixed in the past. I don't know if it can be fixed the same way for these rockchips?

    1. CEC stops working after turning the TV back up (there is no getedid command available in this version of LE to fix this, but there was a fix for this in this commit 4 years ago. That patch added in the fix seems to no longer be on the master branch. Other related commit: #5800)

    2. When playing a movie, the video stutters every like 5 to 10 seconds showing a quick image of the next scene. I couldn't find anything in the logs that might indicate the cause of this issue and I don't know if its something that's only happening to me or it's a bug. I am playing the movie from the Jellyfin add-on, but this doesn't happen with another same installation of Kodi I have running on an Android TV.

    3. Creating profiles is possible, but that makes the master user inaccesible and LE crashes when switching back to that user. There was a fix for this in this commit for LE version 10.

    Ok a workaround I found for the profile creation issue is that I restored a backup from the Kodi app I have installed in my Android TV with the profiles created and now switching between the profiles work. There's probably something wrong in the process of creating a new profile from this version of LE.

    Also when I turn off and then back on my projector, the remote controller no longer works with LE (CEC stops working). I wanted to try to fix it using the getedid script, but the getedid command doesn't seem to exist in this LE. I am trying the latest nightly build. Is there a way I can add or run the script manually? Or is there a possibility to add the getedid command to LE? I just probably need to run the 'getedid create' command to fix this issue.

    Hello. Just wanted to share some issues I am having with the latest nightly build for the Quartz64 Model A.

    1. I have the 8 GB of RAM version, but LE is indicating that its only detecting around 4GB of RAM in the System Information. Also in the logs I saw this line, so I don't know if this is on purpose:

    [    0.000000] Memory limited to 3838MB


    2. When creating a new profile, the new profile is able to login successfully, but changing back to the master user makes the OS freeze. After that I rebooted and now I'm only able to login to the new profile, if I try to go to the login screen or try to login to the master user, it freezes again.

    I tried watching the logs for any error message, but there is none. Basically logging in to the master user after creating a new profile is impossible. I investigated a little and saw a similar situation during the LE version 10 era, so I don't know of this can be related? That situation was fixed with this commit.

    1. I'll have to ask the upstream kernel maintainers if suspend/resume are supported and expected to work. I won't guarantee it.

    2. In theory the kernel should handle the display device going away and coming back. Kodi only checks things at startup though so might not handle things properly even if things lower in the stack do. In either case the workaround will be (or should be) to run the 'getedid' script so the kernel (and thus Kodi) always sees the display device (via it's EDID data) as connected.

    3. If you are using official nightlies please try the latest image in my testing share and see if that fixes the issue? - I've added some kernel options to make iptables work but can't remember if that change has made it into official nightlies. I'm also unsure if I added all the options for Docker though.


    Thank you for your response!! I'll try the getedid script and hopefully it works.

    For #3, I tried the latest image in your testing share for the Quartz Model A that was uploaded on Oct 19. The docker service is still failing :( Seems to not be able to create the nat chain in iptables, at least is a different error haha

    Code
    Oct 29 22:37:37 LibreELEC dockerd[1521]: time="2025-10-29T22:37:37.316172917Z" level=info msg="Loading containers: start."
    Oct 29 22:37:37 LibreELEC dockerd[1521]: time="2025-10-29T22:37:37.548707191Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
    Oct 29 22:37:37 LibreELEC dockerd[1521]: time="2025-10-29T22:37:37.551579816Z" level=info msg="stopping h3althch3ck following graceful shutdown" module=libcontainerd
    Oct 29 22:37:37 LibreELEC dockerd[1521]: time="2025-10-29T22:37:37.551939733Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
    Oct 29 22:37:38 LibreELEC dockerd[1521]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register "bridge" driver: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.11
    Oct 29 22:37:38 LibreELEC dockerd[1521]: Perhaps iptables or your kernel needs to be upgraded.
    Oct 29 22:37:38 LibreELEC dockerd[1521]:  (exit status 3)
    Oct 29 22:37:38 LibreELEC systemd[1]: service.system.docker.service: Main process exited, code=exited, status=1/FAILURE
    Oct 29 22:37:38 LibreELEC systemd[1]: service.system.docker.service: Failed with result 'exit-code'.
    Oct 29 22:37:38 LibreELEC systemd[1]: Failed to start service.system.docker.service.

    I'm just trying to use LE to also stream music from my turntable (which has a USB cable) by HTTP, but the ffmpeg add-on comes with ALSA disabled and docker is not working. I'll continue to investigate any other way to do this with LE (if it's even possible).

    OK I have been using the latest nightly build for RK3566 and I've been able to watch videos natively!! I tried playing HDR and SDR videos and all plays smoothly, even 4K. I'm also able to control LE using CEC with my projector's remote control successfully. Thank you!

    I only have some issues at the moment:

    1. When I try to suspend the system, it gets stuck with a loading icon in the middle of the screen and I have to manually reboot. Is this a normal bug of LE or is this related with the nightly releases for the RK chips?

    2. I set LE to not suspend when the projector turns off (because of issue #1) and when I turn my projector off and then on, the CEC no longer works and LE doesn't react to my remote controller.

    3. I installed the Docker add-on and the docker service is not able to start because of an iptables error.

    Error: iptables v1.8.11 (legacy): can't initialize iptables table `nat': Table does not exist...

    I was having the same issue with my WiFi USB dongle and was able to fix it, so I'll just add it here if it helps someone. I am using LE 13 for RK3566 (I have a Quartz64 Model A)

    chewitt thanks for the instructions on how to see the log. I was able to do it and found this:

    Code
    [   11.871724] rtw88_8821au 3-1:1.0: Direct firmware load for rtw88/rtw8821a_fw.bin failed with error -2
    [   11.871760] rtw88_8821au 3-1:1.0: failed to request firmware
    [   11.962647] rtw88_8821au 3-1:1.0: failed to load firmware
    [   11.962671] rtw88_8821au 3-1:1.0: failed to setup chip efuse info
    [   11.962676] rtw88_8821au 3-1:1.0: failed to setup chip information
    [   11.962854] rtw88_8821au 3-1:1.0: probe with driver rtw88_8821au failed with error -22
    [   11.962982] usbcore: registered new interface driver rtw88_8821au

    As you said, the firmware file rtw88/rtw8821a_fw.bin was missing, so I just downloaded it from here and then I inserted the file in this location: /storage/.config/firmware/rtw88/rtw8821a_fw.bin.

    In my case the firmware folder didn't exist so I had to create it. And after rebooting, voilà! Now my dongle works as expected.