You are not logged in.

#26 2020-12-22 19:00:04

colum
Member
Registered: 2020-12-12
Posts: 8

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

AnonymousChen-

You got the sound working with 5.10.1? Are you using any specific configuration? I've upgrade to the following and am still unable to get anything other then "Dummy Output" to show up.

[colum@hp ~]$ uname -a
Linux hp 5.10.2-arch1-1 #1 SMP PREEMPT Mon, 21 Dec 2020 19:59:42 +0000 x86_64 GNU/Linux

Offline

#27 2020-12-24 06:22:58

AnonymousChen
Member
Registered: 2013-12-19
Posts: 9

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

Nope I just updated the kernel by downloading it from the Arch testing repository.

Offline

#28 2020-12-24 06:24:52

AnonymousChen
Member
Registered: 2013-12-19
Posts: 9

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

I'm using the Dell Inspiron 7306 11th gen i7 processor. The fix applies to anyone using a Tiger Lake processor

Offline

#29 2020-12-25 01:59:51

colum
Member
Registered: 2020-12-12
Posts: 8

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

AnonymousChen-

I'm not seeing any cards show up under PulseAudio on the kernel. I think the issue is specific to the HP laptop in question, and your Dell laptop is using a different sound card.

Offline

#30 2020-12-25 02:21:22

colum
Member
Registered: 2020-12-12
Posts: 8

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

Got sound working ... kinda.

Running with 5.10.2 from Arch Testing, sof-firmware installed, and options snd-intel-dspcfg dsp_driver=1 in /etc/modprobe.d/alsa.conf I'm able to get sound from a single speaker.

I'm not 100% sure, but I think these come with a 5.1 configuration, so more tweaking is required. But progress is progress.

Merry Christmas.

Offline

#31 2020-12-25 03:34:50

AnonymousChen
Member
Registered: 2013-12-19
Posts: 9

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

Try reinstalling Arch. I think there is something messed up because I got mine working purely by updating the kernel. I did that config as you mentioned I got the sound working but not the mic. But then I decided to reinstall it because I decided to upgrade the SSD, put in the latest Kernel and fixed the problem.

Merry Christmas to you too.

Last edited by AnonymousChen (2020-12-25 06:59:46)

Offline

#32 2020-12-25 03:35:47

AnonymousChen
Member
Registered: 2013-12-19
Posts: 9

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

Did you also made sure you installed headers as well?

Offline

#33 2020-12-27 00:39:01

colum
Member
Registered: 2020-12-12
Posts: 8

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

Found the solution, or at least most of it. Borrowed from https://askubuntu.com/a/1293623

From the above link:

The audio chip has an amplifier pin that needs to be set. It is pin 1.

Run the following, and then restart PulseAudio.

sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x01
sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x01
sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01
sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x00

I'm going to spin up an Arch Wiki article on this generation of laptop so we can dump our fixes in there. It takes me one or two tries to apply this fix when I login, but it seems to reliably work in getting at least stereo sound.

Last edited by colum (2020-12-27 02:43:05)

Offline

#34 2020-12-27 01:14:19

colum
Member
Registered: 2020-12-12
Posts: 8

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

I've spun up https://wiki.archlinux.org/index.php/HP … 360_(2020) to document fixes for this generation of laptop.

btw the wiki is a mess for the HP Spectre x360. I blame HP and their poor model number conventions

Offline

#35 2020-12-27 02:13:28

colum
Member
Registered: 2020-12-12
Posts: 8

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

I keep running into issues where this works and then stops working on reboot.

EDIT. My guess is that when audio stops playing pulseaudio puts the card into sleep mode and wakes it up when a sound needs to be played. I'm going to write a little program that will listen to pulseaudio events and preform the above actions. I'm not sure if this is a driver issue per se, or something unique to these laptops due to their sound configuration. Considering that other tigerlake laptops are working fine and the only references to this issue are on these HP laptops- it might require a special patch to sof-firmware or the daemon is the way to go

