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

Sound on Skylake #379

Open
simonheb opened this Issue Aug 5, 2017 · 152 comments

Comments

Projects
None yet
@simonheb
Copy link

simonheb commented Aug 5, 2017

This is to concentrate efforts and document progress on the sound issues related to skylake and GalliumOS. All other skylake users are asked to also contribute their logs and use this issue to document progress towards finding a solution.

I am runnning a plain GalliumOS 2.1 via chrx on a CAVE model (Asus C302CA).

Right after the install, the system looks as follows:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ lspci | grep  -P audio\|snd\|sound\|audio
00:1f.3 Multimedia audio controller: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

$ dmesg | grep -P audio\|snd\|sound\|audio
[    4.433088] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.559255] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[    4.559335] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[    4.559421] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9

My first step is trying out he solution @volfyd suggested for Caroline (#274 (comment)), I will post the result here.

@reynhout

This comment has been minimized.

Copy link
Member

reynhout commented Aug 5, 2017

@simonheb You only have HDMI devices listed there, so the driver is not loaded properly.

If my notes are correct, CAVE should have a Maxim 98357A codec, driver skl_nau88l25_max98357a_i2s (the nau88l25 part is a headphone codec).

The first thing to check is which kernel you're running (uname -r). Unless you're on the testing repo, you'll probably have 4.8.17, which doesn't have the required modules.

To enable the testing repo:

sudo galliumos-repodist --enable testing
galliumos-update

You should get a 4.10.5 kernel package, which might be an improvement. But it'll be more interesting to test on a 4.11 or 4.12 kernel. Currently only 4.12.0 is available in the repo: sudo apt install linux-image-4.12.0-galliumos.

If you still have only HDMI devices in aplay -l, there might be something revealing in dmesg. Actually journalctl has most of the same info, with warnings and errors helpfully colorized...and apparently unhelpfully truncated, but you can use the left and right arrow keys to "scroll" the viewport. systemd, feh.

@simonheb

This comment has been minimized.

Copy link
Author

simonheb commented Aug 5, 2017

@reynhout, thanks for your comments.

The output in the previous post was indeed produced on an 4.8.17 kernel. Now I followed your steps and booted into the 4.12.0 kernel.

Now aplay -l lists more, but apparently all still hdmi devices:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1

dmesg is rather quiet on sound/audio, giving more or less the same messages as on the other kernel (just one more hdmi line).
jounrnalctl gives no related highlighted errors. Only something about tpm_tis, bluetoothd, NetworkManager and ntpd.

Is there something I should look at via the shell in ChromeOS, e.g. to figure out which driver is needed?

In the post where volfyd got it working on Caroline, he mentioned some files he added to the system, which he seems to have gotten from ChromeOS. I assume the equivalent for CAVE would bet getting:

  • /usr/share/alsa/ucm/sklnau8825max/HiFi.conf
  • /usr/share/alsa/ucm/sklnau8825max/sklnau8825max.conf
  • /etc/modprobe.d/alsa-skl.conf
  • /etc/modprobe.d/alsa.conf
  • /lib/firmware/dfw_sst.bin

?

Other posts mentioning blackinsting snd-hda-intel. Anything to try there?

@reynhout

This comment has been minimized.

Copy link
Member

reynhout commented Aug 5, 2017

@simonheb You can check the logs in ChromeOS, but the driver name might be different.

I'm not sure if copying files over will help -- I think you should see some noise in the logs well before those files become useful...though they might be needed for later stages of progress of course. Still, worth a try.

Re: blacklisting. It's possible there's a conflict, but I would expect to see some relevant log entries. Can't hurt to try either, although it will likely disable the HDMI devices, of course.

@simonheb

This comment has been minimized.

Copy link
Author

simonheb commented Aug 5, 2017

Ok, thanks again @reynhout for the comments. Blacklisting snd-hda-intel seems to bring the issue to light:
w/o blacklisting it:

$ dmesg | grep snd -B 2 -A 2
[    3.172835] Bluetooth: L2CAP socket layer initialized
[    3.172842] Bluetooth: SCO socket layer initialized
[    3.188837] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    3.205698] media: Linux media interface: v0.10
[    3.209708] usbcore: registered new interface driver btusb

w/ blacklisting snd-hda-intel:

$ dmesg | grep snd -B 2 -A 2
[    3.311489] input: Elan Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-7/i2c-ELAN0000:00/input/input5
[    3.319982] iwlwifi 0000:01:00.0: loaded firmware version 22.391740.0 op_mode iwlmvm
[    3.327879] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    3.332008] uvcvideo: Found UVC 1.00 device USB2.0 HD UVC WebCam (13d3:5679)
[    3.333514] uvcvideo 1-7:1.0: Entity type for entity Realtek Extended Controls Unit was not initialized!
--
[    3.677456] iwlwifi 0000:01:00.0 wlp1s0: renamed from wlan0
[    3.680975] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
[    3.688197] snd_soc_skl 0000:00:1f.3: Direct firmware load for 9d70-CORE-COREBOOT-0-tplg.bin failed with error -2
[    3.688201] snd_soc_skl 0000:00:1f.3: tplg fw 9d70-CORE-COREBOOT-0-tplg.bin load failed with -2
[    3.688216] snd_soc_skl 0000:00:1f.3: Direct firmware load for dfw_sst.bin failed with error -2
[    3.688218] snd_soc_skl 0000:00:1f.3: Fallback tplg fw dfw_sst.bin load failed with -2
[    3.688219] snd_soc_skl 0000:00:1f.3: Failed to init topology!
[    3.688221] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -2
[    3.688258] skl_n88l25_m98357a skl_n88l25_m98357a: ASoC: failed to instantiate card -2
[    3.696423] skl_n88l25_m98357a: probe of skl_n88l25_m98357a failed with error -2

