<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - After resuming from suspend, discrete GPU is powered on and can't be turned off"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108058">108058</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>After resuming from suspend, discrete GPU is powered on and can't be turned off
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>xorg
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

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

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

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

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

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

        <tr>
          <th>Reporter</th>
          <td>domenico.iezzi.201@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>xorg-team@lists.x.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=141734" name="attach_141734" title="kernel log">attachment 141734</a> <a href="attachment.cgi?id=141734&action=edit" title="kernel log">[details]</a></span>
kernel log

Overall, nouveau works without problem in managing discrete GPU PM, and if I
check power consumption using powertop on a fresh boot it reports an average
battery discharge rate of ~7W like always.
After I resume the laptop from suspend, /sys/kernel/debug/vgaswitcheroo/switch
reports that the device is
dynamically turned off:

0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0

But if I check with powertop, I get a battery discharge rate of ~11W. To better
identify the problem, I tried using bumbleebee+bbswitch+nvidia-driver and see
what bbswitch module reports. On a fresh boot, it works
ok as the nouveau driver, but after resuming from suspend
/proc/acpi/bbswitch reports that the card is turned ON, and there is no way to
power it off:

[root@example user]# cat /proc/acpi/bbswitch 
0000:04:00.0 ON
[root@example user]# tee /proc/acpi/bbswitch <<<OFF
OFF
[root@example user]# cat /proc/acpi/bbswitch 
0000:04:00.0 ON

I attached the kernel log using following parameters when using only nouveau
driver (no bumblebee/bbswitch/nvidia): log_buf_len=1M nouveau.debug=debug.

System specs:
Asus Vivobook S551LN
Intel i7 4500U
NVIDIA 840M
Archlinux 4.18.9-arch1-1-ARCH (but affecting older versions, since early 4.x
version when i started using linux)</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>