[GH-ISSUE #390] NBFC failing to control fan after suspend #349

Closed
opened 2026-02-26 00:32:24 +03:00 by kerem · 1 comment
Owner

Originally created by @eugeneromero on GitHub (Nov 23, 2017).
Original GitHub issue: https://github.com/hirschmann/nbfc/issues/390

Hi! First off, wonderful work on NBFC. Great piece of software and really good for controlling that loud fan.

The issue I'm seeing is the following:

Host: Arch Linux on an HP Folio 13 1050-LA

I have NBFC set as a service. NBFC works great when it starts at boot. However, after suspending the computer, NBFC is no longer able to control the fan. When I come back from suspend, the fan seems to be "set" at a fixed speed (set by the motherboard/EC chip I'm guessing, but have no way to confirm).

nbfc status fails to report the speed anymore (it works before suspending, but after just shows 0 or a negative number).

Attempting to adjust the speed manually does not work. Also, starting/stopping and enabling/disabling the service does not help either. The only way I have been able to get NBFC to come back is to turn off the computer, wait a few seconds, and restart (a simple reboot does not seem to be enough, I wonder if its from power to the EC never fully cutting off).

I have not been able to find any logs where NBFC complains about anything. This is the journalctl log from the moment the computer comes back from suspend:

Nov 22 17:48:30 arch kernel: ACPI: Low-level resume complete
Nov 22 17:48:30 arch kernel: ACPI: EC: EC started
Nov 22 17:48:30 arch kernel: PM: Restoring platform NVS memory
Nov 22 17:48:30 arch kernel: Suspended for 2925.080 seconds
Nov 22 17:48:30 arch kernel: Enabling non-boot CPUs ...
Nov 22 17:48:30 arch kernel: x86: Booting SMP configuration:
Nov 22 17:48:30 arch kernel: smpboot: Booting Node 0 Processor 1 APIC 0x1
Nov 22 17:48:30 arch kernel:  cache: parent cpu1 should not be sleeping
Nov 22 17:48:30 arch kernel: CPU1 is up
Nov 22 17:48:30 arch kernel: smpboot: Booting Node 0 Processor 2 APIC 0x2
Nov 22 17:48:30 arch kernel:  cache: parent cpu2 should not be sleeping
Nov 22 17:48:30 arch kernel: CPU2 is up
Nov 22 17:48:30 arch kernel: smpboot: Booting Node 0 Processor 3 APIC 0x3
Nov 22 17:48:31 arch kernel:  cache: parent cpu3 should not be sleeping
Nov 22 17:48:31 arch kernel: CPU3 is up
Nov 22 17:48:31 arch kernel: ACPI: Waking up from system sleep state S3
Nov 22 17:48:31 arch kernel: PM: noirq resume of devices complete after 18.430 msecs
Nov 22 17:48:31 arch kernel: PM: early resume of devices complete after 0.634 msecs
Nov 22 17:48:31 arch kernel: ACPI: EC: event unblocked
Nov 22 17:48:31 arch kernel: sdhci-pci 0000:03:00.1: Will use DMA mode even though HW doesn't 
fully claim to support it.
Nov 22 17:48:31 arch kernel: sdhci-pci 0000:03:00.1: Will use DMA mode even though HW doesn't 
fully claim to support it.
Nov 22 17:48:31 arch kernel: usb usb2: root hub lost power or was reset
Nov 22 17:48:31 arch kernel: usb usb3: root hub lost power or was reset
Nov 22 17:48:31 arch kernel: sd 0:0:0:0: [sda] Starting disk
Nov 22 17:48:31 arch kernel: usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
Nov 22 17:48:31 arch kernel: PM: resume of devices complete after 878.695 msecs
Nov 22 17:48:31 arch kernel: PM: Finishing wakeup.
Nov 22 17:48:31 arch kernel: OOM killer enabled.

The configuration I'm using was copied from the HP ENVY m6-1254eo template. I tested playing around with the RegisterWriteConfigurations (attempted changing the WriteMode, WriteOccasion and ResetRequiredvalues), but didn't see any meaningful changes. My config is as follows:

<?xml version="1.0"?>
<FanControlConfigV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <NotebookModel>HP Folio 13</NotebookModel>
  <Author>Eugene Romero, based on work by Brian Nelson</Author>
  <EcPollInterval>1000</EcPollInterval>
  <ReadWriteWords>false</ReadWriteWords>
  <CriticalTemperature>85</CriticalTemperature>
  <FanConfigurations>
    <FanConfiguration>
      <FanDisplayName>CPU Fan</FanDisplayName>
      <ReadRegister>17</ReadRegister>
      <WriteRegister>20</WriteRegister>
      <MinSpeedValue>20</MinSpeedValue>
      <MaxSpeedValue>68</MaxSpeedValue>
      <IndependentReadMinMaxValues>false</IndependentReadMinMaxValues>
      <MinSpeedValueRead>0</MinSpeedValueRead>
      <MaxSpeedValueRead>0</MaxSpeedValueRead>
      <ResetRequired>false</ResetRequired>
      <FanSpeedResetValue>0</FanSpeedResetValue>
      <TemperatureThresholds>
        <TemperatureThreshold>
          <UpThreshold>0</UpThreshold>
          <DownThreshold>0</DownThreshold>
          <FanSpeed>0</FanSpeed>
        </TemperatureThreshold>
	<TemperatureThreshold>
          <UpThreshold>60</UpThreshold>
          <DownThreshold>50</DownThreshold>
          <FanSpeed>35</FanSpeed>
        </TemperatureThreshold>
	<TemperatureThreshold>
          <UpThreshold>65</UpThreshold>
          <DownThreshold>55</DownThreshold>
          <FanSpeed>50</FanSpeed>
        </TemperatureThreshold>
	<TemperatureThreshold>
          <UpThreshold>70</UpThreshold>
          <DownThreshold>62</DownThreshold>
          <FanSpeed>75</FanSpeed>
        </TemperatureThreshold>
	<TemperatureThreshold>
          <UpThreshold>80</UpThreshold>
          <DownThreshold>64</DownThreshold>
          <FanSpeed>100</FanSpeed>
        </TemperatureThreshold>
      </TemperatureThresholds>
    </FanConfiguration>
  </FanConfigurations>
  <RegisterWriteConfigurations>
    <RegisterWriteConfiguration>
      <WriteMode>Set</WriteMode>
      <WriteOccasion>OnWriteFanSpeed</WriteOccasion>
      <Register>15</Register>
      <Value>5</Value>
      <ResetRequired>true</ResetRequired>
      <ResetValue>5</ResetValue>
      <ResetWriteMode>Set</ResetWriteMode>
      <Description>Manual Override</Description>
    </RegisterWriteConfiguration>
  </RegisterWriteConfigurations>
</FanControlConfigV2>

Do you have any suggestions of where I could look? Any help is greatly appreciated :)

Originally created by @eugeneromero on GitHub (Nov 23, 2017). Original GitHub issue: https://github.com/hirschmann/nbfc/issues/390 Hi! First off, wonderful work on NBFC. Great piece of software and really good for controlling that loud fan. The issue I'm seeing is the following: **Host:** Arch Linux on an HP Folio 13 1050-LA I have NBFC set as a service. NBFC works great when it starts at boot. However, after suspending the computer, NBFC is no longer able to control the fan. When I come back from suspend, the fan seems to be "set" at a fixed speed (set by the motherboard/EC chip I'm guessing, but have no way to confirm). `nbfc status` fails to report the speed anymore (it works before suspending, but after just shows `0` or a negative number). Attempting to adjust the speed manually does not work. Also, starting/stopping and enabling/disabling the service does not help either. The only way I have been able to get NBFC to come back is to turn off the computer, wait a few seconds, and restart (a simple reboot does not seem to be enough, I wonder if its from power to the EC never fully cutting off). I have not been able to find any logs where NBFC complains about anything. This is the `journalctl` log from the moment the computer comes back from suspend: ``` Nov 22 17:48:30 arch kernel: ACPI: Low-level resume complete Nov 22 17:48:30 arch kernel: ACPI: EC: EC started Nov 22 17:48:30 arch kernel: PM: Restoring platform NVS memory Nov 22 17:48:30 arch kernel: Suspended for 2925.080 seconds Nov 22 17:48:30 arch kernel: Enabling non-boot CPUs ... Nov 22 17:48:30 arch kernel: x86: Booting SMP configuration: Nov 22 17:48:30 arch kernel: smpboot: Booting Node 0 Processor 1 APIC 0x1 Nov 22 17:48:30 arch kernel: cache: parent cpu1 should not be sleeping Nov 22 17:48:30 arch kernel: CPU1 is up Nov 22 17:48:30 arch kernel: smpboot: Booting Node 0 Processor 2 APIC 0x2 Nov 22 17:48:30 arch kernel: cache: parent cpu2 should not be sleeping Nov 22 17:48:30 arch kernel: CPU2 is up Nov 22 17:48:30 arch kernel: smpboot: Booting Node 0 Processor 3 APIC 0x3 Nov 22 17:48:31 arch kernel: cache: parent cpu3 should not be sleeping Nov 22 17:48:31 arch kernel: CPU3 is up Nov 22 17:48:31 arch kernel: ACPI: Waking up from system sleep state S3 Nov 22 17:48:31 arch kernel: PM: noirq resume of devices complete after 18.430 msecs Nov 22 17:48:31 arch kernel: PM: early resume of devices complete after 0.634 msecs Nov 22 17:48:31 arch kernel: ACPI: EC: event unblocked Nov 22 17:48:31 arch kernel: sdhci-pci 0000:03:00.1: Will use DMA mode even though HW doesn't fully claim to support it. Nov 22 17:48:31 arch kernel: sdhci-pci 0000:03:00.1: Will use DMA mode even though HW doesn't fully claim to support it. Nov 22 17:48:31 arch kernel: usb usb2: root hub lost power or was reset Nov 22 17:48:31 arch kernel: usb usb3: root hub lost power or was reset Nov 22 17:48:31 arch kernel: sd 0:0:0:0: [sda] Starting disk Nov 22 17:48:31 arch kernel: usb 1-1.1: reset high-speed USB device number 3 using ehci-pci Nov 22 17:48:31 arch kernel: PM: resume of devices complete after 878.695 msecs Nov 22 17:48:31 arch kernel: PM: Finishing wakeup. Nov 22 17:48:31 arch kernel: OOM killer enabled. ``` The configuration I'm using was copied from the HP ENVY m6-1254eo template. I tested playing around with the `RegisterWriteConfigurations` (attempted changing the `WriteMode`, `WriteOccasion` and `ResetRequired`values), but didn't see any meaningful changes. My config is as follows: ``` <?xml version="1.0"?> <FanControlConfigV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <NotebookModel>HP Folio 13</NotebookModel> <Author>Eugene Romero, based on work by Brian Nelson</Author> <EcPollInterval>1000</EcPollInterval> <ReadWriteWords>false</ReadWriteWords> <CriticalTemperature>85</CriticalTemperature> <FanConfigurations> <FanConfiguration> <FanDisplayName>CPU Fan</FanDisplayName> <ReadRegister>17</ReadRegister> <WriteRegister>20</WriteRegister> <MinSpeedValue>20</MinSpeedValue> <MaxSpeedValue>68</MaxSpeedValue> <IndependentReadMinMaxValues>false</IndependentReadMinMaxValues> <MinSpeedValueRead>0</MinSpeedValueRead> <MaxSpeedValueRead>0</MaxSpeedValueRead> <ResetRequired>false</ResetRequired> <FanSpeedResetValue>0</FanSpeedResetValue> <TemperatureThresholds> <TemperatureThreshold> <UpThreshold>0</UpThreshold> <DownThreshold>0</DownThreshold> <FanSpeed>0</FanSpeed> </TemperatureThreshold> <TemperatureThreshold> <UpThreshold>60</UpThreshold> <DownThreshold>50</DownThreshold> <FanSpeed>35</FanSpeed> </TemperatureThreshold> <TemperatureThreshold> <UpThreshold>65</UpThreshold> <DownThreshold>55</DownThreshold> <FanSpeed>50</FanSpeed> </TemperatureThreshold> <TemperatureThreshold> <UpThreshold>70</UpThreshold> <DownThreshold>62</DownThreshold> <FanSpeed>75</FanSpeed> </TemperatureThreshold> <TemperatureThreshold> <UpThreshold>80</UpThreshold> <DownThreshold>64</DownThreshold> <FanSpeed>100</FanSpeed> </TemperatureThreshold> </TemperatureThresholds> </FanConfiguration> </FanConfigurations> <RegisterWriteConfigurations> <RegisterWriteConfiguration> <WriteMode>Set</WriteMode> <WriteOccasion>OnWriteFanSpeed</WriteOccasion> <Register>15</Register> <Value>5</Value> <ResetRequired>true</ResetRequired> <ResetValue>5</ResetValue> <ResetWriteMode>Set</ResetWriteMode> <Description>Manual Override</Description> </RegisterWriteConfiguration> </RegisterWriteConfigurations> </FanControlConfigV2> ``` Do you have any suggestions of where I could look? Any help is greatly appreciated :)
kerem 2026-02-26 00:32:24 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@github-actions[bot] commented on GitHub (Dec 6, 2019):

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

<!-- gh-comment-id:562372417 --> @github-actions[bot] commented on GitHub (Dec 6, 2019): 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
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nbfc-hirschmann#349
No description provided.