mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-07 15:28:09 +02:00
freebsd: Fix lid detection on FreeBSD
UPower sets property LidIsPresent to true only if hw.acpi.lid_switch_state is different from "NONE", "NONE" being the default value for FreeBSD. Thus, the property is always false on default configurations. Force UPower not to care about the value of the sysctl, making it check only for its existence. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175531 https://bugs.freedesktop.org/show_bug.cgi?id=101828
This commit is contained in:
parent
4753a8bc5a
commit
71ba27a7ea
1 changed files with 1 additions and 1 deletions
|
|
@ -226,7 +226,7 @@ up_backend_lid_coldplug (UpBackend *backend)
|
|||
gchar *lid_state;
|
||||
|
||||
lid_state = up_get_string_sysctl (NULL, "hw.acpi.lid_switch_state");
|
||||
if (lid_state && strcmp (lid_state, "NONE")) {
|
||||
if (lid_state) {
|
||||
up_daemon_set_lid_is_present (backend->priv->daemon, TRUE);
|
||||
}
|
||||
g_free (lid_state);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue