Skip to content

Commit

Permalink
Fix up wakeup lid checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
fewtarius committed Jun 18, 2024
1 parent 69a2d55 commit 56c325e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
2 changes: 1 addition & 1 deletion PKGBUILD/steamfork-device-support/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Fewtarius

pkgname=steamfork-device-support
pkgver=2024.06.17
pkgver=2024.06.18
pkgrel=1
pkgdesc='Hardware support provider for PC handhelds.'
arch=('any')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
# The Flip wakes when the lid is closed and the device is suspended
# so, go back into the sleep state.

LID_STATE=$(awk '{printf $2}' /proc/acpi/button/lid/LID0/state)
for count in $(seq 1 1 5)
do
if [ "${LID_STATE}" = "open" ]
then
exit 0
fi
sleep .1
done
echo mem >/sys/power/state
if [ -f '/proc/acpi/button/lid/LID0/state' ]
then
(
for count in $(seq 1 1 5)
do
LID_STATE=$(awk '{printf $2}' /proc/acpi/button/lid/LID0/state)
if [ "${LID_STATE}" = "open" ]
then
exit 0
fi
sleep .2
done
echo mem >/sys/power/state
) &
fi
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
# The Flip wakes when the lid is closed and the device is suspended
# so, go back into the sleep state.

LID_STATE=$(awk '{printf $2}' /proc/acpi/button/lid/LID0/state)
for count in $(seq 1 1 5)
do
if [ "${LID_STATE}" = "open" ]
then
exit 0
fi
sleep .1
done
echo mem >/sys/power/state
if [ -f '/proc/acpi/button/lid/LID0/state' ]
then
(
for count in $(seq 1 1 5)
do
LID_STATE=$(awk '{printf $2}' /proc/acpi/button/lid/LID0/state)
if [ "${LID_STATE}" = "open" ]
then
exit 0
fi
sleep .2
done
echo mem >/sys/power/state
) &
fi

0 comments on commit 56c325e

Please sign in to comment.