[GH-ISSUE #6] Sony VPCF12S1E support #4

Closed
opened 2026-02-26 00:31:30 +03:00 by kerem · 4 comments
Owner

Originally created by @ntninja on GitHub (May 29, 2015).
Original GitHub issue: https://github.com/hirschmann/nbfc/issues/6

Hi there!

Thank you so much for porting to Linux!!!

I have found your program today and was a bit unhappy that none of the Sony configurations worked for my laptop. However, instead of opening another "Please Help!" ticket, I started to investigate the issue ;-) , wrote a little tool, based on your code, to dump, read and write EC registers and found out that the fan speed is controlled by register 76 on my laptop. While the full range 0...255 of possible values seems to be allowed by the EC, the hardware only seems to be capable of about 32...128.
So far I have not found any way to hand control back to the EC for automatic fan management; once that register is updated once directly is has to be manually updated until next reboot. I also have not found any reliable way to read the current fan speed value from the EC RAM. Additionally, although it's probably a hardware limitation, I have not found a way to stop the fan completely either.
My questions now are: How do I write a configuration XML based on this information? Would any of the missing pieces of information prevent the configuration file for this platform to be distributed along with NBFC? Shouldn't a tool, similar to the one I wrote for poking around the EC, be shipped with NBFC?

Jetzt schon mal Danke im Voraus für deine Mühe!

Originally created by @ntninja on GitHub (May 29, 2015). Original GitHub issue: https://github.com/hirschmann/nbfc/issues/6 Hi there! Thank you so much for porting to Linux!!! I have found your program today and was a bit unhappy that none of the Sony configurations worked for my laptop. However, instead of opening another "Please Help!" ticket, I started to investigate the issue ;-) , wrote a little tool, based on your code, to dump, read and write EC registers and found out that the fan speed is controlled by register 76 on my laptop. While the full range 0...255 of possible values seems to be allowed by the EC, the hardware only seems to be capable of about 32...128. So far I have not found any way to hand control back to the EC for automatic fan management; once that register is updated once directly is has to be manually updated until next reboot. I also have not found any reliable way to read the current fan speed value from the EC RAM. Additionally, although it's probably a hardware limitation, I have not found a way to stop the fan completely either. My questions now are: How do I write a configuration XML based on this information? Would any of the missing pieces of information prevent the configuration file for this platform to be distributed along with NBFC? Shouldn't a tool, similar to the one I wrote for poking around the EC, be shipped with NBFC? Jetzt schon mal Danke im Voraus für deine Mühe!
kerem closed this issue 2026-02-26 00:31:30 +03:00
Author
Owner

@hirschmann commented on GitHub (May 31, 2015):

Hi alexander,

you could either use the config editor shipped with NBFC (Windows only), or any (xml-)editor to create config files for NBFC.

A config file for your notebook could look like this:

<?xml version="1.0"?>
<FanControlConfigV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <NotebookModel>VPCF12S1E</NotebookModel>
  <EcPollInterval>3000</EcPollInterval>
  <ReadWriteWords>false</ReadWriteWords>
  <CriticalTemperature>75</CriticalTemperature>
  <Author>alexander255</Author>
  <FanConfigurations>
    <FanConfiguration>
      <ReadRegister>76</ReadRegister>
      <WriteRegister>76</WriteRegister>
      <MinSpeedValue>32</MinSpeedValue>
      <MaxSpeedValue>128</MaxSpeedValue>
      <ResetRequired>true</ResetRequired>
      <FanSpeedResetValue>0</FanSpeedResetValue>
      <TemperatureThresholds />
      <FanSpeedPercentageOverrides />
    </FanConfiguration>
  </FanConfigurations>
  <RegisterWriteConfigurations />
</FanControlConfigV2>

However, you have to find a way to reset the EC, otherwise I will not distribute it with NBFC.

The tool you wrote sounds great. I usually use rweverything, which is awesome, so I saw no need in shipping a similar tool with NBFC.

<!-- gh-comment-id:107172951 --> @hirschmann commented on GitHub (May 31, 2015): Hi alexander, you could either use the config editor shipped with NBFC (Windows only), or any (xml-)editor to create config files for NBFC. A config file for your notebook could look like this: ``` xml <?xml version="1.0"?> <FanControlConfigV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <NotebookModel>VPCF12S1E</NotebookModel> <EcPollInterval>3000</EcPollInterval> <ReadWriteWords>false</ReadWriteWords> <CriticalTemperature>75</CriticalTemperature> <Author>alexander255</Author> <FanConfigurations> <FanConfiguration> <ReadRegister>76</ReadRegister> <WriteRegister>76</WriteRegister> <MinSpeedValue>32</MinSpeedValue> <MaxSpeedValue>128</MaxSpeedValue> <ResetRequired>true</ResetRequired> <FanSpeedResetValue>0</FanSpeedResetValue> <TemperatureThresholds /> <FanSpeedPercentageOverrides /> </FanConfiguration> </FanConfigurations> <RegisterWriteConfigurations /> </FanControlConfigV2> ``` However, you have to find a way to reset the EC, otherwise I will not distribute it with NBFC. The tool you wrote sounds great. I usually use [rweverything](http://rweverything.com/), which is awesome, so I saw no need in shipping a similar tool with NBFC.
Author
Owner

@ntninja commented on GitHub (May 31, 2015):

Hallo,

thanks for your response, however the characteristic of this value is not linear, so just using the value range from 32 to 128 doesn't sound like a good idea to me...

It appears that the value I'm modifying in EC RAM is some kind cooling power vs loudness-value and, after some tinkering, I've decided that these curves match the idle and high-CPU-load volumes (as felt by me and verified to not be completely off using a volume meter app on my phone) produced at each "EC fan level":
fan loudness versus EC fan level
(the blue line is the loudness while idling, the red line is the loudness when the system is under high CPU load)

Fortunately the red line seems to closely relate to the effective cooling power of the system at each level. I've deduced this by looking at the core CPU temperatures while the system was under full load. The temperature was around 80°C with full fan speed/maximum loudness, while it quickly went past 92°C at the lowest speed (I aborted the test at that point).

Is there a way, similar to the Sony Vaio SVE1713Y1E, to generate a configuration file based on this information?
The graph was generated using the Maxima CAS and these formula:

a(x):=min(0.5+cos((1-30^-(x/255))*0.8*%pi)/2,0.9)/0.9;
b(x):=min(0.5+cos((1-30^-(x/255))*0.87*%pi)/2,0.45)/0.45;
plot2d([a(x), b(x)], [x,0,255], [y,0,1])

Also it turns out (as hinted by the graph above) that the default BIOS/EC fan value is 70 on this system. Setting it to this value at any point makes the laptop as load as usual (IMHO too loud). Just setting the value back to the default value is good enough when reseting the EC, right?

Concerning the tool I wrote: Currently it's kind of a hack that was just for me to poke around in the EC RAM, however I'll look into making it a generic EC RAM (command-line) editor in the next few days and will send you a pull-request once I'm done.

Summary:

  • I have no clue how the convert the above formula (b(x)) into the XML format, please help me out... :-)
  • The default EC fan value is 70. Setting it to this value at any point makes the fan behave as usual.
  • I'll look into make my EC poking tool generic and will send a PR once I'm done
<!-- gh-comment-id:107239258 --> @ntninja commented on GitHub (May 31, 2015): Hallo, thanks for your response, however the characteristic of this value is not linear, so just using the value range from `32` to `128` doesn't sound like a good idea to me... It appears that the value I'm modifying in EC RAM is some kind _cooling power vs loudness_-value and, after some tinkering, I've decided that these curves match the idle and high-CPU-load volumes (as felt by me and verified to not be completely off using a volume meter app on my phone) produced at each "EC fan level": ![fan loudness versus EC fan level](http://i.imgur.com/yF9XOd0.png) (the blue line is the loudness while idling, the red line is the loudness when the system is under high CPU load) Fortunately the red line seems to closely relate to the effective cooling power of the system at each level. I've deduced this by looking at the core CPU temperatures while the system was under full load. The temperature was around `80°C` with full fan speed/maximum loudness, while it quickly went past `92°C` at the lowest speed (I aborted the test at that point). Is there a way, similar to the _Sony Vaio SVE1713Y1E_, to generate a configuration file based on this information? The graph was generated using the Maxima CAS and these formula: ``` a(x):=min(0.5+cos((1-30^-(x/255))*0.8*%pi)/2,0.9)/0.9; b(x):=min(0.5+cos((1-30^-(x/255))*0.87*%pi)/2,0.45)/0.45; plot2d([a(x), b(x)], [x,0,255], [y,0,1]) ``` Also it turns out (as hinted by the graph above) that the default BIOS/EC fan value is `70` on this system. Setting it to this value at any point makes the laptop as load as usual (IMHO too loud). Just setting the value back to the default value is good enough when _reseting the EC_, right? Concerning the tool I wrote: Currently it's kind of a hack that was just for me to poke around in the EC RAM, however I'll look into making it a generic EC RAM (command-line) editor in the next few days and will send you a pull-request once I'm done. Summary: - I have no clue how the convert the above formula (`b(x)`) into the XML format, please help me out... :-) - The default EC fan value is `70`. Setting it to this value at any point makes the fan behave as usual. - I'll look into make my EC poking tool generic and will send a PR once I'm done
Author
Owner

@hirschmann commented on GitHub (Jun 4, 2015):

Well, if you increase the RPM of a fan, the noise doesn't increase linearly either. NBFC shows the fan speed in %, not the fan noise.

Anyway, if you want a non-linear relation between (percent/values writtten to the EC), you can achieve this by overriding the percentages like this:

<?xml version="1.0"?>
<FanControlConfigV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <NotebookModel>VPCF12S1E</NotebookModel>
  <Author>alexander255</Author>
  <EcPollInterval>3000</EcPollInterval>
  <ReadWriteWords>false</ReadWriteWords>
  <CriticalTemperature>75</CriticalTemperature>
  <FanConfigurations>
    <FanConfiguration>
      <ReadRegister>76</ReadRegister>
      <WriteRegister>76</WriteRegister>
      <MinSpeedValue>0</MinSpeedValue>
      <MaxSpeedValue>4</MaxSpeedValue>
      <ResetRequired>true</ResetRequired>
      <FanSpeedResetValue>70</FanSpeedResetValue>
      <TemperatureThresholds />
      <FanSpeedPercentageOverrides>
        <FanSpeedPercentageOverride>
          <FanSpeedPercentage>0</FanSpeedPercentage>
          <FanSpeedValue>255</FanSpeedValue>
        </FanSpeedPercentageOverride>
        <FanSpeedPercentageOverride>
          <FanSpeedPercentage>25</FanSpeedPercentage>
          <FanSpeedValue>146</FanSpeedValue>
        </FanSpeedPercentageOverride>
        <FanSpeedPercentageOverride>
          <FanSpeedPercentage>50</FanSpeedPercentage>
          <FanSpeedValue>81</FanSpeedValue>
        </FanSpeedPercentageOverride>
        <FanSpeedPercentageOverride>
          <FanSpeedPercentage>75</FanSpeedPercentage>
          <FanSpeedValue>49</FanSpeedValue>
        </FanSpeedPercentageOverride>
        <FanSpeedPercentageOverride>
          <FanSpeedPercentage>100</FanSpeedPercentage>
          <FanSpeedValue>22</FanSpeedValue>
        </FanSpeedPercentageOverride>
      </FanSpeedPercentageOverrides>
    </FanConfiguration>
  </FanConfigurations>
  <RegisterWriteConfigurations />
</FanControlConfigV2>

Explanation:
I set min speed to 0 and max speed to 4. Then I overrode all possible percentages. I used one of your functions (a(x)) to calculate the FanSpeedValue for each percentage.

Usually it is not enough to just set the fan speed back to the default value. You have to make sure the EC BIOS controls the fan before shutting down NBFC.
In your case, it could be ok to just set the value back to 70, though. If I understand correctly the EC BIOS still sets the fan speed according to the CPU temperature, regardless of the value you've set?

I'm looking forward to your pull request :)

<!-- gh-comment-id:108990704 --> @hirschmann commented on GitHub (Jun 4, 2015): Well, if you increase the RPM of a fan, the noise doesn't increase linearly either. NBFC shows the fan speed in %, not the fan noise. Anyway, if you want a non-linear relation between (percent/values writtten to the EC), you can achieve this by overriding the percentages like this: ``` xml <?xml version="1.0"?> <FanControlConfigV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <NotebookModel>VPCF12S1E</NotebookModel> <Author>alexander255</Author> <EcPollInterval>3000</EcPollInterval> <ReadWriteWords>false</ReadWriteWords> <CriticalTemperature>75</CriticalTemperature> <FanConfigurations> <FanConfiguration> <ReadRegister>76</ReadRegister> <WriteRegister>76</WriteRegister> <MinSpeedValue>0</MinSpeedValue> <MaxSpeedValue>4</MaxSpeedValue> <ResetRequired>true</ResetRequired> <FanSpeedResetValue>70</FanSpeedResetValue> <TemperatureThresholds /> <FanSpeedPercentageOverrides> <FanSpeedPercentageOverride> <FanSpeedPercentage>0</FanSpeedPercentage> <FanSpeedValue>255</FanSpeedValue> </FanSpeedPercentageOverride> <FanSpeedPercentageOverride> <FanSpeedPercentage>25</FanSpeedPercentage> <FanSpeedValue>146</FanSpeedValue> </FanSpeedPercentageOverride> <FanSpeedPercentageOverride> <FanSpeedPercentage>50</FanSpeedPercentage> <FanSpeedValue>81</FanSpeedValue> </FanSpeedPercentageOverride> <FanSpeedPercentageOverride> <FanSpeedPercentage>75</FanSpeedPercentage> <FanSpeedValue>49</FanSpeedValue> </FanSpeedPercentageOverride> <FanSpeedPercentageOverride> <FanSpeedPercentage>100</FanSpeedPercentage> <FanSpeedValue>22</FanSpeedValue> </FanSpeedPercentageOverride> </FanSpeedPercentageOverrides> </FanConfiguration> </FanConfigurations> <RegisterWriteConfigurations /> </FanControlConfigV2> ``` Explanation: I set min speed to 0 and max speed to 4. Then I overrode all possible percentages. I used one of your functions (a(x)) to calculate the FanSpeedValue for each percentage. Usually it is not enough to just set the fan speed back to the default value. You have to make sure the EC BIOS controls the fan before shutting down NBFC. In your case, it could be ok to just set the value back to 70, though. If I understand correctly the EC BIOS still sets the fan speed according to the CPU temperature, regardless of the value you've set? I'm looking forward to your pull request :)
Author
Owner

@krokodandi commented on GitHub (Sep 26, 2015):

please help
no config file for tablet asus ep121/b121 (for win7)

<!-- gh-comment-id:143408880 --> @krokodandi commented on GitHub (Sep 26, 2015): please help no config file for tablet asus ep121/b121 (for win7)
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#4
No description provided.