💾 Archived View for xavi92.privatedns.org › pinephone-tricks.gmi captured on 2023-07-10 at 13:08:14. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

➡️ Next capture (2023-09-08)

-=-=-=-=-=-=-

Tricks for daily PinePhone users

For a few weeks now, I have been daily driving my (original) PinePhone to a certain extent, and I have compiled a brief list of scripts and tricks that might be helpful to others. Also, since I keep reflashing the operating system in it more often than I would like to, and it would be nice to a have a centralised place to store such stuff.

Vibration for notifications

When the phone is locked (e.g.: the screen is off), notifications do not emit any sound or vibration, but only the notification LED would blink. This trick below makes the phone (only) vibrate when a notification is received.

`/usr/share/feedbackd/themes/pine64,pinephone.json`

{
	"event-name" : "message-missed-notification",
	"type"       : "VibraRumble",
	"duration"   : 1000
}

Disabling keypress vibration

Each keypress on `squeekboard` will trigger a short vibration that I find particularly annoying. While modifying keypress vibration duration seems possible on the Tweaks application, assigning it to `0` changes nothing. Instead, one has to modify `/usr/share/feedbackd/themes/pine64,pinephone.json`. Specifically, set a null `type` to events `button-pressed` and `button-released`, as shown belown:

{
  "event-name" : "button-pressed",
  "type"       : ""
},
{
  "event-name" : "button-released",
  "type"       : ""
}

Mobile-friendly Dino (XMPP)

Dino is a XMPP client written in Vala and GTK-3 for GNU/Linux. It should generally work great on desktop, but IMHO it needs a few tweaks just to make it better for mobile devices.

- Added a send button on the UI, so the Enter key is instead used to insert `\n`;

- Merged `libhandy` branch;

- Do not pop down after selecting an emoji;

- Imported quote button from:

Dino fork with quote button support

- Worked around issue with edit and quote buttons not appearing when selecting text;

- Reduced emoji chooser dimensions, so they can fit into the PinePhone screen.

All these changes are grouped into the `pinephone` branch of my fork of Dino, available below:

Mobile-friendly fork of Dino

Periodical suspend/wakeup

Ideally, the PinePhone performs best and most stable if not suspended. However, and similarly to most mobile devices, the PinePhone saves most energy when suspended. However, no notifications can be received while the device is suspended, but only calls and SMS. This makes receiving notifications such as emails or XMPP messages impossible, unless the user wakes up the device regularly. I find this very distracting for users, so one must find a way to wake up the device at regular intervals, just enough time for the phone to receive any incoming notifications.

So I came up with a (rather complex) shell script that does that, while ensuring not to mess up with `systemd`-level inhibitors that might be active at any moment (e.g.: when Lollypop plays music) or the screen is on, among other conditions. It is heavily based on the following amazing project:

Automatic suspend/wakeup script for the PinePhone

I try to contribute to upstream as much as possible, while keeping some local modifications for experimentation purposes. This is an exact copy of the script that is currently running on my phone:

Fork of pinephone-scripts

The script needs some unused functions be removed, but should still work as is. Users should have special care with the configuration values at the top - most importantly:

WAKE_SECS
SLEEP_STEP
SLEEP_SECS_INIT
SLEEP_MAX_SECS

As observed above, the script will sleep for a shorter amount of time if the device has been recently locked. This allows for quicker incoming notifications e.g.: if having a conversation over XMPP. `SLEEP_STEP` defines how much suspend time should be increased next time, as long as the phone remains inactive.

According to own experience, the configuration values currently used by the script allow for a good balance between responsiveness and battery life. Ideally, `WAKE_SECS` should be as low as possible, but that makes some applications (mostly Dino) to behave unexpectedly or even crash. However, if `WAKE_SECS` cannot be decreased, increasing `SLEEP_MAX_SECS` to very high values does not bring significant benefits, yet noticeably reduce responsiveness.

Working around modem crashes

The Quectel EG25 on the PinePhone (and the PinePhone Pro) is known to be buggy, often crashing without an automatic restart, leaving the user isolated from incoming calls or SMS. While there is an ongoing effort to solve this, fortunately most times this can be worked around by restarting `eg25-manager`. This situation can be detected when the modem is no longer listed as a USB device, so this makes for a good opportunity to write a script like the one below:

Script that restarts eg25-manager automatically

Awesome project dedicated to provide a (nearly) FOSS firmware for the Quectel EG25

According to own experience, this script is a lifesaver for me: the modem would crash at random, most often (for some reason) while on the go, causing me a lot of frustration. Until the bugs are eventually ironed out, I will heavily rely on this workaround.

Lightweight (sort of) web email client

I am a proud Tutanota user since a few years ago. Their support is very good so far, and they aim to be as transparent as possible to their users. Or at least it is better than the Big Tech alternatives. However, their Tutanota "desktop", Electron-based application might not work on the PinePhone (I do not recall an `aarch64` release as of the time of this writing), and they do not support any third-party email clients.

However, GNOME Web allows to isolate a specific website as a "standalone application". Moreover, it allows running such applications in the background, which is ideal for an email client in order to avoid having too many open windows. Cookies (which Tutanota does not use) and storage data are isolated from other web applications.

Web browsing

LibreWolf

Some GNU/Linux distributions released for the PinePhone ship with customized versions of Firefox, designed for mobile. However, I am not big fan of Mozilla and their fishy business model, so LibreWolf is the best choice for me:

LibreWolf project website

However, I could not get hardware acceleration working on LibreWolf, so everything is CPU-rendered (according to about:support), which is slow and inefficient. I still prefer it over Chromium-based alternatives, though, since I am not happy with Google (and therefore Chromium-based web browsers) already owning over 70% web browser market share.

Falkon

Falkon is an interesting project by KDE based on Qt Webengine (Chromium-based, unfortunately) that is generally more responsive compared to LibreWolf. I am using it for websites that just run *too* slow on the latter.

Falkon project website

Tor Browser

The Tor project does not ship a port of Tor Browser for `aarch64`. Fortunately, the following project ships unofficial builds:

Unofficial Tor Browser builds for ARM

While these builds worked well for me for some months, one day they *just stopped working*, now all tabs crashing no matter the URL. I could not contact the maintainer and I do not know anyone else using these builds, so YMMV.

Conclusion

The PinePhone is not quite there as a daily driver for many (or even most) users out there: battery life is very poor, and it often crashes for no particular reason, forcing a reboot. I am not even sure whether GPS can be actually used yet. Dino is not designed with mobile in mind, and would often stop connecting to servers if suspended too often (or at the wrong time). Web browsers are slow and resource-intensive. GNOME Maps does not scale well to the display on the PinePhone.

Would you like to share your thoughts? Contact me!

Back to main page