-
Notifications
You must be signed in to change notification settings - Fork 41
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: coachz (hp chromebook x2 11) (Lenovo Duet 5) #44
Comments
Regarding your touchscreen issues: If you update to debian unstable, there should be no issue using Wayland with either Gnome or KDE |
@leezu So Mate can potentially run on Wayland now? |
i really like the idea to have such an issue per system to discuss its current state and problems - i have just renamed the title a bit so that we have an easy to find subject directly related to the system name in the framework - i hope this is ok? |
@hexdump0815 figured out the sound, partially. At least I have it working for me now ;) |
Both KDE and Gnome work well with Wayland. My understanding is that touchscreen and gesture support is better on Wayland, but X11 may have improved since last time I checked. |
Updated with a better solution to touch screen issues on Xorg. I had tried |
On 230922-01 Bookworm, touchscreen and pen input were not working out of the box. Enabling the Goodix hid-i2c driver in kernel config made it work out of the box, at least on GNOME Wayland. |
@pulak1901 - thanks a lot for the report - which kernel config options exactly did you have to enable to get it working? i would like to add them for future kernels then. |
@hexdump0815 - just I2C_HID_OF_GOODIX. |
see: hexdump0815/imagebuilder#44 (comment) (cherry picked from commit 1510abe)
Regarding audio output, it seems the kernel alsa drivers are working fine, but as there is no UCM, pulseaudio is automatically configuring the default device (0) internal mic.
The only UCM config available for SC7180 is sc7180-rt5682-max98357a, but as coachz does not have rt5682, it is not matched. I tried forcing it to use the same config but that did not go well, I think rt5682 exposes a lot of configurations that are set with cset but adau7002 does not appear to have anything similar. Workaround for just speakers, no mic
Note that simply creating Device DetailsTo verify the order of devices, we can use aplay & arecord:
To have both internal mic & internal speakers working, I figured out how to create a very basic UCM config that will point alsa/pulseaudio to the correct devices. UCM
First make a directory for the new UCM config
Inside this new directory, we'll have two files. One for the actual use case configuration, and another which acts as a loader. The loader will be named
The other file will be named HiFi.conf, containing the following
As I do not have any way to test the HDMI output, I've commented it out from the UCM config because it will conflict with the rest of the configuration. Also note that only the PlaybackPCM and CapturePCM values are required, the rest should be automatically configured. I've taken the other values from sc7180-rt5682-max98357a & added PlaybackRate based on the output of Now we just need to add this to the ucm configurations list, so:
And we're done! On rebooting (or restarting pulseaudio), both speaker and internal mic should be working. |
@pulak1901 - for the audio setup it is usually a good idea to start from the chromeos ucm files and go from there - they usually will not work out of the box, but can give some direction - see also: https://github.com/hexdump0815/imagebuilder/blob/main/doc/alsa-ucm-pulseaudio-hacking.txt ... also be careful to always keep the volume low and try to avoid feedback within the internal mixer to keep the speakers and your ears well - also never put headphones fully on the head when trying to get audio working ... good luck update: there also some audio notes in the issue description as well |
@hexdump0815 the UCM config is indeed based on chrome os' [UCM] (https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/refs/heads/main/overlay-strongbad/chromeos-base/chromeos-bsp-strongbad/files/coachz/audio/ucm-config/sc7180-adau7002-max98357a/HiFi.conf) (doesn't work directly) and the audio-related notes from @Geofferey helped me quite a bit I think if we finish up the UCM (mic gain is too low, and the hdmi output), we'll have a complete Debian setup on coachz out of the box(ignoring fingerprint reader and webcams), so I'm trying to clear out any of the deal breakers that I come across :) For instance, the touchscreen was not working out of the box, so I checked the device tree and it's a goodix touchscreen. I checked with the postmarketOS build and realized that it was only the driver that was missing, no other configuration is required Edit: thanks for the volume warning :D, its really a "once bitten, twice shy" situation for me because I've already experienced that with Arch Linux a decade ago :P Edit 2: I think with https://github.com/hexdump0815/imagebuilder/blob/main/doc/alsa-ucm-pulseaudio-hacking.txt I'll be able to figure out the microphone gain and the rest of the UCM config |
With PostmarketOS, and maybe with these images (I haven't tried in a while), the touchpad is another issue: it's like the pressure threshold is too high. If I use the tip of my finger lightly, the cursor doesn't move, even though |
@DanaGoyette Yeah that's the dreaded |
i have no idea if it helps, but in this issue - #53 - a lot of things were tried/done to significantly improve the touch functionality on kukui krane (so completely different chromeos device) - maybe reading through it helps and/or is good for some inspiration? |
Thankfully libinput provides a whole host of tools to debug input issues. By mostly following the official docs I was able to figure out that the touchpad down pressure is 60 (light touches, like the tip of your finger, would register at around 30-40 from what I can see) and palm threshold is at 160. You can then set your desired values in the following quirks configuration to
Notes:
|
Instead of boosting the gain in Pulseaudio (as mentioned here), I have been trying to figure out if I could have a boosted alsa pcm stream as the default for the mic. Unfortunately I couldn't get it to work by adding a card-specific configuration at /usr/share/alsa/cards, and it looked like pulse will grab the hardware stream anyways, so I'm leaving the mic gain situation for now. Here's the softvol alsa config if anyone is interested. Alsa softvol configuration
Put this in your .asoundrc or asound.conf and
|
Updated with a workaround for some issues with touchpad mouse / lidswitch on XFCE/Xorg... @pulak1901 I have yet to implement your sound fixes but I did want to say how much I appreciate your input on the matter, as soon as I can I'll let you know how it goes :) Thank you for sharing!
UPDATE: Welp I tried it out. There are some differences between UPDATE 2: I screwed around until I found out and now I have working microphone.... Turns out a lil tinkering with
I ended up nuking the ucm2 configs for the card and removing I'm attaching my current UPDATE 3: After further investigation I'm pretty sure I've nailed down the appropriate combination of alsamixer settings to enable stereo microphone input on homestar!!! This should lead up to an appropriate
Now I just gotta figure out those pesky little cameras, if at all possible. I have some ideas involving Waydroid. It may be possible to utilize the camera blobs from CROS's android implementation. This would likely isolate cameras to Waydroids container but it would still be awesome. @hexdump0815 I just wanted to take one more moment to say how much I truly appreciate this project! I have a one of a kind device in large part to you and everyone that has contributed. On top of it all I have learned LOADS!!! Thanks again my friend. :) |
@Geofferey - thanks a lot for your nice and positive feedback - i'm very happy to hear that as this was and is my intention with this project: to make it easier to get started with linux on some usually not so well supported platforms, to maybe encourage people to try to improve some of the still missing details around those images and to maybe build a little community across the github issues which brings the whole thing a bit forward in small steps at the benefit of others as well ... thanks once more |
@Geofferey - oh and before i forget: thanks a lot for your contributions - writing things down as detailed as you did gives a very good starting point for others to use and/or extend the information |
Since I finally got my hands on a usb hdmi adapter, here's a status update on my attempts to get it working with UCM out-of-the-box:
Note: you can get the jack kcontrol name with With this it is working, but only if pulseaudio is able to open the PCM stream. i.e. the HDMI is plugged in while restarting the device (or pulseaudio). If HDMI is not plugged in, pulseaudio will fail to create a card profile with output similar to Pulseaudio output
|
@Geofferey from what I can see of sc7180-rt5682-max98357a ucm config, most of the changes you detailed are present in the config. Speaker is already set to hw:X,1, mic to hw:X,2
Similarly,
is already present in init and Hifi configurations. the init conf is setting all the 0s, the Hifi conf has all the 1s under EnableSequence. If you want to manually trigger the Enable/DisableSequence sections, alsactl can do it with _enadev and _disadev I'd suggest starting with a fresh usb stick, check the output of arecord -L & aplay -L (make sure hwX:0 is mic, hwX:1 is speakers), check pacmd list-cards (if dummy output, ucm is bad), and then try commenting out everything other than Speaker and Mic sections in the existing config. Ideally, you would want it to work without any asound config, dtsi patching, and also without any modifications to pulseaudio config. UCM alone should be able to handle this and that way it'll be ready for pipewire too :) |
On another note @Geofferey @hexdump0815. With 230922-01, here's what i can tell about the Partial/Broken issues mentioned at the beginning of this issue
That leaves:
I think we've already reached pretty much complete usability out-of-the-box if we finalize and add the quirks and ucm configurations to the base image :D |
@pulak1901 - thanks a lot for the updates ... i'm very open to include any such improvements into the next round of images which i plan to roll in the next months based on a v6.6 lts kernel - lets see if they can be polished in a way so that we can ship them via files in extra-files or additions to postinstall* or rc-local-additions ... we should keep in mind that the image is shared among all trogdor devices, so they should not break the other devices and the changes should be as generic as possible (i.e. not only focussed on gnome, kde etc.) but its also fine if they just help on any of those use-cases (lets say working in gnome and kde, but not making sense in xfce) as long as they do not break the other use-cases ... the goodix touchscreen support is already in the kernel part - hexdump0815/linux-mainline-and-mali-generic-stable-kernel@910e937 |
@hexdump0815 i'll send prs to ship the improvements in extra-files most likely, i just haven't gotten around to playing with imagebuilder itself. Will definitely test out a combination of DEs & Xorg/Wayland/Pipewire/Pulseaudio during that time. I think most of the changes are in libinput and alsa ucm, so it should work with xorg as long as it is using the libinput drivers, and since pipewire-pulse should be the same as pulseaudio, i think that will be fine as well |
@pulak1901 You're on @hexdump0815 I have some important info regarding I immediately noticed that Xorg had extremely high cpu usage Regarding |
@Geofferey yep, coachz here. Regarding gain for coachz, the card itself doesn't report any controls at all. If I run And regarding firefox and v4l2 decode, I think it was merged in 116, Debian 12 has esr 115 |
@Geofferey - thanks for the hint about DRM_VGEM, i'll have a look at it as soon as i find some more time ... if you have any kernel config options which we should consider dropping, please let me know - i'm open for it as long as they are of no real use in the context of those image ... i think of remembering that libva-v4l2-request is not really working anymore without a lot of patches on top of a lot of software, but i might be wrong - i think people have other snapdragon/venus setups working with video decoding (h264 only i think, so h64ify might be required) and newer firefox versions (116+ might be correct) |
@pulak1901 Below is some output of
also the
as well as
EDIT: FOR NOW EXCUSE ME I HAVE TO LEAVE UNFINISHED... WILL BE BACK...EDITS WILL COME I don't know if you've seen the trashy kernel |
@Geofferey this is quite strange that it has the same card setup but behaves differently The existing Strongbad/Homestar ChromeOS UCM
So for Lazor the Headphone device is dependent on the Speaker PCM(I think it's the same as ConflictingDevice) and the mic sensitivity is different, but I'm not sure why Homestar behaves so differently. |
Hi, I tried building 5.17.19, 6.6.9 using the guide in the repo, and I also tried the prebuilt 6.1.1-sbt-cbq image from https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel. Here's my findings: I'm not able to get WiFi to work at all in any of these. I was able to get touch working in 6.6.9, but not in the others. In 6.6.9, I had some issue with gdm frequently crashing when trying to load gnome, and after I tried installing one of vulkan-freedreno or xf86-video-freedreno, gdm completely stopped loading. I also tried compiling 6.7.10 using the .config file for 6.6.9 (https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/blob/master/config.exy-6.6.9-stb-exy%2B), but didn't boot (screen was black with nothing shown) I couldn't see any trace of a wifi hardware in lsusb, lshw and dmesg. |
@itsfarseen - wifi should work and for others with an x2 it also worked as described above - can you please post your dmesg to some pastebin and link it here? maybe that would give a hint about where the problem is. |
@hexdump0815 I am using 230922-01 Bookworm on Homestar and it seems really good (thanks for your work). I am happy to contribute an installation how-to for Homestar once I reach a working state :) |
@itsfarseen is this on jammy or bookworm?
Also the HP X2 would be using the cbq kernels, not the exy kernel |
@cabbageman8 only a fresh kernel with that kconfig option enabled should do the job. If you're comfortable doing the kernel builds, you can follow these steps with one of the cbq configs in that repo (instead of using the scripts/kconfig/merge_config.sh step) Edit: before building the kernel with the provided cmdline and flashing it, have a read through the docs here and here to make sure you don't end up with an unbootable kernel |
@hexdump0815 It seems that recent trogdor ubuntu release has wifi issue(no wifi at all). I tried build image, same issue. After some investigation, I found that copy qrtr-* and rmtfs binaries/services from debian release and install https://ubuntu.pkgs.org/22.04/ubuntu-universe-arm64/libqrtr-glib0_1.2.2-1_arm64.deb.html fixed this issue. Hope you can fix this in next release. Thank you for your hard work :) |
@cabbageman8 - i have just uploaded a newer kernel i built some weeks ago here: https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/releases/tag/6.6.23-stb-cbq%2B - see https://github.com/hexdump0815/imagebuilder/blob/main/doc/installing-a-newer-kernel.md about how to install it - this should include touch screen support - maybe give that one a try |
@TingyiChen - thanks a lot for reporting this and sharing the fix - i'll note that down for future images |
@hexdump0815 That worked a treat! (currently typing on Duet 5 Gnome on screen keyboard 😄 ). Keyboard detection for tablet mode is working in Gnome, and orientation sensor is now working. |
@hexdump0815 quick question about the 6.6.23 does the stylus work after this patch? have anyone tested it yet? i finally got my hands on homestar but i don't know if i should get myself a stylus or just use external graphic tablet (if stylus doesn't work) |
Regarding the audio on coachz, I got some help from the PMOS people in IRC, and this UCM seemed to work.
|
Notes on Coachz + Homestar running 6.6.16
Here is list of working and non working features on the HP Chromebook X2 '11 (aka coachz - 11-da0023dx). I will update accordingly with detailed issues, logs and proposed fixes. My goal in long run is to find solutions to high priority issues such as
suspend, lack of audio, touch issuesand others. If we can get the right people looking at this stuff and trying things out we'll have a good chance.In an extremely unfortunate incident I ended up dropping my X2 '11. Sadly a brand new display assembly cost nearly as much as a new device so I went out and bought featuring the SC7180 SoC (Lenovo Duet 5). Fortunately, the devices are nearly 100% identical in terms of hardware and fixes and everything here can be applied to the device.
Working
• WiFi
• Bluetooth
• Pen input
• Detachable KB/Mouse
• Internal EMMC installation (#43)
• USB C
• DisplayPort
• 3D Accelerated graphics (#41)
• Suspend (works on
5.16.X
up)• KVM
Partial
• Touch (libinput needs quirks + reporting to freedesktop for
TOUCH_CANCEL
)• Orientation sensor (inverted)
• Built-in audio / speakers (kernel/userland issues)
• Built-in microphone (gain coachz)
• H/W video decode (partial)
Broken
• Rear & front camera (they're crap anyways)
• DPMS (display off) (coachz)
Untested
• Fingerprint sensor
Touchscreen Issues
There appears to be an issue with the touch screen, Xorg and
libinput
where it will stop functioning once the user creates a substantial pressure point (e.g. resting thumb) on display. Wayland does not appear to be affected in the same way, so there's a consideration.xserver-xorg-input-evdev
and tell our touchscreen to utilize that driver.sudo apt-get install xserver-xorg-input-evdev
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
Locate
MatchIsTouchscreen "on"
and changeDriver "libinput"
toDriver "evdev"
• FOR REFERENCE:
Install TouchEgg and Touchè from the releases via
dpkg -i
& rebootOpen Touchè, if you can't find an icon just execute
com.github.joseexposito.touche
in terminal.In
Global gestures
>Tap
>Tap with 3 fingers
set toExecute a command
and addxinput disable 6 && xinput enable 6
as the command to execute.Now when touch stops responding all you will have to do is tap the screen with 3 phalanges and you'll be back in action. Another potential solution could involve using something like
xbindkeys
and your imagination to achieve a similar result. Also, if you run LightDM and don't want to experience this problem on the login screen try switching to GDM3 which uses Wayland.Sound Fixes
Turns out we can get the sound working as well. By the way this is all very confusing to me how
ucm
(use case manager) works, in general I think it's broken for whatever reason and that's why I'm confused. I figured out the root cause is partially due to the ordering of sound devices in thesc7180-trogdor.dtsi
a quick modification to the file and rebuild of kernel will fix us right up.sc7180-trogdor.dtsi
Before:sc7180-trogdor.dtsi
After:☝️See what I did there? 🤣 I'm still not convinced this is most appropriate solution. I have created a
sc7180-trogdor.dtsi.patch
in case anyone may find it useful. It should be noted; the patch sacrifices automatic set-up of mic in favor of speakers because alsa seems inclined to configurehw:0,0
automatically.• FOR REFERENCE (
coachz
)aplay - l
does report havingHiFI-1
Running
aplay -D plughw:2,1 /home/geofferey/Downloads/piano2.wav
got me sound output. Yay!Using info I obtained from Arch: ALSA/Troubleshooting I created
/etc/asound.conf
with the followingPlease keep in mind on my machine it's
card 2
-device 1
because I have dummy and loopback audio drivers. Yours will likely becard 0
orcard 1
; which is why the above solution may not be ideal, especially for inclusion in images. It also breaks automatic redirection to USB C headphones. More investigation is required.Here is some more output of other commands in case anyone may be able to tell me what's going on with UCM.
cat /proc/asound/cards
reports:Here is message from
alsactl init
:This is what I could find in
dmesg
:Lid Switch Fixes
I noticed during my time using homestar and coachz that leaving the keyboard attached and closed leads to spurious mouse input if not in sleep state. Since I do not always want to sleep when I close the lid + plug waking device it got really annoying and hazardous to my working conditions. At first I thought it was related to touch input but it was actually caused by the touchpad. Another issue with lid switch is due to how upower/XFCE handle it in order to blank screen and often results in a black screen that stays after opening the keyboard flap. Below are some workarounds and scripting wizardry.
sudo apt-get install acpid brightnessctl
set
IgnoreLid=true
in/etc/Upower/Upower.conf
optionally set
HandleLidSwitch=ignore
in/etc/systemd/logind.conf
create the following file in
/etc/acpi/events/lidswitch
/etc/acpid/actions/acpi-lid-switch.sh
Updating Kernel
In order to get KVM networking, waydroid, various USB peripherals and many other features working I opt'd to build mine from source following instructions from these repos. I have also written a simple
script
to automate the process for myself and others. Here is a link to mycurrent kernel configuration
. It has support for many of items mentioned above...... to be continued....
The text was updated successfully, but these errors were encountered: