Changeset f7a5feb9 for general/sysutils/acpid.xml
- Timestamp:
- 09/02/2023 08:28:02 PM (13 months ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/sysutils/acpid.xml
r03ecbc8a rf7a5feb9 35 35 </para> 36 36 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 37 55 &lfs120_checked; 38 56 … … 112 130 113 131 <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 > /etc/acpi/events/lid << "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 > /etc/acpi/events/lid << "EOF" 120 141 <literal>event=button/lid 121 142 action=/etc/acpi/lid.sh</literal> … … 127 148 /usr/sbin/pm-suspend</literal> 128 149 EOF 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 150 chmod +x /etc/acpi/lid.sh 151 152 mkdir -pv /etc/elogind/logind.conf.d 153 echo <literal>HandleLidSwitch=ignore</literal> > /etc/elogind/logind.conf.d/acpi.conf</userinput></screen> 154 155 <screen revision='systemd' role="nodump"><userinput>cat > /etc/acpi/events/lid << "EOF" 156 <literal>event=button/lid 157 action=/etc/acpi/lid.sh</literal> 158 EOF 159 160 cat > /etc/acpi/lid.sh << "EOF" 161 <literal>#!/bin/sh 162 /bin/grep -q open /proc/acpi/button/lid/LID/state && exit 0 163 /usr/bin/systemctl suspend</literal> 164 EOF 165 chmod +x /etc/acpi/lid.sh 166 167 mkdir -pv /etc/systemd/logind.conf.d 168 echo <literal>HandleLidSwitch=ignore</literal> > /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 134 175 <command>acpi_listen</command> tool. Also, look in the <filename 135 176 class="directory">samples</filename> directory under <filename
Note:
See TracChangeset
for help on using the changeset viewer.