Skip to content
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

No Sound on Lenovo Yoga Tablet 2-851F (Intel bay-trail) with WM510205 - ArchLinux Kernel 6.2.13 #4420

Closed
scragnoth opened this issue Jun 7, 2023 · 10 comments

Comments

@scragnoth
Copy link

scragnoth commented Jun 7, 2023

I'm referring to #2485

Running Linux, I never got sound working on this tablet, I tried with Lubuntu in late 2020 and mid 2021, then I didn't try it for a while.

Since April I tried to install ArchLinux after I found the above mentioned issue. Not that easy since I had no prior experience with it, but after multiple attempts it finally worked and I got a boot-able installation.

One thing I observed is that the tablet won't turn off or restart right away when I tell it to. It occurs on ArchLinux live installation media, my installed ArchLinux and the live media of Manjaro (which I tried to install in between after I had no luck with Arch, but their graphical installer is too bloated for that little tablet).

[ 1027.211215] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 1027.216215] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator

Those two messages repeat each other indefinitely after all the system processes have been terminated, the numbers in front of them are increasing with each repeat. I have to hold down the power button for several seconds to turn the tablet off.

I have the feeling that I can't get sound to work if these messages are there.

I installed from the archlinux-2023.05.03-x86_64.iso which contains the Kernel version 6.2.13. I installed all recommended packages I read about in similar threads (where a sole dummy output was the issue) as well as the lxqt desktop and some other things like sudo.

I asked about my problem on the ArchLinux forums as well, but I think that here there more likely will be someone who could help me.

https://bbs.archlinux.org/viewtopic.php?id=286271

@plbossart
Copy link
Member

I only have a vague memory that @jwrdegoede and I fork-lifted the Android code and adapted it for upstream. This was 2 years ago, I have zero bandwidth to revisit this, sorry.

@jwrdegoede
Copy link

Those repeated messages means that the driver asking for those regulators keep trying to bind to the device only to fail later on with -EPROBE_DEFER which leads to the binding being repeated later.

As @plbossart mentioned I did add support for sound on the Yoga Tablet 2-851F / Tablet 2-1051L a while ago, so this should work and I think that the problem is that the arch kernel simply does not have one of the required modules enabled in its kernel configuration.

The following options all need to be enabled:

CONFIG_PMIC_OPREGION=y
CONFIG_BYTCRC_PMIC_OPREGION=y
CONFIG_INTEL_SOC_PMIC=y
CONFIG_PWM_CRC=y
CONFIG_GPIO_CRYSTAL_COVE=y
CONFIG_GPIO_ARIZONA=m
CONFIG_MFD_ARIZONA=m
CONFIG_MFD_ARIZONA_SPI=m
CONFIG_MFD_WM5102=y
CONFIG_REGULATOR_ARIZONA_LDO1=m
CONFIG_REGULATOR_ARIZONA_MICSUPP=m
CONFIG_SND_SOC_ARIZONA=m
CONFIG_SND_SOC_WM5102=m
CONFIG_SND_SOC_INTEL_BYTCR_WM5102_MACH=m

I just checked on my own Yoga Tablet 2-851F with Fedora installed with kernel 6.3.0-rc7 and sound does work there. Here is the lsmod under Fedora:

Module                  Size  Used by
rfcomm                 98304  4
snd_seq_dummy          16384  0
snd_hrtimer            16384  1
qrtr                   53248  4
bnep                   32768  2
snd_soc_wm5102       1470464  1
snd_soc_arizona        98304  1 snd_soc_wm5102
snd_soc_sst_bytcr_wm5102    20480  5
gpio_arizona           16384  2
arizona_micsupp        16384  2
snd_soc_wm_adsp        45056  1 snd_soc_wm5102
gpio_keys              24576  0
cs_dsp                 65536  1 snd_soc_wm_adsp
brcmfmac_wcc           16384  0
intel_rapl_msr         20480  0
mei_pxp                20480  0
pn544_mei              16384  0
mei_phy                20480  1 pn544_mei
pn544                  28672  1 pn544_mei
hci                    61440  2 mei_phy,pn544
nfc                   155648  2 pn544,hci
mei_hdcp               28672  0
iTCO_wdt               16384  0
intel_soc_dts_thermal    20480  0
intel_soc_dts_iosf     20480  1 intel_soc_dts_thermal
intel_pmc_bxt          16384  1 iTCO_wdt
intel_powerclamp       16384  0
coretemp               20480  0
iTCO_vendor_support    16384  1 iTCO_wdt
brcmfmac              421888  1 brcmfmac_wcc
kvm_intel             438272  0
snd_sof_acpi_intel_byt    20480  0
brcmutil               20480  1 brcmfmac
kvm                  1277952  1 kvm_intel
snd_sof_acpi           20480  1 snd_sof_acpi_intel_byt
snd_sof_intel_atom     20480  1 snd_sof_acpi_intel_byt
snd_sof_xtensa_dsp     16384  1 snd_sof_acpi_intel_byt
snd_sof               323584  3 snd_sof_intel_atom,snd_sof_acpi,snd_sof_acpi_intel_byt
cfg80211             1253376  1 brcmfmac
irqbypass              16384  1 kvm
snd_sof_utils          20480  1 snd_sof
intel_cstate           20480  0
snd_intel_sst_acpi     20480  1
snd_soc_acpi_intel_match    65536  2 snd_sof_acpi_intel_byt,snd_intel_sst_acpi
snd_intel_sst_core     73728  1 snd_intel_sst_acpi
pcspkr                 16384  0
snd_soc_sst_atom_hifi2_platform   122880  2 snd_intel_sst_core
joydev                 28672  0
intel_bytcrc_pwrsrc    16384  0
snd_hdmi_lpe_audio     36864  2
snd_soc_acpi           16384  3 snd_sof_intel_atom,snd_soc_acpi_intel_match,snd_intel_sst_acpi
snd_intel_dspcfg       36864  3 snd_sof,snd_sof_acpi_intel_byt,snd_intel_sst_acpi
hci_uart              184320  0
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
btqca                  28672  1 hci_uart
btrtl                  28672  1 hci_uart
snd_soc_core          393216  7 snd_soc_sst_bytcr_wm5102,snd_soc_wm_adsp,snd_sof,snd_soc_wm5102,snd_soc_arizona,snd_soc_sst_atom_hifi2_platform,arizona_micsupp
btbcm                  24576  1 hci_uart
int3401_thermal        16384  0
processor_thermal_device    24576  1 int3401_thermal
btintel                53248  1 hci_uart
processor_thermal_rfim    20480  1 processor_thermal_device
processor_thermal_mbox    16384  2 processor_thermal_rfim,processor_thermal_device
snd_compress           32768  2 snd_soc_wm_adsp,snd_soc_core
ac97_bus               16384  1 snd_soc_core
soc_button_array       24576  0
dptf_power             16384  0
arizona_spi            16384  0
processor_thermal_rapl    20480  1 processor_thermal_device
int3406_thermal        16384  0
snd_pcm_dmaengine      20480  1 snd_soc_core
bluetooth            1003520  36 btrtl,btqca,btintel,hci_uart,btbcm,bnep,rfcomm
arizona_ldo1           16384  1
intel_rapl_common      32768  2 intel_rapl_msr,processor_thermal_rapl
int3403_thermal        20480  0
st_lsm9ds0_i2c         16384  0
snd_seq               102400  7 snd_seq_dummy
int3400_thermal        20480  0
st_lsm9ds0             16384  1 st_lsm9ds0_i2c
st_magn                20480  1 st_lsm9ds0
arizona                57344  3 arizona_spi,snd_soc_wm5102,snd_soc_arizona
acpi_thermal_rel       16384  1 int3400_thermal
int340x_thermal_zone    20480  2 int3403_thermal,processor_thermal_device
snd_seq_device         16384  1 snd_seq
st_accel               28672  1 st_lsm9ds0
regmap_spi             16384  1 arizona_spi
intel_int0002_vgpio    16384  1
snd_pcm               176128  9 snd_soc_sst_bytcr_wm5102,snd_sof,snd_compress,snd_hdmi_lpe_audio,snd_soc_arizona,snd_soc_sst_atom_hifi2_platform,snd_soc_core,snd_sof_utils,snd_pcm_dmaengine
acpi_pad              184320  0
st_sensors             32768  3 st_lsm9ds0_i2c,st_magn,st_accel
industrialio_triggered_buffer    16384  2 st_magn,st_accel
kfifo_buf              16384  1 industrialio_triggered_buffer
mei_txe                32768  3
al3320a                16384  0
industrialio          122880  7 industrialio_triggered_buffer,st_sensors,st_lsm9ds0,al3320a,kfifo_buf,st_magn,st_accel
spi_pxa2xx_platform    36864  0
snd_timer              53248  3 snd_seq,snd_hrtimer,snd_pcm
rfkill_gpio            16384  0
snd                   143360  27 snd_seq,snd_seq_device,snd_soc_wm_adsp,snd_sof,snd_timer,snd_compress,snd_hdmi_lpe_audio,snd_soc_arizona,snd_soc_sst_atom_hifi2_platform,snd_soc_core,snd_pcm
ecdh_generic           16384  2 bluetooth
rfkill                 40960  10 nfc,rfkill_gpio,bluetooth,cfg80211
mei                   176128  8 mei_hdcp,mei_pxp,mei_phy,pn544_mei,mei_txe
lpc_ich                28672  0
soundcore              16384  1 snd
dw_dmac                16384  4
vfat                   24576  1
fat                    94208  1 vfat
zram                   32768  2
i915                 3276800  3
i2c_algo_bit           16384  1 i915
drm_buddy              20480  1 i915
drm_display_helper    196608  1 i915
crct10dif_pclmul       16384  1
cec                    77824  2 drm_display_helper,i915
video                  69632  2 int3406_thermal,i915
crc32_pclmul           16384  0
crc32c_intel           24576  2
hid_multitouch         32768  0
mmc_block              61440  2
ghash_clmulni_intel    16384  0
sha512_ssse3           49152  1
ttm                    98304  1 i915
sdhci_acpi             28672  0
wmi                    32768  1 video
sdhci                  81920  1 sdhci_acpi
i2c_hid_acpi           16384  0
i2c_hid                36864  1 i2c_hid_acpi
mmc_core              233472  4 sdhci,mmc_block,brcmfmac,sdhci_acpi
pwm_lpss_platform      16384  0
pwm_lpss               16384  1 pwm_lpss_platform
i2c_dev                28672  0
ipmi_devintf           20480  0
ipmi_msghandler        86016  1 ipmi_devintf
fuse                  204800  3

