Hacker News new | ask | show | jobs
by zatop 2135 days ago
During Librem 5 development, they considered using GNOME but, after talking with the upstream devs, they abandoned the idea.

Gnome is slow even on laptops, it was made for X and later ported to Wayland, it uses Clutter/Mutter, JavaScript, etc. So here yes definitively it's layers upon layers.

On the other hand, Posh is based on Wlroots and there is no layers. It's pure C code talking directly to EGL/DRM/KMS (And in the future Vulkan) stack.

Even more interesting, Wlroots allows the use of hardware layers and with that you directly write to the screen and compositing is done in hardware. You can't go more optimised than that.

With this kind of approach you can totally write a convergent, both phone & desktop, environment which is butter smooth on low spec mobile.

But of course then the whole question is which apps you run on that environment, the typical Electron app won't run smoothly (but it wouldn't either on a IPhone 1).

On the other hand, GTK 4 should be GPU accelerated and Qt too so those could run pretty smoothly

1 comments

> You can't go more optimised than that.

Phosh uses GTK, right? That's a pretty thick layer right there. You used to be able to put pixels on screen with a handful of ASM instructions https://www.cprogramming.com/tutorial/tut8.html

Yes this is totally true, I should've been more precise.

There are two parts : 'Phoc' and 'Posh'. Phoc is the Wayland compositor (Wlroots & C), Posh is the launcher UI (GTK).

Phosh is just "an app" (with special privileges to talk to Phoc). All it does is display app icons and windows thumbnails (which are not actual live windows but just screenshots of the apps (like on Android)) it does not composite windows, it does not stand between the apps and Phoc.

This is unlike Clutter & JavaScript which do stand between the apps and the Wayland compositor (Mutter) on GNOME.

So my point is that apps on the Librem talk directly to Phoc (not Posh) which is a super minimal layer and can draw pixels on screen with almost no overhead (and potentially none at all when they'll support hardware layers)

(Note : this is the Librem architecture as far as I understood, maybe I missed something)

Very interesting, thanks! I wish there were more videos focusing on UI latency and snappiness for the Librem 5 but all you see are "feature" videos. It's hard to tell if the phone is laggy (finger move to eyeball time) or not.
Once hardware acceleration is enabled it will be very snappy :) : https://social.librem.one/@dos/104218666011152589