void-linux / void-mklive

The Void Linux live image maker
https://voidlinux.org
Other
324 stars 189 forks source link

Pinebook Pro support #105

Open jcgruenhage opened 4 years ago

jcgruenhage commented 4 years ago

This issue tracks progress towards a usable voidlinux image for the Pinebook Pro. Currently, we can already build a working image

How to read the list: A checked box means that the work is done and merged, an unchecked box with a PR linked means that this is basically done, but not merged yet.

jcgruenhage commented 4 years ago

that's very weird indeed. Currently not at home, I'll try to build a new image from scratch then and check whether it works then..

jcgruenhage commented 4 years ago

Still getting the same result with a freshly built image...

jcgruenhage commented 4 years ago

A few more details: I built the image by building a rootfs, then a platformfs, then the image using no special flags. The commit I built from was the one from #115. I installed a superset of the packages @houki0 mentioned. What makes this even weirder, on some image that I tried earlier, it did work, but I don't remember which one.

gogabr commented 4 years ago

I am using the void-pinebookpro-musl-20200221.img.xz from @renatoaguiar for the third day now, and so far everything seems as smooth as possible. Lightdm, awesome, firefox, mpv all seem quite stable; sound works with asound.conf copied from Debian + sndiod. Only problem was texlive-bin only available as glibc binaries and not working with gcompat; I had to manually copy ld-linux-aarch64.so.1, libc and libm from a glibc system (luckily the names are different and do not conflict with musl). But that is not specific to pinebook pro.

houki0 commented 4 years ago

It probably should be noted that my described sway setup worked on the glibc image. The musl image I'm testing now gives a "Unable to create backendDRM device" error with another error underneath it on the same line that's not really clear.

Xfce does work perfectly with it though, and I'm currently resizing the partition so I can test KDE.

houki0 commented 4 years ago

KDE works on musl, but like Xfce it looks unaccelerated, but glxinfo doesn't work so I can't confirm that.

renatoaguiar commented 4 years ago

sound works with asound.conf copied from Debian + sndiod.

@gogabr Did you download asound.conf from some upstream repo or just copied from your running debian?

I'll include it in pinebookpro-base.

gogabr commented 4 years ago

I just copied it from my Debian partition. I remember that some variants I downloaded did not work (maybe this? https://gitlab.manjaro.org/manjaro-arm/packages/community/pinebookpro-post-install/blob/master/asound.state) I will test again later today when I come home.

gogabr commented 4 years ago

Checked this. The asound.state from Manjaro, linked above, works just fine.

renatoaguiar commented 4 years ago

Updated pinebookpro-base with audio and keyboard configuration from manjaro: https://github.com/void-linux/void-packages/pull/19564

houki0 commented 4 years ago

I just found out why my musl setup was software rendering. I forgot to install mesa-dri.

Right now, sway works again, but I have the exact same issues with X11 as on glibc. I think our panfrost is broken.

EDIT: a link to the logs for convenience

anjandev commented 4 years ago

Hello!

Excuse my ignorance here as I may have troubleshooted this issue incorrectly. I installed voidlinux on my pbp 2 weeks ago. Yesterday, I was getting ssl errors with xbps and spotty wifi. I suspected that it was an issue with the time. However, I had updated my time via sudo ntpdate 0.ca.pool.ntp.org.

I think this was finally fixed by setting HARDWARECLOCK="localtime" in rc.conf and running sudo ntpdate 0.ca.pool.ntp.org.

The problem was with the hardware clock (which returned UTC time) I believe cause the system clock was correct (using localtime) and I was still getting ssl errors.

I dont know if this was the correct fix. If this was not the right fix, please let me know the correct way to fix so I can teach people how to fix this problem on the pinebook pro wiki.

anjandev commented 4 years ago

A word of warning for everyone, I cannot get libreoffice to work on the pinebook pro.

See: https://github.com/void-linux/void-packages/issues/19642

Even flatpaks dont work. I was just able to reproduce this issue: https://github.com/flathub/org.libreoffice.LibreOffice/issues/77

Please take a look at those issues if you can.

houki0 commented 4 years ago

Here's the most meaningful logs I could find

I came to that conclusion after seeing software rendering work, and panfrost crash, without fiddling with xorg settings first, so please take it with a grain of salt.

renatoaguiar commented 4 years ago

I do not know if this device has a real RTC, but these cheap devices normally don't.

@xtraeme It does have a real RTC.

q66 commented 4 years ago

@houki0 @xtraeme https://github.com/void-linux/void-mklive/issues/105#issuecomment-587171038

houki0 commented 4 years ago

I forgot about that one. Does manjaro use mesa-git?

KeepBotting commented 4 years ago

manjaro does use mesa-git, yes

https://gitlab.manjaro.org/manjaro-arm/packages/extra/mesa-git/-/blob/master/PKGBUILD

On March 2, 2020 1:06:42 PM EST, Houki notifications@github.com wrote:

I forgot about that one. Does manjaro use mesa-git?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/void-linux/void-mklive/issues/105#issuecomment-593537189

ZachIndigo commented 4 years ago

Using the musl build provided here, I can't use an X programs (I haven't checked Wayland) while mesa-dri is installed. I will try again after running updates, since I haven't updated in a while

renatoaguiar commented 4 years ago

Did anybody else notice an improvement in display support after upgrading to latest mesa version from official repository?

houki0 commented 4 years ago

I hadn't noticed it updated yet.

But it seems to work flawlessly at first glance. The issues with XFCE I posted about are fixed.

jcgruenhage commented 4 years ago

Did anybody else notice an improvement in display support after upgrading to latest mesa version from official repository?

Yes, this finally makes void usable on my pbp :)

There are still some quirks, but sway works, Firefox works, terminal emulators work sort-of (except for some bugs when doing tab completion, but that's probably a problem with my shell setup, even though the exact same setup works flawlessly on manjaro, and also on my workstation with void. See https://ipfs.io/ipfs/Qmbch3yMbXCVUgXf8qyeJ1mkPFCGL6Xz78n5r3zaGBtmSr for an example, where I enter cd dev<tab><tab>), and that's basically all I need :D

GDM still crashes, but that's okay, I'm using CDM in the mean time. Most Qt applications (tried pinentry-qt and pavucontrol-qt) seem to go a bit nuts, with mouse pointers not being where they are supposed to be and weird stuff like that. Has anyone else experienced weird behavior like that?

ZachIndigo commented 4 years ago

After installing the updated mesa-dri, I can open xorg, plasma, sddm, lightdm, lxqt and plasma (xorg, not wayland), but that's probably because I forgot to install something or other. However, there is a visual glitch on plasma where, when opening and closing applications, parts of the screen turn white.

houki0 commented 4 years ago

I've been using it as a daily driver for the past few days, with a bare i3 setup with lightdm. Works pretty well until I enable a compositor, which drops the frames I get in glxgears to 55-45 fps or so, and makes the system a lot less responsive.

I haven't done any real testing with anything else yet, but from the little time I've spent testing KDE I can confirm I'm seeing the same issues as @BenEvolent333.

If I have the time I might try out an XFCE setup with its default window manager, to see if the problem is with compositing in general, or just with xcompmgr/picom.

But it actually is usable as a basic desktop OS now, so that's great! Thanks everyone!

ZachIndigo commented 4 years ago

@houki0 in my experience, Compton works just fine as a compositor, but the one included by default with KDE does not.

sunnaryt commented 4 years ago

it's not KDE's compositor but qt having some incompatibility with panfrost, in manjaro they have special "qt5-es2*" packages built for panfrost compatibility, but i actually have no idea what they are or why they work

jcgruenhage commented 4 years ago

I've been running this for a while now, it's mostly working really good. Some applications don't work (that do work on manjaro), like mumble, but it's usable as a daily driver for me. @xtraeme, what do you think is still needed before a blog post and official images can be made available?

jcgruenhage commented 4 years ago

In case people haven't read the march update from the pine64 people: It currently looks like kernel 5.7 will include everything needed for the pbp, so the device specific kernel can be removed a lot sooner than most people probably expected.

KeepBotting commented 4 years ago

until official images can be generated, are there any images up-to-date with this PR which can be written with dd to the pinebook pro's eMMC?

jcgruenhage commented 4 years ago

I built and shared this for some redditor a while ago https://cloudflare-ipfs.com/ipfs/QmTsWuKW9udVYYY8KfzA4AEQEwnAiptC8G1kUe56zsKiHK/void-pinebookpro-20200320.img.xz

KeepBotting commented 4 years ago

thanks, this boots up nicely from eMMC and also gives microSD priority if one is present

jcgruenhage commented 4 years ago

Yes. I think someone (probably me if no one else wants to chime in) has to write that blog post and ask the admins to generate official images.

KeepBotting commented 4 years ago

after resizing my root partition i can no longer boot all the way into void, is there a known workaround for this?

led turns green but system hangs at blank screen (no backlight)

jcgruenhage commented 4 years ago

Depending on how you resize the partition and the filesystem in it, it might change the partitions UUID. Editing /etc/fstab should fix that. For me, resizing the partition with cfdisk and the fs with resize2fs worked without having to change the fstab.

renatoaguiar commented 4 years ago

I think we should automatically expand root partition on first boot or at least provide an easy CLI tool, e.g. "void-expand-rootfs", to do that properly (without changing UUID).

BTW, that should be a common issue for all targets. How are people dealing with it on Raspberry Pi, for example?

jcgruenhage commented 4 years ago

In general, how is using void as a daily driver working out of others here? I still have a bunch of issues which I couldn't be bothered to fix yet, such as audio not working, bluethooth audio stuttering terribly, Qt applications freezing immediately after launch and some other graphical tools just refusing to launch at all, like GDM. Getting Gnome to work would be amazing, even if it would likely be quite slow.

CameronNemo commented 4 years ago
gogabr commented 4 years ago

For me, mostly everything works. (Admittedly, my demands are not very high.) I built myself emacs, ghc and xmonad, so now I have my preferred setup. Java also works well enough to start Idea, but I haven't done much else with it. For some reason, video does not play in Telegram. I could not, so far, make suspend work.

houki0 commented 4 years ago

All I'm missing is:

Don't know about bluetooth audio, but my bluetooth mouse works fine. I'm not having any problems with qt so far.

thallian commented 4 years ago

I am running it on musl with sway and most stuff works nicely (doing full disk encryption too). Using pulseaudio.

jcgruenhage commented 4 years ago

@thallian How have you set up FDE? I've messed with void-mklive a bit in that direction, but couldn't get it to boot so far.

thallian commented 4 years ago

@jcgruenhage I used void-mklive unchanged to build the image. Did an lvm on luks installation with boot unencrypted on a seperate partition.

In /boot/boot.txt you need to add/update some bootargs:

Update /boot/boot.scr: mkimage -A arm -O linux -T script -C none -n "boot script" -d /boot/boot.txt /boot/boot.scr

Build initramfs (dracut should pick up on the needed modules automatically): dracut

Convert the initramfs to a the u-boot format:

The boot.txt provided by pinebookpro-uboot picks that up automatically.

Add the cryptdevice to /etc/crypttab: crypt /dev/mmcblk2p2 none luks (again, uuid should work too).

That's what I did, hope it helps. I am also not sure if I can leave parts of that out, still trying stuff and I am very new to the arm world :)

EDIT: so, the dracut part was only necessary because it failed during the initial installation (don't know why), after running xbps-reconfigure -f pinebookpro-kernel it generated the initramfs correctly.

And the crypttab part is not necessary either, only makes you input the password twice.

Skirmisher commented 4 years ago

Anyone else having issues with setting up for external modules in the latest kernel versions? I haven't tried since 5.5, but I'm getting this when running make modules_prepare in /usr/src/kernel-headers-5.7.0_1:

arch/arm64/kernel/vdso/Makefile:12: lib/vdso/Makefile: No such file or directory
make[1]: *** No rule to make target 'lib/vdso/Makefile'.  Stop.
make: *** [arch/arm64/Makefile:173: vdso_prepare] Error 2
jcgruenhage commented 4 years ago

Anyone else having problems with bluetooth audio stuttering?

When booting, it complains about a clm_blob not being available, so the device may have limited channels, which sounds related.

Edit: Those are likely unrelated, the pinebook wiki says the stuttering appears, when 2.4G wifi is used:

Since the Bluetooth transceiver shares both its spectrum and antenna with 2.4 GHz Wi-Fi, simultaneous use of these modes may cause interference, especially when listening to audio over Bluetooth. If Bluetooth audio cuts out frequently, switching to the 5 GHz band – or deactivating Wi-Fi – may help.

jcgruenhage commented 4 years ago

So, new problem: Anyone having success booting an image produced by mkimage with the new 5.8 kernel? Manjaro switched from a custom kernel to the upstream kernel, so we shouldn't need a pinebook pro specific kernel anymore.

CameronNemo commented 4 years ago

For the rock64, I have heard that older u-boot cannot boot 5.8 kernels.

Not sure about the rk3399 boards, but it is something to watch out for.

Speaking of -- is the pinebookpro-uboot package going to track mainline u-boot in any expected timeframe?

jcgruenhage commented 4 years ago

The uboot package we have right now (https://github.com/void-linux/void-packages/blob/master/srcpkgs/pinebookpro-uboot/template) is based on a fork that's half a year old. I've looked at the manjaro PKGBUILD (https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-pinebookpro/-/blob/master/PKGBUILD), they're using an upstream release (1.5 months old) with a few patches and a firmware blob.

So, with these things in mind: It's definitely possible 5.8 works on manjaro but not on void because our uboot is older, and switching to upstream uboot should be fairly easy, someone just needs to do it. In case this is not done until October, I'll go clean up this stuff then (meaning switching to an upstream uboot and kernel). Two reasons for waiting for me: I have a big exam on 2020-09-29, so I'm pretty busy until October, and doing something meaningful as part of Hacktoberfest is also nice, instead of just getting the shirt/stickers for doing a few version bump PRs to void-packages.

KeepBotting commented 4 years ago

I'll help test, would like to switch my eMMC to Void with upstream kernel/u-boot :)

jcgruenhage commented 4 years ago

Thanks for the offer, but I'm not sure how much testing is actually needed/useful there. It either boots, or it doesn't, and for the "it doesn't boot" case there's not much one can do without the UART cable (which I have, so debugging won't be a problem). Still, once I have working builds, I'll publish them here.

ghost commented 4 years ago

Just got my PBP today. I tried running:

sudo ./mkrootfs.sh -o aarch64latest aarch64.
sudo ./mkplatformfs.sh pinebookpro aarch64latest
sudo ./mkimage.sh void-pinebookpro-PLATFORMFS-20200216.tar.xz

then unxz the resulting img.xz then dd'd to a microsd. When I insert the microsd and power on the power LED flashes between green and red. I did a sudo pacman -Syu in manjaro before trying as well as I read that some packages may need upgrading to boot off of the microsd.

Any ideas what I might be doing wrong?