cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PaulVanSchayck
Paper Tape
Posts: 3
Registered: ‎10-21-2019
Location: NL
Views: 1,517
Message 71 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability


@cdcastro wrote:

Regarding the sound solution, I downloaded the sof-audio-setup-carbonx1.sh file on uibuntu 18.04 and now I have no sound. 

Upgraded to 19.10 and still have no sound (outuput, headphones, internal and external microphone).

 

http://alsa-project.org/db/?f=f0d5fb969b410358d99eea19d7b3ffa6f4fbe598

 

Can someone help me solving this problem?

 


See above, Ubuntu 19.10 does currently not have the right kernel config to run the snd_sof_intel_hda driver. A fix has been made, and will most likely be included in the Ubuntu kernel 5.3.0-20 release. I would expect that to be released any day now. Most likely the changes made by the script will magically start working. Untill then just comment the changes made in /etc/modprobe.d/blacklist.conf.

 

I did some testing with the proposed version of the 5.3.0-20 release, which already includes the fix. Got a working microphone and better sound. However, the new snd_sof_intel_hda, while supporting the DMIC microphone is still a bit rough around the egdes. It doesn't support the keyboard inidicator for the microphone, has extra surplus devices reported to pulseaudio, doesn't detect headphone plug-in events, and has wrong default sound levels for the DMIC. So, unless you really want the builtin microphone to work you're probably better off with snd_hda_intel for a while. But I've seen numerous work in progress for ALSA and SOF regarding the new driver. So I would expect things to get better the next few months with updates (or at once with 20.04).

Lenovo Employee MarkRHPearson
Lenovo Employee
Posts: 58
Registered: ‎07-22-2019
Location: CA
Views: 1,249
Message 72 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability

I put together some notes based on my experience on getting audio working with various distro's (mostly Debian).

 

Hopefully it's useful - let me know if any questions

 

Mark

willismonroe
Serial Port
Posts: 23
Registered: ‎06-22-2019
Location: CA
Views: 1,242
Message 73 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability

Thanks Mark this is a helpful guide. Quick question does this allow you to use a BT headset as well? That's been the one thing I can't get to work. Audio In/Out works fine for me with the laptop but I can't switch to a wireless headset (for audio in or out).
Lenovo Employee MarkRHPearson
Lenovo Employee
Posts: 58
Registered: ‎07-22-2019
Location: CA
Views: 1,237
Message 74 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability

Hi,

 

Yep - worked fine with my Plantronics BT600. 

 

Mark

dgillmor
Punch Card
Posts: 19
Registered: ‎05-19-2016
Location: US
Views: 1,212
Message 75 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability

Thanks for this guide.

Does anyone know when all of this will make it into Ubuntu via the normal distribution system? I generally wait for that.
PaulVanSchayck
Paper Tape
Posts: 3
Registered: ‎10-21-2019
Location: NL
Views: 1,196
Message 76 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability

The kernel changes for the microphone to work on Ubuntu are now live. You should have 5.3.0-20 or later for things to be able to start working without recompiling the kernel. You still need to manually add the ALSA-ucm files, blacklist the existing drivers and add the topology file.

 

However, as I mentioned a few posts above: this new driver is very much a moving target. For example, they are now in the process of renaming the driver. This most likely means that the latest ALSA-ucm files will now no longer work with the 5.3.0-20 kernel. I would expect a lot of these updates to make it to Ubuntu 20.04. That will come with new ALSA packages, kernel 5.4.0 atleast, etc..

 

In short: If you like fiddling, you can get the microphone to work now. But even then the experience is still suboptimal. I would expect a (near) out-of-the-box experience with Ubuntu 20.04.

dgillmor
Punch Card
Posts: 19
Registered: ‎05-19-2016
Location: US
Views: 1,192
Message 77 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability

Thanks for the details on this. I can wait a few more months. I generally use this machine with a headset in any case, and it's fine that way. I like fiddling but not that much!
ebosi
Blue Screen Again
Posts: 4
Registered: ‎09-13-2019
Location: GB
Views: 884
Message 78 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability

Thanks Mark for your effort.

However, as a layman, I have trouble making it work.

My issues are notably:

… and that — I guess it occured when I upgraded to Linux x1 5.3.9-300.fc31.x86_64 — I have no more sound input nor output on my X1C7 running Fedora 31.

Lenovo Employee MarkRHPearson
Lenovo Employee
Posts: 58
Registered: ‎07-22-2019
Location: CA
Views: 844
Message 79 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability

Hi @ebosi

 

Sounds like you've missed getting the kernel source - and how you do that depends on the distro (or of course you can just grab it from kernel.org). That should get you the scripts/kconfig folder. If you've not done it before your first step is probably to build a kernel - there are lots of guides online but it can be a bit daunting

 

For the broken link - looks like the files have moved around recently. I *think* instead you want to use:

https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/sof-hda-dsp

(based on https://github.com/alsa-project/alsa-ucm-conf/commit/d560d25481916e296387e680a2ec0833a81f68d5#diff-0...) but I've not tried it myself yet - I'll give it a go as soon as I'm able to (and I'll update the guide)

 

Thanks

Mark

 

Highlighted
tokyovigilante
Punch Card
Posts: 21
Registered: ‎07-11-2019
Location: AU
Views: 827
Message 80 of 94

Re: [Guide] X1 Carbon 7th Generation Ubuntu compatability


@MarkRHPearson

Sounds like you've missed getting the kernel source - and how you do that depends on the distro (or of course you can just grab it from kernel.org). That should get you the scripts/kconfig folder. If you've not done it before your first step is probably to build a kernel - there are lots of guides online but it can be a bit daunting

 

For the broken link - looks like the files have moved around recently. I *think* instead you want to use:

https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/sof-hda-dsp

(based on https://github.com/alsa-project/alsa-ucm-conf/commit/d560d25481916e296387e680a2ec0833a81f68d5#diff-0...) but I've not tried it myself yet - I'll give it a go as soon as I'm able to (and I'll update the guide)

  


@MarkRHPearson thanks for your work on Linux support for these laptops, much appreciated. I've been running bleeding-edge kernel, ALSA and SOF firmware combinations on my X1Y4, and can confirm a 5.4-rc7 kernel (from https://github.com/thesofproject/linux/commit/f55db62ec6a17a50cc3f82729c7aaee82dc56033), alsa-lib from master with the ucm2 UCMs, and the 1.3 signed SOF firmware and topology you've linked to previously works very well your guide. Tweeters/Bass speaker, the DMIC microphone and HDMI/DP/headphone jack sensing all working well.

 

Only remaining issue is that ALSA can control the speaker/mic mute LEDs but Pulseaudio doesn't seem to currently. I understand this is being worked on upstream.

 

For anyone interested in the tribulations, see my comments on https://github.com/thesofproject/linux/pull/1442

 

Relevant Kconfig:

 

# CONFIG_SND_SOC_SOF_ACPI is not set
CONFIG_SND_SOC_SOF=m
CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE=y
CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL=y
CONFIG_SND_SOC_SOF_INTEL_PCI=m
CONFIG_SND_SOC_SOF_INTEL_COMMON=m
# CONFIG_SND_SOC_SOF_MERRIFIELD_SUPPORT is not set
# CONFIG_SND_SOC_SOF_APOLLOLAKE_SUPPORT is not set
# CONFIG_SND_SOC_SOF_GEMINILAKE_SUPPORT is not set
CONFIG_SND_SOC_SOF_CANNONLAKE_SUPPORT=y
CONFIG_SND_SOC_SOF_CANNONLAKE=m
# CONFIG_SND_SOC_SOF_COFFEELAKE_SUPPORT is not set
# CONFIG_SND_SOC_SOF_ICELAKE_SUPPORT is not set
# CONFIG_SND_SOC_SOF_COMETLAKE_LP_SUPPORT is not set
# CONFIG_SND_SOC_SOF_COMETLAKE_H_SUPPORT is not set
# CONFIG_SND_SOC_SOF_TIGERLAKE_SUPPORT is not set
# CONFIG_SND_SOC_SOF_ELKHARTLAKE_SUPPORT is not set
# CONFIG_SND_SOC_SOF_JASPERLAKE_SUPPORT is not set
CONFIG_SND_SOC_SOF_HDA_COMMON=m
CONFIG_SND_SOC_SOF_HDA_LINK=y
CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC=y
# CONFIG_SND_SOC_SOF_HDA_ALWAYS_ENABLE_DMI_L1 is not set
CONFIG_SND_SOC_SOF_HDA_COMMON_HDMI_CODEC=y
CONFIG_SND_SOC_SOF_HDA_LINK_BASELINE=m
CONFIG_SND_SOC_SOF_HDA=m
CONFIG_SND_SOC_SOF_XTENSA=m

 

Check out current deals!


Shop current deals

Top Kudoed Authors