libretro / Lakka-LibreELEC

Lakka is a lightweight Linux distribution that transforms a small computer into a full blown game console.
https://www.lakka.tv
1.7k stars 288 forks source link

cec_mini_kb : cec-mini-kb.service is started 1 time only when retroarch.service is activated #1984

Closed ShigeakiAsai closed 1 week ago

ShigeakiAsai commented 2 weeks ago

This pull request concerns with issue #1981

Current (Lakka-v5.x) cec-mini-kb.service is always restarted even if it is failed. If CEC unsupported HDMI display is connected, the framerate hiccups is happened by each cec-mini-kb.service restarts. It needs to control the cec-mini-kb.service starting.

Idea for fix

At first, please refer systemd.service manual. https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html Give "cec-mini-kb.service" to depend "retroarch.service". When the systemd detects "retroarch.service" was normally started, it starts "cec-mini-kb.service". The "cec-mini-kb.service" is started 1 time only.

Changing detail

Limitation:

Request:

I placed "sd_notify()" into rarch_main() on retroarch. Please let me know more good place.

Thanks ASAI, Shigeaki

ToKe79 commented 1 week ago

Thank you. This looks good to me.

ShigeakiAsai commented 1 week ago

I confirmed the following on Lakka-RPi4.aarch64-5.x-20240622-63ed9e5.img.gz

This is the intended behavior.

Thanks ASAI, Shigeaki