You can use this to see if you are missing any kernel modules. Note some modules may be built-in in Arch while they are a module in Fedora or the other way around.

@jwrdegoede
Copy link

You can also write Fedora workstation x86_64 live to a USB, boot from that and check that sound does work there.

@scragnoth
Copy link
Author

Thank you, I have no experience with that, but I will try it. Is that arch wiki entry a good start?

https://wiki.archlinux.org/title/Kernel_module

I don't know if the fedora image will boot right away because of that quirk of the bay-trail architecture (32 bit EFI bootloader, 64 bit architecture). Most 64-bit linux images won't have the necessary 32-bit bootloader. I only got that manjaro image to boot by putting it through a script from the linuxium project, that script was only designed for ubuntu derivates and some others but it still worked with manjaro by excluding the compatibility check with an option. Before that I tried to follow a guide which asked to install any 32-bit linux distribution first and then adding the 64-bit manjaro image as a new menu entry to boot it from there. But it seems that my particular tablet won't see the USB media when I try this.

@jwrdegoede
Copy link

Thank you, I have no experience with that, but I will try it. Is that arch wiki entry a good start?

https://wiki.archlinux.org/title/Kernel_module

That seems to mostly be about building out of tree kernel modules. The problem here is about some kernel modules which are in tree (part of the standard kernel) not being enabled. Please ask for help with this on the Arch forums.

I don't know if the fedora image will boot right away because of that quirk of the bay-trail architecture (32 bit EFI bootloader, 64 bit architecture). Most 64-bit linux images won't have the necessary 32-bit bootloader. I only got that manjaro image to boot by putting it through a script from the linuxium project, that script was only designed for ubuntu derivates and some others but it still worked with manjaro by excluding the compatibility check with an option. Before that I tried to follow a guide which asked to install any 32-bit linux distribution first and then adding the 64-bit manjaro image as a new menu entry to boot it from there. But it seems that my particular tablet won't see the USB media when I try this.

