mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
Temporary workaround for wireless suspend/resume.
Mark the wlan0 interface down on suspend and back up on resume to prod connman into action. The result isn't exactly what we want as connman won't return to the previous ap if another, previously visited ap, is found with higher signal strength. Also this is very heavyweight, the better behaviour is to simulate a beacon miss on resume and try to reassociate to the same ap; then roam if that fails--but getting that behaviour will take more work so add this for now. Review URL: http://chromereview.prom.corp.google.com/1175077 git-svn-id: svn://chrome-svn/chromeos/trunk@57 06c00378-0e64-4dae-be16-12b19f9950a1
This commit is contained in:
parent
a763728b24
commit
6016663568
@ -217,7 +217,7 @@ cat <<EOF > /etc/acpi/events/lidbtn
|
||||
event=button[ /]lid
|
||||
action=/etc/acpi/lid.sh
|
||||
EOF
|
||||
cat <<EOF > /etc/acpi/lid.sh
|
||||
cat <<'EOF' > /etc/acpi/lid.sh
|
||||
#!/bin/sh
|
||||
# On lid close:
|
||||
# - lock the screen
|
||||
@ -228,9 +228,16 @@ export HOME=/home/chronos
|
||||
#CRYPTOHOME=/dev/mapper/cryptohome
|
||||
#/usr/bin/test -b $CRYPTOHOME && /sbin/dmsetup suspend $CRYPTOHOME
|
||||
|
||||
# - stop wireless if UP
|
||||
wlan0isup=`/sbin/ifconfig wlan0 2>/dev/null | /bin/grep UP`
|
||||
test "$wlan0isup" && /sbin/ifconfig wlan0 down
|
||||
|
||||
# - suspend to ram
|
||||
echo -n mem > /sys/power/state
|
||||
|
||||
# - restore wireless state
|
||||
test "$wlan0isup" && /sbin/ifconfig wlan0 up
|
||||
|
||||
# On lid open:
|
||||
# - resume cryptohome device
|
||||
#/usr/bin/test -b $CRYPTOHOME && /sbin/dmsetup resume $CRYPTOHOME
|
||||
|
Loading…
x
Reference in New Issue
Block a user