From 83dfbed7a7c8a51f2681cc0950696af917c94746 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 2 Feb 2023 01:57:16 +0300 Subject: [PATCH] added s1yoga touchpad fix Signed-off-by: Alex A. Naanou --- post-install | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/post-install b/post-install index 4933ade..b4ae63a 100755 --- a/post-install +++ b/post-install @@ -188,7 +188,7 @@ PKG_FLATPAK=( # net... org.briarproject.Briar - com.github.ElostonUngoogledChromium + com.github.Eloston.UngoogledChromium # media... #io.mpv.Mpv @@ -245,6 +245,11 @@ ALL_FEATURES=($( \ # For more info see: # https://fedoramagazine.org/hibernation-in-fedora-36-workstation/ function feature-hibernate(){ + # dracut configuration... + cat <<-EOF | sudo tee /etc/dracut.conf.d/resume.conf +add_dracutmodules+=" resume " +EOF + dracut -f # a service to disable zram before we hibernate... # XXX do we need to enable the swap here too??? cat <<-EOF | sudo tee /etc/systemd/system/hibernate-preparation.service @@ -488,6 +493,27 @@ function feature-snapshots(){ ( ) } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# XXX needs a bit more setup... +function feature-s1yoga-fix-touchpad-resume(){ + cat <<-EOF | sudo tee /etc/systemd/system/fix-touchpad-on-resume.service +[Unit] +Description=Fix touchpad after resume on ThinkPad S1 Yoga +After=suspend.target + +[Service] +User=root +Type=oneshot +ExecStart=modprobe -r i2c_i801 && modprobe i2c_i801 + +[Install] +WantedBy=suspend.target +EOF + + @ sudo systemctl enable fix-touchpad-on-resume.service +} + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # XXX skip scripts starting in "-" # XXX make the scripts support the same syntax as features...