Skip to content
Permalink
Browse files

save/restore sound on suspend

  • Loading branch information
khumarahn committed Nov 22, 2017
1 parent 4bacf81 commit 89417d6514e38ce4384b6242f0967664c1df6122
Showing with 14 additions and 3 deletions.
  1. +8 −2 etc/acpi/actions/powerbtn.sh
  2. +2 −0 etc/acpi/actions/suspend.sh
  3. +3 −0 etc/portage/package.keywords
  4. +1 −1 etc/portage/package.use
@@ -2,5 +2,11 @@

suspend_lock=/run/lock/teres-suspend

# test if we are resuming, delete the lock file then instead of the shutdown
rm "${suspend_lock}" || /sbin/shutdown -h now "Power button pressed"
if [ -f "${suspend_lock}" ] ; then
# we are resuming from suspend: delete the lock file, restore sound,
# do not shutdown
/etc/init.d/alsasound restore
rm "${suspend_lock}"
else
/sbin/shutdown -h now "Power button pressed"
fi
@@ -4,6 +4,8 @@
# then instead of powering off it deleted the lock file
suspend_lock=/run/lock/teres-suspend

/etc/init.d/alsasound save

touch "${suspend_lock}"

echo -n mem > /sys/power/state
@@ -40,3 +40,6 @@ sys-block/f3 amd64
sci-calculators/speedcrunch amd64 ~amd64

<sys-apps/haveged-9999 **

# for biblatex
dev-perl/XML-Writer amd64 ~amd64
@@ -20,7 +20,7 @@ gnome-base/gvfs udisks
lxde-base/lxsession upower
>=lxde-base/lxterminal-0.3.0 gtk3

app-text/texlive xetex
app-text/texlive xetex extra
app-text/texlive-core xetex

# gummi

0 comments on commit 89417d6

Please sign in to comment.
You can’t perform that action at this time.