<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 - Screen sometimes jumps to full brightness on resume from suspend"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108703">108703</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Screen sometimes jumps to full brightness on resume from suspend
          </td>
        </tr>

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

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

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

        <tr>
          <th>OS</th>
          <td>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/intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>luke.schlather@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>At night, I usually turn my brightness down as far as it will go using the
brightness keys. This makes it dim, but visible and not off. When I walk away
for a while, the screen goes to sleep, and when I come back and move the mouse,
the screen jumps to full brightness, which is very unpleasant at night.
Investigating, it seems that the brightness in intel_backlight is getting reset
to 4437, but the one in acpi_video0 reads 0.

This can be triggered by running xset dpms force standby. Here's the
conflicting brightness values:

    $ for file in brightness max_brightness actual_brightness;
    > do
    > for directory in /sys/class/backlight/intel_backlight/
/sys/class/backlight/acpi_video0/
    > do
    > echo $directory$file : $(cat $directory$file)
    > done
    > done
    /sys/class/backlight/intel_backlight/brightness : 4437
    /sys/class/backlight/acpi_video0/brightness : 0
    /sys/class/backlight/intel_backlight/max_brightness : 4437
    /sys/class/backlight/acpi_video0/max_brightness : 15
    /sys/class/backlight/intel_backlight/actual_brightness : 4437
    /sys/class/backlight/acpi_video0/actual_brightness : 0

After I press the button to increase the brightness one notch, they are back in
sync, and then I can turn it back down as well.

    $ for file in brightness max_brightness actual_brightness;
    > do
    > for directory in /sys/class/backlight/intel_backlight/
/sys/class/backlight/acpi_video0/
    > do
    > echo $directory$file : $(cat $directory$file)
    > done
    > done
    /sys/class/backlight/intel_backlight/brightness : 53
    /sys/class/backlight/acpi_video0/brightness : 1
    /sys/class/backlight/intel_backlight/max_brightness : 4437
    /sys/class/backlight/acpi_video0/max_brightness : 15
    /sys/class/backlight/intel_backlight/actual_brightness : 53
    /sys/class/backlight/acpi_video0/actual_brightness : 1

This is on a fresh install of Xubuntu 18.04 with default packages including the
latest version of the i915 Intel Driver which is active. Seems like a
regression from Xubuntu 16.04, which I ran on the same laptop without this
issue.

I initially filed this as a bug in XFCE power manager but after some
troubleshooting there I can reproduce the same issue under Gnome as well.

Original bug with troubleshooting:
<a href="https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1782177">https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1782177</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>