sundarnagarajan / rdp-thinbook-linux

Linux on the RDP Thinbook
Other
10 stars 19 forks source link

bytcr_rt5651 - Sound does not work - Ubuntu 18.04.3 LTS #42

Closed zecamigo closed 4 years ago

zecamigo commented 4 years ago

Hi!

As described here: https://github.com/plbossart/UCM/issues/13 I've been having issues with the internal soundcard. It worked at some point, after some trouble shooting but it didn't last long...

pulseaudio: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-bytcr_rt5651" card_name="alsa_card.platform-bytcr_rt5651" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed. 23:46:59 kernel: Audio Port: ASoC: no backend DAIs enabled for Audio Port

Any help would be appreciated...

sundarnagarajan commented 4 years ago

Thanks,

To start off, can you describe your hardware - is it some kind of laptop, and if so, it is using the Intel CherryTrail chipset? A Brand/Model number and/or a URL will work nicely

sundarnagarajan commented 4 years ago

The ISO you should try is the last Bionic Beaver ISO listed on the main gape of this repo. This is the ISO

Be cautious and do the following:

Only if all steps are OK, you should do the following:

zecamigo commented 4 years ago

Thanks,

To start off, can you describe your hardware - is it some kind of laptop, and if so, it is using the Intel CherryTrail chipset? A Brand/Model number and/or a URL will work nicely

Hope this is not overkill :) description: Notebook product: Q9 | Windows | 14-Lite (To be filled by O.E.M.) vendor: Qilive width: 64 bits capabilities: smbios-3.0 dmi-3.0 smp vsyscall32 configuration: boot=normal chassis=notebook family=To be filled by O.E.M. sku=To be filled by O.E.M. uuid=00020003-0004-0005-0006-000700080009 -core description: Motherboard product: Cherry Trail CR vendor: AMI Corporation physical id: 0 -multimedia description: Multimedia controller product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Imaging Unit vendor: Intel Corporation physical id: 3 bus info: pci@0000:00:03.0 version: 36 width: 32 bits clock: 33MHz capabilities: pm msi cap_list configuration: driver=intel_atomisp2_pm latency=0 resources: irq:255 memory:91000000-913fffff *-generic:0 description: Signal processing controller product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power

zecamigo commented 4 years ago

Will try this soon!

The ISO you should try is the last Bionic Beaver ISO listed on the main gape of this repo. This is the ISO

Be cautious and do the following:

* Download SHA256SUMS.ASC.bionic

* Run `gpg --verify SHA256SUMS.asc.bionic` - check thet the public key matches what I have listed

* Download the [ISO](https://drive.google.com/open?id=1K54zQoQ8ucor5IqYlcHQ7gl298xI4kPj&export=download)

* Run `sha256sum -s SHA256SUMS.asc.bionic 2>/dev/null | grep -i ok`

Only if all steps are OK, you should do the following:

* Write ISO to a thumb drive - I guess you know how ot do this, but if confused, there are instructions on the main page of this repo

* Boot your machine and enter BIOS / EFI and choose to boot from USB

* If there is an 'EFI USB Drivename' entry, choose that

* Choose `Try Ubuntu without installing`
sundarnagarajan commented 4 years ago

Can you confirm your CPU is an Intel Atom X5-Z8300 ? Of paste output of `lshw and output of lscpu

sundarnagarajan commented 4 years ago

Sorry - output of lshw and output of lscpu

zecamigo commented 4 years ago

Here it goes. Spoiler alert: Intel(R) Atom(TM) x5-Z8350 CPU @ 1.44GHz

description: Notebook product: Q9 | Windows | 14-Lite (To be filled by O.E.M.) vendor: Qilive version: To be filled by O.E.M. serial: To be filled by O.E.M. width: 64 bits capabilities: smbios-3.0 dmi-3.0 smp vsyscall32 configuration: boot=normal chassis=notebook family=To be filled by O.E.M. sku=To be filled by O.E.M. uuid=00020003-0004-0005-0006-000700080009 -core description: Motherboard product: Cherry Trail CR vendor: AMI Corporation physical id: 0 version: To be filled by O.E.M. serial: To be filled by O.E.M. slot: To be filled by O.E.M. -firmware description: BIOS physical id: 0 version: YHSM-14-BI-Y116CR600-C34A-014-B date: 12/20/2017 size: 64KiB capacity: 4032KiB capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int14serial int17printer acpi usb biosbootspecification uefi -memory description: System Memory physical id: 28 slot: System board or motherboard size: 2GiB capabilities: ecc configuration: errordetection=multi-bit-ecc -bank:0 description: DIMM DDR3 1066 MHz (0,9 ns) product: 00000000 vendor: Hynix Semiconductor physical id: 0 serial: 00000000 slot: A1_DIMM0 size: 2GiB width: 8 bits clock: 1066MHz (0.9ns) -bank:1 description: DIMM [empty] product: 00000000 vendor: Hynix Semiconductor physical id: 1 serial: 00000000 slot: A1_DIMM1 -cache:0 description: L1 cache physical id: 32 slot: CPU Internal L1 size: 224KiB capacity: 224KiB capabilities: internal write-back configuration: level=1 -cache:1 description: L2 cache physical id: 33 slot: CPU Internal L2 size: 2MiB capacity: 2MiB capabilities: internal write-back unified configuration: level=2 -cpu description: CPU product: Intel(R) Atom(TM) x5-Z8350 CPU @ 1.44GHz vendor: Intel Corp. physical id: 34 bus info: cpu@0 version: Intel(R) Atom(TM) x5-Z8350 CPU @ 1.44GHz slot: SOCKET 0 size: 547MHz capacity: 2400MHz width: 64 bits clock: 80MHz capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch epb pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm ida arat md_clear cpufreq configuration: cores=4 enabledcores=4 threads=4 -pci description: Host bridge product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register vendor: Intel Corporation physical id: 100 bus info: pci@0000:00:00.0 version: 36 width: 32 bits clock: 33MHz configuration: driver=iosf_mbi_pci resources: irq:0 -display description: VGA compatible controller product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 36 width: 64 bits clock: 33MHz capabilities: pm msi vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:166 memory:90000000-90ffffff memory:80000000-8fffffff ioport:f000(size=64) memory:c0000-dffff -multimedia description: Multimedia controller product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Imaging Unit vendor: Intel Corporation physical id: 3 bus info: pci@0000:00:03.0 version: 36 width: 32 bits clock: 33MHz capabilities: pm msi cap_list configuration: driver=intel_atomisp2_pm latency=0 resources: irq:255 memory:91000000-913fffff -generic:0 description: Signal processing controller product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller vendor: Intel Corporation physical id: b bus info: pci@0000:00:0b.0 version: 36 width: 64 bits clock: 33MHz capabilities: msi pm cap_list configuration: driver=proc_thermal latency=0 resources: irq:164 memory:9183b000-9183bfff -usb description: USB controller product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller vendor: Intel Corporation physical id: 14 bus info: pci@0000:00:14.0 version: 36 width: 64 bits clock: 33MHz capabilities: pm msi xhci bus_master cap_list configuration: driver=xhci_hcd latency=0 resources: irq:117 memory:91800000-9180ffff -usbhost:0 product: xHCI Host Controller vendor: Linux 5.3.0-26-generic xhci-hcd physical id: 0 bus info: usb@1 logical name: usb1 version: 5.03 capabilities: usb-2.00 configuration: driver=hub slots=7 speed=480Mbit/s -usb:0 description: Mouse product: Usb Mouse vendor: SIGMACHIP physical id: 1 bus info: usb@1:1 version: 1.10 capabilities: usb-1.10 configuration: driver=usbhid maxpower=100mA speed=1Mbit/s -usb:1 description: Keyboard product: USB KEYBOARD vendor: HAILUCK CO.,LTD physical id: 2 bus info: usb@1:2 version: 1.00 capabilities: usb-1.10 configuration: driver=usbhid maxpower=100mA speed=1Mbit/s -usb:2 description: Video product: USB 2.0 WebCamera vendor: Alcor Micro, Corp. physical id: 4 bus info: usb@1:4 version: 0.05 capabilities: usb-2.00 configuration: driver=uvcvideo maxpower=200mA speed=480Mbit/s -usbhost:1 product: xHCI Host Controller vendor: Linux 5.3.0-26-generic xhci-hcd physical id: 1 bus info: usb@2 logical name: usb2 version: 5.03 capabilities: usb-3.00 configuration: driver=hub slots=6 speed=5000Mbit/s -generic:1 description: Encryption controller product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine vendor: Intel Corporation physical id: 1a bus info: pci@0000:00:1a.0 version: 36 width: 32 bits clock: 33MHz capabilities: pm msi bus_master cap_list configuration: driver=mei_txe latency=0 resources: irq:163 memory:91700000-917fffff memory:91600000-916fffff -isa description: ISA bridge product: Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU vendor: Intel Corporation physical id: 1f bus info: pci@0000:00:1f.0 version: 36 width: 32 bits clock: 33MHz capabilities: isa bus_master cap_list configuration: driver=lpc_ich latency=0 resources: irq:0 *-network description: Wireless interface physical id: 1 logical name: wlan0 serial: ac:35:ee:30:e1:3c capabilities: ethernet physical wireless configuration: broadcast=yes driver=rtl8723bs ip=192.168.1.90 multicast=yes wireless=IEEE 802.11bgn

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 76 Model name: Intel(R) Atom(TM) x5-Z8350 CPU @ 1.44GHz Stepping: 4 CPU MHz: 1124.298 CPU max MHz: 1920,0000 CPU min MHz: 480,0000 BogoMIPS: 2880.00 Virtualization: VT-x L1d cache: 24K L1i cache: 32K L2 cache: 1024K NUMA node0 CPU(s): 0-3 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch epb pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm ida arat md_clear

sundarnagarajan commented 4 years ago

That's good. Try the ISO I linked.

At the minimum you should see the following improvements:

And you can install from the ISO on to your hard disk - if you don't have anything of value on the hard disk, and you should continue to have all the above benefits.

HOWEVER, put off installing for a later point - just use the live session and try anything you want and get things to work.

zecamigo commented 4 years ago

Can't check signature, no public key...

sundarnagarajan commented 4 years ago

But the gpg --verify command output should say gpg: using RSA key F0C3CE69C8C00D1E4D8834F5DF2AC095857CADBD That is the part that is key here.

zecamigo commented 4 years ago

Hi @sundarnagarajan again some steps seem to have got me closer to the solution

Did step 4 of the tutorial https://help.ubuntu.com/community/SoundTroubleshootingProcedure

Unblacklisted HDMI

Copied UCMs from plbossart repo (the ones that originally worked) sof-bytcr-rt5651 bytcr-rt5651

aplay /usr/share/sounds/alsa/Front_Center.wav Works loud and clear!!!

But still no sound output from applications or system, just slight crackling sound every time a sound should be played.

pavucontrol GUI displays a message:

29744971-05bc07a2-8aa8-11e7-9ffa-ba57121c01cc

Is this just a matter of configuration? What should I be looking at?

sundarnagarajan commented 4 years ago

Short response - will respond in more detail later. I BELIEVE the fact that you unblacklisted HDMI is causing pulseaudio to die. There is an issue on my github repository that talks about this, and it is why I blacklist HDMI audio - please check issues on this repository.

My conclusion SEEMS to be borne out by:

Reboot, and do following:

sundarnagarajan commented 4 years ago

This is the pulseaudio issue I was talking about

sundarnagarajan commented 4 years ago

Actually this was the original pulseaudio issue and contains more details

sundarnagarajan commented 4 years ago

And this is the dicsussion referenced in issue 10

zecamigo commented 4 years ago

Hi @sundarnagarajan

Thanks for all your patience and support! It was really helpful, I was loosing hope.

So late night yesterday I tried the following, while planning to follow your instructions today:

alsamixer > choose bytcr-rt5651 as card went to sleep (nothing like a good night's sleep) (computer slept too) wake up, make breakfast wake computer

Logs errors:

10:18:13 pulseaudio: [alsa-sink-1] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

[alsa-sink-1] alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_soc_sst_bytcr_rt5651'. Please report this issue to the ALSA developers.

[alsa-sink-1] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write.

10:18:02 kernel: debugfs: File 'SSP2-Codec' in directory 'Audio Port' already present! 10:06:07 wpa_supplicant: bgscan simple: Failed to enable signal strength monitoring 10:05:57 systemd-rfkill: Failed to open device rfkill2: No such device

Fixed - sound is fully operational Ubuntu volume control settings are glitchy though. The upper right menu volume control doesn't do anything

Turn off HDMI card in pavucontrol as a precaution Reboot

Fully fixed! Go figure Feel free to ask for any additional details if useful for you or curious, or just close the issue!

Again thank you a bunch!

sundarnagarajan commented 4 years ago

Good to hear sound is working fine now.

I took a quick look at the log lines:

If Upper right menu volume is not working, it MAY be because pulseaudio DEFAULT audio sink is not the card you are using.

As of now (as of Ubuntu Bionic 18.04 or earlier), I don't know how to make HDMI sound work without crashing pulseaudio. It is supposed to be fixed in pulseaudio 12.0, but: