Created attachment 5841
Patch to use sysctl(3) on FreeBSD and DragonFly
Patch replaces sysfs by sysctl(3) functions on FreeBSD and DragonFly. On these systems backlight brightness is managed by acpi_video(4) .
Often acpi_video is not functional, and panel plugin crashes, like bug #11101.
sysctlbyname () function returns 0, success or -1, failure.
backlight_helper_get_levels () function returns GList object because we can find several times same values, and values are not always sorted. It's more simpler when we need to find higher value.
e.g., sysctl hw.acpi.video.lcd0.levels
hw.acpi.video.lcd0.levels: 70 30 10 17 23 30 40 50 60 70 80 90 100
backlight_helper_set_* functions check value have really changed, because in some rare case, it always success but value was not changed.
Awesome, thanks for doing this! Pushed to master in:
Author: Olivier Duchateau <firstname.lastname@example.org>
Date: Wed Dec 31 11:52:52 2014 +0100
Use sysctl(3) to get or set brightness level on FreeBSD and DragonFly systems