Switch off suspend when using the L5 as hotspot

I’m in Cuba and use my L5 with a local SIM and LTE datamobile as AP to Internet for my laptop. Works all fine. What I do miss is switch off the suspend mode (set to 2 minutes) when hotspot mode is on.

I’d know how to do this with gsettings from command line, the missing “link” is to run a shell script when hotspot is activated and vice versa. Any ideas?

3 Likes

Purism really needs to get on just making this a feature

3 Likes

I’d look into NetworkManager…

1 Like

Thanks for the hints, the NM has hook scripts and I have already sorted out how to do something on action up or down for the CONNECTION_ID HotSpot. Last problems are:

  • the gsettings commands like
$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout
900

$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 120

$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout
120

do fine, when run from command line; when run from the hook script, not;

  • The values to be configured from the system dialog are stored somewhere else and not the same as from gsettings commands; this starts already with the fact that the system dialog has values in minutes while the gsettings allow seconds

  • the values set with gsettings seems to overule the values from the system dialog.

Any ideas?

2 Likes

Probably the hooks are run as root. To use gsetttings it must be run in the environment of the user running the g (in this case phoc/phosh).
You could do something like this: ~chrichri/librem5-bm818-watchmodem (main): script/librem5-recover-xhci-usb.sh - sourcehut git
To get what I needed I originally used this project: GitHub - Ventto/xpub: POSIX Shell script to get user's display environment variables of any TTY from anywhere. .

Maybe what you really want is to have the phone not suspend for a timeout after the last client disconnected.
Anyway, changing the configuration of the phone is in my opinion not the right way to go about it. I’d recommend something that doesn’t leave no traces after a reboot. For a script that could be something like gnome-session-inhibit.

1 Like

Seems fixed on: phosh 0.35.0

Untested.
Released January 2024

  • Fix suspend-inhibitor when hotspot is on

Purism Free Software & Community.

3 Likes