aboutsummaryrefslogtreecommitdiff
path: root/scripts/hostclass/laptop
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-10-15 23:35:53 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-10-15 23:35:53 -0400
commit145668c3dd67c5271eddcb62d1e7843487d768a7 (patch)
tree4c7d563e9d320e6b122ee3dbf048d93eee6776c3 /scripts/hostclass/laptop
parentb2af400a1098ebf445575d169e11a6717867045f (diff)
downloadinfrastructure-145668c3dd67c5271eddcb62d1e7843487d768a7.tar.gz
huge amount of fixes
Diffstat (limited to 'scripts/hostclass/laptop')
-rw-r--r--scripts/hostclass/laptop20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/hostclass/laptop b/scripts/hostclass/laptop
index 26f9fe6..dba2c5f 100644
--- a/scripts/hostclass/laptop
+++ b/scripts/hostclass/laptop
@@ -1,5 +1,9 @@
#!/bin/sh
+# Enable thinkpad hardware features.
+load_kernel_module acpi_ibm
+set_loader_conf acpi_ibm_load=YES
+
# Set USB power savings
usbconfig | awk -F: '{ print $1 }' | xargs -rtn1 -I% usbconfig -d % power_save ||:
install_file /etc/rc.local
@@ -14,6 +18,19 @@ load_kernel_module if_urndis
set_loader_conf if_urndis_load=YES
sysrc -v ifconfig_ue0='DHCP'
+# Install laptop packages.
+pkg install -y networkmgr
+
+# Misc power saving stuff.
+set_loader_conf \
+ vfs.zfs.txg.timeout=10 \
+
+if [ "$graphics_type" = intel ]; then
+ set_loader_conf \
+ compat.linuxkpi.i915_disable_power_well=1 \
+ compat.linuxkpi.i915_enable_dc=2
+fi
+
case ${wireless_type:-} in
iwm*)
set_loader_conf \
@@ -28,6 +45,9 @@ case ${wireless_type:-} in
;;
esac
+# Enable power saving for sound card.
+set_sysctl hw.snd.latency=7
+
# Configure wireless card.
sysrc -v \
create_args_wlan0='country US regdomain FCC' \