I also copied the aforementioned files from ChromeOS and ran called alsaucm

$ sudo alsaucm -c sklnau8825max set _verb HiFi
ALSA lib main.c:344:(execute_sequence) unable to open ctl device 'hw:sklnau8825max'
ALSA lib main.c:1546:(set_verb_user) error: failed to initialize new use case: HiFi
alsaucm: error failed to set _verb=HiFi: No such device

As you suspected earlier this didn't really yield anything new.

When booting after the files were copied into the system, dmesg contains:

[    3.636850] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
[    3.639588] iwlwifi 0000:01:00.0 wlp1s0: renamed from wlan0
[    3.645834] snd_soc_skl 0000:00:1f.3: Direct firmware load for 9d70-CORE-COREBOOT-0-tplg.bin failed with error -2
[    3.645838] snd_soc_skl 0000:00:1f.3: tplg fw 9d70-CORE-COREBOOT-0-tplg.bin load failed with -2
[    3.649295] snd_soc_skl 0000:00:1f.3: ASoC: invalid manifest size
[    3.651591] snd_soc_skl 0000:00:1f.3: tplg component load failed-22
[    3.652948] snd_soc_skl 0000:00:1f.3: Failed to init topology!
[    3.652950] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -22
[    3.653011] skl_n88l25_m98357a skl_n88l25_m98357a: ASoC: failed to instantiate card -22
[    3.660528] skl_n88l25_m98357a: probe of skl_n88l25_m98357a failed with error -22
@simonheb

This comment has been minimized.

Copy link
Author

simonheb commented Aug 5, 2017

I made some very mild progress on this, not sure whether this is good though as what is described below only works on the 4.10.5 kernel, even though @reynhout suggested to try the 4.12.0.

After reading that the hardware is similar on SENTRY, I went ahead and used the topology binary provided in #274 (comment) and placed it in /lib/firmware/dfw_sst.bin. This got me a little further. More specifically, dmesg shows:

[ 1457.234035] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 1457.264801] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
[ 1457.282043] nau8825 i2c-10508825:00: No 'mclk' clock found, assume MCLK is managed externally
[ 1457.296992] snd_soc_skl 0000:00:1f.3: Direct firmware load for 9d70-CORE-COREBOOT-0-tplg.bin failed with error -2
[ 1457.296998] snd_soc_skl 0000:00:1f.3: tplg fw 9d70-CORE-COREBOOT-0-tplg.bin load failed with -2
[ 1457.297118] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297122] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297125] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297139] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297142] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297145] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297160] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297163] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297166] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[ 1457.297376] snd_soc_skl 0000:00:1f.3: ASoC: Parent card not yet available,Do not add new widgets now
[ 1457.345873] skl_n88l25_m98357a skl_n88l25_m98357a: snd-soc-dummy-dai <-> System Pin mapping ok
[ 1457.345959] skl_n88l25_m98357a skl_n88l25_m98357a: snd-soc-dummy-dai <-> System Pin mapping ok
[ 1457.346023] skl_n88l25_m98357a skl_n88l25_m98357a: snd-soc-dummy-dai <-> Reference Pin mapping ok
[ 1457.346105] skl_n88l25_m98357a skl_n88l25_m98357a: snd-soc-dummy-dai <-> DMIC Pin mapping ok
[ 1457.346169] skl_n88l25_m98357a skl_n88l25_m98357a: snd-soc-dummy-dai <-> HDMI1 Pin mapping ok
[ 1457.346232] skl_n88l25_m98357a skl_n88l25_m98357a: snd-soc-dummy-dai <-> HDMI2 Pin mapping ok
[ 1457.346297] skl_n88l25_m98357a skl_n88l25_m98357a: snd-soc-dummy-dai <-> HDMI3 Pin mapping ok
[ 1457.346330] skl_n88l25_m98357a skl_n88l25_m98357a: HiFi <-> SSP0 Pin mapping ok
[ 1457.346955] skl_n88l25_m98357a skl_n88l25_m98357a: nau8825-hifi <-> SSP1 Pin mapping ok
[ 1457.347002] skl_n88l25_m98357a skl_n88l25_m98357a: dmic-hifi <-> DMIC01 Pin mapping ok
[ 1457.347054] skl_n88l25_m98357a skl_n88l25_m98357a: intel-hdmi-hifi1 <-> iDisp1 Pin mapping ok
[ 1457.347100] skl_n88l25_m98357a skl_n88l25_m98357a: intel-hdmi-hifi2 <-> iDisp2 Pin mapping ok
[ 1457.347142] skl_n88l25_m98357a skl_n88l25_m98357a: intel-hdmi-hifi3 <-> iDisp3 Pin mapping ok
[ 1457.349524] input: sklnau8825max Headset Jack as /devices/platform/skl_n88l25_m98357a/sound/card0/input7
[ 1457.349837] input: sklnau8825max HDMI/DP, pcm=4 Jack as /devices/platform/skl_n88l25_m98357a/sound/card0/input8
[ 1457.350032] input: sklnau8825max HDMI/DP, pcm=5 Jack as /devices/platform/skl_n88l25_m98357a/sound/card0/input9
[ 1457.350182] input: sklnau8825max HDMI/DP, pcm=6 Jack as /devices/platform/skl_n88l25_m98357a/sound/card0/input10