Last edited by colum (2020-12-28 05:27:28)

Offline

#36 2021-01-18 12:00:53

hirnschmalz
Member
Registered: 2020-11-19
Posts: 36

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

I tried a fresh install but a

pactl list cards

shows nothing

Last edited by hirnschmalz (2021-01-18 12:01:12)

Offline

#37 2021-01-19 01:10:07

aigilea
Member
Registered: 2021-01-19
Posts: 4

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

Kind-of-workaround for the long keyboard initialization: add "i8042.dumbkbd=1" to the kernel command line.
This is not the best solution as it breaks caps lock led, but otherwise it's ok.

Offline

#38 2021-01-19 05:59:24

hirnschmalz
Member
Registered: 2020-11-19
Posts: 36

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

It looks like I've a configuration issue with PulseAudio.

alsamixer shows me a sof-hda-dsp sound card as option

Screenshot of alsamixer

Screenshot of alsamixer showing the sof-hda-dsp card

Offline

#39 2021-01-19 07:07:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,393

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

You need to install alsa-ucm-conf for these cards to give you sensible mixers in pulse. However if colum's finding are true you need to disable sof/ucm with the mentioned kernel parameter

Offline

#40 2021-01-19 07:14:35

hirnschmalz
Member
Registered: 2020-11-19
Posts: 36

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

alsa-ucm-conf is installed

_ pacman -Ss alsa-ucm-conf
extra/alsa-ucm-conf 1.2.4-2 [installed]
    ALSA Use Case Manager configuration (and topologies)

I also tried blacklisting the mentioned kernel modules - without success

Offline

#41 2021-01-19 07:28:34

hirnschmalz
Member
Registered: 2020-11-19
Posts: 36

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

I also tried this without success. Just to be sure I re-created a /etc/modprobe.d/alsa.conf with the mentioned line - no changes in behaviour.

What did change was the output of alsamixer (after switching the sound card)

alsamixer after changing kernel options

Offline

#42 2021-01-19 10:36:02

aigilea
Member
Registered: 2021-01-19
Posts: 4

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

When you force the old driver with that line in the config you should also see your card in pactl list cards. That doesn't give anything useful however.

Looks like 13inch spectres are different, I have the same hardware by the 13-aw2022ur name and I'm in the very same spot, no matter what kernels, packages, drivers or SOF versions I try.

With legacy driver (dmic_detect=0 or dsp_driver=1 options) everything initializes well, but only 8 disconnected HDMI outputs are present.
With the new SOF driver only 3 disconnected HDMI outputs are present and pulseaudio fails to initialize the card with a "module-alsa-card.c: Failed to find a working profile.". Currently I'm on kernel 5.11 & SOF 1.6.1 with that very result.

I've resorted to submitting a ticket with all the logs to SOF developers.

Last edited by aigilea (2021-01-19 12:59:33)

Offline

#43 2021-01-19 11:06:55

hirnschmalz
Member
Registered: 2020-11-19
Posts: 36

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

aigilea wrote:

Looks like 13inch spectres are different, I have the same hardware by the 13-aw2022ur name and I'm in the very same spot, no matter what kernels, packages, drivers or SOF versions I try.

I'm glad to hear that I'm not the only who struggles with this issue. Thanks for your input!

Offline

#44 2021-01-21 11:46:10

hirnschmalz
Member
Registered: 2020-11-19
Posts: 36

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

colum wrote:

I've spun up https://wiki.archlinux.org/index.php/HP … 360_(2020) to document fixes for this generation of laptop.

btw the wiki is a mess for the HP Spectre x360. I blame HP and their poor model number conventions

It looks like this solution does not work for the 13-aw2XXXng. See https://github.com/thesofproject/linux/issues/2700
So please update your wiki to not "fool" users of these sort of machines.

Last edited by hirnschmalz (2021-01-21 11:47:14)

Offline

#45 2021-01-28 23:48:57

aigilea
Member
Registered: 2021-01-19
Posts: 4

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

There's a major win over there thanks to SOF and ALSA developers.
To make everything work you'll need (as of right now):
Your own kernel 5.12-rc with these two patches applied and soundwire driver enabled (I had to add CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y, CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m, CONFIG_SND_SOC_RT1308=m to the config).
ALSA 1.2.4 with the latest UCM configuration.
SOF 1.6.1 with the topology file updated.
PulseAudio 14.2.

This is WIP, everything will change and homemade kernels and configs will probably be incompatible with the final solution, but it's just so good to finally have some sound.

(post was updated on mar 14).

Last edited by aigilea (2021-03-14 15:25:33)

Offline

#46 2021-01-29 06:23:15

hirnschmalz
Member
Registered: 2020-11-19
Posts: 36

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

aigilea wrote:

There's a major win over there thanks to SOF and ALSA developers.
To make everything work you'll need (as of right now):
Your own kernel 5.11-rc5 with commit 2ad1b7a, pr2717, pr2718 and pr2721 applied and soundwire driver enabled (I had to add CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y, CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m, CONFIG_SND_SOC_RT1308=m to the config).
ALSA 1.2.4 with the latest UCM configuration.
SOF 1.6.1 with the topology file updated.
PulseAudio 14.2.

This is WIP, everything will change and homemade kernels and configs will almost certainly be incompatible with the final solution, but it's just so good to finally have some sound.

Hi aigilea,

I followed the GitHub issue and just want to say thank you for all your input and time you spent to help the SOF team!

Offline

#47 2021-01-29 23:10:14

borix134
Member
Registered: 2016-10-15
Posts: 9

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

I am also on Tiger Lake as I got a new laptop for Christmas. I've had a similar issue to what you're describing here, with the dummy output in alsa as well. I would recommend handing everything over to PulseAudio for starts, it makes life so much easier.

hirnschmalz wrote:

It looks like I've a configuration issue with PulseAudio.
alsamixer shows me a sof-hda-dsp sound card as option

I don't think that on its own is the issue. I have the same thing and mine works just fine.
2021-01-29-165513-1920x1080-scrot.png

I would advise using a pulse config in your home directory (if you're not already), and make sure it includes the default from etc. It has been a few weeks since I fixed the issue I had with it, but I do not recall having to blacklist anything. Also checkout https://support.system76.com/articles/audio/.

Last edited by borix134 (2021-01-30 01:55:12)

Offline

#48 2021-01-31 22:31:13

aigilea
Member
Registered: 2021-01-19
Posts: 4

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

So I decided to take a stab at fixing slow keyboard initialization and here are my findings.

The root cause of the problem is poor i8042 emulation by the laptop firmware. i8042 is an ancient ps/2 driver chip which is rarely if ever used in modern PCs, but is often emulated to give a familiar keyboard interface for the OS.
It has an interrupt signal used to tell that data is available for the OS to read, usually it's asserted as long as new data is present but in this particular implementation interrupt deasserts right after first byte is read.
Usually it's not a problem as almost every transaction on ps/2 bus has a reply size of one byte, but there's an exception -- GETID command that returns 3 bytes and it is used by linux kernel to probe the keyboard.
When Linux kernel tries to probe the keyboard it starts with the GETID command, but interrupt deasserts after reading the first byte of the reply and command execution times out leaving two more bytes unread. After that it tries to probe the keyboard with other commands like SETLEDS but usually fails to parse the acknowledgement because of these two extra bytes on the bus.
After numerous attempts it finally gets some old acknowledgment from the bus in the right moment and probe finishes successfully.
All this bus talk may be seen by adding "i8042.debug=1 i8042.unmask_kbd_data=1 dyndbg=\"file atkbd.c +p\" dyndbg=\"file libps2.c +p\"" to the kernel params and decoded using some docs.

So how this could be solved:
1. Firmware may be fixed to keep interrupt asserted as long as there is data to read. Sounds good, but I don't know how to reach anyone responsible at HP or AMI.
2. Kernel may be forced to assume a working keyboard without probing by adding "i8042.dumbkbd=1" to the kernel command line. This breaks caps lock led however because this parameter forbids any writes to the keyboard.
3. Finally there's a status flag that may be used by the kernel driver to read out all the available data in a single interrupt invocation. This approach requires a patch and here it is. I'm going to try to get it upstream, but I don't know when and if it'll happen.

So now this laptop is my daily driver. I would like to have mute leds (likely), tpm+luks (maybe) and fingerprint reader (unlikely) working as well, but that'll do for now.

Last edited by aigilea (2021-02-01 10:44:07)

Offline

#49 2021-03-02 04:33:37

archbo
Member
Registered: 2021-03-02
Posts: 1

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

aigilea wrote:

There's a major win over there thanks to SOF and ALSA developers.

That's just amazing! I don't see any of that merged to kernel yet, but hope it's going to become available soon!

BTW, my previous x360 used to boot just fine with no initramfs, while this one hangs. Any clues what might be causing that?

Last edited by archbo (2021-03-02 04:33:56)

Offline

#50 2021-08-23 14:16:03

hirnschmalz
Member
Registered: 2020-11-19
Posts: 36

Re: Various problems with HP Spectre x360 aw2xxxng (Tiger Lake)

aigilea wrote:

So I decided to take a stab at fixing slow keyboard initialization and here are my findings.

The root cause of the problem is poor i8042 emulation by the laptop firmware. i8042 is an ancient ps/2 driver chip which is rarely if ever used in modern PCs, but is often emulated to give a familiar keyboard interface for the OS.
It has an interrupt signal used to tell that data is available for the OS to read, usually it's asserted as long as new data is present but in this particular implementation interrupt deasserts right after first byte is read.
Usually it's not a problem as almost every transaction on ps/2 bus has a reply size of one byte, but there's an exception -- GETID command that returns 3 bytes and it is used by linux kernel to probe the keyboard.
When Linux kernel tries to probe the keyboard it starts with the GETID command, but interrupt deasserts after reading the first byte of the reply and command execution times out leaving two more bytes unread. After that it tries to probe the keyboard with other commands like SETLEDS but usually fails to parse the acknowledgement because of these two extra bytes on the bus.
After numerous attempts it finally gets some old acknowledgment from the bus in the right moment and probe finishes successfully.
All this bus talk may be seen by adding "i8042.debug=1 i8042.unmask_kbd_data=1 dyndbg=\"file atkbd.c +p\" dyndbg=\"file libps2.c +p\"" to the kernel params and decoded using some docs.

So how this could be solved:
1. Firmware may be fixed to keep interrupt asserted as long as there is data to read. Sounds good, but I don't know how to reach anyone responsible at HP or AMI.
2. Kernel may be forced to assume a working keyboard without probing by adding "i8042.dumbkbd=1" to the kernel command line. This breaks caps lock led however because this parameter forbids any writes to the keyboard.
3. Finally there's a status flag that may be used by the kernel driver to read out all the available data in a single interrupt invocation. This approach requires a patch and here it is. I'm going to try to get it upstream, but I don't know when and if it'll happen.

So now this laptop is my daily driver. I would like to have mute leds (likely), tpm+luks (maybe) and fingerprint reader (unlikely) working as well, but that'll do for now.

A short update on the all the issues I had with this laptop

  • Sound problems are fixed with kernel 5.10

  • Keyboard issues (delay) can be fixed with the latest BIOS (F.11). I was not able to update the BIOS with my linux machine. So I created a Windows USB stick for that.

The issues I'm fighting still with

  • Unable to boot if a USB device is attached

  • Screen does not rotate in GNOME

Offline

Board footer

Powered by FluxBB