fix(daemon): use linuwu_sense module name in rmmod/modprobe + Predator log strings#193
Open
GbrFrn wants to merge 1 commit into
Open
fix(daemon): use linuwu_sense module name in rmmod/modprobe + Predator log strings#193GbrFrn wants to merge 1 commit into
GbrFrn wants to merge 1 commit into
Conversation
…rings - rmmod/modprobe in restart/force paths used 'linuwu-sense' (hyphen); actual kernel module is 'linuwu_sense' (underscore), so every restart attempt failed with non-zero exit, stranding the daemon in UNKNOWN even when the module was loaded and sysfs was populated. - _force_model_predator() docstring/log strings were copy-pasted from _force_model_nitro() — they said 'Nitro' where they should say 'Predator'.
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.
Summary
Two bugs in
DAMM-Daemon/DAMX-Daemon.py(daemon v0.4.6) that together strand the daemon inUNKNOWNmode when the first detection attempt fails for any reason.1. Wrong module name in
rmmod/modprobecallsEvery
subprocess.runinvocation that touches the kernel module uses'linuwu-sense'(hyphen) instead of'linuwu_sense'(underscore). The actual module name is the underscore form (lsmodand/sys/module/linuwu_senseconfirm). Affected functions:_restart_drivers_and_daemon(lines 327, 334)_force_model_nitro(154, 161)_force_model_predator(184, 191)_force_enable_all(213, 220)rmmod linuwu-sensereturns non-zero,subprocess.run(..., check=True)raises, the except branch fires, the restart helper returnsFalse. In the__init__retry loop this looks like:The daemon then settles into "limited functionality" mode for the lifetime of the process even when
/sys/module/linuwu_senseis fine, and the GUI's "Force Predator/Nitro/Enable-all" buttons silently fail to actually reload the driver./etc/modprobe.d/linuwu-sense.conf(the conf file, not a kernel module argument) deliberately keeps the hyphen — modprobe normalizes-↔_in module names, so that file still applies. The fix only touches the actual module-name args passed tormmod/modprobe.2.
_force_model_predatorcopy-paste artifactsThe docstring, the entry log, and the exception log in
_force_model_predatorall reference "Nitro" where they should say "Predator" — pure copy-paste from_force_model_nitro. The actualmodprobe ... predator_v4call was already correct; only the logging was misleading.Test plan
rmmod/modprobecall sites uselinuwu_senseafter patch (AST scan)Detected laptop type: PREDATORon an Acer Predator Triton 300 SE PT316-51s (companion PR upstreams the matching DMI quirk to Div-Linuwu-Sense)backlight_timeout, battery_calibration, battery_limiter, boot_animation_sound, fan_speed, lcd_override, thermal_profile, usb_charging