saidsay-so / fancy

Control your laptop fans with a fancy ( ͡° ͜ʖ ͡°) software (compatible with NBFC).
https://musikid.github.io/fancy/
Mozilla Public License 2.0
11 stars 0 forks source link

How to check the correctness of the fan config? #15

Closed dumprop closed 2 years ago

dumprop commented 2 years ago

I created config for my laptop ( https://pastebin.com/Zj1RrUmE ) and tested it via nbfc, all seems well (tested via mono nbfc.exe set -s <values>) Also added that config for fancy (/etc/fancy/configs), it shows in fancy list but entering values via fancy set -f <values> has no result fancy list --recommended shows empty list (I can't test same function in nbfc because https://github.com/UraniumDonut/nbfc-revive/issues/53#issuecomment-960642177) All services seems well

# service fancy status
Redirecting to /bin/systemctl status fancy.service
● fancy.service - Fancy Service Daemon
     Loaded: loaded (/usr/lib/systemd/system/fancy.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2021-11-05 14:15:37 +03; 52s ago
   Main PID: 8353 (fancyd)
      Tasks: 1 (limit: 18898)
     Memory: 708.0K
        CPU: 208ms
     CGroup: /system.slice/fancy.service
             └─8353 /usr/bin/fancyd

Nov 05 14:15:37 fedora systemd[1]: Starting Fancy Service Daemon...
Nov 05 14:15:37 fedora systemd[1]: Started Fancy Service Daemon.
# service fancy-sleep status
Redirecting to /bin/systemctl status fancy-sleep.service
○ fancy-sleep.service - Fancy Service Sleep Hook
     Loaded: loaded (/usr/lib/systemd/system/fancy-sleep.service; enabled; vendor preset: disabled)
     Active: inactive (dead) since Fri 2021-11-05 13:39:42 +03; 36min ago
    Process: 4990 ExecStart=/bin/systemctl --no-block restart fancy.service (code=exited, status=0/SUCCESS)
   Main PID: 4990 (code=exited, status=0/SUCCESS)
        CPU: 4ms

Nov 05 13:39:42 fedora systemd[1]: Started Fancy Service Sleep Hook.
Nov 05 13:39:42 fedora systemd[1]: fancy-sleep.service: Deactivated successfully.

What could have gone wrong?

saidsay-so commented 2 years ago

What fancy get speeds and fancy get config shows? (they are detailed in the man files) Also, you can list the configs without the --recommended flag.

dumprop commented 2 years ago

What fancy get speeds and fancy get config shows? (they are detailed in the man files) ~Also, you can list the configs without the --recommended flag.~

Seems problem is found

[user@fedora ~]$ fancy set -c "Lenovo ThinkPad 13"
[user@fedora ~]$ fancy get config
Lenovo ThinkPad 13
[user@fedora ~]$ fancy set -c "Lenovo Yoga Slim7"
[user@fedora ~]$ fancy get config
Lenovo ThinkPad 13

So, my config is not set But I see my config Lenovo Yoga Slim7 in fancy list Also changed selected_fan_config in config.toml and Error: The name is not activatable is result Seems that my config for nbfc is not compatible for fancy What could be wrong? So, seems that documentation for porting nbfc configs to fancy is needed

saidsay-so commented 2 years ago

There is no need to port configuration to Fancy. All the configurations used by Fancy are just directly pulled from the NBFC repository, so there is maybe an error in your configuration, which is why it would refuse to load it (the config checker is very strict in Fancy, I should maybe loosen it a bit).

saidsay-so commented 2 years ago

So I found the error, it is because there is no RegisterWriteConfigurations in your configuration. I will loosen the checker to accept non-essential sections.

saidsay-so commented 2 years ago

(Also, off-topic, but thanks a lot for the inputs to improve the software, I am really grateful for that!)

dumprop commented 2 years ago

So I found the error, it is because there is no RegisterWriteConfigurations in your configuration. I will loosen the checker to accept non-essential sections.

Indeed, changed

  </FanConfigurations>
</FanControlConfigV2>

to

  </FanConfigurations>
  <RegisterWriteConfigurations />
</FanControlConfigV2>

And now all works well :partying_face: thank you for the prompt improvement of the software :+1: