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

chromebook_trogdor: status: wormdingler (lenovo chromeboot duet 3) #182

Open
vulpes2 opened this issue Dec 8, 2023 · 32 comments
Open

chromebook_trogdor: status: wormdingler (lenovo chromeboot duet 3) #182

vulpes2 opened this issue Dec 8, 2023 · 32 comments

Comments

@vulpes2
Copy link
Contributor

vulpes2 commented Dec 8, 2023

Noticed there wasn't a devcie-specific issue for wormdingler, so I thought I'd open one to keep info in the correct place.

Software setup

  • kernel: 6.4.16 (based on config from v6.1.51)
  • distro: Debian sid
  • mesa: 23.2.1 (from the Debian sid repo)
  • window protocol: wayland
  • desktop environment: gnome

Working

  • Wi-Fi (including WPA3-SAE and 802.11w) and Bluetooth
  • Built-in display (orientation, brightness controls)
  • Energy: battery status, dpms, suspend/resume
  • IIO sensors: gyroscope (auto-screen orientation, udev rule required). Link is for krane but the rule should work the same.
  • Trackpad: works well, libinput quirk required to configure pressure correctly just like krane.
  • USB: USB host, PD charging, display out (no audio)
  • Touchscreen: works out of the box, orientation is correct and follows screen rotation on GNOME
  • Graphics: OpenGL works out of the box with freedreno, performance is noticeably better than mali
  • Audio: speakers and mics seem okay

Needs work

Will investigate in these when I have more time.

  • Hardware video decoding/encoding: venus firmware is loaded, tested decoding with mpv --hwdec=v4l2m2m-copy, it's extremely choppy and unusable
  • Pen digitizer: cannot test, this device will only work with USI2 pen which I don't have
  • Audio: ucm config needs to be modified to remove the nonexistent headset and mic. dt might also need tweaks to fix the flood of ASoC: error at __soc_pcm_hw_params on MultiMedia2: -22 messages.

Broken

  • Cameras: CSI cameras, no mainline support for the subsystem.

Notes

  1. IIO sensors require iio-sensor-proxy to be installed and running for them to work with GNOME.
  2. Hardware compositing work out of the box with chromium and firefox once they are running natively on Wayland.
@vulpes2
Copy link
Contributor Author

vulpes2 commented Dec 8, 2023

Unfortunately starting from kernel 6.5 the display has stopped working, the device will only boot to a blank screen. Tested two config files, one was from the existing v6.1.51, one was config.cbq-6.6.0-stb-cbq, both gave the same results. Power management seems to be working as the power button does turn the backlight on and off, but there is simply nothing displayed on the screen. From what I can tell a homebrew SuzyQ should give me access to the AP serial console, don't know when I'll get to it but that's probably the next step for troubleshooting.

@hexdump0815
Copy link
Owner

@vulpes2 - thanks a lot for creating thise separate gh issue for wormdingler, i have now also linked it in the trogdor readme: ee9e71b

for debugging blank screen problems this might be helpful: #61 (comment) ... did you try v6.6 already? if not: maybe its fixed there and in general it is a very good target as it is a lts kernel, so it will get fixes for the next three years

in case you would prefer to buy something suzyqable like: there seems to be someone selling working devices now on ebay - see the link at the end of https://github.com/hexdump0815/linux-mainline-on-arm-chromebooks ... i have no relation to this, just read on irc that it seems to work

@vulpes2
Copy link
Contributor Author

vulpes2 commented Dec 9, 2023

Both 6.5 and 6.6 boot to a blank screen, I'll try the script trick you mentioned and see if I can get some logs. It's really a shame because I was really hoping 6.6 would work out of the box, since it's a nice LTS release.

In terms of SuzyQ, I do actually have the breakout board, just haven't gotten around to putting it together yet. It's inevitable that I'll get frustrated enough and decide to put it together, it's just a matter of time basically.

@vulpes2
Copy link
Contributor Author

vulpes2 commented Dec 9, 2023

Added the below snippet to rc.local to get some logs, and I got a completely normal boot sequence with no additional error messages on v6.5.13. Since there were a lot of renames in the dts, I tried using the dt from 6.4 with kernel 6.5 too, and nothing seems to have changed. I'm out of ideas at this point, even getting a serial console to the soc won't help me, will stick to v6.4 for now. It would be great if anyone can provide some more hints on how to debug this further.

if [ ! -f /marker ]; then
	dmesg > /dmesg.txt
	touch /marker
	shutdown -h now
fi

@hexdump0815
Copy link
Owner

@vulpes2 - if you have a working and a non working version, then git bisect should lead to the breaking commit - it is a bit painful (due to having to compile and install multiple kernels) and requires a bit of discipline (to always install the proper kernel each time, as the kernel version will jump around a bit between last, new and various -rcx versions during bisecting) but it helped me to find the root cause of problems quite a few times already ... if you do that, then do it on a usb device, so that you can easily revert to a working kernel via dd on another machine - for the emmc case otherwise this would be of interest: https://github.com/hexdump0815/imagebuilder/blob/main/doc/test-booting-a-kernel-on-chromebooks.txt ... good luck

btw. when you mention suzyq breakout board above, do you mean the google servoe board or some self built variant?

@vulpes2
Copy link
Contributor Author

vulpes2 commented Dec 9, 2023

Yeah, that's what I have been doing, building the kernel and flashing the kpart image to a flashdrive so there will be a working copy on the emmc at all times. I've previously tried to bisect a kernel issue on a different board and it was extremely painful due to the amount of manual work involved, even with the image building & flashing process completely scripted, so I'm pretty hesitant to try that again.

About the suzyq thing, I have one of these generic breakout boards to build a cable with, not a fancy servo board unfortunately.

@vulpes2
Copy link
Contributor Author

vulpes2 commented Dec 25, 2023

An update on the display situation, I tried bisecting the kernel source and found the root cause, the dsi bridge is powered on too late so panel init is failing. I'm not much of a developer so my ability to troubleshoot this kind of stuff is very limited, but I did come up with a hack that can reliably mitigate this issue for now. The patch and more details can be found in the upstream bug report: https://gitlab.freedesktop.org/drm/msm/-/issues/47

By the way, I did end up putting together a debug cable, having access to the AP serial console is super helpful for debugging, but I'm not sure how I can unlock ccd without reinstalling ChromeOS.

@vulpes2
Copy link
Contributor Author

vulpes2 commented Dec 26, 2023

A proper fix has been suggested and it has been tested. Will try to get it upstreamed and backported to linux-stable.

@hexdump0815
Copy link
Owner

hexdump0815 commented Dec 27, 2023

i usually do a ccd open and setting the gbb flags to 0x19 as a first thing before using a chromebook with linux ... it might be required to backup (maybe dd) your current system, restore chromeos, ccd open and then restore linux again ... maybe searching the web for "sh1mmer" might bring up an option to boot and ccd open your device from usb :) ... it at least helped me to ccd open and usb-boot enable a krane with broken emmc which would otherwise only be useable as a paperweight or doorstop ...

@vulpes2
Copy link
Contributor Author

vulpes2 commented Dec 28, 2023

Unfortunately there's no leaked RMA shim for trogdor so that's a dead end. I'll leave it as is for now and reinstall ChromeOS at some point to fix it.

@hexdump0815
Copy link
Owner

hexdump0815 commented Dec 28, 2023

@vulpes2 - i think wormdingler is based on strongbad (see: https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/ - and strongbad somehow seems to be some variant of trogdor - don't ask me about the logic behind all this naming :) )

update: the recovery image name of wormdingler seems to tell the same story

@WesleyVanNeck
Copy link

@hexdump0815 can you make a updated kernel build for chromebook trogdor i cant do it my self

@hexdump0815
Copy link
Owner

@FrostNovaHD - i have no time to build new kernels right now - but it is not that complicated to build one yourself and it can be done easily on the device itself - see: https://github.com/hexdump0815/imagebuilder/blob/main/doc/building-own-kernels.md

@WesleyVanNeck
Copy link

@FrostNovaHD - i have no time to build new kernels right now - but it is not that complicated to build one yourself and it can be done easily on the device itself - see: https://github.com/hexdump0815/imagebuilder/blob/main/doc/building-own-kernels.md

When do we get new bootable img for trogador

@vulpes2
Copy link
Contributor Author

vulpes2 commented Feb 24, 2024

You do not need a new bootable image, you can simply build the kernel and install it on top of the existing image. I may post an updated kernel image at some point, no promises though.

@UnitTHK
Copy link

UnitTHK commented Jun 23, 2024

Heya, just hopping on to the party here. The last bootable image for trogdor is kernel 6.1, uh. can I get some hand holding to get the device to a good stable new kernel/image? ((i just got the chromebook like 2 days ago so I've got not much experience with it's hardwares, I know a bit of linux and such but not much)). Dev mode is enabled, and a test boot of the last bootable sd images is successful, just wanted to be a bit more up to date

@thenameisluk
Copy link
Collaborator

thenameisluk commented Jun 23, 2024

the latest avaliable kernel is here (6.6.23)
you just need to follow this guide it is really simple just do it step by step
@XxTHKxX

@UnitTHK
Copy link

UnitTHK commented Jun 26, 2024

the latest avaliable kernel is here (6.6.23) you just need to follow this guide it is really simple just do it step by step @XxTHKxX

Uh, if I may ask, is there a way for me to edit the cmdline for this kernel (without rebuilding it completely at least)? I'd like to reenable ipv6 support on the kernel, as part of my network requires the usage of ipv6 in order to connect to their service

@UnitTHK
Copy link

UnitTHK commented Jun 26, 2024

Okay so I tried to build and install the latest kernel based on instruction on building-your-own-kernel and the corresponding readme file for my device, but seems like even after installing the new kernel via
dd if=/boot/vmlinux.kpart-6.6.23-stb-cbq+ of=/dev/mmcblk0p1
The booted image still use the old kernel, any suggestion?

@thenameisluk
Copy link
Collaborator

thenameisluk commented Jun 26, 2024

Uh, if I may ask, is there a way for me to edit the cmdline for this kernel

afaik no without building it at least once.
it isn't very complicated process as long as u just copy comand one by one and modifying one file

if depthcharge-tools are added to the images it should be possible

for my device, but seems like even after installing the new kernel via
dd if=/boot/vmlinux.kpart-6.6.23-stb-cbq+ of=/dev/mmcblk0p1
The booted image still use the old kernel, any suggestion?

try running lsblk and checking if ur emmc aint called mmcblk1 instead of mmcblk0
if that's the case the command shoud be

dd if=/boot/vmlinux.kpart-6.6.23-stb-cbq+ of=/dev/mmcblk1p1

@XxTHKxX

@UnitTHK
Copy link

UnitTHK commented Jun 26, 2024

Uh, if I may ask, is there a way for me to edit the cmdline for this kernel
afaik no without building it at least once.
it isn't very complicated process as long as u just copy comand one by one and modifying one file

if depthcharge-tools are added to the images it should be possible

for my device, but seems like even after installing the new kernel via
dd if=/boot/vmlinux.kpart-6.6.23-stb-cbq+ of=/dev/mmcblk0p1
The booted image still use the old kernel, any suggestion?
try running lsblk and checking if ur emmc aint called mmcblk1 instead of mmcblk0
if that's the case the command shoud be

dd if=/boot/vmlinux.kpart-6.6.23-stb-cbq+ of=/dev/mmcblk1p1

@XxTHKxX

I feel like an idiot after looking at the mmc device name, how the heck did i missed something so obvious. After fixing the device name from 0 to 1, the new kernel is booted up, and the new cmdline provided worked perfectly. Thank you so much for pointing me in the right direction!

@thenameisluk
Copy link
Collaborator

thenameisluk commented Jun 26, 2024

no problem
actually don't blame urself
on previous/older devices i used it always used to be 0 that's why the guide assumes it should be 0
but yeah in newer ones it for some reason is 1

@thenameisluk
Copy link
Collaborator

about stylus
it does "work" but has same issue as lenovo 10e x and y axis are swapped
i still don't know solution for it but when i find one will make sure to share it

@na-sa-do
Copy link

Maybe it's going to be a mess, but it's also half the price of the two Linux-native tablets I'm looking at, so I'm still considering getting one of these. The postmarketOS wiki says the modem doesn't work after suspending, but this issue doesn't note anything like that -- is that specific to their setup? Also, if hardware video decoding is unusably choppy atm, how bad is software decoding for perf & battery?

@thenameisluk
Copy link
Collaborator

thenameisluk commented Jul 19, 2024

@na-sa-do for me the devices run very well with minor tweaks
if you're asking for recommendation. for daily drive i would go with either

(my choice) Lenovo IdeaPad Duet 5

it has

Acer Chromebook Spin 513

it has

  • working camera (if u care for that)
  • sometimes funny screen rotation behaviour

in general i'd pick duet 5 given choice, while acer spin works well it doesn't feel that well made (just prefference)
if you want a small tablet i'd go with duet 3, if you want sth slightly bigger with good (attachable) keyboard, i'd say duet 5

for all, video decoding seams to currently be working fine (on the latest kelner) with ffplay and firefox, encoding not so much

on the topic of modem as far as i know neither acer spin, duet 3 nor duet 5 has mobile data capability so it doesn't really apply to them

also i'd recommend updating the kelner to the latest right way after installing the os (it fixed broken touchscreen on duet 5)

@na-sa-do
Copy link

Thanks, @LukIsHere. I know it doesn't have cellular, but I asked about the modem anyway because someone told me that on most Qualcomm chips, the cellular, wifi, and bluetooth are all linked together somehow, so if the cellular was broken the others might be too. But I take it you haven't had that issue?

@thenameisluk
Copy link
Collaborator

thenameisluk commented Jul 19, 2024

@na-sa-do nope
wifi has no issue with it (at least i don't know of any)
i've had duet 3 for just a few days and haven't noticed anything
same on other devices i've had for longer

@etihwjd
Copy link

etihwjd commented Nov 15, 2024

I've just installed the latest Ubuntu build on this device, and I may be overlooking something glaringly obvious, but I'm not getting any Wi-Fi when I boot from USB.

@thenameisluk
Copy link
Collaborator

@etihwjd
Copy link

etihwjd commented Nov 15, 2024

@etihwjd trogdor https://github.com/hexdump0815/imagebuilder/blob/main/doc/important-information.md ?

That'd explain it! 😅 I didn't spot that as I was reading around

@thenameisluk
Copy link
Collaborator

thenameisluk commented Nov 15, 2024

yeah unless you know where it is it's hard to spot

hopefully will be fix in future images

@thenameisluk
Copy link
Collaborator

just a quick note regarding usi stylus on this device (which is rotated 90*)

putting file like this

ENV{DEVNAME}=="/dev/input/event3",ENV{LIBINPUT_CALIBRATION_MATRIX}="0 -1 1 1 0 0"

in /etc/udev/rules.d/99-wormdingler-stylus.rules
and rebooting the device should fix the issue

for other devices you need to change /dev/input/eventX to correct one
you might be also interested in trying diffrent rotation matrix'es
Encourage. you to share correct config on other device issues if found one :3

should probably put it in doc's at some point with other device calibratino stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants