-
Notifications
You must be signed in to change notification settings - Fork 11
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
Touchscreen and audio not working for Gallium 3.1 on HP Chromebook 14 x360 SONA (Kaby Lake) #606
Comments
Yeah you can install a blietooth speaker. I would like to know if your install is stable. I have kaby Lake too. Are we the only ones on here? I really wanted Gallium to be the bomb. Such a great and needed idea. Have you found anything else stable? |
@newgall My install has been stable so far. Did you do anything in particular that made it start to flicker and lock up or was it random? I haven't personally tried any other distros except tails, which works great but is very limiting because it is designed with amnesia and strict privacy in mind. I think we are the only ones here as of now, which is disappointing because I really enjoy Gallium so far, but I'm no coder or programmer with the capabilities to make adjustments to it. Have you tried ArchLinux or Lubuntu? |
On the left side there is a menu with “Update GalliumOS” right at the top. I suggest to you that you NOT update. It seemed to go downhill after i updated it. I may have done the update once and been ok. It could be too just that it breaks down with time somehow. |
I was able to get the Kabylake audio working on a Pantheon Device (Lenovo C630). I had to use the 5.10.0 kernel and compile in the drivers for the audio. I added the use case files for the ALSA device. See attached. alsaucm -c kblda7219max.pantheon set _verb HiFi set _enadev Speaker ; pulseaudio -k for speaker or headphone output respectively. I haven't figured out how to automate the switch based on headphone jack insertion. Fixing the touchscreen has been much more difficult. Haven't figured that out yet. |
Repost to fix typo I was able to get the Kabylake audio working on a Pantheon Device (Lenovo C630). I had to use the 5.10.0 kernel and compile in the drivers for the audio. I added the use case files for the ALSA device. See attached. alsaucm -c kblda7219max.pantheon set _verb HiFi set _enadev Speaker ; pulseaudio -k for speaker or headphone output respectively. I haven't figured out how to automate the switch based on headphone jack insertion. Fixing the touchscreen has been much more difficult. Haven't figured that out yet. |
Xinato, I just saw your post at https://ask.fedoraproject.org/t/upgrade-from-5-14-18-300-kernel-to-5-15-4-201-kernel-broke-sound-pipewire and see the 5.15 kernel was not allowing sound for you either on the Lenovo C630 "Pantheon". Therefore, I compiled kernel 5.14.21 with the default included snd_soc_kbl_da7219_max98357a kernel module from kernel.org included and I now have sound on OpenSUSE Leap 15.3! I am using the Mr. Chromebox's full UEFI BIOS as well, and have no problems with sleep or shutdown either (though the fan does come on full after waking from sleep). As for firmwares in /lib/firmware, I am using the newest from kernel.org in addition to extra files copied over from ChromeOS as well. The additional files from ChromeOS needed in addition to the latest firmware from kernel org are:
Then you need to create the following symbolic link: I have installed ALSA v.1.2.4 so also had to add the line I do, though, have the same problem as you whereby the sound does not automatically switch port when headphones are inserted/removed, but at least we are making progress! I also find the speaker volume steps are strange in KDE/PipeWire whereby only the smaller increments make a difference to the volume. |
Great work Paul! I am booting Fedora 35 off of a USB stick, not UEFI. I am using the same firmware components as you from the Chromebook: lib/firmware/9d71-GOOGLE-NAMIMAX-0-tplg.bin I also disabled the intel HDA driver in /etc/modprobe/chrome.conf with: options snd_intel_dspcfg dsp_driver=2 The tplg file seems to have an issue that affects the dmic. It doesn't inform the higher layers of the correct audio formats. I got around that by modifying wireplumber's interface to the alsa device. This fix is not applicable to you. The issue is that the dmic advertises that it support S16_LE and S32_LE. My testing shows that S32_LE is broken. I have attached my current kblda7219 files. Note that I don't keep the .pantheon suffix. That way alsa reads the file at bootup. Maybe pulse will also use the file if the name matches the device. I also modified the use case names to match the alsa documentation. I am able to record from the dmic at this point. My next goal is the headset mic, although that should be easier. I was hoping that the ucm changes would help wireplumber with the device switching, but I have not found the magic. I wrote a program that monitors the headset jack (event7 on my machine) and issues alsaucm commands to switch the speakers and headphones. This is a backup, since I am still working to get wireplumber to do the switching, The program works for headphones and speaker, but I still need to work on the mic changeovers. Starting with kernel 5.15, the kernel developers broke the snd-soc-skl driver as it applies to this box. The NHLT table in the ACPI has some sort of problem. I have posted an issue, but no fix yet. In the mean time I am compiling snd-soc-skl and snd-soc-skl-sst-clk drivers from the 5.14.21 branch of the tree and using those modules in my later kernels. So where are the issues:
|
Hi Xinato, Thanks for the details. Good to see someone has been investigating this deeply! Why is the internal mic fix not applicable to me? I am using PipeWire and wireplumber. What difference does it make if I remove the .pantheon suffix exactly? When I tried this I didn't get any sound at all. I was just using the I also got the port switching on headphone insertion/removal sort-of working using a bit of hack by modifying the acpid technique at https://github.com/nebulakl/cave-audio .
In /etc/acpi/events/unplugheadphone I have:
I also modified my HiFi.conf to put the Headphones DisableSequence at the start of the Speaker EnableSequence (and vice-versa) because I wasn't sure if the DisableSequences were being called using this switching method. I think this may have improved the reliability of the switching slightly, but I'm not sure. The switching is still not very reliable and if you unplug and plug in a headset too many times, or plug/unplug when audio is playing, the audio will stop working without a power-off. Does your port switching method work reliably? Would be good if wireplumber did it and we didn't need any hacks! |
Hi Paul, Reading your earlier post, I thought you were using Pulseaudio without Pipewire so my Pipewire research wouldn't help you. I attached /usr/share/wireplumber/main.lua.d/50-alsa-config.lua. This contains a matching rule that limits the format that Pipewire will use to connect to the alsa devices. This helps the dmic work. I have not finished working on the headset mic, but the same technique should work. 50-alsa-config.lua.txt Alsa and Pipewire expect the ucm file to be named after the device. According to my conversations with the Pipewire developers, Wireplumber is supposed to use the UCM file to automatically switch the alsa context. I have not really gotten this to work yet, but it doesn't hurt to name the files what the developers expect them to be. You will notice that all the other distributed UCM files match the device names. I am using gnome for the desktop. The gnome integration with Pipewire seems pretty shaky. I have not been able to get the desktop icons or controls to work yet, but that has not been my focus. Honestly, Pipewire is complicated and the documentation is difficult to find. I found a project called https://gitlab.freedesktop.org/ryuukyu/helvum that provides graphic visualization of the Pipewire map that has helped me see what is going on. I appreciate your idea for the acpi events. I had not tripped over that before. That is likely easier than what I was trying with the program I wrote. The reliability of switchover from speaker to headphones seems to be an artifact of the software stack. The switchover forces a change in the alsa layer between the da7291 codec and the max98357a codec without changing the alsa device name. Pipewire needs to keep the audio stream running despite the change in codec. This seems to work sometimes. Sometimes it requires a "systemctl --user restart pipewire pipewire-pulse" to get it resynced. This has not been bulletproof. It may be that we have to pause the stream, switch the alsa devices, and restart the stream. |
Since I was on this topic also a while now I want to give some feedback that maybe helps some others. The steps described in the linked soundsteps.txt above (https://github.com/GalliumOS/galliumos-distro/files/7354046/soundsteps.txt) did it for me with two exceptions:
What is my set-up:
I also experienced no sound with live-images of galliumOS and also ubuntu and searched for solutions since months. I gave up inbetween and now recently gave it another try and found this page here. |
I have an update on my progress getting touchscreen and audio working under Fedora 35. Touchscreen is pretty straight forward. As root issue the following command to bind the touchscreen to the driver. echo -n "i2c-SYTS7817:00" > /sys/bus/i2c/drivers/i2c_hid_acpi/bind I do this with a on-shot systemd service file. Audio is substantially more complex, but I have playback and microphones working with the base unit, headphones, and bluetooth speakers. There are a lot of pieces. The currently running kernel for Fedora 35 is version 5.15.12. It seems that every version after 5.14.21 has a change to the handling of the NHLT data in the bios. This change fails with the Lenovo Yoga C-630 and snd_skl_kbl7219max, the driver for the sound card, refuses to load. To get around this problem, I built the drivers from 5.14.21 and load them as out-of-tree drivers. Its an extra step each time Fedora releases a new kernel version. I submitted a bug report to the kernel team, but there has been no action. See https://fedoraproject.org/wiki/Building_a_custom_kernel for how to compile out-of-tree modules. The hda_intel driver is disabled as described above to allow operation of the snd_skl_kblda7219 driver. I rewrote the alsa ucm file to use the newest syntax. The kablda7219max.pantheon file has elements in it that are meant for the ChromeOS Cras sound manager. Between that, and trying to sort out the microphone operation, I rewrote it. Alsa is looking for a UCM file that matches the name of the card when it loads and initializes. The latest version of alsa moved these files to /usr/share/alsa/ucm2/conf.d. Fedora has standardized on the pipewire sound server. This uses wireplumber as a service manager to reconfigure the server as applications attach or as you plug and unplug devices, like bluetooth speakers. It also has a front end that implements the pulseaudio server so that things like Gnome and media players can attach to it. The documentation is challenging. There are still glitches in the implementation. But the pipewire team has been responsive. In order to switch between devices, you use alsaucm to change the speaker and headphone, or the internal mic and the headset mic. For the speaker/headphone, the alsa drivers have to switch codecs. This can confuse pipewire resulting in crashed media players and a hung pipewire. I have found that if you pause the running media player, before the switch you can minimize this glitch. For the internal mic/headset mic, you also have to change the default source device. This is done through pactl set-default-source. The microphones advertise that they are capable of 32-bit sampling in the bios. Testing shows that they only work with S16_LE format. Pipewire defaults to connecting to them with S32_LE which does not work. Also, the microphone in the unit is a four microphone array. I modified the wireplumber alsa configuration to tame the format and channel mappings. I used playerctl to find the running media players, pause them, and restart them. Both playerctl and pactl need to run as the user to work. Of course, we want the device change-overs to happen automatically when we plug or unplug headphones or headset. The simplest way to detect plug events is with ACPID. But ACPID runs in system space. I wrote the event handlers for acpid to export the events via a socket interface to user space. I wrote a corresponding user-land server to catch the events, pause the media players, switch the operation, and restart the players. files attached. |
On the Lenovo C630 Chromebook with the latest MrChromebox UEFI coreboot 4.16 Release (2022.04.09) you now shouldn't have to do anything to get the touchscreen to work. |
Just found this thread. Got my hands on a Lenovo Chromebook Yoga C630 (Kaby Lake). I have tried all the suggestions in this thread to get the audio working but I have not had any success. @xinato I did a fresh install of Fedora 36 to the internal memory and added all the files in your chromeos-630.zip file. The touchscreen hack works if I run it at the terminal as root but the .service file does not seem to load or do anything on boot. I will still have to test building kernel 5.14.21 with the out of tree drivers. @paulmcauley I tried installing OpenSUSE and following your instructions but also had no luck. I also saw this https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.19-Sound I have tried compiling the AVS drivers in the linux-next kernel. The drivers load but there is no ALSA topology so there still is no audio. Intel will need to release the ALSA topologies for these boards eventually.... |
I did not do much with this for a while because kernel changes to the skl sound driver in fall 22 made sound stop working. In kernel 6.2, driver support started working again when I combined it with this topology file and kernel 6.2. I also tried the avs driver and found a couple of issues that I passed back to the developers. They seem to be getting close with it. It might be kernel 6.4 where av works for my nami-based machine. |
Hi Xinato, good that you still look at this. My sound on the Lenovo Chromebook C630 Pantheon stopped working on kernel 5.14, so now I am trying the skylake driver on the stock Fedora 38 kernel 6.2.15-300.fc38.x86_64 with no luck. Could you give more detail on what you did to get it working on 6.2? Did you modify the kernel? I tried the following: First to get the topology bin file, first compiled the itt tool with mono .net 6 and then:
I put this in /lib/firmware I also linked Did you use the same Using the UCM/Wireplumber config you posted before and additional firmware files from ChromeOS, I get the following related errors in dmesg:
Also, why do you suspect the AVS driver will work in Kernel 6.4? Do you have any links to what is happening? Thanks, Paul |
Hi Paul, First, I did not modify the kernel for version 6.2. I am using Fedora's 6.2.15, although I have been testing with 6.3 and 6.4 with success. I compiled the tplg file at https://github.com/thesofproject/avs-topology-xml/blob/for-skylake-driver/src/nami-tplg.xml and compiled it as you described. Congratulations on figuring out how to comile it. It took me a while. The target file is /lib/firmware/9d71-GOOGLE-NAMIMAX-0-tplg.bin and be sure you remove any other copies in the firmware directory. For the dsp firmware, : /lib/firmware/intel/dsp_fw_kbl.bin.xz -> avs/skl/dsp_basefw.bin.xz I hadd to play with the mixer settings, as the defaults did not work for me. But, I don't remember what I changed. I hope this helps you! |
With regard to the avs driver, I have been corresponding with the Intel team working on the driver. I have done some testing on my machine and fed back the results to the team. There is still a bug that is preventing operation, but they understand it and they are fixing it upstream. I am hoping the bug is fixed in 6.4 (or maybe 6.5). My current testing on 6.4 shows the bug is still there. |
Paul, |
Thanks, that was useful. I gave up on the Skylake/skl driver and went for the AVS and now have (almost) everything working on the Lenovo Chromebook C630 Pantheon, Fedora 38, included Fedora kernel 6.3.4-201.fc38.x86_64, Mr. Chromebox Coreboot 4.20 firmware. To cut a long story short, save yourself the hassle and just use the WeirdTreeThing audio script at https://github.com/WeirdTreeThing/chromebook-linux-audio by running This script sets up all the UCM files, makes a Wireplumber modification, sets the modprobe, downloads compiled topology files. I have everything working better than ever, except for the in-built microphone ("no DMIC ep_blob found"). |
I had stopped working on this device a while ago but am tempted to pull it out and start working on it again now. Which distro has working audio now? Does the touchscreen and gyroscope work? There was zero support for those features in the past also. |
I have a chromebook Spin 13 (acer) I could get the headphones (presumably mic) to work with tehe WeirdTreeThing script above. No success yet with the touchscreen. I wanted to try linking "i2c-SYTS7817:00" but I cannot find that file anywhere. In ChromeOS (dual boot) I am unable to copy any files from the ChromeOS side in /sys/bus/i2c because they are either write-protected or perhaps in use. Any tips? |
I got the touchscreento work on the Chromebook Spin 13 (Acer CP 713 1WN 54GA, Kubuntu 23.10) with the following command: The following discussion was helpful: |
Further information on Chromebook Spin 13. I got backlight control by changing the boot parameter acpi_backlight=vendor to acpi_backlight=intel |
The title pretty much sums up the issue.
The text was updated successfully, but these errors were encountered: