hirschmann / nbfc

NoteBook FanControl
Other
2.9k stars 487 forks source link

nbfc service unable to start when using zenpower instead of k10temp #1096

Closed Yato202010 closed 3 years ago

Yato202010 commented 3 years ago

Describe the bug i recently decide to install zenpower for having a info about power consumption of my cpu but when using zenpower nbfc became unable to start

To Reproduce ` sudo modprobe -r k10temp && sudo modprobe zenpower ~  sensors amdgpu-pci-0100 Adapter: PCI adapter vddgfx: 850.00 mV edge: +55.0°C (crit = +94.0°C, hyst = -273.1°C) power1: 13.14 W (cap = 60.00 W)

zenpower-pci-00c3 Adapter: PCI adapter SVI2_Core: 832.00 mV SVI2_SoC: 1.09 V Tdie: +56.5°C (high = +95.0°C) Tctl: +56.5°C SVI2_P_Core: 16.43 W SVI2_P_SoC: 16.18 W SVI2_C_Core: 20.78 A SVI2_C_SoC: 14.79 A

amdgpu-pci-0400 Adapter: PCI adapter vddgfx: N/A vddnb: N/A edge: +56.0°C

ath10k_hwmon-pci-0300 Adapter: PCI adapter temp1: +53.0°C

BAT1-acpi-0 Adapter: ACPI interface in0: 17.03 V curr1: 0.00 A

sudo systemctl start nbfc ~  sudo systemctl status nbfc ● nbfc.service - NoteBook FanControl service Loaded: loaded (/etc/systemd/system/nbfc.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2021-03-12 12:35:20 CET; 10s ago Process: 7529 ExecStart=/opt/nbfc/nbfcservice.sh start (code=exited, status=0/SUCCESS) Main PID: 7532 (code=exited, status=1/FAILURE)

mar 12 12:35:20 yato202010 systemd[1]: nbfc.service: Scheduled restart job, restart counter is at 6. mar 12 12:35:20 yato202010 systemd[1]: Stopped NoteBook FanControl service. mar 12 12:35:20 yato202010 systemd[1]: nbfc.service: Start request repeated too quickly. mar 12 12:35:20 yato202010 systemd[1]: nbfc.service: Failed with result 'exit-code'. mar 12 12:35:20 yato202010 systemd[1]: Failed to start NoteBook FanControl service.

sudo modprobe -r zenpower && sudo modprobe k10temp

sudo systemctl start nbfc ~  sudo systemctl status nbfc ● nbfc.service - NoteBook FanControl service Loaded: loaded (/etc/systemd/system/nbfc.service; disabled; vendor preset: disabled) Active: active (running) since Fri 2021-03-12 12:36:47 CET; 7s ago Process: 7918 ExecStart=/opt/nbfc/nbfcservice.sh start (code=exited, status=0/SUCCESS) Main PID: 7921 (mono) Tasks: 11 (limit: 17863) Memory: 32.7M CGroup: /system.slice/nbfc.service └─7921 /usr/bin/mono /usr/lib/mono/4.5/mono-service.exe -l:/run/nbfc.pid -m:NbfcService /opt/nbfc/NbfcService.exe

mar 12 12:36:47 yato202010 systemd[1]: Starting NoteBook FanControl service... mar 12 12:36:47 yato202010 systemd[1]: nbfc.service: Can't open PID file /run/nbfc.pid (yet?) after start: Operation not permitted mar 12 12:36:47 yato202010 systemd[1]: Started NoteBook FanControl service. mar 12 12:36:48 yato202010 mono[7921]: NbfcService: Service NoteBookFanControlService started ~  ~  sudo systemctl status nbfc ● nbfc.service - NoteBook FanControl service Loaded: loaded (/etc/systemd/system/nbfc.service; disabled; vendor preset: disabled) Active: active (running) since Fri 2021-03-12 12:36:47 CET; 1min 16s ago Process: 7918 ExecStart=/opt/nbfc/nbfcservice.sh start (code=exited, status=0/SUCCESS) Main PID: 7921 (mono) Tasks: 11 (limit: 17863) Memory: 32.8M CGroup: /system.slice/nbfc.service └─7921 /usr/bin/mono /usr/lib/mono/4.5/mono-service.exe -l:/run/nbfc.pid -m:NbfcService /opt/nbfc/NbfcService.exe

mar 12 12:36:47 yato202010 systemd[1]: Starting NoteBook FanControl service... mar 12 12:36:47 yato202010 systemd[1]: nbfc.service: Can't open PID file /run/nbfc.pid (yet?) after start: Operation not permitted mar 12 12:36:47 yato202010 systemd[1]: Started NoteBook FanControl service. mar 12 12:36:48 yato202010 mono[7921]: NbfcService: Service NoteBookFanControlService started ~  sensors amdgpu-pci-0100 Adapter: PCI adapter vddgfx: 850.00 mV edge: +55.0°C (crit = +94.0°C, hyst = -273.1°C) power1: 13.14 W (cap = 60.00 W)

k10temp-pci-00c3 Adapter: PCI adapter Tctl: +53.8°C Tdie: +53.8°C

amdgpu-pci-0400 Adapter: PCI adapter vddgfx: N/A vddnb: N/A edge: +53.0°C

ath10k_hwmon-pci-0300 Adapter: PCI adapter temp1: +53.0°C

BAT1-acpi-0 Adapter: ACPI interface in0: 17.03 V curr1: 0.00 A `

