<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - pwm1 value not restored during hibernate/restore cycle in the event of manual fan management mode"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=66177">66177</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>nouveau@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>pwm1 value not restored during hibernate/restore cycle in the event of manual fan management mode
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>xorg-team@lists.x.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mr.dash.four@googlemail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver/nouveau
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>xorg
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When I have done the following:

echo 1 > /sys/class/hwmon/hwmon0/pwm1_enable 
echo 30 > /sys/class/hwmon/hwmon0/pwm1 

pwm1=30
pwm1_enable=1
pwm1_max=100
pwm1_min=0
temp1_auto_point1_pwm=100
temp1_auto_point1_temp=90000
temp1_auto_point1_temp_hyst=3000
temp1_crit=115000
temp1_crit_hyst=2000
temp1_emergency=135000
temp1_emergency_hyst=5000
temp1_input=41000
temp1_max=95000
temp1_max_hyst=3000
update_rate=1000

and then do hibernate/restore, I get this:

pwm1=100
pwm1_enable=1
pwm1_max=100
pwm1_min=0
temp1_auto_point1_pwm=100
temp1_auto_point1_temp=90000
temp1_auto_point1_temp_hyst=3000
temp1_crit=115000
temp1_crit_hyst=2000
temp1_emergency=135000
temp1_emergency_hyst=5000
temp1_input=37000
temp1_max=95000
temp1_max_hyst=3000
update_rate=1000

The "pwm1_enable" value is restored, thanks to the patch proposed by Emil
Velikov in <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - pwm1[_enable] faults after hibernate/restore related to automatic (or otherwise) fan management"
   href="show_bug.cgi?id=66022">Bug 66022</a>, but that doesn't restore the pwm1 value in case of manual
fan management. I am attaching 2 patches to this report:

1. which fixes this bug and restores everything ("pwm1_enable", as well as
"pwm1"); and

2. a separate patch, allowing fan_mode and fan duty (percentage) to be
specified at the command line, allowing me to set my fan speed immediately and
not waiting for OS scripts to do that for me as was the case up until now.

Since the automatic fan management is, well, lets just say incomplete, that's
currently the best option to not have my fan wail like a jet engine every time
I boot up and use my machine.

Patches follow...</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>