Created attachment 132743 [details] [review] Patch to fix lid detection on freebsd Please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175531 On freebsd, if hw.acpi.lid_switch_state is present (its default value is NONE), then a lid is detected by the kernel. Upower does the opposite and sets lid present only when hw.acpi.lid_switch_state is not NONE (which only happens when the lid is closed). This has been fixed previously downstream, but for some reason in recent version of freebsd the fix is not applied to upower. The attached patch solves the issue.
Created attachment 134085 [details] [review] 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
Attachment 134085 [details] pushed as 71ba27a - freebsd: Fix lid detection on FreeBSD Please attach git-formatted patches with the correct authorship and commit message in the future, it makes it much easier (and thus quicker) to commit.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.