Update Envy
This commit is contained in:
parent
94c0687d06
commit
e73cae4c81
22
HP_Envy/HP_Envy.md
Normal file
22
HP_Envy/HP_Envy.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Module Blacklist
|
||||||
|
|
||||||
|
* sp5100_tco - something nvidia related
|
||||||
|
* acer_wmi - some acer wireless module that hangs while booting
|
||||||
|
* amd_gpio - Further testing needed
|
||||||
|
* tpm_crb -- TPM crap, may not need to be blacklisted, further testing needed
|
||||||
|
|
||||||
|
# Disabled Services
|
||||||
|
* systemd-rfkill.socket -- Further testing needed
|
||||||
|
|
||||||
|
# ACPI Config
|
||||||
|
* Add events and actions in order to control brightness
|
||||||
|
Check your codes with "acpi_listen" and then press your brightness keys
|
||||||
|
They may be different. Edit the events files as needed
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
The above was all tested as of kernel 4.5.16
|
||||||
|
The ones marked with "needs more testing" were done all at the same time
|
||||||
|
and the kernel updated to 4.5.17 during the process.
|
||||||
|
It's possible that the kernel upgrade fixes all these issues, but the system
|
||||||
|
boots now. Also, the acer module is certainly not needed as this laptop
|
||||||
|
has nothing from acer
|
4
HP_Envy/etc/acpi/actions/bl_down.sh
Executable file
4
HP_Envy/etc/acpi/actions/bl_down.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
bl_device=/sys/class/backlight/amdgpu_bl0/brightness
|
||||||
|
echo $(($(cat $bl_device)-5)) | sudo tee $bl_device
|
4
HP_Envy/etc/acpi/actions/bl_up.sh
Executable file
4
HP_Envy/etc/acpi/actions/bl_up.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
bl_device=/sys/class/backlight/amdgpu_bl0/brightness
|
||||||
|
echo $(($(cat $bl_device)+5)) | sudo tee $bl_device
|
3
HP_Envy/etc/acpi/events/anything
Normal file
3
HP_Envy/etc/acpi/events/anything
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Pass all events to our one handler script
|
||||||
|
event=.*
|
||||||
|
action=/etc/acpi/handler.sh %e
|
2
HP_Envy/etc/acpi/events/bl_down
Normal file
2
HP_Envy/etc/acpi/events/bl_down
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
event=video/brightnessdown BRTDN 00000087 00000000
|
||||||
|
action=/etc/acpi/actions/bl_down.sh
|
2
HP_Envy/etc/acpi/events/bl_up
Normal file
2
HP_Envy/etc/acpi/events/bl_up
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
event=video/brightnessup BRTUP 00000086 00000000
|
||||||
|
action=/etc/acpi/actions/bl_up.sh
|
77
HP_Envy/etc/acpi/handler.sh
Executable file
77
HP_Envy/etc/acpi/handler.sh
Executable file
@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Default acpi script that takes an entry for all actions
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
button/power)
|
||||||
|
case "$2" in
|
||||||
|
PBTN|PWRF)
|
||||||
|
logger 'PowerButton pressed'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
logger "ACPI action undefined: $2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
button/sleep)
|
||||||
|
case "$2" in
|
||||||
|
SLPB|SBTN)
|
||||||
|
logger 'SleepButton pressed'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
logger "ACPI action undefined: $2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
ac_adapter)
|
||||||
|
case "$2" in
|
||||||
|
AC|ACAD|ADP0)
|
||||||
|
case "$4" in
|
||||||
|
00000000)
|
||||||
|
logger 'AC unpluged'
|
||||||
|
;;
|
||||||
|
00000001)
|
||||||
|
logger 'AC pluged'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
logger "ACPI action undefined: $2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
battery)
|
||||||
|
case "$2" in
|
||||||
|
BAT0)
|
||||||
|
case "$4" in
|
||||||
|
00000000)
|
||||||
|
logger 'Battery online'
|
||||||
|
;;
|
||||||
|
00000001)
|
||||||
|
logger 'Battery offline'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
CPU0)
|
||||||
|
;;
|
||||||
|
*) logger "ACPI action undefined: $2" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
button/lid)
|
||||||
|
case "$3" in
|
||||||
|
close)
|
||||||
|
logger 'LID closed'
|
||||||
|
;;
|
||||||
|
open)
|
||||||
|
logger 'LID opened'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
logger "ACPI action undefined: $3"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
logger "ACPI group/action undefined: $1 / $2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# vim:set ts=4 sw=4 ft=sh et:
|
4
HP_Envy/etc/modprobe.d/blacklist.conf
Normal file
4
HP_Envy/etc/modprobe.d/blacklist.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
blacklist acer_wmi
|
||||||
|
blacklist sp5100_tco
|
||||||
|
blacklist amd_gpio
|
||||||
|
blacklist tpm_crb
|
Loading…
x
Reference in New Issue
Block a user