imagebuilder icon indicating copy to clipboard operation
imagebuilder copied to clipboard

chromebook_trogdor: status: homestar (lenovo duet 5 chromebook)

Open hexdump0815 opened this issue 3 years ago • 48 comments

notes on homestar running 5.19.1:

here is list of working and non working features on the lenovo duet 5 chromebook. please also have a look at https://github.com/hexdump0815/imagebuilder/issues/44 as it also contains some useful information for homestar in it.

working

  • wifi
  • builtin display
  • energy: battery status
  • usb c for basic usb functionality
  • gpu opengl: via mesa freedreno (opengl 3.3)

untested

  • bluetooth
  • energy: dpms, suspend/resume
  • external display
  • hw video encode/decode: most probably not working yet

broken

  • sound: i got audio out of both the speakers and out of connected headphones using the lenovo adapter in a proof of concept way, but there is still work to be done for a proper out of the box ucm and pulseaudio setup
  • webcams: not working yet, unclear if they can be made working as they are just simple cameras and no usb video class cameras like on other chromebooks (not deeply checked yet)

installation

coming soon

problems

none so far

hexdump0815 avatar Aug 14 '22 16:08 hexdump0815

Just got a Duet 5 a few days ago, and made a boot-thumbdrive out of your image yesterday. Boots up and so-far-so-good.

bsammon avatar Nov 30 '22 03:11 bsammon

@bsammon - thanks a lot for the feedback ... i plan to look at newer kernels and images a bit after linux kernel v6.1 is out - looks like there might be some patches required to make it work nicely on snapdragon 7c from what i read on the irc channel ... i hope to have something ready around new year maybe

hexdump0815 avatar Nov 30 '22 19:11 hexdump0815

Discovery: trying to modify the partition table of the boot-thumbdrive with parted (most attempts were actually the gparted frontend, but IIRC one attempt was commandline parted) renders the thumbdrive unbootable. Each attempt was tried on a recently-created and recently-working thumbdrive setup. Modifying the partition table with fdisk was successful, however.

I'm not really sure what the partition layout needs to look like to be bootable, and how strict the constraints are.

bsammon avatar Dec 25 '22 02:12 bsammon

Since I can't really find a relevant forum (or mailing list/etc) for discussing this (non-ChromeOS/crostini/crouton-linux-on-Duet), I'm thinking of posting my discoveries/questions here on an ongoing basis. Let me know if you'd like me to stop or set limits or something.

bsammon avatar Dec 25 '22 03:12 bsammon

@bsammon - that is the idea of those per device threads and issues here, so you are welcome to continue giving feedback here about what you notice ... regarding your parted issue you might have a look at this: https://oftc.irclog.whitequark.org/linux-cros-arm/2022-12-13#31712113 ... if you just want to extend the filesystem to full size, for that there is a script /scripts/extend-rootfs.sh to be run as root for exactly that

hexdump0815 avatar Dec 26 '22 20:12 hexdump0815

Yeah, I didn't want to grow the filesystem to fill the drive, just expand it a few gigs, leaving space for other partitions. I did experiment with customizing the extend-rootfs script; don't remember if that's the approach that I ended up using.

While the parted information in that IRC thread was confusing (What's the "-f" argument to parted? Undocumented?), the Kali Linux forum thread linked from there had some interesting info.

My current thinking: If you're going to use parted, learn how to use cgpt first.

bsammon avatar Dec 27 '22 20:12 bsammon

@bsammon - i plan to maybe switch to a more simply parted approach at some point in time when i find some time to change and test it ... let me know in case you find any working solution

hexdump0815 avatar Dec 28 '22 08:12 hexdump0815

So... (a question that came to mind while commenting in another issue) ... which kernel source do I download if I want to compile a kernel for this device?

bsammon avatar Dec 28 '22 16:12 bsammon

@bsammon - answered here: https://github.com/hexdump0815/imagebuilder/issues/104#issuecomment-1366862821

hexdump0815 avatar Dec 28 '22 19:12 hexdump0815

So, in this case, the relevant document would be https://github.com/hexdump0815/imagebuilder/blob/main/systems/chromebook_trogdor/readme.md ? Looking at that document, it seems to be more of a general "how to build a kernel from git sources" document, and not specific information about which sources should be used for which hardware. Or do I just want to use Linus's kernel tree?

...okay, poking around a bit more, maybe what I'm supposed to do is go to https://github.com/hexdump0815/imagebuilder/releases/tag/220814-01, and download the "source code" there?

bsammon avatar Dec 28 '22 21:12 bsammon

@bsammon - its all described in the three documents i have linked in the other issue - please have a look at them ... i spent quite a bit of time to write them, so you should also invest that even less time it needs to read them :)

