<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Laptop not suspending when lid is closed."
href="https://bugs.freedesktop.org/show_bug.cgi?id=76267#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Laptop not suspending when lid is closed."
href="https://bugs.freedesktop.org/show_bug.cgi?id=76267">bug 76267</a>
from <span class="vcard"><a class="email" href="mailto:dar@darklajid.de" title="Benjamin Podszun <dar@darklajid.de>"> <span class="fn">Benjamin Podszun</span></a>
</span></b>
<pre>This issue came just up on the mailing list again, with a patch [1].
As far as I can tell the change that introduced this behavior is at [2]. Note
that the commit message at this point said 'logind: ignore lid switch if more
than 1 display is connected', but the code checked for 'if the number of
displays is not 0'.
The check as hinted at by the commit message would be fine - users with Nvidia
blobs would end up with "0" displays (not > 1, suspending fine).
A configuration parameter (logind.conf for example) would certainly be helpful,
but it would also help to understand at what point the mismatch between commit
message (> 1) and code (!= 1) leaned to the latter?
The current code (as seen in the patch) has the following comment, introduced
in a later commit [3]:
/* If we have more than one or no displays connected,
* don't react to lid closing. The no display case we
* treat like this under the assumption that there is
* no modern drm driver available. */
At this point I'm drawing a blank here - I wouldn't understand the requirement
for the no display case. I'm just a curious end user and certainly lack the
insights necessary. "Lid closing" can only happen on laptops, right? Which
drivers are the reasons for the 0-case here, if nouveau for example isn't it?
Wouldn't most (all?) free drivers come up with a valid number here? Is the
ratio of laptops with no modern drm drivers available expected to be much
larger than the nvidia user base?
I might be totally off, but this reads like a case for 'running a very recent
systemd based system on a laptop with outdated video drivers'. Obviously (I'm
serious, no snark) I'm not clever enough to be sure about that, nor do I know
how common that case is.
Given that the whole point of that exception is to avoid suspending
- IF you close the lid
- AND have no 'modern' video drivers
- AND actually have more than one display connected
isn't that more rare than closing one's laptop and taking it somewhere, period?
Plus, isn't there a working way to solve that issue (systemd-inhibit) if you're
in the special case above? It seems the commit fixed a scenario that already
had a configurable workaround and introduced a problem for nvidia users without
a configurable workaround? [4]
1: <a href="http://article.gmane.org/gmane.comp.sysutils.systemd.devel/18764">http://article.gmane.org/gmane.comp.sysutils.systemd.devel/18764</a>
2:
<a href="http://cgit.freedesktop.org/systemd/systemd/commit/src/login/logind-action.c?id=6a79c58603ea816a1b4fa1520397b4e138bc1ca0">http://cgit.freedesktop.org/systemd/systemd/commit/src/login/logind-action.c?id=6a79c58603ea816a1b4fa1520397b4e138bc1ca0</a>
3:
<a href="http://cgit.freedesktop.org/systemd/systemd/commit/src/login/logind-action.c?id=f9cd6be10ece07e10488c05e270a0b5860779864">http://cgit.freedesktop.org/systemd/systemd/commit/src/login/logind-action.c?id=f9cd6be10ece07e10488c05e270a0b5860779864</a>
4: Not quite true - people in the Arch Linux tracker suggest using acpid
events/hooks to issue systemctl suspend</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>