Following the PureOS Crimson beta release in our last post, we are eagerly looking forward to the general release. We received a lot of constructive feedback about the beta, and with only a few blockers left, we are taking the opportunity to make this the best PureOS release yet.
With that goal in mind, our March report includes improvements spanning the entire OS, from deep within the kernel up through the major applications.
Reliability improvements are part of the “long tail” of many small improvements for a reliable operating system. As a result, this is one of our longest posts!
In the Librem 5, the Linux kernel initializes and controls almost all of the hardware. This differs from PCs, where some hardware is controlled by the EC or coreboot, and the OS kernel doesn’t have to be aware of it. This means that most improvements for basic hardware functionality on the Librem 5 occur in the kernel.
The latest kernel for the Librem 5 includes improvements for the hardware kill switches, volume keys, suspend, display initialization, and much more.
The Librem 5’s hardware kill switches physically disable the phone’s sensors or radio. The OS has no role in this, but the OS does sense the switches. This way, the OS can display indicators to remind you that the kill switch is off, and it will reset software components that interact with the modem, camera, or other sensors.
We found that in some phones, the software sense could trigger inadvertently when the switches were on. This happened if some of the internal components, like resistors, were at the edge of their normal tolerance range. To fix this, we adjusted the drive strength of those signals from the CPU, which accounts for a wider range of internal component values.
There was also a rare crash that could occur when toggling the camera and microphone kill switch, which is fixed.
Like the kill switch sense signals, the CPU also senses the volume keys. Real switches never produce a perfectly clean “toggle” when they change state. There is always a short time when they flicker between the off and on states, known as “bounce.” Linux “debounces” the signal by sampling it for a short time.
The 50 ms debounce interval from prior releases was long enough that it could suppress some normal short presses, and we reduced it to 20 ms.
Another signal to the CPU is the modem wake signal. When the system is suspended, the modem uses this signal to wake up the system for a call or SMS.
Some phones did not always receive the wake signal reliably – the idle state wasn’t quite pulling the signal high enough, so it wouldn’t always register a transition when the modem asserts it low. We adjusted the input signal to ensure the phone always registers the transition and always wakes up.
We backported a fix for the eMMC interface that ensures the system suspends and resumes reliably even if some commands take longer to finish than expected.
Some recent kernel changes interacted poorly with older versions of U-Boot. With an older U-Boot, sometimes the display backlight would not power on during boot. The latest kernel now retries initialization in this case to ensure that the backlight turns on.
When we’re shipping product, supportability is important in addition to robustness. No product is perfect, and users will find new issues. When that happens, we need good tools to support our customers and get those problems fixed.
The latest kernels have pstore and ramoops enabled, so if the kernel panics and must restart, it will have a log from the panic that we can then analyze. This works by reserving a small part of RAM as a “persistent store” (pstore), so the kernel will preserve it through a reboot following a panic.
PureOS contains many shared and reusable components that become parts of the applications in the OS. We made fixes and robustness improvements to several of these components, improving the reliability of PureOS.
GTK is a toolkit for GNOME applications, including many of the applications on the Librem 5. Many GTK applications had issues with multitouch events, which we fixed. WebKitGTK, a web rendering engine that powers Epiphany and is used in other GTK applications, received fixes for pinch-to-zoom and hardware-accelerated video decoding.
Squeekboard is the default on-screen keyboard in PureOS, which gives it a central role on a touch-focused device. We fixed a reproducible crash specifically affecting the “Terminal” layout, which is the default for the Terminal but also sometimes useful in other applications.
Etnaviv, the 3D acceleration driver for Vivante GC graphics processors, powers all 3D-accelerated applications on the Librem 5. This includes more applications than you might realize – not just “3D applications”, many modern 2D applications now use 3D acceleration to draw 2D interfaces. The Phosh compositor (phoc) and most web browsers are great examples.
We backported many upstream improvements to Etnaviv, which improves stability and functionality for all of these applications.
While the kernel manages the low-level hardware, applications make the high-level decisions. For example, the kernel manages raw communication with the cellular modem, but applications make decisions about what to do with an incoming call.
Several improvements impact cellular functionality – mobile data, calls, and SMS.
If you received more than one SMS message in quick succession, some of them might not be received, since ModemManager was busy processing the first message while receiving the second. We think this was likely to impact multi-part SMS (long messages), or receiving multiple SMS while resuming from suspend. It also might impact MMS, because carriers deliver MMS by sending an SMS that tells the phone where to download the multimedia message. Queueing requests that occur while ModemManager is busy ensures all messages are received.
Chatty, the messaging application, might have failed to show notifications for messages. It’s not supposed to generate notifications when you’re already looking at the window, but due to a bug, it thought its own window was always in the foreground. We fixed that so it detects this state correctly again.
Applications like Contacts couldn’t initiate an SMS, due to a bug in Chatty that is fixed.
Calls, the calling application, now prevents starting a second call while one is in progress. Calls doesn’t support multiple calls, so if a second call ever did occur, it would just hang it up again. This isn’t normally possible, but this robustness fix ensures that we don’t dial a number inadvertently if it does happen due to a bug.
Occasionally, we’ve seen the modem’s communication interface to the phone stop responding. While the cause for this is not clear yet, and likely involves the modem’s firmware, we improved ModemManager to reset the interface if it happens to maintain connectivity.
A common “call quality” issue is actually caused by microphone input volume. If it’s too low, the other party can’t hear you. If it’s too high, the other party will hear distorted audio and might receive excessive background noise. It is also hard to adjust, as the setting is part of the detailed audio settings, and you can’t hear the result while changing it. We’re now setting a reasonable default level on boot to ensure that calls work.
Finally, we backported several fixes for ModemManager and notification improvements for Chatty, which improve the overall phone experience on the Librem 5.
Calamares is the graphical installer used in PureOS, Debian Live images, and many other distributions.
Installations made with Calamares weren’t configuring GRUB correctly – an update later might ask you where to install GRUB again, which was difficult to answer for many users. We fixed Calamares so new installations will be configured correctly.
With all of these improvements, we are eager for the latest PureOS to reach all of our customers. We’re now focusing on the last few blockers in order to make the general release. Stay tuned for more news, and thank you to all of our customers and PureOS subscribers for making this work possible!