aplay -l now gives me these:

**** List of PLAYBACK Hardware Devices ****
card 0: sklnau8825max [sklnau8825max], device 0: Audio (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sklnau8825max [sklnau8825max], device 4: Hdmi1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sklnau8825max [sklnau8825max], device 5: Hdmi2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sklnau8825max [sklnau8825max], device 6: Hdmi3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And I was able to hear a humming/beeping sound on my headphones when unmuting codec1_out in alsamixer (i hope i didn't break anything).

I'm not sure if i moved closer to or further from solving the issue for CAVE, any input on what to try next?

Update: I just booted into ChromeOS to confirm that I didn't break anything and it seems sound is still working fine from the hardware side.

Update 2: On the 4.9.4-galliumos-braswell kernel it works as on the 4.10.5 kernel, i.e. the drivers seems to get loaded, but other than humming/beeping on the headphones i get no sound. amixer lists the following items, in case anybody is able to learn from that what's going on:

amixer |grep -ivP Item\|mono\|channels\|front
Simple mixer control 'Headphone',0
  Capabilities: volume
  Limits: 0 - 63
Simple mixer control 'Headphone Bypass',0
  Capabilities: volume
  Limits: 0 - 15
Simple mixer control 'Headphone Crosstalk',0
  Capabilities: volume
  Limits: 0 - 255
Simple mixer control 'Headphone Jack',0
  Capabilities: pswitch pswitch-joined
  Capabilities: volume volume-joined
  Limits: 0 - 37
Simple mixer control 'Mic',0
  Capabilities: volume volume-joined
  Limits: 0 - 255
Simple mixer control 'ADC Decimation Rate',0
  Capabilities: enum
Simple mixer control 'BIQ Path Select',0
  Capabilities: enum
Simple mixer control 'DAC Oversampling Rate',0
  Capabilities: enum
Simple mixer control 'DACL Mux',0
  Capabilities: enum
Simple mixer control 'DACR Mux',0
  Capabilities: enum
Simple mixer control 'Headset Mic',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'Pin 5 Mux',0
  Capabilities: enum
Simple mixer control 'Pin 6 Mux',0
  Capabilities: enum
Simple mixer control 'Pin 7 Mux',0
  Capabilities: enum
Simple mixer control 'Spk',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'codec0_out mo codec0_in mi',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'codec0_out mo dmic01_hifi_in mi',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'codec0_out mo media0_in mi',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'codec1_out mo codec0_in mi',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'codec1_out mo dmic01_hifi_in mi',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'codec1_out mo media0_in mi',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'media0_out mo codec0_in mi',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'media0_out mo dmic01_hifi_in mi',0
  Capabilities: pswitch pswitch-joined
Simple mixer control 'media0_out mo media0_in mi',0
  Capabilities: pswitch pswitch-joined

@usfbrian

This comment has been minimized.

Copy link

usfbrian commented Aug 10, 2017

On a ThinkPad (SENTRY) with 2.1, I had messed around before trying to get sound to work (such as blacklisting snd_hda_intel) and implemented the steps @volfyd listed on #274, except trying to replace "adi" with "max", although I'm not even sure that would work or is the right chipset for this Chromebook. I admittedly don't know much of what I'm doing when it comes to kernel stuff. Here's my log:

~ > uname -r
4.12.0-galliumos

~ > galliumos-repodist
xenon-devel       (disabled)  GalliumOS "devel" packages
xenon-prerelease  (enabled)   GalliumOS "prerelease" packages
xenon-testing     (enabled)   GalliumOS "testing" packages

~ > aplay -l
aplay: device_list:268: no soundcards found...

~ > lspci | grep  -P audio\|snd\|sound\|audio
00:1f.3 Multimedia audio controller: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

~ > dmesg | grep -P audio\|snd\|sound\|audio
[   14.792796] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   14.929469] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
[   14.938491] snd_soc_skl 0000:00:1f.3: Direct firmware load for 9d70-CORE-COREBOOT-0-tplg.bin failed with error -2
[   14.938495] snd_soc_skl 0000:00:1f.3: tplg fw 9d70-CORE-COREBOOT-0-tplg.bin load failed with -2
[   14.940684] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940687] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940689] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940696] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940698] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940699] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940707] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940708] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940710] snd_soc_skl 0000:00:1f.3: Control load not supported 64:64:64
[   14.940772] snd_soc_skl 0000:00:1f.3: ASoC: Parent card not yet available,Do not add new widgets now
@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Aug 10, 2017

Got exactly the same output as @usfbrian on LARS

@simonheb simonheb referenced this issue Aug 14, 2017

Open

Skylake Platform Validation #274

13 of 18 tasks complete
@azertyfun

This comment has been minimized.

Copy link

azertyfun commented Aug 16, 2017

I tried @volfyd's instructions to LARS running Arch, and things went very wrong. Please do not try to reproduce if you don't want to damage your hardware.

What I did:

  • I copied the caroline-audio files to my filesystem
    *Changed all references from sklnau8825adi to sklnau8825max in those file (including file names)
  • Ran sudo alsaucm -c sklnau8825max set _verb HiFi, which told me it couldn't find /usr/share/alsa/ucm/Acer-Lars-1.0-Lars
  • Copied sklnau8825max.conf to /usr/share/alsa/ucm/Acer-Lars-1.0-Lars/Acer-Lars-1.0-Lars.conf
  • Copied HiFi.conf to /usr/share/alsa/ucm/Acer-Lars-1.0-Lars/HiFi.conf
  • Re-ran alsaucm with success

I could now play audio, but it seems the hardware output was maxed out, regardless of my settings (in kde or alsa-mixer). Lowering software audio just made the sound very compressed, but still very loud.
I tried plugging in my headphones, but before I could get them to work, I smelled the unmistakable smell of something burning coming from my audio jack. The lower right corner of the laptop also became very hot.

As it turns out, it seems, on LARS at least, that the sound card was maxed out or something, and it was literally burning.

I don't have Chrome OS installed right now to assess whether or not the sound card still works.

I am baffled that it is possible to (potentially?) destroy hardware like that using software. The sound card should have shut down by the point I could smell it...

@RedTopSR20

This comment has been minimized.

Copy link

RedTopSR20 commented Aug 21, 2017

I've got a CHELL, m7. If anyone needs me to do an experiment on my hardware, i'd be glad to help. Preferably not whatever @azertyfun did and literally burn my sound card.

I'm not knowledgeable enough to do any good on my own, but I can follow directions.

I'll be following this thread.

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Aug 21, 2017

@azertyfun how come that I am getting an error on Gallium when using your tut ? The output is on #274

@azertyfun

This comment has been minimized.

Copy link

azertyfun commented Aug 22, 2017

That's weird. Only thing I can think of is a missing HiFi.conf somewhere?

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Aug 22, 2017

@azertyfun: Could you please try to locate all HiFi.conf files on your system ?

@azertyfun

This comment has been minimized.

Copy link

azertyfun commented Aug 22, 2017

Mhm, I deleted them after I (probably) fried my sound card, but I'm pretty sure I had two unmodified HiFi.conf files at /usr/share/alsa/ucm/Acer-Lars-1.0-Lars/HiFi.conf and /usr/share/asla/ucm/sklnau8825max/HiFi.conf.

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Aug 22, 2017

Well I tried that, didn't work

@RiverCambria

This comment has been minimized.

Copy link

RiverCambria commented Aug 24, 2017

Anyone make progress? I tried updating to newest linux kernel since I saw some release notes citing skylake audio driver compatibility but no dice.

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Aug 24, 2017

@RiverCambria Nope, everybody that is / would be able to do something is silent. I can't do anything without somebody pointing me into the right direction.

@moookino

This comment has been minimized.

Copy link

moookino commented Sep 1, 2017

is it possible somehow to use audio settings from ChromeOS?

@MrChromebox

This comment has been minimized.

Copy link

MrChromebox commented Sep 1, 2017

@LufyCZ it's on our to do list, chill. This isn't our FT job, nor our #1 priority even for GalliumOS.

@moookino unfortunately the (much older) ChromeOS kernel and mailline Linux kernel are sufficiently different to where we can't simply move the drivers/settings/etc directly from ChromeOS to GalliumOS. If we could, we would have done that a long time ago :)

@RedTopSR20

This comment has been minimized.

Copy link

RedTopSR20 commented Sep 2, 2017

@MattDevo

What's the best way to support GalliumOS? I don't have the knowledge to do anything about the Skylake audio issue, but I love GalliumOS and the doors it opens for me on my Chromebook.

Should I buy GalliumOS stickers? Lol. TELL ME HOW TO BE USEFUL

@RedTopSR20

This comment has been minimized.

Copy link

RedTopSR20 commented Sep 5, 2017

@LufyCZ I bought a Sabrent USB audio adapter from Amazon for $8. It was plug and play with GalliumOS. It's going to be very useful until a fix is developed.

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Sep 6, 2017

Just tried out @azertyfun 's instructions, ready to turn off my CB as soon as I heard something (to not get my speakers damaged). After the reboot, I ran a test "alsaucm -c sklnau8825max set _verb HiFi", and I got the same exact output as he did (that the conf file Acer-Lars.... wasn't found). When I was typing the command to make the Acer-Lars... directory, I (by mistake) pressed backspace on an empty line. That normally makes a sound. Howewer, I just heard a very loud static-like sound, and almost jumped up with my heartbeat at double the normal speed. The files seem to do something, but I wasn't brave enough to continue testing. The speakers work fine in ChromeOS. This was tested on arch.

@azertyfun

This comment has been minimized.

Copy link

azertyfun commented Sep 8, 2017

Yes, I used my chromebook recently, and I think some kernel update or other enabled the speakers — I didn't do anything since last time, but the speakers seem to "work" (emphasis on the quotes).

It looks like the sound would be fine on maximum volume (aside from bursting your eardrums), and reducing the volume only compresses the sound (acceptable volume is at 2%, at which point it is nearly unrecognizable).

The good news is that means my sound card wasn't damaged from last time, which is good. If I find the time, I'll investigate; my guess is that the Caroline soundcard and LARS soundcard differ slightly, and finding the right ones would make everything work.

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Sep 8, 2017

Well we could try the LARS files from ChromeOS. Here are the files. Could you please test them out @azertyfun ?

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Sep 9, 2017

I GOT AUDIO TO WORK!!!!! Just copy over the files, reboot, and voilá :)

