====== Linux Laptop ======
===== Lenovo w540 =====
==== Touchpad ====
Tapping aktivieren
/etc/X11/xorg.conf.d/40-libinput.conf
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "Tapping" "on"
EndSection
==== Sondertasten Fn ====
==== Lautstärke regeln ====
Mit Fn + F1 lauter
/home/user/.config/openbox/rc.xml
/home/user/bin/vol_up.sh
/home/user/bin/vol_up.sh
amixer set Master 2%+ >/dev/null
VOLUME=`amixer get Master | sed -ne '/%/s/.*\[\(.*\)%\].*/\1/p'`
osd_cat --colour=Green -f '-adobe-*-*-r-*-*-*-240-*-*-*-*-*-*' -p bottom -A center -o 100 -d 1 -b percentage -P $VOLUME -T "Volume $VOLUME%"
Mit Fn + F2 leiser
/home/user/.config/openbox/rc.xml
/home/user/bin/vol_down.sh
/home/user/bin/vol_down.sh
amixer set Master 2%- >/dev/null
VOLUME=`amixer get Master | sed -ne '/%/s/.*\[\(.*\)%\].*/\1/p'`
osd_cat --colour=Green -f '-adobe-*-*-r-*-*-*-240-*-*-*-*-*-*' -p bottom -A center -o 100 -d 1 -b percentage -P $VOLUME -T "Volume $VOLUME%"
=== Bildschirm Helligkeit steuern ===
Mit Fn + F5 Bildschirm heller
/home/user/bin/brightness_up.sh
act_br=`cat /sys/class/backlight/intel_backlight/actual_brightness`
max_br=`cat /sys/class/backlight/intel_backlight/max_brightness`
new_br=$((act_br+51))
echo $new_br | sudo tee /sys/class/backlight/intel_backlight/brightness >/dev/null
br=$((act_br*100/max_br))
osd_cat --colour=Green -f '-adobe-*-*-r-*-*-*-240-*-*-*-*-*-*' -p bottom -A center -o 100 -d 1 -b percentage -P $br -T "Brightness $br%"
Mit Fn + F6 Bildschirm dunkler
/home/user/bin/brightness_down.sh
act_br=`cat /sys/class/backlight/intel_backlight/actual_brightness`
max_br=`cat /sys/class/backlight/intel_backlight/max_brightness`
new_br=$((act_br-51))
echo $new_br | sudo tee /sys/class/backlight/intel_backlight/brightness >/dev/null
br=$((act_br*100/max_br))
osd_cat --colour=Green -f '-adobe-*-*-r-*-*-*-240-*-*-*-*-*-*' -p bottom -A center -o 100 -d 1 -b percentage -P $br -T "Brightness $br%"
==== ACPI Steuerung ====
Unter /proc/acpi/ibm/ sind Dateien zum lesen und schreiben die Teile des Laptops steuern.
root> ls -l /proc/acpi/ibm/
-rw-r--r-- 1 root root 0 Sep 9 12:07 beep
-rw-r--r-- 1 root root 0 Sep 9 12:07 bluetooth
-rw-r--r-- 1 root root 0 Sep 9 12:07 cmos
-r--r--r-- 1 root root 0 Sep 9 12:07 driver
-rw-r--r-- 1 root root 0 Sep 9 12:07 fan
-rw-r--r-- 1 root root 0 Sep 9 12:07 hotkey
-rw-r--r-- 1 root root 0 Sep 9 12:07 kbdlight
-rw-r--r-- 1 root root 0 Sep 9 12:07 led
-rw-r--r-- 1 root root 0 Sep 9 12:07 light
-rw------- 1 root root 0 Sep 9 12:07 video
-rw-r--r-- 1 root root 0 Sep 9 12:07 volume
Lüfter abfragen
cat /proc/acpi/ibm/fan
status: enabled
speed: 1639
level: auto
Lüfter steuern
echo "options thinkpad_acpi fan_control=1" > /etc/modprobe.d/thinkpad_acpi.conf
echo level 0 > /proc/acpi/ibm/fan # fan off
echo level <1-7> > /proc/acpi/ibm/fan # fan speed 1-7
echo level auto > /proc/acpi/ibm/fan
Tastaturbeleuchtung steuern
root> echo 1 > /proc/acpi/ibm/kbdlight
-> Tastaturbeleuchtung mittlere Helligkeit
root> echo 2 > /proc/acpi/ibm/kbdlight
-> Tastaturbeleuchtung hohe Helligkeit
root> echo 0 > /proc/acpi/ibm/kbdlight
-> Tastaturbeleuchtung aus
Einschaltknopf LED steuern
root> echo "0 blink" > /proc/acpi/ibm/led
-> LED blinken lassen
root> echo "0 off" > /proc/acpi/ibm/led
-> LED ausschalten
root> echo "0 on" > /proc/acpi/ibm/led
-> LED einschalten