System information

-OS: Manjaro Linux x86_64 -Host: Nitro AN515-42 V1.18 -Kernel: 5.11.2-1-MANJARO -Shell: zsh 5.8 -Resolution: 1920x1080 -DE: Plasma 5.21.2 -WM: KWin -CPU: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx (8) @ 2.000GHz -GPU: AMD Radeon Vega 8 Mobile Series -GPU: AMD ATI Radeon RX 560X -Memory: 16 Gb

batmalin commented 3 years ago

Mine works without problem. Try to start the nbfc system first and then unload k10temp and load zenpower nitro@Nitro:~/zenpower$ sudo systemctl status nbfc ● nbfc.service - NoteBook FanControl service Loaded: loaded (/etc/systemd/system/nbfc.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2021-03-15 21:37:24 EET; 2min 50s ago Process: 10476 ExecStart=/opt/nbfc/nbfcservice.sh start (code=exited, status=0/SUCCESS) Main PID: 10479 (mono) Tasks: 12 (limit: 16601) Memory: 36.7M CGroup: /system.slice/nbfc.service └─10479 /usr/bin/mono /usr/lib/mono/4.5/mono-service.exe -l:/run/nbfc.pid -m:NbfcService /opt/nbfc/NbfcService.exe

мар 15 21:37:24 Nitro systemd[1]: Starting NoteBook FanControl service... мар 15 21:37:24 Nitro systemd[1]: nbfc.service: Can't open PID file /run/nbfc.pid (yet?) after start: Operation not permitted мар 15 21:37:24 Nitro systemd[1]: Started NoteBook FanControl service. мар 15 21:37:25 Nitro mono[10479]: NbfcService: Service NoteBookFanControlService started NBFC

Yato202010 commented 3 years ago

ok for some reason this work but with this workaround i will have to switch to k10temp before each restart and swicth to zenpower after nbfc has started this don't fix the issues unfortunatly :cry:

batmalin commented 3 years ago

Well after kernel update to 5.10.23 this workaround no longer works. I hope that someone can add in the code native support for zenpower.

batmalin commented 3 years ago

OK got it working. Delete NBFC folder from /opt and /home folders, download the source again and go to Core/Plugins/StagWare.Plugins.FSTemperatureMonitor/FSTemperatureMonitor.cs open it and edit line 28 to include "zenpower" , save and then compile it again and it should work.

batmalin commented 3 years ago

So, blacklisted k10temp, zenpower loads automatically rebooted and guess what? I works like a charm with zenpower!

Yato202010 commented 3 years ago

Ohhh I will try and close this issue once I managed to do it I don't have my laptop with me right now thanks a lot X) batmalin

batmalin commented 3 years ago

You are welcome mate!

kellpossible commented 3 years ago

thank you so much, this fixed my problem too! (adding "zenpower" to the list). I was previously getting this message:

Could not load a  plugin which implements StagWare.FanControl.Plugins.ITemperatureMonitor
batmalin commented 3 years ago

Glad that it helped.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open more than 180 days with no activity. If nobody comments within 7 days, this issue will be closed