Edit: Just found out that at 100% it is the high static noise @azertyfun talked about, and when it is low it is highly compressed. It looks like that 20% = 100% in ChromeOS. When going lower it gets compressed. When higher, the sound goes from not-understandeable to high static. I tested it by manually setting the % in terminal and then using Gnomes built-in "speaker test"

@moookino

This comment has been minimized.

Copy link

moookino commented Sep 9, 2017

@LufyCZ, can u provide details about distribution, kernel, etc?

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Sep 9, 2017

@moookino I tested it on Arch. Kernel version is 4.12.10-1.

@Crowesesse

This comment has been minimized.

Copy link

Crowesesse commented Sep 10, 2017

This process works for CAVE as well, don't think I've seen anyone post a success for that yet. I have CAVE working with the same files from #274, renamed things to sklnau8825max as others have mentioned. There is definitely an issue with the audio gain that I still haven't figured out how to fix. Output is far too loud. Can't have volume up more than a couple notches.

@RiverCambria

This comment has been minimized.

Copy link

RiverCambria commented Sep 13, 2017

@LufyCZ I copied the files you posted but I get the following when trying to initialize:

alsaucm -c sklnau8825max set _verb HiFi
ALSA lib main.c:344:(execute_sequence) unable to open ctl device 'hw:sklnau8825max'
ALSA lib main.c:1546:(set_verb_user) error: failed to initialize new use case: HiFi
alsaucm: error failed to set _verb=HiFi: No such device

I have no sound devices now listed under volume control. Any suggestions?

@LufyCZ

This comment has been minimized.

Copy link

LufyCZ commented Sep 13, 2017

@RiverCambria are you on Gallium or on Arch ?

@khominhvi

This comment has been minimized.

Copy link

khominhvi commented Aug 20, 2018

I would like to thank everyone for the work they've put into this. I see a lot of people have worked on this problem for over a year. I thought I'd share my results and experiences.

ASUS-C302CA (CAVE) / Running GalliumOS:

I have sound after following elhenro's instructions.

It didn't seem to work while I was dual booting with chrx (No soundcards found...). I then did a full-rom firmware install (Mr Chromebox's firmware). Then followed elhenro's instructions exactly with a fresh install and that seemed to do the trick.

Interesting note; it didn't work at first - it wasn't until I went into SoundControl>VolumeControl>Configure and then turned it off and on again did I get blaring sound out of the speakers (in the middle of the night too...).

Device shows up as "sklnau8825max n/a + n/a" in Sound Control. With two available ports showing 'n/a' I assume one is supposed to be headphones and one speakers as when I switch between the ports and disable/enable device I get sound either through headphones or speakers. Sound quality on internal speakers drops off drastically at low volume and high volume. There seems to be a sweet spot in the middle. Headphone jack doesn't seem to have this problem.

A few of unresolved questions/issues:

  • Does it work with Chrx (dual-boot)? (Thx elhenro)
  • Whats the issue of having to disable/enable sound (off/default settings) when changing port?
  • Is there a way to remove static at low and high volumes? (Working on it)
  • Is there a way to adjust the volume scale?
  • Is there a better way of removing the pop when changing port (without disabling suspend-on-idle)?
  • Is the solution limited to kernel 4.15.7? or will going to 4.18.x improve things/compatibility? (Thx fexofenadine.)

I'll test some of these myself.. eventually. Unless someone has already tried and would care to share.
Not looking for an immediate solution/answer. Just hoping to see some of these issues resolved before my laptop gets too old to be relevant. Anyway thanks again for your hard work.

@fexofenadine

This comment has been minimized.

Copy link

fexofenadine commented Aug 20, 2018

@khominhvi 4.18.x didn't seem to improve anything for me, if you exceed 4.16.x you'll get apt packages missing in some cases, I had to manually install libssl1.1 for example.

I think someone above was able to improve the static by swapping out the dfw_sst.bin firmware file but it completely killed my sound when I tried that (I restored the .bin from this repository).

this is the alternative source i used in case you're interested in trying it for yourself: alt dfw_sst.bin

@c---

This comment has been minimized.

Copy link

c--- commented Aug 24, 2018

WARNING: as mentioned above, this stuff is nowhere even close to reliable and can destroy hardware so proceed with caution. The issue of over-driving the hardware does not seem to be fixed.

In case anyone is trying do this on other distros this is what I did for Arch Linux running on ASUS C302 (CAVE):

Use the galliumos stuff:

wget http://apt.galliumos.org/pool/main/g/galliumos-skylake/galliumos-skylake_2.9902_all.deb
mkdir galliumos-stuff
cd galliumos-stuff
7z x -so ../galliumos-skylake_2.9902_all.deb | tar xvf -
# (switch to root or use sudo)
cp etc/modprobe.d/snd-hda-intel.conf /etc/modprobe.d/
cp lib/firmware/dfw_sst.bin /lib/firmware/
cp -r usr/share/alsa/ucm/sklnau8825adi /usr/share/alsa/ucm/sklnau8825max
mv /usr/share/alsa/ucm/sklnau8825max/sklnau8825adi.conf /usr/share/alsa/ucm/sklnau8825max/sklnau8825max.conf
sed -i 's/adi/max/g' /usr/share/alsa/ucm/sklnau8825max/HiFi.conf
mkdir /usr/share/alsa/ucm/Google-Cave-1.0-Cave
ln -s /usr/share/alsa/ucm/sklnau8825max/sklnau8825max.conf /usr/share/alsa/ucm/Google-Cave-1.0-Cave/Google-Cave-1.0-Cave.conf

