Ignore:
Timestamp:
09/02/2023 08:28:02 PM (9 months ago)
Author:
Thomas Trepl <thomas@…>
Branches:
lazarus
Children:
3e86dee
Parents:
03ecbc8a (diff), 642d7af (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'trunk' into lazarus

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/sysutils/acpid.xml

    r03ecbc8a rf7a5feb9  
    3535    </para>
    3636
     37    <note>
     38      <para>
     39        Some other packages may handle some ACPI events as well and they
     40        may conflict with this package.  For example, &logind;
     41        (read the documentation for <option>Handle*=</option> in
     42        <filename>logind.conf(5)</filename> for details) and
     43        <xref linkend='upower'/> (used by many desktop environments such as
     44        GNOME, KDE, and XFCE for handling ACPI events).  If you've installed
     45        such a package and it's enough for your use case, this package is
     46        probably not needed.  If you really need this package, you must be
     47        careful configuring it and the other packages handling ACPI events
     48        to avoid conflicts.  Notably, &logind; handles some ACPI events
     49        by default, so the handling of these events by &logind; should be
     50        disabled first if handling these events with acpid
     51        (again, read <filename>logind.conf(5)</filename> for details).
     52      </para>
     53    </note>
     54
    3755    &lfs120_checked;
    3856
     
    112130
    113131    <para>
    114       The following brief example will suspend the system when the laptop lid
    115       is closed (it requires <xref linkend="pm-utils"/>):
    116     </para>
    117 
    118     <!-- TODO: Move from pm-suspend to systemctl suspend for systemd -->
    119 <screen role="root"><userinput>cat &gt; /etc/acpi/events/lid &lt;&lt; "EOF"
     132      The following brief example will suspend the system when the laptop
     133      lid is closed<phrase revision='sysv'> (it requires
     134      <xref linkend="pm-utils"/>)</phrase>.  The example also disables
     135      the default handling of the lid close event by &logind; when the
     136      system is on battery and not connected to any external monitor,
     137      in order to avoid a conflict:
     138    </para>
     139
     140<screen revision='sysv' role="nodump"><userinput>cat &gt; /etc/acpi/events/lid &lt;&lt; "EOF"
    120141<literal>event=button/lid
    121142action=/etc/acpi/lid.sh</literal>
     
    127148/usr/sbin/pm-suspend</literal>
    128149EOF
    129 chmod +x /etc/acpi/lid.sh</userinput></screen>
    130 
    131     <para>
    132       Unfortunately, not every computer labels ACPI events in the same way. To
    133       determine how your buttons are recognized, use the
     150chmod +x /etc/acpi/lid.sh
     151
     152mkdir -pv /etc/elogind/logind.conf.d
     153echo <literal>HandleLidSwitch=ignore</literal> &gt; /etc/elogind/logind.conf.d/acpi.conf</userinput></screen>
     154
     155<screen revision='systemd' role="nodump"><userinput>cat &gt; /etc/acpi/events/lid &lt;&lt; "EOF"
     156<literal>event=button/lid
     157action=/etc/acpi/lid.sh</literal>
     158EOF
     159
     160cat &gt; /etc/acpi/lid.sh &lt;&lt; "EOF"
     161<literal>#!/bin/sh
     162/bin/grep -q open /proc/acpi/button/lid/LID/state &amp;&amp; exit 0
     163/usr/bin/systemctl suspend</literal>
     164EOF
     165chmod +x /etc/acpi/lid.sh
     166
     167mkdir -pv /etc/systemd/logind.conf.d
     168echo <literal>HandleLidSwitch=ignore</literal> &gt; /etc/systemd/logind.conf.d/acpi.conf</userinput></screen>
     169
     170    <para>
     171      Unfortunately, not every computer labels ACPI events in the same way
     172      (for example, the lid may be recognized as <filename>LID0</filename>
     173      instead of <filename>LID</filename>).
     174      To determine how your buttons are recognized, use the
    134175      <command>acpi_listen</command> tool. Also, look in the <filename
    135176      class="directory">samples</filename> directory under <filename
Note: See TracChangeset for help on using the changeset viewer.