Fedora 64 bit livecds include 32 bit EFI shim and grub binaries so they should boot without issues on x86_64 machines with a 32 bit UEFI.

@scragnoth
Copy link
Author

scragnoth commented Jun 15, 2023

You can also write Fedora workstation x86_64 live to a USB, boot from that and check that sound does work there.

Fedora 64 bit livecds include 32 bit EFI shim and grub binaries so they should boot without issues on x86_64 machines with a 32 bit UEFI.

I just tried it, getting Dummy Output there as well. Out of curiosity I tried to install the "sof-firmware" package, but the terminal ran out of memory without installing it (or showing me if it is already installed).

And currently my arch installation is bricked, I ran a "pacman -Syu" command and rebooted, Now, I get the emergency shell where I can't use my keyboard, the main error message says

ERROR: device 'UUID=' not found. Skipping fsck.,

I tried to fix it but no luck.

My

mkinitcpio -p linux

(which I tried when I booted an Arch installation medium, mounted my filesystems and arch-chrooted into my root partition - as it was suggested to make the system boot again)

gives maybe another clue ... about my issue with the WM510205, since one line reads:

sort: cannot read: '/sys/devices/LNXSYSTM:00/LNXSYBUS:00/80860F0E:00/WM510205:00/wakeup/wakeup36/uevent': no such file or directory
modprobe: ERROR: missing parameters. See -h.

Which I didn't do, because I just discovered that line in the photo I've taken, after I had turned the tablet off already (since I was curious if my non-booting issue had been solved).

Edit Jun-16-23: I've got ArchLinux running again now, I mounted my partitions in the wrong order (first the boot, then the root partition, it has to be the other way around), that's why my repair attempt wasn't successful.

I saved the output of "journalctl -b" to a text file which I will analyze later. The output seems to be infiniely long tho, since those messages

[ 1027.211215] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator [ 1027.216215] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator

also appear there again and again.

@scragnoth
Copy link
Author

scragnoth commented Jun 18, 2023

I compared your @jwrdegoede lsmod with mine and put 31 modules my lsmod was missing into

/etc/modules-load.d/arizona.conf (to load them on each boot)

I rebooted and most of them showed up, but

intel_bytcrc_pwrsrc
regmap_spi

didn't show up. I also have some modules loaded which aren't in your lsmod. Maybe I have to unload / blacklist some if they're conflicting, but I want to get all modules loaded first, maybe it will work then already.

I asked on ArchLinux forums how to edit the kernel configuration to enable the options you listed above.

@scragnoth
Copy link
Author

Sorry for triple-post, but it works now. I had to additionally load gpio-crystalcove as told here:

https://bbs.archlinux.org/viewtopic.php?pid=2105645#p2105645

@scragnoth
Copy link
Author

scragnoth commented Jun 25, 2023

Quadruple-post, sorry for that, but I spoke too soon since I'm only able to get sound from the speakers (the headphone jack doesn't work). Here's the strange behavior I observed:

I plugged in a headset first (with a 4-pole plug). PulseAudio ignores that headphones are present (keeps speakers active, headphones can be chosen manually but that output has "unplugged" written behind it, changing to that gives me no sound). Some faint, weird noises come from the headphones as well.

But the internal microphone from the headset is recognized, PulseAudio automatically switches to that input. I still can manually revert back to the internal mic, and the input also changes the wording "plugged in" and "unplugged" corresponding to my physical actions.

I plugged a 3-pole-plug in just now, it isn't recognized as well. I had the slight hope that microphone detection might claim the full awareness, rendering the "rest" unseen ...

Do you have a quick clue why that is, and what I can do, @jwrdegoede ?

I got into a bit more detail about what I already tried on ArchLinux forums:

https://bbs.archlinux.org/viewtopic.php?id=286752

@jwrdegoede
Copy link

Do you have a quick clue why that is, and what I can do, @jwrdegoede ?

Sorry for being very slow with replying to this (I've been buried in other work). Lets continue this in #4491 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants