chromebook_cherry: status: tomato (acer cp513-2h)
this issue is just a placeholder to potentially give feedback if my untested experimental images from https://github.com/hexdump0815/imagebuilder/releases/tag/220710-01 are working at all and in case they are working to note down what works and what not ...
Hi, thanks a lot for your efforts! I had tried. It's working pretty well, except audio and video hardware acceleration.
What works and what not:
- [x] Display
- [x] Camera
- [x] WiFi
- [x] Bluetooth (can connect to other devices, sending file failed)
- [x] Video (soft decode)
- [ ] Video Codec (hardware acceleration)
- [ ] Audio (no sound, pulseaudio shows zero sinks/sources)
thanks a lot for testing - that is actually way better than i expected :)
for audio: what does "cat /proc/asound/cards" show?
- The output looks like:
cat /proc/asound/cards
0 [m8195r10195682s]: m8195_r1019_568 - m8195_r1019_5682s
m8195_r1019_5682s
-
and, found a ucm config for this card in chromeos source code.
-
also, seems something wrong with ALSA ASoC driver.
dmesg -l err
[ 1.275644] mtk_cmdq 10320000.disp_mailbox: failed to get gce clk: 0
[ 1.282094] mtk_cmdq 10330000.mdp_mailbox: failed to get gce clk: 0
[ 1.614156] mtk-tphy soc:t-phy@11c40000: failed to get ref_clk(id-1)
[ 1.620657] mtk-tphy soc:t-phy@11c50000: failed to get ref_clk(id-1)
[ 1.627173] mtk-tphy soc:t-phy@11e40000: failed to get ref_clk(id-1)
[ 1.634685] mt8195-pinctrl 10005000.pinctrl: pin GPIO19 already requested by 10005000.pinctrl; cannot claim for 112f0000.pcie
[ 1.646073] mt8195-pinctrl 10005000.pinctrl: pin-19 (112f0000.pcie) status -22
[ 1.653346] mt8195-pinctrl 10005000.pinctrl: could not request pin 19 (GPIO19) from group GPIO19 on device pinctrl_paris
[ 1.664380] mtk-pcie 112f0000.pcie: Error applying setting, reverse things back
[ 1.735591] mtk-mmsys 1c01a000.clock-controller: error -2 can't parse gce-client-reg property (0)
[ 1.751979] mtk-mmsys 1c01a000.clock-controller: error -2 can't parse gce-client-reg property (0)
[ 1.985198] mediatek-disp-ovl-adaptor mediatek-disp-ovl-adaptor.6.auto: Failed to get id. type: 1, alias: -19
[ 2.006930] mediatek-disp-ovl-adaptor mediatek-disp-ovl-adaptor.6.auto: Failed to get id. type: 1, alias: 5
[ 2.359772] mt8195-pinctrl 10005000.pinctrl: pin GPIO8 already requested by 10005000.pinctrl; cannot claim for 11e00000.i2c
[ 2.370906] mt8195-pinctrl 10005000.pinctrl: pin-8 (11e00000.i2c) status -22
[ 2.377949] mt8195-pinctrl 10005000.pinctrl: could not request pin 8 (GPIO8) from group GPIO8 on device pinctrl_paris
[ 2.388635] i2c-mt65xx 11e00000.i2c: Error applying setting, reverse things back
[ 2.804271] mtk-wdt 10007000.watchdog: IRQ index 0 not found
[ 3.315961] mt8195_mt6359_rt1019_rt5682 mt8195-sound: mt8195_mt6359_rt1019_rt5682_dev_probe snd_soc_register_card fail -517
[ 3.497683] mediatek-mutex 1c016000.disp_mutex0: error -2 can't parse gce-client-reg property (0)
[ 3.513994] mediatek-mutex 1c101000.disp_mutex0: error -2 can't parse gce-client-reg property (0)
[ 3.531353] mediatek-drm-dp 1c500000.edp_tx: Failed to find panel or bridge: -517
[ 3.548313] mediatek-drm-dp 1c600000.dp_tx: Failed to get dptx clock: -2
[ 3.961959] hub 4-0:1.0: config failed, hub doesn't have any ports! (err -19)
[ 4.105580] hub 6-0:1.0: config failed, hub doesn't have any ports! (err -19)
[ 4.322563] xhci-mtk 11200000.xhci: drop_ep_quirk high-speed ep1in intr, mpkt:1, interval:12/256ms
[ 4.863472] mediatek-drm-dp 1c500000.edp_tx: Failed to find panel or bridge: -517
[ 5.332063] mediatek-drm-dp 1c500000.edp_tx: Failed to get dptx clock: -2
[ 5.529826] usb 1-1-port1: Cannot enable. Maybe the USB cable is bad?
[ 6.524343] usb 1-1-port1: Cannot enable. Maybe the USB cable is bad?
[ 6.797317] systemd[1]: Failed to find module 'autofs4'
[ 7.928819] usb 1-1-port1: Cannot enable. Maybe the USB cable is bad?
[ 8.374035] remoteproc remoteproc0: request_firmware failed: -2
[ 8.446301] mtk-vdec-comp 18002000.vcodec_lat_soc: IRQ index 0 not found
[ 8.446303] mtk-vdec-comp 18002000.vcodec_lat_soc: Failed to get irq resource
[ 8.446303] mtk-vdec-comp 18002000.vcodec_lat_soc: Failed to register irq handler.
[ 8.526550] mt7921e 0000:01:00.0: ASIC revision: 79610010
[ 8.631498] remoteproc remoteproc0: request_firmware failed: -2
[ 8.766286] [MTK_V4L2][ERROR] fops_vcodec_open:176: vpu_load_firmware failed!
[ 8.783682] remoteproc remoteproc0: request_firmware failed: -2
[ 8.783687] [MTK_V4L2][ERROR] fops_vcodec_open:321: failed to load firmware!
[ 8.898379] usb 1-1-port1: Cannot enable. Maybe the USB cable is bad?
[ 8.898810] usb 1-1-port1: unable to enumerate USB device
[ 9.035493] mt7921e 0000:01:00.0: Firmware init done
[ 11.143603] Bluetooth: read_supported_features() hci0: Failed to read MSFT supported features (-56)
[ 12.086842] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.092589] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.098391] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.104135] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.104170] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.104171] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.104260] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.114790] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.114895] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.120585] remoteproc remoteproc0: request_firmware failed: -2
[ 12.126359] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.132285] [MTK_V4L2][ERROR] fops_vcodec_open:321: failed to load firmware!
[ 12.141120] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.151773] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.151822] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.163436] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.163472] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.170478] remoteproc remoteproc0: request_firmware failed: -2
[ 12.170480] [MTK_V4L2][ERROR] fops_vcodec_open:176: vpu_load_firmware failed!
[ 12.176211] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.176310] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.236678] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.242637] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.248382] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.255779] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.261521] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.267338] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.273079] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.278886] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.284626] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[ 12.290492] DL2_FE: ASoC: no backend DAIs enabled for DL2_FE
[ 12.296228] DL2_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
- The codec driver looks like missing firmware
[MTK_V4L2][ERROR] fops_vcodec_open:176: vpu_load_firmware failed!
the chromeos ucm config would be a good start i guess - i have collected some notes about getting audio working here: https://github.com/hexdump0815/imagebuilder/blob/main/info/generic/alsa-ucm-pulseaudio-hacking.txt ...
there is some limitation in the length of the ucm dir name, so it should go to /usr/share/alsa/ucm2/m8195_r1019_568 (see also the output of the /proc/alsa/cards) ... i think it is a good idea to put a "Syntax 2" on top of m8195_r1019_5682s.tomato.conf and to comment out all devices except the speakers at the beginning
to check if the proper ucm file gets loaded it is a good idea to run "strace alsaucm -c myconfig reload" (will have to add it to the notes mentioned above)
in general when trying to bring up audio never use headphones directly until you have it working as you might get high volume level in the process which is not good for the ears
regarding video accel: i guess the chance is low to get this working with a regular linux without a lot of extra patches i guess (but i might be wrong)
good luck and best wishes - hexdump
this might be a good read about getting audio to work: https://github.com/hexdump0815/imagebuilder/issues/54
Thanks for the detail info, will try.
Wow! That worked, audio is working now ! hahaha
What works and what not:
- [x] Display
- [x] Camera
- [x] WiFi
- [x] Bluetooth (can connect to other devices, sending file failed)
- [x] Video (soft decode)
- [ ] Video Codec (hardware acceleration)
- [x] Audio
- [x] Speaker
- [x] Mic ( need to adjust volume
pactl set-source-volume 1 400%as the note said)
Many many thanks!
@zhxt - that sounds very good!
could you please create a pull request with your working ucm files or upload/post them somewhere, so that i can include them?
@hexdump0815 PR #64 created :D
@zhxt - thanks a lot - pull request is already merged :)
regarding the default to headphone what i have learned over time is that the last entry in the ucm file is used by default as it seems - so maybe you can get this fixed by just reordering the entries to have the speaker last ... same applies for the mics
this is the ugly hack for kukui chromebooks to initially set the devices: https://github.com/hexdump0815/imagebuilder/blob/main/systems/chromebook_kukui/rc-local-additions.txt#L29-L73
best wishes - hexdump
@hexdump0815 thanks, reorder the entries did the trick :-D
for initialize: maybe add a BootSequence section will work, I will test later.
and btw, do you think is it possible to get GPU work ?
@zhxt - i think in newer ucm versions (syntax 3 and 4 i think) they restructured things completely with proper init sections (so no more enadev etc. required) and maybe there are more keywords ... chromeos has some extra keywords in their ucm files which are specific to their cras (chrome-audio-server i think) and not really part of reglar ucm
i think gpu support will come with mainline support via the panfrost project, but all that is in very early stages and will still need quite a few months until it might start to get useable, so most probably some patience is required for this
@hexdump0815 tried, BootSequence still need to call aslactl init.
and yeah, seems cras uses a separate program called sound_card_init triggered by udev rules to do the initialization.
for GPU, I was thinking, chromeos came with GPU support, and debian uses the same kernel, the point is cros is 32bit, but debian is 64bit, so if the user space binary blobs can be get from somewhere, will it work on debian ?
I found that there is a overlay-cherry64 directory, maybe there will be a 64bit cros in the future :)
the mali blobs are not really useable for linux as they are for the chromeos windows system or low level drm (not sure) and thus have a completely different api than what xorg or wayland are using ... but initial mali valhal support is there in panfrost, so its just a matter of time that it will be useable
i have reordered the devices in the ucm files in the repo now as well: https://github.com/hexdump0815/imagebuilder/commit/b659e964f86b4fd4adae3f0d17897f8f62b21627
the mali blobs are not really useable for linux as they are for the chromeos windows system or low level drm (not sure) and thus have a completely different api than what xorg or wayland are using ... but initial mali valhal support is there in panfrost, so its just a matter of time that it will be useable
yeah, need to wait for now. and btw, how about kukui ? It has a bifrost arch GPU, seems panfrost already support it .
kukui is in very good shape - with my latest images nearly everything is working quite well except of hw video decoding, external monitors and on some devices the cameras if no usb video class devices are used ... otherwise gpu is working with panfrost, wifi, bt, suspend/resume, sound all works quite well with little bugs here and there maybe :) - see for example https://github.com/hexdump0815/imagebuilder/issues/52
@zhxt - i read your conversation on panfrost irc - good luck for trying mainline - please let me know here if you get anywhere near a working kernel with this ...
kukui is in very good shape - with my latest images nearly everything is working quite well except of hw video decoding, external monitors and on some devices the cameras if no usb video class devices are used ... otherwise gpu is working with panfrost, wifi, bt, suspend/resume, sound all works quite well with little bugs here and there maybe :) - see for example #52
Sounds great!
@zhxt - i read your conversation on panfrost irc - good luck for trying mainline - please let me know here if you get anywhere near a working kernel with this ...
yeah, I haven't tried that kernel yet. I will let you know if I get any progress :D
Hey, finally got some time to try. :laughing: The kernel seems work fine , but I got no GUI with a black screen. I can login with ctrl+alt+fn, the log shows lightdm service failed to start, still need more time to find out the reason.
@zhxt - from irc i remember some trouble with the /dev/dri device numbering (https://oftc.irclog.whitequark.org/panfrost/2022-10-24 and the next days) - maybe try something like https://github.com/hexdump0815/imagebuilder/blob/main/files/extra-files/etc/X11/xorg.conf.d.samples/13-panfrost-swapped-dri-nodes.conf
best wishes and good luck - hexdump
@hexdump0815 yeah, I saw that too, but I didn't find any log related Xorg, when I start lightdm manually from terminal, it just jump to the black screen with a flicking cursor.
@hexdump0815 wow, tried the patch, that did the trick. thanks. A new problem is when login with plasma wayland, it just goes back to login window again after a few seconds while enter password. Have you tried plasma-wayland on other devices?
@zhxt - are you using the latest version of mesa?
@zhxt - are you using the latest version of mesa? @hexdump0815 yeah, I rebuild mesa 22.2 taken from bookwarm .