Arch Linux ARM on PinePhone
#88
Thumbs Up 
pacman -Syu 2020-11-16, Based on 20201112 image. Meets all my needs for production use. Flashed to eMMC!
My needs for a daily driver are fairly modest, reliable phone, SMS, email, contacts, calendar. A voice assistant is also strongly desired. The only compromise I have made is I reboot at least twice a day, whether it needs it or not.I also network forward calls when I cannot be reached . This provides a backup if the wakeup problem returns.

- At this time there is no mobile data but there has been in the past.
- deep sleep wakeup: 100% of the time the phone wakes up, 95% of the time gnome-calls answers
- suspend/sleep is very flaky
- USB changes are flaky
- mobile roaming not tested
- SMS 100%
- MMS must be manually handled, refer to https://gitlab.com/mobian1/issues/-/issues/89
- GPS must be manually handled, aGPS has to be manually handled, see below
- USB/HDMI dock functions subject to USB flakiness, xfce4 has issues with the displays, lightdm is functional
- power consumption is acceptable, the phone will run for 48 hours with wifi, bluetooth and gps turned off

My install process is as follows I use 2 cards for every distro I run. The QA card gets updated first, always.
- Flash both cards, test phone and SMS functionality, connect wifi.

I am a command line guy, everything below is done in terminal.
- passwd

# if you have a USB dock with HDMI output add a proper full screen window manager xfce4, Display Manager and on screen keyboard
pacman -S evolution xfce4 lightdm-gtk-greeter onboard xorg-server xorg-server-xephyr

# following is a sizing tweak
scale-to-fit Evolution on

#  Configure email, and CALDAV data sources in Evolution
# Take tar backups of /home/your_home_dir. This will save you lots of time on subsequent installs
USB Dock and HDMI

Most important here is ensure your phone is fully charged and the dock is powered properly. A standard computer USB plug will not provide enough power for reliable operation. Every single time my environment goes flaky when it has been reliable, it is due to inadequate power.  Always:

Setup the dock, do not attach the phone.
Boot phone fully, login
Attach dock.
Attach USB devices to dock, wait until recognized, may need to repeat, more than once, attach HDMI.

The first time is a hardware test. After letting everything communicate you should see the background on your HDMI monitor. You can start applications on the phone and and drag over to the big screen. Not optimal but this is a test.

Courtesy of @canaac add the following to bottom of /etc/lightdm/lightdm-gtk-greeter.conf
[greeter]
keyboard = onboard -l Phone -t Nightshade
keyboard-position = "100%,center -0;100% 20%"
a11y-states = +keyboard
icon-theme-name = Adwaita
font-name = Sans 14
xft-dpi = 100
hide-user-image = true
user-background = true

Set the above up and then test it
lightdm --test-mode --debug

Once it works run
sudo systemctl disable phosh && sudo systemctl enable lightdm && sudo reboot

This will bring up a display manager where you can choose a phosh session (mostly for phone only) or an xfce session (for the big screen)

To enable Phosh: 
sudo systemctl disable lightdm && sudo systemctl enable phosh && sudo reboot

This returns to the original login process. More details here
https://wiki.mobian-project.org/doku.php...vironments
https://wiki.postmarketos.org/wiki/XFCE4
https://wiki.postmarketos.org/wiki/Category:Interface

At this point the basic system is setup and functional. one of the most useful commands from now on is:
sudo journalctl -f

Enabling GPS
mmcli -L
mmcli -m any --location-status
mmcli -m any --location-enable-agps-msa
mmcli -m any --location-enable-gps-raw
mmcli -m any --location-enable-gps-nmea
mmcli -m any --location-status
mmcli -m any --location-get

If you want to run the aGPS update process as described here: https://gist.github.com/alastair-dm/2632...e555fa6628,
This update is independent of the OS. The data download is time-limited so this process needs to be repeated on a regular schedule.
Before you execute the script the first time run:
sudo pacman -S python-pyserial

To enable the Geoclue daemon to accesss the GPS you need to add a new rule to the PolicyKit daemon
sudo vi /etc/polkit-l/rules.d/51-gps.rules and add the following:

polkit.addRule(function(action, subject) {
  if ((action.id == "org.freedesktop.ModemManager1.Device.Control")
      && (subject.user == "geoclue")) {
        return polkit.Result.YES;
    }
  if ((action.id == "org.freedesktop.ModemManager1.Location")
      && (subject.user == "geoclue")) {
        return polkit.Result.YES;
    }
});

Run the following python script to test:
#!/usr/bin/python3
# implements a GeoClueSimpleObject
# https://www.freedesktop.org/software/geo...imple.html
import gi
gi.require_version('Geoclue', '2.0')
from gi.repository  import Geoclue
clue = Geoclue.Simple.new_sync('kalliope.desktop',Geoclue.AccuracyLevel.EXACT,None)
location = clue.get_location()
print(location.get_property('latitude'), location.get_property('longitude'))

In addition to the above I have a fully working Kalliope voice assistant built, however, the Arch aarch64 build process needs a little (lot) more work before I release it, lol

Thanks to everyone's work. As far as I am concerned, while not complete, this is a functional, usable phone. With the dock it is extremely easy to work on the system and I am continually amazed at how fast the hardware interface is being debugged. 

HTH
LF
  Reply


Messages In This Thread
Arch Linux ARM on PinePhone - by Danct12 - 06-30-2020, 08:08 PM
Power drain - by jmorris - 10-04-2020, 12:29 AM
RE: Arch Linux ARM on PinePhone (2020/11/12) - by Lousy Fisherman - 11-22-2020, 03:03 PM
RE: Arch Linux ARM on PinePhone - by linmob - 07-26-2021, 02:04 AM
RE: Arch Linux ARM on PinePhone - by mouffa - 07-25-2021, 04:27 AM
RE: Arch Linux ARM on PinePhone - by bcnaz - 09-22-2021, 06:22 PM
RE: Arch Linux ARM on PinePhone - by AndyM - 09-23-2021, 12:17 AM
RE: Arch Linux ARM on PinePhone - by bcnaz - 09-23-2021, 01:28 AM
RE: Arch Linux ARM on PinePhone - by AndyM - 09-23-2021, 04:27 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  LibreOffice usable with Arch Linux on the Pinephone? Peter Gamma 2 592 07-28-2024, 05:12 AM
Last Post: Peter Gamma
  Pinephone with KDE Plasma stuck at K logo after update Daniello 0 270 06-20-2024, 01:52 AM
Last Post: Daniello
  Pinephone error system-generators/ostree-system-generator failed with exit status 127 Daniello 3 634 06-15-2024, 03:38 AM
Last Post: Kevin Kofler
  Updating Arch Linux _radv_ 8 2,311 02-20-2024, 09:35 AM
Last Post: _radv_
  PinePhone AND/OR PinePhone Pro Arch Complete Install and Setup mikehenson 2 3,606 01-14-2024, 08:43 AM
Last Post: shifras
  How to install arch with FDE user641 3 1,528 01-11-2024, 10:18 PM
Last Post: Kevin Kofler
  How to find software app, on Arch Phosh? general_lee 5 2,960 10-15-2023, 10:12 PM
Last Post: Kevin Kofler
  Arch auto mount usb example Lazy_one 2 3,489 10-06-2023, 09:36 AM
Last Post: luppivega
  Arch with FDE user641 1 1,330 07-29-2023, 08:27 AM
Last Post: alpineduck
  No keyboard on Arch Plasma when entering password on document Chief 0 1,066 12-03-2022, 08:35 PM
Last Post: Chief

Forum Jump:


Users browsing this thread: 70 Guest(s)