That's it for the install. Then somewhere you need to run:

alsaucm -c sklnau8825max set _verb HiFi

The gallium files have a systemd service that runs it. You need to modify their usr/bin/galliumos-init-skylake script to detect CAVE. Or you can run it as a user when you login. The systemd service may not work that well as-is. It seems it needs a delay or something because often it will "successfully" start but not enable the sound. However, if you restart the service later then it works.

In any case, although the sound works you can tell it's being massively over-driven. It's very loud with distortion even at low volume. This could cause problems, like overheating or even hardware failure because it's obviously not configuring something correctly.

@fexofenadine

This comment has been minimized.

Copy link

fexofenadine commented Aug 25, 2018

pactl set-sink-volume alsa_output.platform-skl_n88l25_m98357a.stereo-fallback 1%

this seems to eliminate the static and sets volume nicely for input sources, but the scale is very much off (it's 1% not 100%) - so even bumping a volume button will set it to 6% and it sounds awful. need a way to rescale the pulseaudio base volume and steps if anyone knows how to do that

@elhenro

This comment has been minimized.

Copy link

elhenro commented Aug 27, 2018

Does it work with Chrx (dual-boot)?

@khominhvi Yes, I always used chrx

@khominhvi

This comment has been minimized.

Copy link

khominhvi commented Aug 27, 2018

@elhenro Thx I'll reinstall and give it a go. I like having dual boot as an option for guests.

@gills4prem

This comment has been minimized.

Copy link

gills4prem commented Dec 6, 2018

I'm reading this thread and was slightly confused.. Is sound working on acer Chromebook 15 2017. As I am dual booting with gallium and at present I have no sound. Just wondering if I may have an older install. Running gallium 3.0

@MrChromebox

This comment has been minimized.

Copy link

MrChromebox commented Dec 6, 2018

@gills4prem this thread is not relevant for your device; the 2017 Acer CB 15 (SAND) is Apollolake, not Skylake, based. There is a separate thread for those devices, and no sound does not work for them.

@rayfield

This comment has been minimized.

Copy link

rayfield commented Dec 24, 2018

I'm afraid despite the best efforts of some folks who've put a good deal of thought and work into this process, there are so many cross-references and partial accounts in this thread -- sometimes to incomplete instructions, or blind alleys -- that I, for one, can't tell what exactly I should do to enable sound using Gallium 2.1 on a Skylake/Asus 302.

It would be great if someone could post step-by-step directions.

@MrChromebox

This comment has been minimized.

Copy link

MrChromebox commented Dec 24, 2018

@rayfield honestly, buy a USB adapter or BT speaker/headphones. If getting it to work was straightforward, there would be clear instructions for doing so / it would have been added to the repo like for Caroline and Chell.

@TesseractCat

This comment has been minimized.

Copy link

TesseractCat commented Dec 27, 2018

@rayfield The solution presented by Stephan, along with a powerwash on the chromeos side, plus updating the kernel via Ukuu fixed sound for me, at least for the headphone jack (I haven't tested speakers). This isn't completely straitforward, but it's what worked for me, so you could give it a shot.

@joelyno

This comment has been minimized.

Copy link

joelyno commented Dec 28, 2018

*** Warning DECREASE YOUR MAIN VOLUME TO 20% AFTER COMPLETING REBOOT ***

Hi all, I'm using an ASUS C302CA-DHM4. After following @elhenro 's instructions, the speakers worked for video playing. I'm still testing them. After almost blowing out my speakers at 50% I found the sweet spot for them to be around 25%. Just wanted to provide an update, and warning for someone following the instructions.

Thank you all for your help. <3

*** Warning DECREASE YOUR MAIN VOLUME TO 20% AFTER COMPLETING REBOOT ***

@renzomassobrio

This comment has been minimized.

Copy link

renzomassobrio commented Jan 14, 2019

Hi! I got my audio working following @elhenro instructions. Thanks for that!
One question though, is the internal microphone working for anyone? Thanks for your input.

@Backpackstudio

This comment has been minimized.

Copy link

Backpackstudio commented Jan 16, 2019

Hi have Lenovo ThinkPad 13 Chromebook, which is Skylake/Sentry Chromebook.

What is the proper procedure to get audio on this book?

@Backpackstudio

This comment has been minimized.

Copy link

Backpackstudio commented Jan 16, 2019

alsaucm -c sklnau8825max set _verb HiFi
I get an error:
unable to open ctl device hw: sklnau8825max

EDIT --

Error was fixed byt updating the kernel.

@mtimms1980

This comment has been minimized.

Copy link

mtimms1980 commented Jan 26, 2019

I have a C302 (CAVE) and have audio working on Elementary OS Juno but cannot recall what steps I took to get to work! I am now testing Ubuntu 18.10 and was wondering if anyone has audio working on CAVE in Ubuntu 18.10? If so, I'd appreciate any help anyone can offer! I've tried numerous combinations of the various discoveries posted here but so far, no luck.

Big thanks to those that have contributed so much already.

@Backpackstudio

This comment has been minimized.

Copy link

Backpackstudio commented Jan 26, 2019

I have a C302 (CAVE) and have audio working on Elementary OS Juno but cannot recall what steps I took to get to work! I am now testing Ubuntu 18.10 and was wondering if anyone has audio working on CAVE in Ubuntu 18.10? If so, I'd appreciate any help anyone can offer! I've tried numerous combinations of the various discoveries posted here but so far, no luck.

Big thanks to those that have contributed so much already.

Which procedure you have used for Elementary to get audio to work?

@mtimms1980

This comment has been minimized.

Copy link

mtimms1980 commented Jan 26, 2019

I have a C302 (CAVE) and have audio working on Elementary OS Juno but cannot recall what steps I took to get to work! I am now testing Ubuntu 18.10 and was wondering if anyone has audio working on CAVE in Ubuntu 18.10? If so, I'd appreciate any help anyone can offer! I've tried numerous combinations of the various discoveries posted here but so far, no luck.
Big thanks to those that have contributed so much already.

Which procedure you have used for Elementary to get audio to work?

That's the problem, it was a while ago and I didn't document it at the time so I can't remember. I have a backup of that install so can pull files etc. if required.

@Backpackstudio

This comment has been minimized.

Copy link

Backpackstudio commented Jan 27, 2019

I have a C302 (CAVE) and have audio working on Elementary OS Juno but cannot recall what steps I took to get to work! I am now testing Ubuntu 18.10 and was wondering if anyone has audio working on CAVE in Ubuntu 18.10? If so, I'd appreciate any help anyone can offer! I've tried numerous combinations of the various discoveries posted here but so far, no luck.
Big thanks to those that have contributed so much already.

Which procedure you have used for Elementary to get audio to work?

That's the problem, it was a while ago and I didn't document it at the time so I can't remember. I have a backup of that install so can pull files etc. if required.

Thank you. I just figured out. I used StephanvanSchaik files on ThinkPad 13, which is a Sentry Chromebook. No noise, clear audio. Elementary OS Juno.

https://git.codentium.com/StephanvanSchaik/gentoo-chromebook-skylake

@mtimms1980

This comment has been minimized.

Copy link

mtimms1980 commented Jan 27, 2019

Thank you. I just figured out. I used StephanvanSchaik files on ThinkPad 13, which is a Sentry Chromebook. No noise, clear audio. Elementary OS Juno.

https://git.codentium.com/StephanvanSchaik/gentoo-chromebook-skylake

OK, I'll give that a go and report back. Thank you.

@mtimms1980

This comment has been minimized.

Copy link

mtimms1980 commented Jan 27, 2019

Thank you. I just figured out. I used StephanvanSchaik files on ThinkPad 13, which is a Sentry Chromebook. No noise, clear audio. Elementary OS Juno.

https://git.codentium.com/StephanvanSchaik/gentoo-chromebook-skylake

Still no joy, I think if I remember correctly I previously used some (all?) of the steps under the "Audio" section of https://www.codentium.com/category/chromebooks.html

@Backpackstudio

This comment has been minimized.

Copy link

Backpackstudio commented Jan 27, 2019

I have created detailed instrucions for Elementary OS on Lenovo ThinkPad 13 Chromebook. These are detailed instructions how to install audio on Lenovo ThinkPad 13 Chromebook. Audio is working fine!! No noise, clear audio. Also it provides keys mappings for Chromebook. It's based on files provided by StephanvanSchaik, modified especially for Elementary OS on Lenovo ThinkPad 13 Chromebook.

It comes with an easy to use installation script:

cd; curl -LO https://raw.githubusercontent.com/Backpackstudio/chromebook-sentry/master/scripts/install-sentry-fixes && sudo bash install-sentry-fixes
@c---

This comment has been minimized.

Copy link

c--- commented Jan 27, 2019

The correct firmware (topology) seems to be THE single most important piece of this. On the ASUS C302 I can find only one dfw_sst.bin firmware blob that "works" (sort of; it over-drives). It's the one created for some HP Skylake-based Chromebook. This was a bug reported and someone (Intel?) generated a conf file that worked. Original bug: https://bugzilla.kernel.org/show_bug.cgi?id=195593

This is the conf file for that HP topology:
https://bugzilla.kernel.org/attachment.cgi?id=256357

That can be compiled:
alsatplg -c SKL_ssm4567_nau8825_topology.conf -o dfw_sst.bin

This produces the working firmware for HP Chromebook and somewhat working for C302 CAVE (23120 bytes). Obviously the conf file needs to be changed though because it's not exactly right and over-drives the C302 (ie. it will literally burn the hardware).

They seemed to respond and get it working for that HP. Why haven't they responded similar for the ASUS? Here is a bug that seems like a good starting place but nobody has responded (maybe the original report is not good enough?). https://bugzilla.kernel.org/show_bug.cgi?id=200963

@Beatnukem

This comment has been minimized.

Copy link

Beatnukem commented Jan 28, 2019

I have a C302 (CAVE) and have audio working on Elementary OS Juno but cannot recall what steps I took to get to work! I am now testing Ubuntu 18.10 and was wondering if anyone has audio working on CAVE in Ubuntu 18.10? If so, I'd appreciate any help anyone can offer! I've tried numerous combinations of the various discoveries posted here but so far, no luck.

Big thanks to those that have contributed so much already.

For what it's worth, I am running Ubuntu Studio 18.04 on my Asus Flipbook C302CA (CAVE). I got speaker & mic working pretty much perfectly (no overdrive, only a noticeable 'click' when booting the system or waking it up from sleep).

  1. I followed StephanvanSchaik comment from Feb 26, 2018. This got audio working, but overdrive was pretty bad.
  2. I installed the dwf_sst.bin that is linked here: https://www.codentium.com/category/chromebooks.html (dwf_sst.bin from here). That fixed the audio quality, but you would hear a noticable 'click' everytime audio would start playing (when the driver would power the chip up)
  3. The 'click' was fixed by following instruction from LufyCZ comment from Jul 8, 2018
@Backpackstudio

This comment has been minimized.

Copy link

Backpackstudio commented Jan 28, 2019

Pop after waking up the sound card can be fixed by commenting out the line

load-module module-suspend-on-idle

in the file /etc/pulse/default.pa

If I use this method, I loose audio. No audio at all. Driver itself remains, but no sound.

@mtimms1980

This comment has been minimized.

Copy link

mtimms1980 commented Jan 28, 2019

I have a C302 (CAVE) and have audio working on Elementary OS Juno but cannot recall what steps I took to get to work! I am now testing Ubuntu 18.10 and was wondering if anyone has audio working on CAVE in Ubuntu 18.10? If so, I'd appreciate any help anyone can offer! I've tried numerous combinations of the various discoveries posted here but so far, no luck.
Big thanks to those that have contributed so much already.

For what it's worth, I am running Ubuntu Studio 18.04 on my Asus Flipbook C302CA (CAVE). I got speaker & mic working pretty much perfectly (no overdrive, only a noticeable 'click' when booting the system or waking it up from sleep).

  1. I followed StephanvanSchaik comment from Feb 26, 2018. This got audio working, but overdrive was pretty bad.
  2. I installed the dwf_sst.bin that is linked here: https://www.codentium.com/category/chromebooks.html (dwf_sst.bin from here). That fixed the audio quality, but you would hear a noticable 'click' everytime audio would start playing (when the driver would power the chip up)
  3. The 'click' was fixed by following instruction from LufyCZ comment from Jul 8, 2018

I can confirm that this worked a treat for me so thank you! Sadly it does not work on 18.10 though, no sound and anything that would be playing audio doesn't progress, like a YouTube video for example. Shame as 18.10 feels noticeably quicker on my CAVE.

Thanks for all of the help on this all.

@c---

This comment has been minimized.

Copy link

c--- commented Jan 28, 2019

That 33772 byte firmware doesn't work on C302 running Arch Linux. There is a possibility it just needs to be recompiled but I can't find the topology/conf for that version.

@Conjohnsonjohnson

This comment has been minimized.

Copy link

Conjohnsonjohnson commented Feb 8, 2019

The 33772 firmware doesn't work on my C302 either.

@doozan

This comment has been minimized.

Copy link

doozan commented Feb 9, 2019

Here's how I got sound working with GalliumOS 3.0 on a Chromebook 13 (Sentry). I don't expect this will work for non-Sentry devices, but the earlier posts should be sufficient to get that working. I think the most important step is to stop using the default Gallium kernel.

sudo apt-get install linux-image-generic-hwe-18.04

# Conf from https://github.com/GalliumOS/galliumos-distro/issues/274#issuecomment-292821069
wget https://us-east.manta.joyent.com/jmc/public/tmp/sentry.conf -O /tmp/sentry.conf
sudo alsatplg -c /tmp/sentry.conf -o /lib/firmware/dfw_sst.bin

sudo su
mkdir -p /usr/share/alsa/ucm/sklnau8825max/
cd /usr/share/alsa/ucm/sklnau8825max/
wget https://raw.githubusercontent.com/GalliumOS/galliumos-skylake/master/usr/share/alsa/ucm/sklnau8825adi/sklnau8825adi.conf -O sklnau8825max.conf
wget https://raw.githubusercontent.com/GalliumOS/galliumos-skylake/master/usr/share/alsa/ucm/sklnau8825adi/HiFi.conf
sed -i 's/adi/max/g' /usr/share/alsa/ucm/sklnau8825max/HiFi.conf
sed -i 's/Caroline/Sentry/g' /usr/share/alsa/ucm/sklnau8825max/sklnau8825max.conf
ln -s /usr/share/alsa/ucm/sklnau8825max/ /usr/share/alsa/ucm/Google-Sentry-1.0-Sentry
ln -s /usr/share/alsa/ucm/sklnau8825max/sklnau8825max.conf /usr/share/alsa/ucm/sklnau8825max/Google-Sentry-1.0-Sentry.conf
exit

cat <<EOF>~/.config/autostart/skylake-soundinit.desktop
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=skylake-soundinit
Comment=
Exec=skylake-soundinit
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false
EOF

cat <<EOF>~/.local/bin/skylake-soundinit
#!/bin/sh
alsaucm -c sklnau8825max set _verb HiFi set _disdev Speaker
alsaucm -c sklnau8825max set _verb HiFi set _disdev Headphone
alsaucm -c sklnau8825max set _verb HiFi set _enadev Speaker
EOF
chmod +x ~/.local/bin/skylake-soundinit

sudo reboot

For whatever reason, the Gallium kernel doesn't work with sound. Switching from 4.16.13-galliumos to the ukuu 4.16.13 works just fine so it's something with the gallium config or patches. I didn't investigate further. For convenience, I'm using the generic Ubuntu 4.18 kernel since it doesn't require messing with ukuu.

Furthermore, the alsaucm -c sklnau8825max set _verb HiFi ... commands only work when run as the user after logging into xfce, so I've added a script to .local/bin and run it by default through the .desktop link. This differs from the Caroline/Chell configuration that happens in /usr/bin/galliumos-init-skylake

I still get a 'popping' sound when audio starts, but the fix mentioned earlier #379 (comment) just breaks sound entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment