How to convert your pinephone to a palmtop now that you have the clamshell keyboard
#1
For me, and probably for a small minority of other Pinephone users out there, the arrival of the clamshell keyboard allowed me to convert my Pinephone into the thing I had been dreaming about for years: a tiny palmtop computer. However some googling on how to do this was not super helpful. So I'm writing up what I figured out, both as an archive of my process and maybe to help others who want to do this get past sticky points.

There's two big categories of what I tried: First, I experimented with using Plasma Mobile as a desktop, but turned on its side to landscape by default. This worked more or less fine, but I soon got the hankering for being able to have multiple windows open on a screen, and being able to alt-tab between applications. (Why doesn't that work on Plasma Mobile? Seems like there's no reason it shouldn't! But it didn't.) So after a week of using Plasma Mobile in landscape mode, I installed Awesome windows manager and never looked back.

I really want to spend more time using and less time configuring, so while I _could_ do this on Arch or some other more experimental Pinephone OS, I really wanted to make everything work on default Manjaro. Thankfully this turned out to not be too difficult.

So first up: configurations to Plasma Mobile to make it more like a desktop now that you've got the clamshell keyboard going (this stuff is pretty basic, but I had trouble finding it):

  1. Landscape mode: Just use the settings to turn on auto-rotate and roll the screen to landscape mode. I found it annoying to auto-rotate so once it was in landscape I turned auto-rotate off.

  2. The most important thing is to disable the soft keyboard. This is done by adding the keyboard control widget to the desktop and then disabling the soft keyboard, see:
    https://forum.pine64.org/showthread.php?...#pid105077
    (I wish I had seen this post. I had to figure it out for myself. Tip: if you haven't seen the Pine64 wiki page on the keyboard it is full of useful information:
    https://wiki.pine64.org/wiki/PinePhone_(Pro)_Keyboard
    ...And surprisingly difficult to google.)

  3. That's pretty much it for Plasma Mobile. Because poking and swiping sucks, I recommend just getting used to using the keyboard shortcuts for your software, but those are all the same as shortcuts you've probably been using for your full-sized laptop/desktop for years. With the soft keyboard disabled the Plasma Mobile Terminal works nicely. Install a terminal-based text editor and start writing or coding! Firefox rocks as a browser, particularly if you install the Vim Vixen extension and go to an all-keyboard interaction with your browser.

But... if you're like me you quickly realize you want a terminal open next to a browser, or something like that. Time to throw off Plasma Mobile and get a full-blown Linux desktop running!

How to get Awesome windows manager (and probably you can generalize to a bunch of other windows managers) on your Pinephone with clamshell keyboard:

  1. Install Awesome or any other windows manager you want to run with pacman. Nothing fancy here, you should already know how to do this as part of basic system maintenance and management. I didn't try IceWM or any other more conventional windows manager. I don't see any reason why you can't run whatever you like most. I would suggest though that a tiling windows manager like Awesome or DWM where everything can be controlled by keyboard shortcuts will be more useful. Poking tiny menus on the Pinephone touchscreen isn't super easy. I'd also suggest that -- at least with regular Pinephone -- keeping your windows manager lightweight is going to help.

  2. Now to launch the windows manager you want to use you need to change the display/login manager. The factory-installed setup on the Pinephone is sddm (KDE's display manager) which kicks you automatically into Plasma-mobile windows manager. (All running on top of Manjaro Linux of course.) The sweetest thing would be if sddm let you choose which windows manager you wanted to use on login. This is how most Linux desktops are set up. So normally all you have to do is install the windows manager you want (mine = Awesome as I said) and then you can choose it at the login screen.

    On the Pinephone, sddm has been modified for poking in a number to unlock the screen/log in. Nowhere is there an option to choose your windows manager (or 'session' as many call it). I could not figure out how to change the settings of sddm to give you the option to choose your windows manager (even though regular desktop sddm has this normally). After messing with it for a while, I decided it would be easier to just switch display/login managers.
    • The first thing I tried was switching to LightDM, a common enough choice for display managers. This was just a matter of installing it with pacman, and then enabling it as a service:
      Code:
      sudo systemctl enable lightdm.service
      But LightDM was crashing on startup for some reason. Gave up on that.
    • Then I tried ly display manager -- super minimal, non-graphical, ncurses-like. I love it on my full-sized laptop. I compiled it and installed it from the AUR:
      https://aur.archlinux.org/ly.git
      That one seemed to be starting fine, but wasn't coming up on the console when it started. So I gave up on that one too.
    • Finally I decided minimalism was the way to go, and compiled and installed emptty:
      https://aur.archlinux.org/emptty.git
      Emptty is nothing but a command-line login that then lets you choose which windows manager to start. (Note: it required installing the pacman package go to compile it.) It worked perfectly. Remember you need to enable the service:
      Code:
      sudo systemctl enable emptty

    • You may also need to disable sddm:
      Code:
      sudo systemctl disable sddm.service

  3. Now you've got the display manager going but since emptty is running on the console it is in portrait mode and rotated from your landscape keyboard setting. You'll want to rotate the console so you can read it.
    As root, edit /boot/boot.txt. To the setenv bootargs line, add:
    Code:
    fbcon=rotate:1

    Then run:
    Code:
    mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr

    This will set your console to boot in landscape mode. Just remember that if you want to run your phone _without_ your keyboard, you'll need to use systemctl to enable sddm and disable emptty because without the keyboard there's no way to input anything on the console! In that case you will need to go back to the sddm poking-in-a-number display manager.

  4. More on configuring Awesome ('Awesome' has got to be one of the single most ungoogle-able pieces of software in the linux world! It's not the smartest name.) Obviously if you are using a different windows manager, you can skip this. Though I think a few of the concepts will be relevant to other windows managers, and you may find them useful.
    • Screen rotation: Awesome is going to default to portrait mode. You'll want to rotate it once you are running by opening a terminal and using xrandr:
      Code:
      xrandr --output DSI-1 --rotate right

    • Pointer rotation: You also need to rotate your pointer input or your x will be on your y axis and visa versa. This took my _forever_ to figure out how to do. You use xinput to do the same thing xrandr did for the screen:
      Code:
      xinput set-prop 8 --type=float "Coordinate Transformation Matrix"  0 1 0 -1 0 1 0 0 1

    • Set these automatically on login: You can probably do this in Awesome, but I like to control it in the .xinitrc file in my home directory. This is the file that is read if you use 'startx' to start your windows manager from the command line. But you can also use it if you start your windows manager with a display/login manager like we are doing. To do so, you need to install the xinit-session package from AUR:
      https://aur.archlinux.org/xinit-xsession.git
      After install xinit will be one of your session options in emptty, and you can start Awesome by reading from .xinitrc. I added these lines to the end of my ~/.xinitrc:
      Code:
      exec xrandr --output DSI-1 --rotate right &
      exec xinput set-prop 8 --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1 &
      awesome  # Needs to NOT have a &

      Big NOTE: you need to make your .xinitrc file _executable_ for xinit to work as a session:
      Code:
      chmod 755 ~/.xinitrc
    • Configuring Awesome itself: Awesome is configured in the ~/.config/awesome/rc.lua file. It is not entirely simple or straightforward, and you'll want to read the documentation on Awesome if you really want to get into this. However, here's a few tips:
      • Mod4 is the Pinecone key. Might as well put that to work!
      • I like to go through the rc.lua and disable the stuff I don't use. I can only hold so many key commands in my head anyway.
      • I like to put system commands on keyboard combinations in the rc.lua,like:
      • put 'systemctl suspend' on meta-z
      • put 'firefox' on meta-f or something.
      • put a terminal launch command on meta-Enter
      • put 'xbacklight -dec 10' and 'xbacklight -inc 10' on meta--(minus) and meta-+ respectively so you can control screen brightness. This will require installing the xbacklight or the acpilight packages. And it only works if your windows manager uses X11, not wayland.
      • You can do something similar to control sound using pamixer (or some other command-line volume control) to control sound volume.

  5. Poking the screen: At this point you can do _almost_ everything from the keyboard. But you'll find you still need to occasionally poke the screen to select something. The touchscreen is accurate enough that you can very very carefully select a tiny link in a browser, or software menu. But you can't really select things for copy-pasting. And there's no right-click. (Though I see some packages that implement a long-hold as a right-click. I haven't tried them yet.)

More on why I wanted to do this:

Back in the day I was a big fan of the netbook class with ~9" screens when those were widely available. I always felt that a small laptop was far more useful than a tablet or phone. I wrote my graduate school thesis on a netbook! Ever since then I've had the suspicion that an even smaller laptop could replace my need for a phone entirely, though probably not my need for a full-sized laptop. (I say _my_ need, not yours -- I have settled into a place with mobile technology that is pretty unique. More on that later.) Because of this, I have been eagerly awaiting the release of the Pinephone clamshell keyboard for more than a year. And now that it is here, it does not disappoint! All my dreams of a tiny but fully capable computer have come true. Many things that I sort of intuited but hadn't explicitly imagined also came about: turns out, if you don't have to waste half your screen for a lousy soft keyboard then a 5" screen really has quite a bit of usable real estate -- imagine two usable web browser windows open side-by-side. And I don't know about you, but I find soft keyboards eternally flaky and unreliable. Touchscreen technology is like 20 years old now and it still sucks. Or at least doesn't work well with my fingers. But most of all I have found that switching from a poking-and-swiping "app" based interface to a small version of a traditional Linux desktop that you interact with primarily through the physical keyboard has made the Pinephone FAR less flaky, less crash-prone, and much faster.

Doing this of course makes it, you know, _not_ a phone. Most people are used to our "phones" being these objects that are ready at a moment's notice to present an interrupt to our daily lives and give you a report on whatever it is you care about: news updates, weather, phone calls, text messages, email, etc. Turning the Pinephone into a laptop limits a lot of this interrupt ability. Mostly it's back to 1990s style "gotta check my email" pull notifications. For me, this is perfect. I don't _want_ push notifications. I want my computer to stay out of my business until I am ready to sit down and check my messages. The beauty of the Pinephone with clamshell and Linux desktop is that now I can do that almost anywhere -- but still only when I want to pull notifications. No push please! Though I could imagine that someone who really wants push notifications can configure their standard Linux desktop to provide a good chunk of that service, if not quite everything a phone does these days.
  Reply
#2
It's been a few months since you made this post, did you end up sticking with it? What were some annoyances that came up? Was thinking about doing something similar but haven't gotten around to it yet.
  Reply
#3
(04-25-2022, 03:25 PM)ragreenburg Wrote: It's been a few months since you made this post, did you end up sticking with it? What were some annoyances that came up? Was thinking about doing something similar but haven't gotten around to it yet.


It *rocks*. Everything I ever wanted in a tiny linux desktop. WAYYYY more stable and faster than any of the swipey-based interfaces (I tried a bunch of them when I first got the pinephone). And if you like attention, people are always admiring it at coffeeshops and super impressed when you show them switching between apps with alt-tab. I think there's a real pent-up demand for tiny computers out there even among the non-linux general population.

The big drawback (for some people, not for me) is, you know, it's not a phone at all. I don't even have the cellular modem going (though that's a project I want to try and get working at some point.) I'm just on wifi. I just use google voice for texts and calls, so I don't miss phone functionality at all, but for most people you would still need another device for your phone. Perhaps a pinephone pro phone and and a regular pinephone for tiny linux desktop? Maybe I'll be at that point someday.

Here's the one bad thing: two times now the keyboard stopped working on a big pacman update:
https://forum.pine64.org/showthread.php?tid=16522

And, you know, reinstalling and re-setting up the OS is... an annoyance. 

Also I switched to dwm for an even lighter footprint, but probably any keyboard-driven lightweight desktop will be fine.
 
Please do try it! I wrote out that (too long) set of instructions mostly as notes for myself. But I'd love it if at least one other person found it useful!
  Reply
#4
(05-07-2022, 12:18 PM)rotwang Wrote:
(04-25-2022, 03:25 PM)ragreenburg Wrote: It's been a few months since you made this post, did you end up sticking with it? What were some annoyances that came up? Was thinking about doing something similar but haven't gotten around to it yet.


It *rocks*. Everything I ever wanted in a tiny linux desktop. WAYYYY more stable and faster than any of the swipey-based interfaces (I tried a bunch of them when I first got the pinephone). And if you like attention, people are always admiring it at coffeeshops and super impressed when you show them switching between apps with alt-tab. I think there's a real pent-up demand for tiny computers out there even among the non-linux general population.

The big drawback (for some people, not for me) is, you know, it's not a phone at all. I don't even have the cellular modem going (though that's a project I want to try and get working at some point.) I'm just on wifi. I just use google voice for texts and calls, so I don't miss phone functionality at all, but for most people you would still need another device for your phone. Perhaps a pinephone pro phone and and a regular pinephone for tiny linux desktop? Maybe I'll be at that point someday.

Here's the one bad thing: two times now the keyboard stopped working on a big pacman update:
https://forum.pine64.org/showthread.php?tid=16522

And, you know, reinstalling and re-setting up the OS is... an annoyance. 

Also I switched to dwm for an even lighter footprint, but probably any keyboard-driven lightweight desktop will be fine.
 
Please do try it! I wrote out that (too long) set of instructions mostly as notes for myself. But I'd love it if at least one other person found it useful!








I essentially just spent my weekend working on getting Sway setup properly on my Pro with the keyboard. The issue I had was that I had a phone call come through and I didn't have volume on it, which I need to fix. I don't make many calls or texts but I do need the ability to do so. Though I do think I got a pretty sweet Sway setup right now.

[/url]
[url=https://drive.protonmail.com/urls/W388FH5FRW#9No70SqWNLrp]https://drive.protonmail.com/urls/W388FH5FRW#9No70SqWNLrp
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  systemic issue pinephone penguins_rule 3 389 04-02-2024, 11:52 AM
Last Post: Kevin Kofler
  link for supported pinephone os manjharo et all penguins_rule 2 212 03-19-2024, 10:36 AM
Last Post: penguins_rule
  new PinePhone upgrade issue WhiteHexagon 5 1,778 05-09-2023, 04:09 PM
Last Post: WhiteHexagon
  Can't add micro SD card to Pinephone thorensjubilee 7 2,498 02-27-2023, 10:21 AM
Last Post: mikehenson
  Pinephone Freeze kmsgli 14 7,421 02-04-2023, 08:35 PM
Last Post: Westslope
  No keyboard in Signal Desktop Kimberley van Buyten 4 2,363 10-16-2022, 10:25 AM
Last Post: Eugo
  Where do the keyboard layouts go? Eugo 1 1,094 08-31-2022, 11:03 AM
Last Post: Eugo
  Pinephone craches after each call neithan76 2 1,594 07-29-2022, 11:47 AM
Last Post: Chief
  manjaro-pinephone / plasma-mobile-dev: Update broken Uturn 32 29,312 07-28-2022, 12:40 PM
Last Post: johaennessen
Sad Latest Manjaro breaks Keyboard Case (Again)? hollerpots 4 2,747 06-17-2022, 07:48 AM
Last Post: hollerpots

Forum Jump:


Users browsing this thread: 1 Guest(s)