xoocoon / hp-15-ew0xxx-snd-fix

DKMS module for fixing the sound on Linux for HP models Envy x360 15-ew0xxx
GNU General Public License v3.0
33 stars 16 forks source link

Not working ubuntu 23.04 kernel linux 6.2.0-20-generic #6

Open diamondarrow67 opened 1 year ago

diamondarrow67 commented 1 year ago

Hi, I am still fairly new to linux and have had no luck with these scripts working on my hp-15-ew0xxx. I have tried both the snd-hda-scodec-cs35l41 module and the snd-hda-codec-realtek module with no luck. when the readme tells me to use sudo dmesg | grep cs35l41-hda I get no output, same with sudo dmesg | grep cs35l41-hda. However, when I run dkms status I get:

readelf: Error: Not an ELF file - it has the wrong magic bytes at the start readelf: Error: Not an ELF file - it has the wrong magic bytes at the start readelf: Error: Not an ELF file - it has the wrong magic bytes at the start snd-hda-codec-realtek/0.1, 6.2.0-20-generic, x86_64: installed snd-hda-scodec-cs35l41/0.1, 6.2.0-20-generic, x86_64: installed

I know from the readme that the readelf errors are to be ignored, I see a few other scripts in the repo I cloned, should I try those? If so in what order?

diamondarrow67 commented 1 year ago

Update: I realized my device was actually the hp-15-ey0xxx. used the solution from #3 but edited it of course to have my subsytem ID, mine was longer for some reason? Tried that and still no luck, I even replaced my line by editing one of the premade ones and still had no luck, at my wits end and think I will just have to try again next ubuntu release and hope its solved by then

xoocoon commented 1 year ago

Hi @diamondarrow67 , in my experience, the readelf error appears if the compiler finds a linux kernel somewhere on the build path with an unexpected format (which should not affect the module build results). If you have a log of the make process, could you provide it to me? Presumably it can be found under /var/lib/dkms/snd-hda-codec-realtek/0.1/build/make.log

diamondarrow67 commented 1 year ago

@xoocoon sorry for the delay in this response, here is the make.log make.log

also to reiterate: sudo dmesg | grep cs35l41-hda returns no results

sigaloid commented 1 year ago

Same position as you, installed patches, changed machine ID from second subsystem (first was 6 characters), etc. On Fedora. I modified the build scripts, basically just delete all apt calls (I manually installed the packages), replace update-initramfs with dracut, and change subver path. I can upload my changes if anyone wants it. But, I doubt you do, as it still doesn't work. :(

Only interesting dmesg output is:

~> sudo dmesg | grep hda
[   14.142516] snd_hda_intel 0000:04:00.1: enabling device (0000 -> 0002)
[   14.142604] snd_hda_intel 0000:04:00.1: Handle vga_switcheroo audio client
[   14.142736] snd_hda_intel 0000:04:00.6: enabling device (0000 -> 0002)
[   14.171339] snd_hda_intel 0000:04:00.1: bound 0000:04:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[   14.187187] snd_hda_codec_generic hdaudioC1D0: autoconfig for Generic: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   14.187190] snd_hda_codec_generic hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   14.187191] snd_hda_codec_generic hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   14.187192] snd_hda_codec_generic hdaudioC1D0:    mono: mono_out=0x0
[   14.187192] snd_hda_codec_generic hdaudioC1D0:    inputs:
[   14.187193] snd_hda_codec_generic hdaudioC1D0:      Mic=0x19
diamondarrow67 commented 1 year ago

Same position as you, installed patches, changed machine ID from second subsystem (first was 6 characters), etc. On Fedora. I modified the build scripts, basically just delete all apt calls (I manually installed the packages), replace update-initramfs with dracut, and change subver path. I can upload my changes if anyone wants it. But, I doubt you do, as it still doesn't work. :(

Only interesting dmesg output is:

~> sudo dmesg | grep hda
[   14.142516] snd_hda_intel 0000:04:00.1: enabling device (0000 -> 0002)
[   14.142604] snd_hda_intel 0000:04:00.1: Handle vga_switcheroo audio client
[   14.142736] snd_hda_intel 0000:04:00.6: enabling device (0000 -> 0002)
[   14.171339] snd_hda_intel 0000:04:00.1: bound 0000:04:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[   14.187187] snd_hda_codec_generic hdaudioC1D0: autoconfig for Generic: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   14.187190] snd_hda_codec_generic hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   14.187191] snd_hda_codec_generic hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   14.187192] snd_hda_codec_generic hdaudioC1D0:    mono: mono_out=0x0
[   14.187192] snd_hda_codec_generic hdaudioC1D0:    inputs:
[   14.187193] snd_hda_codec_generic hdaudioC1D0:      Mic=0x19

Looks like we have the same output, also when I run cat /sys/class/sound/hwC0D0/subsystem_id My output doesnt match the vendor subsystem id, I get 0xaa0100

Tried my own edit and it looks like this: + SND_PCI_QUIRK(0xaa01, 0x0100, "HP Envy x360 15-ey0xxx", ALC287_FIXUP_CS35L41_I2C_2),

But still doesnt work

sigaloid commented 1 year ago

Personally I used + SND_PCI_QUIRK(0x103c, 0x8a31, "HP ENVY x360 2-in-1 Laptop 15-ey0xxx", ALC287_FIXUP_CS35L41_I2C_2), from this patch but that doesn't work for me either.

diamondarrow67 commented 1 year ago

Also tried that one but still no luck

davej23 commented 1 year ago

Hi @diamondarrow67 @sigaloid , did either of you figure this out? I am also having the same issue getting HP Envy 16-h0xxx working with Fedora.

The output from cat /sys/class/sound/hwC0D0/subsystem_id is 0x103c8a2c and I have done the same steps that @sigaloid mentioned above, both with + SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16-h0xxx", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), and with + SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16-h0xxx", ALC287_FIXUP_CS35L41_I2C_2),

and I am still not getting sound and this is the output of sudo dmesg | grep cs35l41-hda

[    5.878010] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.0: Cirrus Logic CS35L41 (35a40), Revision: B2
[    5.878973] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: Reset line busy, assuming shared reset
[    5.948261] cs35l41-hda i2c-CSC3551:00-cs35l41-hda.1: Cirrus Logic CS35L41 (35a40), Revision: B2

Also tried HP ENVY Laptop 16-h0xxx as that is the hardware name in dmidecode but no luck.

sigaloid commented 1 year ago

Nope, still not working :upside_down_face: It's quite frustrating that it's been a year now. It's technically on HP to expose these parameters on the BIOS, and the Windows drivers just hack around it. :/ I wish Linux would too though!

xoocoon commented 1 year ago

The current version of setup_snd-hda-codec-realtek.sh has the parameters --auto and --quirk. You might want to test it for your machine (see README.md). Also, there are conditional blocks handling OS-specific commands. You might want to add those for Fedora and submit a pull request. This at least will allow for some fiddling with quirks and other parameters.