hexdump0815 avatar Dec 28 '22 21:12 hexdump0815

I've read them. Either I'm confused, or they don't answer my questions (or both). And it's probably compounded by me not expressing my questions clearly.

bsammon avatar Dec 28 '22 21:12 bsammon

It seems like there's a lot of "You've never compiled a kernel before? Here's what you need to know" there, and I (as someone who's compiled a kernel before) am having problems finding the one or two lines that tell me what specifically to do to get the correct kernel source. That doesn't mean it's not in there, just that I'm having trouble finding it.

bsammon avatar Dec 28 '22 21:12 bsammon

Alternatively, I'm thinking, rather than looking for the answer in the documentation, I'll try reading the source to the scripts you've created, and maybe that'll tell me what source files get downloaded.

bsammon avatar Dec 28 '22 21:12 bsammon

Digging and digging, I'm looking for information about kernel patches that you use, or a special git repository with trogdor-specific kernel support, and all I've found is that the version number is 5.19.1, and https://github.com/hexdump0815/kernel-extra-patches , which seems to be (optional-i.e. I can build a bootable, usable kernel without them) efficiency patches.

I'm starting to find myself coming to the conclusion that vanilla 5.19.1 kernel sourcecode is all that I need, with no special patches, just the right .config file. Or am I missing something?

bsammon avatar Dec 28 '22 22:12 bsammon

@bsammon - i just added some extra info to the kernel deb package issue - lets continue the kernel build discussion there

hexdump0815 avatar Dec 28 '22 23:12 hexdump0815

Image 230218-03 - debian bookworm runs fine on Homestar Rev3. Working are Graphics, attached keyboard and touchpad, wifi. Not working is sound (as noted). Did an install to internal emmc and wiped chromeos (yeah), boots fine. Did an update using your kernel config to linux 6.2.6, installed depthcharge package for automatic kernel and initrd upgrades, worked fine after deleting plymouth (image with graphical boo was to big to fit into the kernel partition). Any suggestions where to look to get sound working ? Thank you James

JamesLastBolero avatar Mar 16 '23 04:03 JamesLastBolero

Did an install to internal emmc and wiped chromeos (yeah), boots fine.

Did you have/make a script/installer that does this, or did you do it manually? Is there any documentation that you found about this? I'm considering doing this myself.

Any suggestions where to look to get sound working ?

I found https://github.com/hexdump0815/imagebuilder/blob/main/doc/alsa-ucm-pulseaudio-hacking.txt a few days ago.. haven't gotten around to trying it (or even understanding it) yet. I'd be interested in hearing about what you've tried, may save me some time. Also, Cadmium claims to have sound working on the Duet 5, but it wouldn't boot (or it booted and didn't display anything) the time I tried it. I gave up on Cadmium pretty quickly (I'm meaning to get back to it sometime soon)

bsammon avatar Mar 16 '23 16:03 bsammon

@JamesLastBolero - thanks a lot for the report ... for sound i think this would be mostly around the ucm config, the mentioned ucm debugging notes might be helpful, also maybe reading through https://github.com/hexdump0815/imagebuilder/issues/54 is good (especially please keep in mind my headphone and other warnings in it) ... if it worked with cadmium then the cadmium ucm files might be a good start or the ones from the chromeos sources

@bsammon - regarding the emmc installation i have recently written some doc: https://github.com/hexdump0815/imagebuilder/blob/main/doc/install-to-emmc-on-arm-chromebooks.md ... i just wrote it down, but there might still be errors in it, so please let me know if something should not work (but in theory it should simply work) ... it is an easier to read version of https://github.com/hexdump0815/imagebuilder/blob/main/doc/install-to-emmc-with-luks-full-disk-encryption.txt

hexdump0815 avatar Mar 16 '23 18:03 hexdump0815

Excuse me, I found that the touch screen seems to be unusable during use

SiFan229 avatar Aug 20 '23 09:08 SiFan229

@SiFan229 - i must admit that i never really used the touchscreen and usually use such convertible devices usually just in laptop mode - maybe i should have a closer look at it ... maybe it is a similar problem as described here - https://github.com/hexdump0815/imagebuilder/issues/44 ?

hexdump0815 avatar Aug 20 '23 19:08 hexdump0815

I was able to verify bluetooth works.

Am looking to test things for the touch screen and audio support! I will report back anything else I can figure out.

EDIT:

I gave the #44 method for fixing the touchscreen a shot and was unsuccessful. The fix was swapping libinput for evdev on the touch screen.

The issue for coachz seems to have been working out of the box but would break with big touches. With Homestar we're looking at the touchscreen not working at all.

SOUND:

As mentioned previously bluetooth sound does work! I will look into making the dtsi edits mentioned on #44 as well and see if that works for Homestar - Would I need to build an entire image or just the kernel for this?

Edit 2: Remembered it should just be kernel, will check back in once I give it a spin.

raremotas avatar Sep 30 '23 11:09 raremotas

So... I've been running pretty well under 5.19.1, but I have some free time, and I thought I'd take a shot at upgrading to v6 of the kernel. I got the impression that 6.1.51 would be a good one to try, as it appears that others have gotten that kernel version to work.

I'm just getting started, but thought I check in to see if anyone here has a pointer to a config file that I should start with, or a document I should start with (in particular, a document with specific info about building kernels for this chromebook -- I've already found general kernel-building tutorials), or just advice in general.

[edited -- Initially I said 6.1.59, now I'm thinking 6.1.51 makes more sense]

bsammon avatar Nov 28 '23 19:11 bsammon

I've found https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/blob/lts/config.cbq-6.1.51-stb-cbq Seems like a reasonable candidate.

bsammon avatar Nov 28 '23 19:11 bsammon

@bsammon - in case you prefer a precompiled kernel, then you can have a look at https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/releases/tag/6.1.51-stb-cbq and https://github.com/hexdump0815/imagebuilder/blob/main/doc/installing-a-newer-kernel.md ... but compiling a kernel yourself is the better option anyway - for that https://github.com/hexdump0815/imagebuilder/blob/main/doc/building-own-kernels.md might be useful ...

hexdump0815 avatar Nov 28 '23 21:11 hexdump0815

Yeah, I may want that precompiled kernel for comparison's sake if the one I build doesn't work.

Since you didn't comment on my choice of config file, I'm assuming you have no objections or reservations.

bsammon avatar Nov 28 '23 21:11 bsammon

Also, is https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/blob/lts/readme.cbq the latest version of the process you use to build the FIT images?

bsammon avatar Nov 28 '23 21:11 bsammon

yes - for v6.1 it is and there is another branch with some initial (not really well tested yet) v6.6 experiments

hexdump0815 avatar Nov 29 '23 20:11 hexdump0815

@JamesLastBolero @bsammon @raremotas - please have a look at https://github.com/hexdump0815/imagebuilder/issues/44 as well, which now also contains some information useful for homestar and sound maybe worth trying.

hexdump0815 avatar Jan 28 '24 19:01 hexdump0815

image homestar seams to only work with one external monitor instead of 2 image not sure why

thenameisluk avatar Jun 14 '24 18:06 thenameisluk