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) [1]. 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. [1] https://www.freebsd.org/cgi/man.cgi?query=acpi_video&sektion=4&manpath=FreeBSD+10.1-RELEASE
Awesome, thanks for doing this! Pushed to master in: commit f9980385de8ba5bb33391cf3bc8b283db0fb1de2 Author: Olivier Duchateau <duchateau.olivier@gmail.com> Date: Wed Dec 31 11:52:52 2014 +0100 Use sysctl(3) to get or set brightness level on FreeBSD and DragonFly systems http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=f9980385de8ba5bb33391cf3bc8b283db0fb1de2