Sxmo/Tips and Tricks

From postmarketOS

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

Calls, SMS, Modem

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:

  1. mmcli --modem any --messaging-list-sms
    mmcli --modem 0 --sms 0
    mmcli --modem 0 --messaging-delete-sms=##
    mmcli --modem 0 -r
    The identifying number of the modem may vary, being incremented upon toggles and sometimes reboots. you probably also can use: --modem any

How to send an SMS via command line (or ssh)

cat mysupersmsfile | +33123123123 -

Where to Delete SMS


How to call from the command line

Example: 08003301000

How to change SIM pin

From 1234 to 1010:

mmcli -i any --pin=1234 --change-pin=1010


mmcli -i any --pin=1010 --disable-pin

How to send USSD

Try something like:

mmcli -m any --3gpp-ussd-initiate="*100#"

How to send AT command


  1. If desired monitor output as root:
    cat /dev/ttyUSB2
  2. In another terminal, send the command, in this example to check the ADSP firmware version:
    echo -ne "AT+QGMR\r" >/dev/ttyUSB2

Through modem manager

  1. Restart modem manager in debug mode:
    sudo /sbin/rc-service modemmanager stop
    sudo /usr/sbin/ModemManager --debug
  2. In another terminal, send the command, in this example to check the ADSP firmware version:
    mmcli -m any --command="AT+QGMR"
  3. Stop modem manager in debug mode, then run:
    sudo /sbin/rc-service modemmanager start

Retrieving signal strength information


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:

adb shell content query --uri content:// --projection display_name:data1:data3:data4 | grep '[0-9]\{10\}' | grep -v gprofile > raw_contacts

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

then run on the terminal

python3 raw_contacts | sort | uniq > contacts.tsv

For completeness, entire content of the python file ``

import csv, sys, phonenumbers as p; with open(sys.argv[1], 'r') as file:

 reader = csv.reader(file)
 for row in reader:
   name = row[0][str(row[0]).find("=") + 1:]
   for match in p.PhoneNumberMatcher(str(row), None):
     number = p.format_number(match.number, p.PhoneNumberFormat.E164)
     print(number + "\t" + name)

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:

git clone && cd cvf2csv && pip install phonenumbers

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

python && cp contacts.csv ~/.config/sxmo/contacts.tsv

General configuration

How to display the percentage of battery left, along with the icon, in the status bar? (sxmo 1.14)

add: SXMO_BAR_SHOW_BAT_PER=1 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!)

Xft.dpi: 192

(chaning it in ~/.Xresources works as well)

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

xrandr --dpi x

How to change the keyboard layouts? (wvkbd/wayland)?

edit your .config/sxmo/profile and add default command lines options for wvkbd like this:

export KEYBOARD_ARGS="-l full,special -H 200 -fn 'Hack 11'"

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

wvkbd-mobintl --help

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

How to type Umlauts

hit Cmp 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 <height>" to change the portrait height, "-L <height>" to change the landscape height.

How to activate data

In menu under Networks select 'Add a GSM'. Enter the APN settings for your carrier.

find a list here:

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

tmpfs /tmp tmpfs rw,nodev 0 0

Help with adding cronjobs

You can edit your crontab via

crontab -e

This website has proven useful in making cronjobs.

If using mnc, make sure that commands run via


55-59/2 7 * * 1-5 /home/user/script

How to customize the colours/fonts of the interface?


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


  • .config/sxmo/sway
  • bemenu parameters through BEMENU_OPTS env variable. for instance in .profile:

export BEMENU_OPTS="--fn 'FiraMono Nerd Font 13' --tf '$MYCOLOR' --tb '#00000090' --nb '#00000090' --nf '$MYCOLOR' --hb '$MYCOLOR' --hf '#000000' --sb '$MYCOLOR' --sf '$MYCOLOR' --scb '#000000' --scf '$MYCOLOR' "

  • mako config in .config/mako/config

Some notifications stay stuck on the screen!

If in dwm:

pkill dunst

If in sway:

pkill mako

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, and set Gateway to (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 less /home/user/.local/state/tinydm.log or tail -f /home/user/.local/state/tinydm.log

or logread -f 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 ~/.config/sxmo/sway and add a gaps configuration to it.

bar { gaps 42 0 }

See and

Applications specific

What to use for cartography/navigation?

osmin works well. gps can be used with the package geoclue and running /usr/libexec/geoclue-2.0/demos/agent .

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:

sudo /etc/gpsd/device-hook "" ACTIVATE

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

See 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 to ~/.config/sxmo/userscripts/

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 $XDG_CONFIG_HOME/cmus/rc to contain the string "cmus":

echo "set format_title= %a %t %c cmus" >> .config/cmus/rc


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 . As a workaround set the scaling to 1.75 or less via SXMO_SWAY_SCALE in $HOME/.config/sxmo/profile.

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

Extra features, advanced tweaking

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/ to ~/.config/sxmo/hooks/ and edit that file.

NOTE: make sure you chmod +x ~/.config/sxmo/hooks/

List all available icons for the hook entry

cat /usr/share/sxmo/default_hooks/


after an upgrade

if something is not working anymore after you updated the system, for example errors like: Error: Connection activation failed: No suitable device found for this connection (device usb0 not available because profile is n..


sudo apk fix

and then reboot.