Posts by frakkin64

    The linked post (number 9) contains the solution at

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    Looks like that will install a new service, and will trigger on any shutdown event (poweroff/halt/reboot). So something to consider with what is trying to be achieved.

    This option would be nice to see as an enhancement to kodi-autostart.service passing a start/stop parameter to autostart.sh, but I guess the problem there is no way of knowing if the script is written for an argument.

    Upon Kodi power-off-system, I want to send a message to a headless RPi4 to shutdown properly via "shutdown -P now" or similar.


    Would there be another way that avoids having to use the GPIO to communicate between the two RPis?

    I wouldn't turn them off, but that's me. The power draw is so minimal, it's honestly not worth the hassle, wear & tear.

    Other than GPIO, which you could use the gpio-poweroff overlay on the one controlling the shutdown and gpio-shutdown overlay on the one receiving it. There does appear to be some downsides with that approach, as in you need to remove power externally.

    Another option is could be simply pinging from the headless RPi4 and initiating a shutdown? Or wait and see what others have to say, now they understand your end goal here.

    You may well be right - But I use two browsers simultaneously most of the time, one of them doesn't have me logged into YT and the videos play the same as the other browser where I am logged-in. How is that different to LE not being logged-in and requesting to play a video?

    You need to log a ticket with the add-on developer, as LE doesn't maintain the YouTube add-on.

    Tubed is another add-on you can check out, it uses a shared API key that is already embedded in the add-on, it's written by the same person who maintains the YouTube add-on.

    GitHub - anxdpanic/plugin.video.youtube: Watch your favorite YouTube content on Kodi
    Watch your favorite YouTube content on Kodi. Contribute to anxdpanic/plugin.video.youtube development by creating an account on GitHub.
    github.com

    I am guessing this might be the fix for the black screen (no HDMI output) issue, it was just committed today to the rpi-5.10.y branch:

    drm/vc4: hdmi: Fix clock value used for validating hdmi modes · raspberrypi/linux@cd1b7be
    We are using mode->crt_clock here which is filled by drm_mode_set_crtcinfo() which is called right after .mode_valid. Use mode->clock which is valid…
    github.com

    Hopefully this will make it into LE 10.0.2 and the LE 11 nightly builds soon.

    Here is another option to look at, which I think will enable a bridge (which is easier, IMO):

    Alomon
    May 11, 2021 at 2:07 PM
    Enable Ethernet tethering with LibreELEC
    I have my Raspberry Pi 3 connected to my WLAN with the on-board chip. Now I want to connect my TV's Ethernet cable (it does not have WiFi) to the RPi3 to…
    raspberrypi.stackexchange.com


    For the route you are going you would probably have to setup NAT via iptables, did you do that? what do those rules look like? More than likely you need to just reverse interface names in a few places.

    iptables -t nat -F

    iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

    iptables -F FORWARD

    iptables -A FORWARD -i eth0 -j ACCEPT

    should be the minimal configuration, along with enabling ip_forward. But I would go with the bridge/tethering option, as it is a lot simpler, and the TV device would appear on your network.

    i would be ecstatic if someone knew of an addon that could help.. or a way for me to auto replace the /etc/localtime flag without harming libreelec..

    Time zone is stored in "/storage/.cache/timezone", and you would need to restart tz-data.service for it to take effect on the OS side. You might need to restart Kodi as well, but I guess you can experiment to find out.

    Outputting 23.976/24.000Hz content natively in 23.976/24.000 Hz over HDMI shouldn't cause you 'Soap Opera Effect' issues unless your TV either cannot disable Frame Rate interpolation, or can't display 23.976/24.000fps content cleanly (i.e. without itself adding 3:2 or similar artefacts)

    Once I turned off Picture Clarity Settings on the Samsung TV it is working fine. They call it motion smoothing, what exactly the technical details are not clear to me. :)

    As for my other issue with the 29.97 content, perhaps it is caused by transcoding interlaced MPEG2 broadcasts to H.264. You need a heck a lot of time and patience to understand ffmpeg and video encoding, and there is a lot of bad information, so it's possible I am doing it wrong. I am going to drop yadif filter, and via mediainfo if it says the scan type is Interlaced then add "-flags +ilme+ildct -x264opts tff=1" to transcode to H.264 interlaced.

    Pull-down is only needed for 24->60 Hz, you can keep it disabled if your TV suports 24fps. You should enable double refresh rate though (and disable 25/29.97/30Hz in whitelist) to get proper output with interlaced contents.

    I didn't have 24/25/29.7/30 Hz enabled in the whitelist, mostly because of the "soap opera" effect (apparently that's what Samsung calls it) I was having.

    Motion smoothing and the soap opera effect on Samsung TVs
    Motion smoothing, auto motion plus, the soap opera effect, or blur reduction. No matter what you call it, there are certain times where you may want to use…
    www.samsung.com

    Regarding the black screen/refresh rate changes: can you please upload a sample file that shows this issue?

    The issue seems to be caused by I guess Kodi sampling the frame rate and averaging it, and 29.97 to 30 is within that bit of error for it to cause a refresh rate change when double refresh rate is enabled. My guess it has always been like this, up until now I haven't enabled adjust display refresh rate, so a bit of new territory for me. In any case, I did delete the episodes from the PVR, they were all from the same show, I checked a few recordings from the same channel and haven't noticed it again. I'll reply back once I find one again.

    It would be great to get some feedback on the LE10 testbuild as well, initial testing here looked good, but we'd like to have some more positive confirmation that things work as expected before adding the backport patches to official LE10 releases.

    Anyone else seeing occasional black screen during playback? It's almost like the TV is switching refresh rate or resolution, which isn't something I would expect. Running LE10 build based on the le10-test branch. Mostly have noticed this watching from PVR (Tvheadend) with h264 progressive content using HW decoding. It's not scene changes, because I left the progress bar on screen and it also disappears.

    Debug log:

    http://ix.io/3JuE


    Should both pull down & double refresh rate be used? It looks like it is jumping between 59.94 and 60, which I wouldn't have expected with on start/stop as the adjust refresh option. In any case, I went back to the recommendations, turned off pull down & double refresh rate, and removed the 25, 29.94, and 30 fps options. I guess that would probably fix it.

    chewitt Awesome guide, thanks. I ended up with the same settings, the only thing is 4Kp24 looked weird as I mentioned like it was sort of slow, hard to describe it. Whitelisting the 50-60hz ranges only and letting Kodi double up the frames seemed to smooth it out. I appreciate the notation you made about the HDMI cable, CanaKit claims it supports 4Kp60 and it seems to be working now, but I'll keep an eye out for problems there.

    So far I am using it on LE 10, with 5.15 kernel from LE11, and everything seems to work fine.

    This is great work from LibreELEC & Raspberry Pi teams. Thank you!

    What are the recommended Kodi settings to play back 4K HDR content?

    1) setting resolution to maximum supported, with limit gui to 1080 ? i thought this controlled the gui resolution, but then the limit gui option is a bit confusing.

    -or-

    2) setting adjust display refresh rate to on start/stop? this seems to work, however 24hz refresh rate playback was a bit weird (doesn't seem smooth, hard to describe)

    Samsung TV is reporting 3840x2160@24Hz, Input Signal Plus, HDR, UHD.

    Also, I don't see any 4Kp60 resolutions in Kodi, is that working or am I missing something?

    Edit:

    1. Option #2 seems fine, paired with whitelisting 50-60hz refresh rates and using the pull up/double options. I only whitelisted 1080 & 2160 resolutions, leaving Kodi to upscale to 1080.

    2. Still can't explain why Kodi didn't see 60hz refresh rates at 4K, but I restarted Kodi and they are showing up now.

    enable_uart=1 or freq_min=500 brings good results for my LG TV and RPi4 with a fresh installed RaspiOS Bullseye and LibreELEC 10.0.1.

    No more additional commands such as video=HDMI-A-1:1320x768@60D are needed.


    What I can't confirm at this moment, if it will affect anything else.

    I will let you know

    My understanding is enable_uart enables the serial port over the GPIO pins, with a TTL to USB serial cable you can get bootloader logs (with uart_2ndstage=1 + enable_uart=1). See here for bootloader documentation. I have been running with it for a while and haven't had any issues.

    Reported the problem over at:

    No signal after Xorg startup · Issue #4695 · raspberrypi/linux
    Describe the bug Running latest bullseye image, See the rainbow screen See the splash screen As soon as Xorg starts, No signal, monitor goes into power saving,…
    github.com

    If you want to share your experiences on that issue. They are aware of it but I think with the release of Bullseye and the new KMS display stack those guys are pretty buried in solving issues on a lot of fronts.

    I stumbled on this initially with LE 5.15.2 testing, when trying to figure out why there was no display. It also seemed to affect my USB wireless dongle. As soon as I enabled it and plugged in my TTL cable then Kodi came up fine and I was like "what the hell". :)

    I had similar problems testing 5.15.2 on LibreELEC 10, and one of my devices has problems with the current HEAD on libreelec-10.0 branch, also had similar problems with bullseye on a 3rd RPi4.

    Oddly, what I found solved it was enable_uart=1 in config.txt. There is a lot of miscellaneous reports on this issue, and some naturally have different causes, so there is a lot of noise out there on the Pi forums, the issue trackers, etc. I am told core_freq_min=500 should have the same effect, but I haven't tested that yet.

    EDIT: can confirm core_freq_min=500 also solves it, tested it on bullseye, basically without either I get crtc flip bit timeouts and black screen on GUI.

    Then I wonder, why affecting 1.9G to /tmp, or 1.8G to /var and only 27M to /storage?

    Not really mentioned here, but /tmp and /var are "tmpfs" filesystems. Which is basically like a ramdisk and is not persistent storage or using any real disk partitions.

    There is a safeguard in the resize script that will not do the resizing if the /storage partition already has some key folders. Where things go wrong is when you re-image and decide to copy files over and then recover files from a backup before first boot. This is likely your situation, and it requires a manual partition resizing & filesystem resizing.