TrimUI: dedicated OSD event watchdog and FN switch status synchronization - #1703
Open
leslieclemence wants to merge 1 commit into
Open
leslieclemence wants to merge 1 commit into
leslieclemence wants to merge 1 commit into
Conversation
3 tasks
chrisj951
requested changes
Sep 21, 2026
chrisj951
left a comment
Contributor
There was a problem hiding this comment.
You're missing the hooks in Saves/spruce/spruce-config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per request by @chrisj951 on #1681, this PR introduces a dedicated
osd_sync_watchdog.shfor TrimUI OSD events rather than mixing OSD handlers intovolume_sync_watchdog.sh.Motivation & Background
On TrimUI devices with stock OSDD active (such as the Smart Pro and Smart Pro S), interactions in the Quick Menu / OSD (Cooler level, LED, Wi-Fi, Bluetooth, Rumble) drop event command files into
/tmp/system/.Furthermore, flipping the physical FN switch on the console executes
scene-rgb-led.shto turn LEDs on/off, but previously did not update the shared memory (shmvar ledswitch) or/tmp/trimui_osd/toggle_led/status, leaving the OSD tile out-of-sync with hardware.Key Changes:
osd_sync_watchdog.sh(spruce/scripts/osd_sync_watchdog.sh):/tmp/system/using event-driveninotifywait(with an interval polling fallback).set_fanlevel/set_fan: callsapply_fan_levelandsave_fan_level.led_turn_on/led_turn_off: controls RGB LEDs, removes/setsleds_forced_offflag, and syncsshmvar ledswitch&/tmp/trimui_osd/toggle_led/status.wifi_turn_on/wifi_turn_off: controls wifi, updatesSYSTEM_JSON,shmvar wifiswitch, and OSD status.bluetooth_turn_on/bluetooth_turn_off: manages bluetooth daemon, updatesSYSTEM_JSON,shmvar btswitch, and OSD status.rumble_turn_on/rumble_turn_off: sets/sys/class/motor/max_scale, gives a tactile pulse, and syncsshmvar rumbleswitch& OSD status.volume_sync_watchdog.sh100% focused on ALSA volume.spruce/scripts/FN_Button/scene-rgb-led.shandfn-led-toggle.sh: Updatesshmvar ledswitchand/tmp/trimui_osd/toggle_led/statuson the very first lines, ensuring zero-latency UI status synchronization.trimui_delegate.sh:osd_sync_watchdog.shsolely on TrimUI devices where/usr/trimui/osd/trimui_osddis present.Hardware Testing: