From 9b1c9390bc417f12af493d94faaf162e2736ffb2 Mon Sep 17 00:00:00 2001 From: Eli Gladman Date: Mon, 11 May 2015 14:26:18 -0400 Subject: [PATCH 1/3] added instructions to operate keyboard backlight --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/README.md b/README.md index 832dee4..a236e6b 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,59 @@ to `/etc/acpi/handler.sh`: Brightness can be controlled through /sys/class/leds/chromeos::kbd_backlight. + +By default users other than root are not permitted to write to `/sys/class/leds/chromeos::kbd_backlight/brightness` so we must first change the file's permissions. +``` +chown $USER:wheel /sys/class/leds/chromeos::kbd_backlight/brightness +``` + +We can then use a script to incrementally increase or decrease the keyboard backlight. Save the following file to your home directory:`~/.config/kb-backlight.sh` + + +``` +#!/bin/bash + +# ~/.config/kb-backlight.sh + +step=10 +file=/sys/class/leds/chromeos::kbd_backlight/brightness + +case "$1" in + -i|--increase) ((val = +step));; + -d|--decrease) ((val = -step));; +esac + +if !((val)); then + echo "Increase or decrease screen brighness" + echo "Usage: ${0##*/} --increase | --decrease" + exit +fi + +read -r cur < "$file" +((val = cur + val)) + +if ((val < 0)); then ((val = 0)); fi +if ((val > 100)); then ((val = 100)); fi + +printf '%d' "$val" > "$file" + +printf ""$val"\n" +``` + +Make the file executable +``` +chmod +x $HOME/.config/kb-backlight.sh +``` + +Now you can now control the keyboard backlight with the following two commands. Bind each command to your keyboard with your preferred program/method. + +``` +$HOME/.config/kb-backlight.sh --increase +``` +``` +$HOME/.config/kb-backlight.sh --decrease +``` + #### Patches The patches in arch/linux-samus apply to Linux 3.19.2. From c343f1fc271605f03a97d34ce07d12b71a9692a7 Mon Sep 17 00:00:00 2001 From: Eli Gladman Date: Mon, 11 May 2015 15:31:33 -0400 Subject: [PATCH 2/3] added additional xorg.conf.d example --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a236e6b..9bbdec2 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ grub-mkconfig -o /boot/grub/grub.cfg ###### Configure Synaptics To use xf86-input-synaptics with the touchpad, you'll need at least the -following in your xorg.conf.d: +following in `/etc/X11/xorg.conf.d/50-synaptics.conf`: ``` Section "InputClass" @@ -83,6 +83,29 @@ Section "InputClass" EndSection ``` +Example configuration with additional features enabled +``` +Section "InputClass" + Identifier "touchpad" + MatchIsTouchpad "on" + MatchDevicePath "/dev/input/event*" + Driver "synaptics" + Option "TapButton1" "1" + Option "TapButton2" "3" + Option "TapButton3" "3" + Option "FingerLow" "5" + Option "FingerHigh" "10" + Option "VertEdgeScroll" "on" + Option "VertTwoFingerScroll" "on" + Option "HorizEdgeScroll" "on" + Option "HorizTwoFingerScroll" "on" +EndSection +``` + + + + + ###### Change ALSA device order The SoC audio device shows up as the second ALSA device, so you might want to From 4156489c2206613f74b75e9f9209dc2edd9a9d82 Mon Sep 17 00:00:00 2001 From: Eli Gladman Date: Mon, 11 May 2015 16:18:42 -0400 Subject: [PATCH 3/3] included kernel parameter example Including the "grub-mkconfig" command again is kinda redundant so if you have a better way of incorporating this information, have at it. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 9bbdec2..4d23c0e 100644 --- a/README.md +++ b/README.md @@ -274,4 +274,27 @@ These kernel config flags should be set: CONFIG_BACKLIGHT_CHROMEOS_KEYBOARD CONFIG_LEDS_CHROMEOS_KEYBOARD ``` +###Applying Patches + +#####Grub + + +Edit `/etc/default/grub` and append your kernel options to the GRUB_CMDLINE_LINUX_DEFAULT line: + +``` +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" +``` + +``` +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash CONFIG_BACKLIGHT_CHROMEOS_KEYBOARD" +``` + +And then automatically re-generate the grub.cfg file with: + +``` +grub-mkconfig -o /boot/grub/grub.cfg +``` +