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

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

Closed
zecamigo opened this issue Jan 22, 2020 · 17 comments
Closed

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

zecamigo opened this issue Jan 22, 2020 · 17 comments

Comments

@zecamigo
Copy link

Hi!

As described here: plbossart/UCM#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
Copy link
Owner

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
Copy link
Owner

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
  • 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

@zecamigo
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

Can you confirm your CPU is an Intel Atom X5-Z8300 ?
Of paste output of ````lshwand output oflscpu```

@sundarnagarajan
Copy link
Owner

Sorry - output of lshw and output of lscpu

@zecamigo
Copy link
Author

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
Copy link
Owner

That's good.
Try the ISO I linked.

At the minimum you should see the following improvements:

  • All required modules should be present
  • Sound card should be detected
  • Sound MAY or MAY NOT work (may need UCM files?)
  • Headphone jack and / or switching back and forth between headset and speakers MAY NOT work - may need UCM files
  • Wifi should just work - but you probably had that working anyway
  • Bluetooth should just work

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
Copy link
Author

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

@sundarnagarajan
Copy link
Owner

  • Download the SHASUMS.asc.bionic file - assuming here that it is under ~/Downloads
  • cd ~/Downloads (where SHA256SUMS.asc.bionic was downloaded)
  • gpg --verify SHA256SUMS.asc.bionic
    It WILL say that the public key is not trusted - that is normal, since you have not marked my key as trusted and you SHOULD NOT

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

@zecamigo
Copy link
Author

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
Copy link
Owner

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:

  • aplay works
  • Connection to pulseaudio failed

Reboot, and do following:

  • Copy UCMs as you did before
  • avoid the 'unblacklisting'
  • Post your observations - in particular what pavucontrol shows

@sundarnagarajan
Copy link
Owner

This is the pulseaudio issue I was talking about

@sundarnagarajan
Copy link
Owner

Actually this was the original pulseaudio issue and contains more details

@sundarnagarajan
Copy link
Owner

And this is the dicsussion referenced in issue 10

@zecamigo
Copy link
Author

zecamigo commented Jan 25, 2020

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
Copy link
Owner

Good to hear sound is working fine now.

I took a quick look at the log lines:

  • pulseaudio and alsa-sink.c errors: I have no idea - looks like this was reported in Arch linux way back in 2013. It MAY be due to default sound sink getting set explicitly in my code when the ISO boots - in which case it is harmless. If you want to explore further, you should as the UCM folks or on the alsa mailing list
  • kernel: debugfs: File 'SSP2-Codec' in directory 'Audio Port' already present! - probably harmless debug error. Looks like it is fixed in this patch - may not have made it into mainline kernel?
  • wpa_supplicant: bgscan simple: Failed to enable signal strength monitoring: If wifi is working fine, I would not worry about it. I can see some references to this error, but nothing conclusive.
  • systemd-rfkill: Failed to open device rfkill2: No such device: If bluetooth is working fine, I would not worry about this. If bluetooth is NOT working or has intermittent problems asfet resume or after disable-enable-bluetooth cycles, open a diffferent issue

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:

  • pulseaudio 12.0 will ship with focal fossa 20.04 (not yet out)
  • I have not tried to backport pulseaudio 12.0 into bionic

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

2 participants