feat: Built-in NitroSense/Turbo Key Monitor, Live GUI Sync & Clean Event Architecture - #258
Open
bymayfe wants to merge 2 commits into
Open
feat: Built-in NitroSense/Turbo Key Monitor, Live GUI Sync & Clean Event Architecture#258bymayfe wants to merge 2 commits into
bymayfe wants to merge 2 commits into
Conversation
- Implement native evdev key monitor in DAMM-Daemon for NitroSense (148/425) and Turbo keys (149/202/203) - Add low-power mode support in PowerSourceDetection to prevent unwanted mode resets on battery - Add DispatcherTimer polling in GUI MainWindow for live dynamic sync of thermal profile changes - Switch thermal profile buttons to .Click event to eliminate programmatic feedback loops - Remove hardcoded IsChecked on Balanced button and add _isInitialized startup guard
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.
[PR / Feature Draft] Built-in NitroSense/Turbo Key Monitor, Live GUI Sync & Clean Event Architecture
📌 Summary & Motivation
This Pull Request brings complete out-of-the-box hardware key integration and resolves thermal profile synchronization bugs between the background daemon and the Avalonia GUI:
Native Hotkey & Turbo Key Daemon Monitor (
DAMM-Daemon/KeyboardMonitor.py):evdevmulti-device input monitoring directly inDAMX-Daemon, eliminating the need for external shell scripts or third-party wrappers.code 148 / 425): Automatically detects the active desktop user and launches/toggles the DAMX GUI application.code 149 / 202 / 203): Performs native 5-stage AC and 2-stage Battery thermal profile cycling directly in the daemon, adjusts fan speeds accordingly, and sends desktop OSD notifications (notify-send).code 530 / 531 / 532): Built-in handler for touchpad shortcut.Battery Mode (
low-power) Compatibility Fix (DAMM-Daemon/PowerSourceDetection.py):"low-power"to the allowed battery profile list, preventing the daemon from erroneously resetting Eco mode back to Balanced on battery.Live GUI Sync & Startup State Guard (
DivAcerManagerMax):IsChecked="True"fromBalancedProfileButtonand added_isInitializedguard to stop the GUI from overriding the active hardware profile on startup.DispatcherTimerpolling loop to automatically update the open GUI when thermal modes change externally (via Turbo key, CLI, or power source transition).IsCheckedChangedto.Click(ProfileButton_Click). This completely eliminates programmatic feedback loops (where programmaticIsCheckedchanges triggered artificial user click events that fought with the daemon).🔍 Code Comparisons & Git Diff
1.
DAMM-Daemon/KeyboardMonitor.py(NEW / REWRITTEN)2.
DAMM-Daemon/PowerSourceDetection.py3.
DivAcerManagerMax/MainWindow.axaml4.
DivAcerManagerMax/MainWindow.axaml.cs🧪 Verification & Testing