Sxmo/Tips and Tricks

Here is a growing list of tips, tricks and configuration snippets for using Sxmo.

This pages is intended to focus mostly on "non-core" issues, such as running apps and everyday usability. The core configuration issues should end up in sxmo doc, as discussed on https://todo.sr.ht/~mil/sxmo-tickets/275

Sometimes Modem gets stuck
Sometimes the modem does not respond, stops receiving/sending calls, etc.

Preferred solution: toggle 'Modem Daemons' in the menu under 'Config'.

Reliable solution: reboot.

Sometimes SMS messages aren't sent/received
The latest biktorgj firmware (0.5.3) should address this situation. Alternatively, check for stuck sms and delete them:


 * The identifying number of the modem may vary, being incremented upon toggles and sometimes reboots. you probably also can use:
 * The identifying number of the modem may vary, being incremented upon toggles and sometimes reboots. you probably also can use:
 * The identifying number of the modem may vary, being incremented upon toggles and sometimes reboots. you probably also can use:
 * The identifying number of the modem may vary, being incremented upon toggles and sometimes reboots. you probably also can use:
 * The identifying number of the modem may vary, being incremented upon toggles and sometimes reboots. you probably also can use:

How to call from the command line
Example:

How to change SIM pin
From 1234 to 1010:

Disabling:

How to send USSD
Try something like:

Directly

 * 1) If desired monitor output as root:
 * 2) In another terminal, send the command, in this example to check the ADSP firmware version:
 * 1) In another terminal, send the command, in this example to check the ADSP firmware version:

Through modem manager

 * 1) Restart modem manager in debug mode:
 * 2) In another terminal, send the command, in this example to check the ADSP firmware version:
 * 3) Stop modem manager in debug mode, then run:
 * 1) In another terminal, send the command, in this example to check the ADSP firmware version:
 * 2) Stop modem manager in debug mode, then run:
 * 1) Stop modem manager in debug mode, then run:

Retrieving signal strength information
See https://wiki.postmarketos.org/wiki/Modem#ModemManager

Create contacts.tsv for Sxmo from Android data
This assumes you have developer mode enabled on your phone and usb debugging using adb.

I messed around with different API calls, I store the contacts locally on the device, what worked for me to get the full set of phone numbers was:

`create_contact_tsv.py` depends on python package `phonenumbers`, please install it.

then run on the terminal

For completeness, entire content of the python file `create_contact_tsv.py`

Create contacts.tsv for Sxmo from a vcard export ( vcf export from nextcloud for example )
We can convert an export in vcard format of a contact list to a file sxmo can work with with the following commands:

Put the vcard export you downloaded in the same directory as the convert.py script, name it contacts.vcf Look at README.md if you want to change the default behaviour of the convert script.

How to display the percentage of battery left, along with the icon, in the status bar? (sxmo 1.14)
add: in ~/.config/sxmo/profile

How to easily change the size of the text, system-wide?
Change the value in: /usr/share/sxmo/appcfg/xresources_xft.xr (try 160!)

(chaning it in  works as well)

if you remove the dpi line there you can set dpi on the fly via

How to change the keyboard layouts? (wvkbd/wayland)?
edit your .config/sxmo/profile and add default command lines options for wvkbd like this:

To see a list of possible options for KEYBOARD_ARGS, enter:

Possible keyboard layouts for option  are: Full, Special, Emoji, Simple, SimpleGrid, Nav, Dialer, Cyrillic, Arabic, Persian, Greek, and Georgian.

How to type Umlauts
hit  followed by the according letter.

How to change the size of the virtual keyboard?
edit KEYBOARD_ARGS in your ~/.config/sxmo/profile and add "-H " to change the portrait height, "-L " to change the landscape height.

How to activate data
In menu under Networks select 'Add a GSM'.

How to launch programms on startup?
If you run dwm, then edit ~/.config/sxmo/xinit. If you run sway, then edit ~/.config/sxmo/sway. In either case, you can also copy over /usr/share/sxmo/default_hooks/start to ~/.config/sxmo/hooks/start and edit that file. NOTE: Make sure you chmod +x ~/.config/smxo/hooks/start.

mount /tmp/ in RAM, to save write cycles on storage device
add the following in /etc/fstab

Help with adding cronjobs
You can edit your crontab via

This website https://crontab.guru/ has proven useful in making cronjobs.

If using mnc, make sure that commands run via sxmo_rtcwake.sh.

Example:

xorg/dwm
Get example in the alpine blooms theme by Tetrakist, as entries to add in /home/user/.Xresources

wayland/sway

 * .config/sxmo/sway


 * bemenu parameters through BEMENU_OPTS env variable. for instance in .profile:


 * mako config in .config/mako/config


 * In depth guide on editing colors in Sway, bemenu, Foot, and wvkbd with all color options detailed. At the bottom of the guide is the link to a script which will do it all for you once you set the colors.

Some notifications stay stuck on the screen!
If in dwm:

If in sway:

A simple way to share sxmo's connection through USB (aka "USB tethering")
Select 'Networks' in the menu and add a USB hotspot.

On your connecting device, you may need to configure IPv4 configuration Manually, as your pmOS device is not going to act as a DHCP server by default. Set "Addresses" to 10.42.0.2/24, and set Gateway to 10.42.0.1 (which is your pmOS device's address). If you're running DNSmasq, you may also use that for DNS server, otherwise set DNS server to your favorite server.

Where can i read logs for sxmo?
try or

or for the generic pmOS log, that also displays some of sxmo deamons (modemmanager, etc.) information

Move sxmo's bar below your phone's notch
Find the bar entry in  and add a gaps configuration to it.

See https://todo.sr.ht/~mil/sxmo-tickets/494 and https://man.archlinux.org/man/sway-bar.5.en

What to use for cartography/navigation?
osmin works well. gps can be used with the package geoclue and running .

Pure-maps sort of works (using OpenTopo or Sputnik tiles), as well as Marble (QT/KDE, heavy...). Unsure yet how to make the GPS work for both of these, but it has reported being feasible...

Apparently a good start to enable GPS should be:

Also, Mepo, under heavy development, seems promising, and seems already packaged for alpine/postmarketOs in its alpha versions.

See https://wiki.postmarketos.org/wiki/Applications_by_category#Geography for geography applications.

QT app (vlc-qt, etc.) doesnt fit the screen!
try adding the following in your .config/sxmo/xinit

(change the factor until it suits your need)

You can also copy https://git.sr.ht/~anjan/sxmo-userscripts/tree/master/item/scripts/scale_display.sh to ~/.config/sxmo/userscripts/scale_display.sh

Cmus: the application related bemenu is not loaded as soon as a song is played.
change the title of the terminal in the cmus config file  to contain the string "cmus":

Flatpak
If you use Flatpak apps, you probably will have problems with sound. That is because Flatpak requires a PulseAudio-compatible sound server, but SXMO uses by default only ALSA. To install and setup PipeWire as well as its PulseAudio implementation, please refer to SXMO's documentation.

NB: it seems that as of latest (1.8.2 at time of writing), pipewire now comes as default in sxmo

Telegram Desktop
The onscreen keyboard may overlap the text input field on Wayland. See https://github.com/telegramdesktop/tdesktop/issues/3274. As a workaround set the scaling to 1.75 or less via  in.

Additionally the window decorations can be removed via Telegram Settings > Advanced > System Integration > Use System Window Frame > Enable (restart required).

A Wayland version of Sxmo, really??
Yes. Really! It's the default now. Use WM Toggle in the menu under 'Power' to toggle between dwm and sway.

How to Add Apps to the List?
Copy /usr/share/sxmo/default_hooks/sxmo_hook_apps.sh ~/.config/sxmo/hooks/sxmo_hook_apps.sh and edit that file. NOTE: make sure you chmod +x ~/.config/sxmo/hooks/sxmo_hook_apps.sh