Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot: A few updates to LVGUI #285

merged 31 commits into from
Jan 25, 2021


Copy link

@samueldr samueldr commented Jan 23, 2021

First, to the lvgui project itself:

  • Support libinput as an input source
  • Try DRM before falling back to fbdev

Then, in LVGUI

  • Added a toggle switch control
  • Added an select control

libinput support

Compared to evdev, really there shouldn't be any differences. Except in practice there is. One difference is that there is no need for a hack to detect the input type (touchscreen vs. mouse).

Another is that libinput supports calibration matrices. It's not been needed for any in-tree devices, but an x86 tablet I own requires it (per-device though). While the support isn't in Mobile NixOS yet, it should be possible to add handle this.

Additionally, working with libinput feels much better, as it does things like translate touchpad events to relative movements for you (me).

DRM support

This is a big one! SDM845 devices, like the Pixel 3 family and razer-cheryl2 don't have a working fbdev backend. Luckily, it seems Android works with DRM, and we also can. Furthermore asus-dumo actually has bad behaviours with fbdev available, where the display cannot suspend/resume and gets into a bad place.

It might not actually work as implemented right now. I still need to test on SDM845, but for asus-dumo it does work as expected.

For SDM845 it might still require page flipping or something similar to be added. Though known working DRM sample programs exist, and were used as a basis for the reworked DRM driver.

toggle switch


The description is configured by the user. It does not automatically mirror the value, but it is trivial enough for the user to handle it by themselves.

It's meant to describe a boolean state (duh).

It will soon be used to optionally disable kexecing into a generation's kernel from stage-0.




It is meant to allow choosing one option among a list. It shows up as an overlay.

A few uses are thought of, but nothing concrete planned. It just felt right to implement it at this moment while working on this. It might be used in target disk mode to select a partition or disk to export.


  • test DRM on razer-cheryl2

Copy link
Member Author

samueldr commented Jan 24, 2021

Tested on razer-cheryl2. Weird thing though is that with the current kernel revision used it doesn't work. Neither does the drm-howto programs.

I would hazard a guess that an updated GPU driver from a specific kernel fork I was using to test early was needed. That is, because it was confirmed to work with that kernel fork.

Though, supporting razer-cheryl2 is not a goal, right now, the goal is to add DRM support so later on all DRM-only platforms can use it. razer-cheryl2 anyway kind of works with simplefb. And anyway, razer-cheryl2 needs a kernel update, since the vendor dropped an update on us. At that point in time I'll (1) rehydrate the kernel history as I did and (2) look carefully at the GPU code. And anyway, I'm like the only person to own that phone and want to run Mobile NixOS on it, not a priority yet :).

To be clear: with that updated GPU driver it works as expected, and works just fine.

@samueldr samueldr added the 4. type: enhancement New feature or request label Jan 25, 2021
Where more generic one-off helpers will be added
This probably should not have been added straight onto LVGL bindings,
but that's where they're the easiest to implement safely.

This allows a widget to take control of the focus group, while allowing
the previous content to be re-added properly.
It was found, through some debugging, that we were adding a
non-invisible dummy object for focus group handling. With this change
we have a common dummy object to use for this purpose.
This way it's easy to just colour an element when visualizing its
A bit like a "drop down" select
This way it's trivial to *check* what is actually running on the device.
It breaks the DRM-based app, and anyway was bad on the fbdev app
Useless for this kind of system.
@samueldr samueldr merged commit 173ddba into NixOS:master Jan 25, 2021
@samueldr samueldr deleted the feature/lvgui-january-2021 branch January 25, 2021 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4. type: enhancement New feature or request
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant