~mil/sxmo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
5 4

[PATCH sxmo-utils] Drop fast wifi reconnection behavior

Details
Message ID
<20230829185736.31180-2-contact@willowbarraco.fr>
DKIM signature
missing
Download raw message
Patch: +1 -23
As this does not works for a long time, and this is mostly Pinephone
specific, we drop this from Sxmo.

If someone want to investigate futher to keep something similar, I would
recomment to find a more global solution than this Sxmo specific trick.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
---
 .../three_button_touchscreen/sxmo_hook_postwake.sh       | 6 ------
 .../three_button_touchscreen/sxmo_hook_unlock.sh         | 9 ---------
 scripts/deviceprofiles/README.md                         | 4 ----
 .../sxmo_deviceprofile_pine64,pinephone-1.2.sh           | 4 +---
 .../deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh | 1 -
 5 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh b/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
index f550bde..7067f03 100755
--- a/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
+++ b/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
@@ -12,10 +12,4 @@ if [ -z "$MMCLI" ]; then
	sxmo_wakelock.sh lock sxmo_modem_crashed 30s
fi

# see the comments in sxmo_hook_lock.sh
# and https://todo.sr.ht/~mil/sxmo-tickets/150
if [ 1 = "$SXMO_RTW_SCAN_INTERVAL" ]; then
	echo 1200 > "/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr"
fi

# Add here whatever you want to do
diff --git a/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh b/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
index 8353cf4..3b40f27 100755
--- a/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
+++ b/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
@@ -25,15 +25,6 @@ sxmo_wm.sh inputevent touchscreen on
sxmo_daemons.sh stop periodic_blink
sxmo_daemons.sh stop periodic_wakelock_check

# see https://todo.sr.ht/~mil/sxmo-tickets/150
# We set the scan interval threshold here to
# 16000 (16s) the default, since in sxmo_hook_postwake.sh
# we set it to 1200 (.12s) so that we can reconnect to wifi
# quicker after resuming from suspend.
if [ 1 = "$SXMO_RTW_SCAN_INTERVAL" ]; then
	echo 16000 > "/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr"
fi

# Go to lock after 120 seconds of inactivity
if [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
	sxmo_daemons.sh stop idle_locker
diff --git a/scripts/deviceprofiles/README.md b/scripts/deviceprofiles/README.md
index 4abbce2..7c00ccc 100644
--- a/scripts/deviceprofiles/README.md
+++ b/scripts/deviceprofiles/README.md
@@ -81,10 +81,6 @@ ### Input-related
SXMO_MONITOR		| Display "Output" from `swaymsg -t get_outputs`. Should be the same as the output from the `xrandr` command when running dwm.

### General / Misc.
SXMO_WIFI_MODULE		| The wifi kernel module used when switching scan intervals

SXMO_RTW_SCAN_INTERVAL	| Does the wifi kernel module offer a rtw_scan_interval_thr interface ? [default: 0]

SXMO_SYS_FILES			| String of files for sxmo_setpermissions.sh to make +rw (see sxmo_setpermissions.sh)

SXMO_VIBRATE_DEV		| Path to vibration device (see sxmo_vibrate.c and clickclack.c) [default: /dev/input/by-path/platform-vibrator-event]
diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh b/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
index 849c3fa..eef1d72 100755
--- a/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
+++ b/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
@@ -2,9 +2,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors

export SXMO_WIFI_MODULE=8723cs
export SXMO_RTW_SCAN_INTERVAL=1
export SXMO_SYS_FILES="/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr /sys/power/state /sys/devices/platform/soc/1f00000.rtc/power/wakeup /sys/power/mem_sleep /dev/rtc0 /sys/devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/power/wakeup"
export SXMO_SYS_FILES="/sys/power/state /sys/devices/platform/soc/1f00000.rtc/power/wakeup /sys/power/mem_sleep /dev/rtc0 /sys/devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/power/wakeup"
export SXMO_TOUCHSCREEN_ID=8
export SXMO_MONITOR="DSI-1"
export SXMO_ALSA_CONTROL_NAME=PinePhone
diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh b/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
index dcc0d92..57d38d1 100755
--- a/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
+++ b/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
@@ -47,5 +47,4 @@ export SXMO_MONITOR='0:0:MELFAS_MMS345_Touchscreen'
# /sys/devices/platform/soc@0/78b8000.i2c/i2c-5/5-0035/power_supply/rt5033-battery/wakeup6
# /sys/devices/virtual/wakeup/wakeup4
# /sys/devices/virtual/wakeup/wakeup5
export SXMO_WIFI_MODULE='wcn36xx'
export SXMO_SWAY_SCALE="2"
-- 
2.42.0

[sxmo-utils/patches/test.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CV59C8B1VUEI.3UR5XGSTN0LXO@cirno2>
In-Reply-To
<20230829185736.31180-2-contact@willowbarraco.fr> (view parent)
DKIM signature
missing
Download raw message
sxmo-utils/patches/test.yml: SUCCESS in 45s

[Drop fast wifi reconnection behavior][0] from [Willow Barraco][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/44137
[1]: contact@willowbarraco.fr

✓ #1049597 SUCCESS sxmo-utils/patches/test.yml https://builds.sr.ht/~mil/job/1049597
Details
Message ID
<ZO5yX8OdmVmXFNQ9@durand.trilidun.org>
In-Reply-To
<20230829185736.31180-2-contact@willowbarraco.fr> (view parent)
DKIM signature
missing
Download raw message
Last I checked (Spring) this was still needed, although, obviously, 
hacky af...  Did something change?

On Tue, Aug 29, 2023 at 08:57:37PM +0200, Willow Barraco wrote:
>As this does not works for a long time, and this is mostly Pinephone
>specific, we drop this from Sxmo.
>
>If someone want to investigate futher to keep something similar, I would
>recomment to find a more global solution than this Sxmo specific trick.
>
>Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
>---
> .../three_button_touchscreen/sxmo_hook_postwake.sh       | 6 ------
> .../three_button_touchscreen/sxmo_hook_unlock.sh         | 9 ---------
> scripts/deviceprofiles/README.md                         | 4 ----
> .../sxmo_deviceprofile_pine64,pinephone-1.2.sh           | 4 +---
> .../deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh | 1 -
> 5 files changed, 1 insertion(+), 23 deletions(-)
>
>diff --git a/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh b/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
>index f550bde..7067f03 100755
>--- a/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
>+++ b/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
>@@ -12,10 +12,4 @@ if [ -z "$MMCLI" ]; then
> 	sxmo_wakelock.sh lock sxmo_modem_crashed 30s
> fi
>
>-# see the comments in sxmo_hook_lock.sh
>-# and https://todo.sr.ht/~mil/sxmo-tickets/150
>-if [ 1 = "$SXMO_RTW_SCAN_INTERVAL" ]; then
>-	echo 1200 > "/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr"
>-fi
>-
> # Add here whatever you want to do
>diff --git a/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh b/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
>index 8353cf4..3b40f27 100755
>--- a/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
>+++ b/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
>@@ -25,15 +25,6 @@ sxmo_wm.sh inputevent touchscreen on
> sxmo_daemons.sh stop periodic_blink
> sxmo_daemons.sh stop periodic_wakelock_check
>
>-# see https://todo.sr.ht/~mil/sxmo-tickets/150
>-# We set the scan interval threshold here to
>-# 16000 (16s) the default, since in sxmo_hook_postwake.sh
>-# we set it to 1200 (.12s) so that we can reconnect to wifi
>-# quicker after resuming from suspend.
>-if [ 1 = "$SXMO_RTW_SCAN_INTERVAL" ]; then
>-	echo 16000 > "/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr"
>-fi
>-
> # Go to lock after 120 seconds of inactivity
> if [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
> 	sxmo_daemons.sh stop idle_locker
>diff --git a/scripts/deviceprofiles/README.md b/scripts/deviceprofiles/README.md
>index 4abbce2..7c00ccc 100644
>--- a/scripts/deviceprofiles/README.md
>+++ b/scripts/deviceprofiles/README.md
>@@ -81,10 +81,6 @@ ### Input-related
> SXMO_MONITOR		| Display "Output" from `swaymsg -t get_outputs`. Should be the same as the output from the `xrandr` command when running dwm.
>
> ### General / Misc.
>-SXMO_WIFI_MODULE		| The wifi kernel module used when switching scan intervals
>-
>-SXMO_RTW_SCAN_INTERVAL	| Does the wifi kernel module offer a rtw_scan_interval_thr interface ? [default: 0]
>-
> SXMO_SYS_FILES			| String of files for sxmo_setpermissions.sh to make +rw (see sxmo_setpermissions.sh)
>
> SXMO_VIBRATE_DEV		| Path to vibration device (see sxmo_vibrate.c and clickclack.c) [default: /dev/input/by-path/platform-vibrator-event]
>diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh b/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
>index 849c3fa..eef1d72 100755
>--- a/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
>+++ b/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
>@@ -2,9 +2,7 @@
> # SPDX-License-Identifier: AGPL-3.0-only
> # Copyright 2022 Sxmo Contributors
>
>-export SXMO_WIFI_MODULE=8723cs
>-export SXMO_RTW_SCAN_INTERVAL=1
>-export SXMO_SYS_FILES="/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr /sys/power/state /sys/devices/platform/soc/1f00000.rtc/power/wakeup /sys/power/mem_sleep /dev/rtc0 /sys/devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/power/wakeup"
>+export SXMO_SYS_FILES="/sys/power/state /sys/devices/platform/soc/1f00000.rtc/power/wakeup /sys/power/mem_sleep /dev/rtc0 /sys/devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/power/wakeup"
> export SXMO_TOUCHSCREEN_ID=8
> export SXMO_MONITOR="DSI-1"
> export SXMO_ALSA_CONTROL_NAME=PinePhone
>diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh b/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
>index dcc0d92..57d38d1 100755
>--- a/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
>+++ b/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
>@@ -47,5 +47,4 @@ export SXMO_MONITOR='0:0:MELFAS_MMS345_Touchscreen'
> # /sys/devices/platform/soc@0/78b8000.i2c/i2c-5/5-0035/power_supply/rt5033-battery/wakeup6
> # /sys/devices/virtual/wakeup/wakeup4
> # /sys/devices/virtual/wakeup/wakeup5
>-export SXMO_WIFI_MODULE='wcn36xx'
> export SXMO_SWAY_SCALE="2"
>-- 
>2.42.0
>

--
sic dicit magister P
https://phartman.sites.luc.edu/
GPG keyID 0xE0DBD3D6 (CAE6 3A6F 755F 7BC3 36CA  330D B3E6 39C6 E0DB D3D6)
Details
Message ID
<CV5QDO3F3ECP.72TT4R7U0VDU@yellow-orcess>
In-Reply-To
<ZO5yX8OdmVmXFNQ9@durand.trilidun.org> (view parent)
DKIM signature
missing
Download raw message
> Last I checked (Spring) this was still needed, although, obviously, 
> hacky af...  Did something change?

Yes, it doesn't works anymore. At least on my device. Does it works on
yours?
Details
Message ID
<ZO8bPCV8gI7G1aMi@durand.trilidun.org>
In-Reply-To
<CV5QDO3F3ECP.72TT4R7U0VDU@yellow-orcess> (view parent)
DKIM signature
missing
Download raw message
On Wed, Aug 30, 2023 at 10:19:37AM +0200, Willow Barraco wrote:
>> Last I checked (Spring) this was still needed, although, obviously,
>> hacky af...  Did something change?
>
>Yes, it doesn't works anymore. At least on my device. Does it works on
>yours?

OK.  Let me check again.

--
sic dicit magister P
https://phartman.sites.luc.edu/
GPG keyID 0xE0DBD3D6 (CAE6 3A6F 755F 7BC3 36CA  330D B3E6 39C6 E0DB D3D6)
Details
Message ID
<ZPyIiA0TTWy2ZIho@durand.trilidun.org>
In-Reply-To
<20230829185736.31180-2-contact@willowbarraco.fr> (view parent)
DKIM signature
missing
Download raw message
Applied.

On Tue, Aug 29, 2023 at 08:57:37PM +0200, Willow Barraco wrote:
>As this does not works for a long time, and this is mostly Pinephone
>specific, we drop this from Sxmo.
>
>If someone want to investigate futher to keep something similar, I would
>recomment to find a more global solution than this Sxmo specific trick.
>
>Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
>---
> .../three_button_touchscreen/sxmo_hook_postwake.sh       | 6 ------
> .../three_button_touchscreen/sxmo_hook_unlock.sh         | 9 ---------
> scripts/deviceprofiles/README.md                         | 4 ----
> .../sxmo_deviceprofile_pine64,pinephone-1.2.sh           | 4 +---
> .../deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh | 1 -
> 5 files changed, 1 insertion(+), 23 deletions(-)
>
>diff --git a/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh b/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
>index f550bde..7067f03 100755
>--- a/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
>+++ b/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
>@@ -12,10 +12,4 @@ if [ -z "$MMCLI" ]; then
> 	sxmo_wakelock.sh lock sxmo_modem_crashed 30s
> fi
>
>-# see the comments in sxmo_hook_lock.sh
>-# and https://todo.sr.ht/~mil/sxmo-tickets/150
>-if [ 1 = "$SXMO_RTW_SCAN_INTERVAL" ]; then
>-	echo 1200 > "/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr"
>-fi
>-
> # Add here whatever you want to do
>diff --git a/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh b/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
>index 8353cf4..3b40f27 100755
>--- a/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
>+++ b/configs/default_hooks/three_button_touchscreen/sxmo_hook_unlock.sh
>@@ -25,15 +25,6 @@ sxmo_wm.sh inputevent touchscreen on
> sxmo_daemons.sh stop periodic_blink
> sxmo_daemons.sh stop periodic_wakelock_check
>
>-# see https://todo.sr.ht/~mil/sxmo-tickets/150
>-# We set the scan interval threshold here to
>-# 16000 (16s) the default, since in sxmo_hook_postwake.sh
>-# we set it to 1200 (.12s) so that we can reconnect to wifi
>-# quicker after resuming from suspend.
>-if [ 1 = "$SXMO_RTW_SCAN_INTERVAL" ]; then
>-	echo 16000 > "/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr"
>-fi
>-
> # Go to lock after 120 seconds of inactivity
> if [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
> 	sxmo_daemons.sh stop idle_locker
>diff --git a/scripts/deviceprofiles/README.md b/scripts/deviceprofiles/README.md
>index 4abbce2..7c00ccc 100644
>--- a/scripts/deviceprofiles/README.md
>+++ b/scripts/deviceprofiles/README.md
>@@ -81,10 +81,6 @@ ### Input-related
> SXMO_MONITOR		| Display "Output" from `swaymsg -t get_outputs`. Should be the same as the output from the `xrandr` command when running dwm.
>
> ### General / Misc.
>-SXMO_WIFI_MODULE		| The wifi kernel module used when switching scan intervals
>-
>-SXMO_RTW_SCAN_INTERVAL	| Does the wifi kernel module offer a rtw_scan_interval_thr interface ? [default: 0]
>-
> SXMO_SYS_FILES			| String of files for sxmo_setpermissions.sh to make +rw (see sxmo_setpermissions.sh)
>
> SXMO_VIBRATE_DEV		| Path to vibration device (see sxmo_vibrate.c and clickclack.c) [default: /dev/input/by-path/platform-vibrator-event]
>diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh b/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
>index 849c3fa..eef1d72 100755
>--- a/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
>+++ b/scripts/deviceprofiles/sxmo_deviceprofile_pine64,pinephone-1.2.sh
>@@ -2,9 +2,7 @@
> # SPDX-License-Identifier: AGPL-3.0-only
> # Copyright 2022 Sxmo Contributors
>
>-export SXMO_WIFI_MODULE=8723cs
>-export SXMO_RTW_SCAN_INTERVAL=1
>-export SXMO_SYS_FILES="/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr /sys/power/state /sys/devices/platform/soc/1f00000.rtc/power/wakeup /sys/power/mem_sleep /dev/rtc0 /sys/devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/power/wakeup"
>+export SXMO_SYS_FILES="/sys/power/state /sys/devices/platform/soc/1f00000.rtc/power/wakeup /sys/power/mem_sleep /dev/rtc0 /sys/devices/platform/soc/1f03400.rsb/sunxi-rsb-3a3/axp221-pek/power/wakeup"
> export SXMO_TOUCHSCREEN_ID=8
> export SXMO_MONITOR="DSI-1"
> export SXMO_ALSA_CONTROL_NAME=PinePhone
>diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh b/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
>index dcc0d92..57d38d1 100755
>--- a/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
>+++ b/scripts/deviceprofiles/sxmo_deviceprofile_samsung,a5u-eur.sh
>@@ -47,5 +47,4 @@ export SXMO_MONITOR='0:0:MELFAS_MMS345_Touchscreen'
> # /sys/devices/platform/soc@0/78b8000.i2c/i2c-5/5-0035/power_supply/rt5033-battery/wakeup6
> # /sys/devices/virtual/wakeup/wakeup4
> # /sys/devices/virtual/wakeup/wakeup5
>-export SXMO_WIFI_MODULE='wcn36xx'
> export SXMO_SWAY_SCALE="2"
>-- 
>2.42.0
>

--
sic dicit magister P
https://phartman.sites.luc.edu/
GPG keyID 0xE0DBD3D6 (CAE6 3A6F 755F 7BC3 36CA  330D B3E6 39C6 E0DB D3D6)
Reply to thread Export thread (mbox)