acpi_fujitsu - Fujitsu Laptop Extras
device acpi_fujitsu
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf5:
acpi_fujitsu_load="YES"
Using this driver, one can control the brightness of the display, the volume of the speakers, and the internal (eraserhead) mouse pointer.
Defaults for these sysctls can be set in sysctl.conf5.
notify 10 { match "system" "ACPI"; match "subsystem" "FUJITSU"; action "/usr/local/sbin/acpi_oem_exec.sh $notify fujitsu"; };
A possible /usr/local/sbin/acpi_oem_exec.sh script might look like:
#!/bin/sh # if [ "$1" = "" -o "$2" = "" ] then echo "usage: $0 notify oem_name" exit 1 fi NOTIFY=`echo $1` LOGGER="logger" CALC="bc" BC_PRECOMMANDS="scale=2" ECHO="echo" CUT="cut" MAX_LCD_BRIGHTNESS=7 MAX_VOLUME=16 OEM=$2 DISPLAY_PIPE=/tmp/acpi_${OEM}_display case ${NOTIFY} in 0x00) LEVEL=`sysctl -n hw.acpi.${OEM}.mute` if [ "$LEVEL" = "1" ] then MESSAGE="volume muted" else MESSAGE="volume unmuted" fi ;; 0x01) LEVEL=`sysctl -n hw.acpi.${OEM}.pointer_enable` if [ "$LEVEL" = "1" ] then MESSAGE="pointer enabled" else MESSAGE="pointer disabled" fi ;; 0x02) LEVEL=`sysctl -n hw.acpi.${OEM}.lcd_brightness` PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \ ${LEVEL} / ${MAX_LCD_BRIGHTNESS} * 100" |\ ${CALC} | ${CUT} -d . -f 1` MESSAGE="brightness level ${PERCENT}%" ;; 0x03) LEVEL=`sysctl -n hw.acpi.${OEM}.volume` PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \ ${LEVEL} / ${MAX_VOLUME} * 100" | \ ${CALC} | ${CUT} -d . -f 1` MESSAGE="volume level ${PERCENT}%" ;; *) ;; esac ${LOGGER} ${MESSAGE} if [ -p ${DISPLAY_PIPE} ] then ${ECHO} ${MESSAGE} >> ${DISPLAY_PIPE} & fi exit 0
This manual page was written by An Philip Paeps Aq [email protected] .
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |