<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 --- - dual-gpu (vgaswitcheroo) laptop doesn't suspend when lid closed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=77246">77246</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>dual-gpu (vgaswitcheroo) laptop doesn't suspend when lid closed
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.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>mt-ml@gmx.de
          </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>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I'm seeing the same symptoms on my laptop as in
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Laptop not suspending when lid is closed."
   href="show_bug.cgi?id=76267">https://bugs.freedesktop.org/show_bug.cgi?id=76267</a> : closing the lid doesn't
suspend while the suspend button does, but, as I understand, the cause is a
different one so new bug. Please mark as duplicate if I was wrong ;)

In the logs I see this (with SYSTEMD_LOG_LEVEL=debug for logind):
systemd-logind[4178]: Lid closed.
systemd-logind[4178]: Ignoring lid switch request, 2 displays connected.

However there is only one (the integrated) display.

The laptop has two gpus using vgaswitcheroo, an intel igp and a radeon
dedicated gpu, both are working with the free drivers. And both connectors

/sys/class/drm/card0-LVDS-1/status (the igp, actually in use)

and

/sys/class/drm/card1-LVDS-2/status (the radeon gpu, dynamically powered off)

show "connected", so src/login/logind-core.c:manager_count_displays() returns
2.

Is the kernel supposed to advertise two connectors as connected in this case
even though there's only one display? If so, what is a better way to recognize
the actual number of displays connected?

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