News for hackers. Stuff that matters.
Re:Librem 5 Phone Dogwood Thermals and Battery Life by jchw on Tuesday July 28, 2020 @02:21PM (#23979011)
I just recently received my PinePhone Braveheart unit, which is by no means a similar device. However, I did try running Mobian, which runs a similar stack (including Librem’s innovative Phosh.) It actually is pretty impressive, and even though it is not aimed at consumer use it is pretty close to being usable as a basic phone with Linux.

There’s really two problems.

1. Speed. The CPUs are just underwhelming. It is not unusable by any means, but it definitely feels like many steps backwards. I think at least the PinePhone needs to be running lighter software; Wayland is certainly not an issue, but a lot of heavy GTK software is probably not a good idea. Web browsing is tricky and makes me wish there existed lightweight browser engines that implemented less of the web standard, but it is actually passable believe it or not.

2. Linux desktop software is just not designed for phones. I think Phosh is clever, and feels very nice to use... until you remember its a phone, and then realize the inherent differences. Normal phones have some kind of central push notification management, but not here. I assume when the device sleeps, you simply stop getting any notifications. I haven’t actually seen a notification pop up on the lockscreen yet, so I’m not sure. There’s an SMS and messaging app, and Telegram/tdesktop works really well, so there is that.

I think that both problems could be solved somehow, but it’s feeling like it could be a tough one. One of the things that both iOS and Android did right off the bat was dramatically change the model of execution that apps had, to orient them around the concept of constantly being swapped in and out. There’s really no obvious way you can support standard Linux desktop apps without some compromise here. I would actually be pretty happy if these devices were capable of just staying awake on a low frequency most of the time, because I think that would dramatically simplify things, but you would have to worry a lot about power draw from apps running and etc in ways that you don’t have to in most modern phones.

Some may view the lack of a good push notification story as a benefit, but for me there are definitely things where I want it to be reliable and timely... so I am left feeling a bit lost.

Re:Librem 5 Phone Dogwood Thermals and Battery Life by seba_dos1 on Tuesday July 28, 2020 @08:08PM (#23982060)
[disclaimer: I work for Purism] Having both Librem 5 and PinePhone right in front of me, I'd say that it's RAM speed, not CPU that's underwhelming. Librem 5 feels much snappier to use, even for such tasks as apt-getting over ssh. They have pretty similar CPUs, but Librem 5's RAM is more than twice as fast as PinePhone's and it shows.

The Vivante GPU is also pretty capable: https://social.librem.one/@dos/104218666011152589

Notifications on the lockscreen are planned, just give it some time :)

> I assume when the device sleeps, you simply stop getting any notifications.

That's true, and that's one of the reasons why Librem 5 doesn't utilize suspend yet - the idle times as seen in the article are just that: idle, not sleeping. We could have made integrating suspend in ATF our top priority, but there's still a lot of groundwork needed before it will actually make enough sense. There's plenty of other power management work to focus on first.

Re:Librem 5 Phone Dogwood Thermals and Battery Life by jchw on Tuesday July 28, 2020 @08:47PM (#23982314)
Ahh, that does look very impressive. Well, then I certainly look forward to that. The current price point for the Librem 5 (showing up as $750 USD for me now) is a bit more than I’m willing to drop for it though, so I guess I’ll have to really think about this.
Re:Librem 5 Phone Dogwood Thermals and Battery Life by qchris on Tuesday July 28, 2020 @02:36PM (#23979180)
I'm not sure I've had that issue with Mobian--I definitely am able to receive phone calls while it's sleeping in the other room, so it's not like there's an inherent inability to push notifications during sleep. I think that using `libnotify-bin` is the recommended library for doing notifications at the moment, although I haven't tested it to see if it pops up during sleep.

I did my first "Hello, world" app for it on Mobian on Pinephone, linked below, with that library and that seems to work pretty well.

[1] https://github.com/quietlychris/mobian_hello

Edit: After some prelim testing, it does look like the notification from the example I linked doesn't get pushed to the phone while it's sleeping. Unless there's been a fix pushed in the week or so since I've updated it, looks like that's still a to-do.

Re:Librem 5 Phone Dogwood Thermals and Battery Life by jchw on Tuesday July 28, 2020 @03:24PM (#23979676)
Phone calls and text messages are way different than push notifications. The modem is a separate chip on the device that can almost definitely wake up the CPU, and there is, to my knowledge, no such chip for fetching push notifications over the internet. Even if there was, you can verify by hand that apps like tdesktop don’t support any kind of central push notification service from the operating system, so it would be impossible for the device to do anything special; it simply has to be awake for traditional apps to process push notifications.

Libnotify is for sending notifications to the OS for display. However “push notifications” usually refers to the system that handles the push portion. For example, APNS (Apple Push Notification Service) and FCM (Firebase Cloud Messaging.) Lacking a centralized service both on the OS side and in the cloud, it’s difficult to see how a battery-optimized push notification system could be devised. From my understanding, on today’s phones generally the CPU has to wake up periodically to poll, and if you have many individual push services that would be inefficient. (Maybe iPhone has a more clever system than just waking up the main CPU to poll, I do not know.)

Re:Librem 5 Phone Dogwood Thermals and Battery Life by megous on Tuesday July 28, 2020 @03:36PM (#23979776)
You can possibly use the modem itself for monitoring for notifications, even if the main SoC sleeps. And wake the main SoC up from the modem. It would only work over mobile data though.
Re:Librem 5 Phone Dogwood Thermals and Battery Life by seba_dos1 on Tuesday July 28, 2020 @10:05PM (#23982809)
Don't forget that the modem firmware is completely proprietary, so the idea is rather to make it do less, not more.
Re:Librem 5 Phone Dogwood Thermals and Battery Life by megous on Wednesday July 29, 2020 @05:14AM (#23984816)
Modem firmware is, but the Linux running on the modem isn't. It's under GPL. Some people would even like to run mainline Linux there, eventually.

Even the userspace running on the modem can hardly be called completely proprietary. It's some busybox system + bunch of other tools that are also under GPL or other OSS licenses. I didn't measure it exactly, but it wouldn't surprise me if the amount of proprietary code in userspace of the modem is < 20%.

Re:Librem 5 Phone Dogwood Thermals and Battery Life by seba_dos1 on Wednesday July 29, 2020 @09:26AM (#23986370)
The fact that the firmware contains GPLv2 code doesn't mean it's not completely proprietary.

You can't modify the modem firmware and then still legally operate it in public networks under most legal jurisdictions around the world.

Re:Librem 5 Phone Dogwood Thermals and Battery Life by megous on Wednesday July 29, 2020 @08:31PM (#23993090)
Sure I can. Modem's firmware is split into two parts. Linux OS running on ARM CPU and modem's modem FW running on hexagon cores. It's possible to modify ARM CPU code without affecting modem's operation much at all. ARM CPU just takes care of some audio/USB and such interfacing tasks. It's laregely free to run your own tasks. The manufacturer even allows customers to build their own userspace code for the ARM CPU inside the modem and extend it this way as part of quectel open linux SDK.

Anyway, the original issue was about notifications, and ability to implement them without consuming too much power. And one of ways to do it is to extend the modem this way.

Re:Librem 5 Phone Dogwood Thermals and Battery Life by zozbot234 on Tuesday July 28, 2020 @04:35PM (#23980407)
> generally the CPU has to wake up periodically to poll, and if you have many individual push services that would be inefficient.

Even if you had many push services, waking up periodically and polling them all at the same time ought to be rather efficient.

Re:Librem 5 Phone Dogwood Thermals and Battery Life by jchw on Tuesday July 28, 2020 @06:08PM (#23981209)
Even if this is true, you still need to coordinate all of them to happen at once, so it doesn't obviate the need for an OS-level service to coordinate this at least.
Re:Librem 5 Phone Dogwood Thermals and Battery Life by zozbot234 on Tuesday July 28, 2020 @04:34PM (#23980391)
> Wayland is certainly not an issue, but a lot of heavy GTK software is probably not a good idea

GTK by itself is quite light, even GTK3. It's certainly lighter than the Java UX of Android.

Re:Librem 5 Phone Dogwood Thermals and Battery Life by jchw on Tuesday July 28, 2020 @06:11PM (#23981227)
I don't know what your definition of light is, but it just doesn't match mine, and I also actually contest the idea that it is necessarily "less light" than Android UI. They're pretty different beasts, and there's multiple dimensions to "lightweightness." What I do know is that GTK pulls in quite a lot including a CSS engine. You can certainly do UI libraries that use a lot less cycles and RAM.