#!/bin/bash | |
# README You probablyl don't need this script anymore. Please read the comments below to catch up. | |
## Description | |
# Lenovo Carbon X1 Gen 7 - Audio and microphone fix - kernel 5.3+ required. | |
# The script has only been tested for Arch and OpenSuse, | |
# Original thread: https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/td-p/4489823 | |
# Prereq: Install Linux 5.3 or newer | |
# NOTE: run this script as root and at your own risk. | |
firmware_version=v1.4.1 | |
echo Copy https://github.com/thesofproject/sof/releases/download/${firmware_version}/sof-cnl-${firmware_version}.ri to /lib/firmware/intel/sof/ as sof-cnl.ri | |
mkdir -p /lib/firmware/intel/sof/ | |
curl -L https://github.com/thesofproject/sof/releases/download/${firmware_version}/sof-cnl-${firmware_version}.ri -o /lib/firmware/intel/sof/sof-cnl.ri | |
echo Copy https://github.hamidza.re/dl/sof-hda-generic.tplg to /lib/firmware/intel/sof-tplg/ as sof-hda-generic-4ch.tplg | |
mkdir -p /lib/firmware/intel/sof-tplg/ | |
curl -L https://github.hamidza.re/dl/sof-hda-generic.tplg -o /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg | |
ln -s /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg /lib/firmware/intel/sof-tplg/sof-hda-generic.tplg | |
echo creating file /etc/modprobe.d/alsa-base.conf ------ | |
cat <<EOT >> /etc/modprobe.d/alsa-base.conf | |
# autoloader aliases | |
install sound-slot-0 /sbin/modprobe snd-card-0 | |
install sound-slot-1 /sbin/modprobe snd-card-1 | |
install sound-slot-2 /sbin/modprobe snd-card-2 | |
install sound-slot-3 /sbin/modprobe snd-card-3 | |
install sound-slot-4 /sbin/modprobe snd-card-4 | |
install sound-slot-5 /sbin/modprobe snd-card-5 | |
install sound-slot-6 /sbin/modprobe snd-card-6 | |
install sound-slot-7 /sbin/modprobe snd-card-7 | |
# Cause optional modules to be loaded above generic modules | |
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; } | |
# | |
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505) | |
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; } | |
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; } | |
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; } | |
# | |
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; } | |
# Cause optional modules to be loaded above sound card driver modules | |
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; } | |
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; } | |
# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway) | |
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; } | |
# Prevent abnormal drivers from grabbing index 0 | |
options bt87x index=-2 | |
options cx88_alsa index=-2 | |
options saa7134-alsa index=-2 | |
options snd-atiixp-modem index=-2 | |
options snd-intel8x0m index=-2 | |
options snd-via82xx-modem index=-2 | |
options snd-usb-audio index=-2 | |
options snd-usb-caiaq index=-2 | |
options snd-usb-ua101 index=-2 | |
options snd-usb-us122l index=-2 | |
options snd-usb-usx2y index=-2 | |
# Ubuntu #62691, enable MPU for snd-cmipci | |
options snd-cmipci mpu_port=0x330 fm_port=0x388 | |
# Keep snd-pcsp from being loaded as first soundcard | |
options snd-pcsp index=-2 | |
# Keep snd-usb-audio from being loaded as first soundcard | |
options snd-usb-audio index=-2 | |
EOT | |
echo finished creating /etc/modprobe.d/alsa_base.conf ------ | |
echo creating file /etc/modprobe.d/blacklist.conf ------- | |
cat <<EOT >> /etc/modprobe.d/blacklist.conf | |
blacklist snd_hda_intel | |
blacklist snd_soc_skl | |
EOT | |
echo finished creating /etc/modprobe.d/blacklist.conf ------- | |
echo creating file /usr/share/alsa/ucm/sof-skl_hda_card/HiFi.conf ------- | |
mkdir -p /usr/share/alsa/ucm/sof-skl_hda_card | |
cat <<EOT >> /usr/share/alsa/ucm/sof-skl_hda_card/HiFi.conf | |
# Use case Configuration for skl-hda-card | |
SectionVerb { | |
EnableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='Master Playback Switch' on" | |
cset "name='Capture Switch' on" | |
] | |
DisableSequence [ | |
cdev "hw:sofsklhdacard" | |
] | |
} | |
SectionDevice."Headphone" { | |
Comment "Headphone" | |
EnableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='Headphone Playback Switch' on" | |
] | |
DisableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='Headphone Playback Switch' off" | |
] | |
Value { | |
PlaybackPCM "hw:sofsklhdacard,0" | |
PlaybackChannels "2" | |
JackName "sof-skl_hda_card Headphone" | |
JackType "gpio" | |
JackSwitch "12" | |
JackControl "Headphone Jack" | |
} | |
} | |
SectionDevice."Speaker" { | |
Comment "Speaker" | |
EnableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='Speaker Playback Switch' on" | |
] | |
DisableSequence [ | |
cset "name='Speaker Playback Switch' off" | |
] | |
Value { | |
PlaybackPCM "hw:sofsklhdacard,0" | |
JackHWMute "Headphone" | |
PlaybackChannels "2" | |
} | |
} | |
SectionDevice."Headset" { | |
Comment "Headset Mic" | |
ConflictingDevice [ | |
"DMIC Stereo" | |
] | |
EnableSequence [ | |
cdev "hw:sofsklhdacard" | |
] | |
DisableSequence [ | |
cdev "hw:sofsklhdacard" | |
] | |
Value { | |
CapturePCM "hw:0,0" | |
CaptureChannels "2" | |
JackControl "Mic Jack" | |
} | |
} | |
SectionDevice."Dmic" { | |
Comment "DMIC Stereo" | |
ConflictingDevice [ | |
"Headset Mic" | |
] | |
EnableSequence [ | |
cdev "hw:sofsklhdacard" | |
] | |
DisableSequence [ | |
cdev "hw:sofsklhdacard" | |
] | |
Value { | |
CapturePCM "hw:0,6" | |
CaptureChannels "2" | |
} | |
} | |
SectionDevice."HDMI1" { | |
Comment "HDMI1/DP1 Output" | |
EnableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='hif5-0 Jack Switch' on" | |
cset "name='Pin5-Port0 Mux' 1" | |
] | |
DisableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='Pin5-Port0 Mux' 0" | |
cset "name='hif5-0 Jack Switch' off" | |
] | |
Value { | |
PlaybackPCM "hw:0,3" | |
PlaybackChannels "2" | |
JackControl "HDMI/DP, pcm=11 Jack" | |
} | |
} | |
SectionDevice."HDMI2" { | |
Comment "HDMI2/DP2 Output" | |
EnableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='hif6-0 Jack Switch' on" | |
cset "name='Pin6-Port0 Mux' 2" | |
] | |
DisableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='Pin6-Port0 Mux' 0" | |
cset "name='hif6-0 Jack Switch' off" | |
] | |
Value { | |
PlaybackPCM "hw:0,4" | |
PlaybackChannels "2" | |
JackControl "HDMI/DP, pcm=12 Jack" | |
} | |
} | |
SectionDevice."HDMI3" { | |
Comment "HDMI3/DP3 Output" | |
EnableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='hif7-0 Jack Switch' on" | |
cset "name='Pin7-Port0 Mux' 3" | |
] | |
DisableSequence [ | |
cdev "hw:sofsklhdacard" | |
cset "name='Pin7-Port0 Mux' 0" | |
cset "name='hif7-0 Jack Switch' off" | |
] | |
Value { | |
PlaybackPCM "hw:0,5" | |
PlaybackChannels "2" | |
JackControl "HDMI/DP, pcm=13 Jack" | |
} | |
} | |
EOT | |
echo finished creating /usr/share/alsa/ucm/sof-skl_hda_card/HiFi.conf ------- | |
echo creating file /usr/share/alsa/ucm/sof-skl_hda_card/sof-skl_hda_card.conf ------ | |
cat <<EOT >> /usr/share/alsa/ucm/sof-skl_hda_card/sof-skl_hda_card.conf | |
SectionUseCase."HiFi" { | |
File "HiFi.conf" | |
Comment "Play HiFi quality Music" | |
} | |
EOT | |
echo finished creating /usr/share/alsa/ucm/sof-skl_hda_card/sof-skl_hda_card.conf ------- | |
echo "Reboot and run alsamixer. Use F6 to select the sound card and F4 to go to Capture, then turn all of the channels up to 100" | |
echo "If there is no sound card detected, ‘dmesg | grep sof’ can be used to see what went wrong" |
This comment has been minimized.
This comment has been minimized.
actually we might need to host that elsewhere, I wasn't hosting that and now it's not available. |
This comment has been minimized.
This comment has been minimized.
@hamidzr, I saw you changed the file link. Thank you very much. Now i have a problem :) I'm running Ubuntu 18.04 and after run your script, I've no sound at all :( Do you have some advice? |
This comment has been minimized.
This comment has been minimized.
I've only tested this on 64bit x86 Arch. Reversing the process should be simple but would have some manual work. just go through the steps in reverse? I'm only automating someone else's work on Arch. |
This comment has been minimized.
This comment has been minimized.
I've had the same issue as @cdcastro on Fedora 30 (
To revert the effect, I've found that simply deleting/commenting out |
This comment has been minimized.
This comment has been minimized.
So.. on Ubuntu 19.10, with the 5.3.0-18-generic kernel I'm getting this after following these instructions:
From reading elsewhere, I suspect that it's loading the nocodec machine driver, when it shouldn't. I don't know how to fix this. I'm starting to suspect, from reading this SOF issue, that this stock Ubuntu 19.10 is kernel missing these two kernel options:
|
This comment has been minimized.
This comment has been minimized.
Mind there is a typo here: https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#file-sof-audio-setup-carbonx1-sh-L58 Also, it should probably create the folder /usr/share/alsa/ucm/sof-skl_hda_card/ and re-running the script will append the content again to already created files which only break things. Other than that, this works well for OpenSUSE. |
This comment has been minimized.
This comment has been minimized.
Thanks for catching those. I updated the script and also added some description. |
This comment has been minimized.
This comment has been minimized.
I use the latest Arch and after running the script (and try the method in the forum back and forth several times), I notice there's no output of "dmesg | grep sof". It seems that the sof firmware is not loaded at all. I must have missed something. Do you have any idea of why this is happening? Thanks! |
This comment has been minimized.
This comment has been minimized.
I have also lost the microphone with recent updates (on Arch). I haven't had a chance to look into it yet. Let me know if you find something |
This comment has been minimized.
This comment has been minimized.
It's good to know that it's because of recent updates. I haven't found anything related yet. I'll keep you posted if I do. Thanks! |
This comment has been minimized.
This comment has been minimized.
@DesmondZhong you're aware of the dedicated thread on Lenovo's forums, right? |
This comment has been minimized.
This comment has been minimized.
@EBoisseauSierra Yes, I mainly focused on the thread you mentioned and this thread in Archlinux forum. |
This comment has been minimized.
This comment has been minimized.
I've made some fixes:
|
This comment has been minimized.
This comment has been minimized.
You may also start using release 1.4.1 firmware. |
This comment has been minimized.
This comment has been minimized.
i cannot find the intel signed one, which i don't really know if it's needed. |
This comment has been minimized.
This comment has been minimized.
@paolomainardi thanks I'll review it and add the changes in |
This comment has been minimized.
This comment has been minimized.
@paolomainardi the ones here https://github.com/thesofproject/sof/releases are signed (even if name does not say) |
This comment has been minimized.
This comment has been minimized.
thanks @hsanjuan and @paolomainardi. I added the changes and tested it on my machine both mic and speakers work.
|
This comment has been minimized.
This comment has been minimized.
does the mic work properly or does the sound recorded sound "like in slow-motion"? Also, is 4.0 / 4.1 sound detected (or only 2.0 stereo)? @hamidzr |
This comment has been minimized.
This comment has been minimized.
They work both but just bottom stereo speaker gets detected. |
This comment has been minimized.
This comment has been minimized.
Anyway just to add all the info, I’m testing it on Ubuntu 18.04 LTS with the standard 5.3 kernel. |
This comment has been minimized.
This comment has been minimized.
Thank you, the script and sound is working on Linux Mint 19.2 with kernel 5.3.0-24. |
This comment has been minimized.
This comment has been minimized.
Upgraded to 1.4.1 and everything is working fine, now is there a way to configure also the other speakers as well ? RIght now i can see just the 2 bottom ones. |
This comment has been minimized.
This comment has been minimized.
Speaker and mic works properly on 19.10 with 5.3 kernel. |
This comment has been minimized.
This comment has been minimized.
But I can see only two front speakers in the sound option. |
This comment has been minimized.
This comment has been minimized.
Thank you so much for the script. I did manually each step and I get the mic and audio working well on Linux Mint 19.2 using kernel 5.4.5 |
This comment has been minimized.
This comment has been minimized.
One thing I realized is that the keyboard LED that indicated if mic or sound are muted don't work any more. (on the F2 and F4 keys). Not a hug deal though. |
This comment has been minimized.
This comment has been minimized.
Hi, I have a x1c7 and I want to get my microphone working. I see that there is updated snippet in the comment, which one should I take? Is the first one updated? I took the last one. Was it safe to run on Debian buster? I did it and I have both microphone and speaker working, thanks!
@paolomainardi Does the version I have installed also include that bug ? @ Thanks and merry xmas! |
This comment has been minimized.
This comment has been minimized.
@kopax I have included any fixes or updates people posted here. Happy holidays |
This comment has been minimized.
This comment has been minimized.
It is safe to run on Debian buster.
…On Sun, Dec 22, 2019 at 5:23 PM Hamid Zare ***@***.***> wrote:
@kopax <https://github.com/kopax> I have included any fixes or updated
people posted here. Happy holidays
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/dd81e429dc86f4327ded7a2030e7d7d9?email_source=notifications&email_token=AAH272LJJIXBDRWOLC5DSWDQ2AHHRA5CNFSM4JBD5QU2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF6LNI#gistcomment-3118804>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH272LE65NFTLMGJWZYCJ3Q2AHHRANCNFSM4JBD5QUQ>
.
|
This comment has been minimized.
This comment has been minimized.
Thanls all for the quick reply, I confirm it is OK, is this the expected startup logs?
|
This comment has been minimized.
This comment has been minimized.
Thanks all man, it's works in Pop os 19.10 (Ubuntu 19.10). |
This comment has been minimized.
This comment has been minimized.
Running this script fixed the mic, speakers (bass and regular), and headphones on my Lenovo Carbon X1 7th (Fedora 31 5.5.0-0.rc4.git0.1.vanilla.knurd.1.fc31.x86, pulseaudio 13.0-97-gcdcb, alsa-lib-1.2.1.2-4.fc31). I had previously not gotten mic+speakers to work following the linked manual instructions some time ago. Installing the packages in this RH bug report enabled them briefly, but a subsequent regular dnf upgrade broke everything again, this time including headphones. Issue did not seem to be simply that PulseAudio reverted. Running this script restored all functionality. Thanks! |
This comment has been minimized.
This comment has been minimized.
I've followed these instructions on Ubuntu and my speakers + mic almost work. The only problem is pitch is too high. Should I adjust the sample rate somewhere? |
This comment has been minimized.
This comment has been minimized.
The script fixed my audio problems on Ubuntu 19.10. One question, the devices have very long names like "sof-skl_hda_card Speaker + Headphones". Is there a way to get the names shorter and more readable? I use an output switcher and the names are so long that all they are cut off and look the same. |
This comment has been minimized.
This comment has been minimized.
Thank you for the script. It works pretty well for my X1Y4 in Manjaro (Gnome, non-free drivers), except for one issue I am having big trouble with. Here's my issue I hope somebody can help me with: Before I executed this script the click sounds were even worse and occured also during volume changes, they got even summarized when I played several videos at the same time in YouTube for instance. I'm pretty sure I'm not the only one having this issue. |
This comment has been minimized.
This comment has been minimized.
The script works out of the box for For posterity, here's the script I used: #!/bin/bash
## Description
# Lenovo Carbon X1 Gen 7 - Audio and microphone fix - kernel 5.3+ required.
# The script has only been tested for Arch and OpenSuse,
# Original thread: https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/td-p/4489823
# Prereq: Install Linux 5.3 or newer
# NOTE: run this script as root and at your own risk.
firmware_version=v1.4.1
echo Copy https://github.com/thesofproject/sof/releases/download/${firmware_version}/sof-cnl-${firmware_version}.ri to /lib/firmware/intel/sof/ as sof-cnl.ri
mkdir -p /lib/firmware/intel/sof/
curl -L https://github.com/thesofproject/sof/releases/download/${firmware_version}/sof-cnl-${firmware_version}.ri -o /lib/firmware/intel/sof/sof-cnl.ri
echo Copy https://github.hamidzare.xyz/dl/sof-hda-generic.tplg to /lib/firmware/intel/sof-tplg/ as sof-hda-generic-4ch.tplg
mkdir -p /lib/firmware/intel/sof-tplg/
curl -L https://github.hamidzare.xyz/dl/sof-hda-generic.tplg -o /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg
ln -s /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg /lib/firmware/intel/sof-tplg/sof-hda-generic.tplg
echo creating file /etc/modprobe.d/alsa-base.conf ------
cat <<EOT >> /etc/modprobe.d/alsa-base.conf
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }
# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from being loaded as first soundcard
options snd-usb-audio index=-2
EOT
echo finished creating /etc/modprobe.d/alsa_base.conf ------
echo creating file /etc/modprobe.d/blacklist.conf -------
cat <<EOT >> /etc/modprobe.d/blacklist.conf
blacklist snd_hda_intel
blacklist snd_soc_skl
EOT
echo finished creating /etc/modprobe.d/blacklist.conf -------
echo creating file /usr/share/alsa/ucm/sof-skl_hda_card/HiFi.conf -------
mkdir -p /usr/share/alsa/ucm/sof-skl_hda_card
cat <<EOT >> /usr/share/alsa/ucm/sof-skl_hda_card/HiFi.conf
# Use case Configuration for skl-hda-card
SectionVerb {
EnableSequence [
cdev "hw:sofsklhdacard"
cset "name='Master Playback Switch' on"
cset "name='Capture Switch' on"
]
DisableSequence [
cdev "hw:sofsklhdacard"
]
}
SectionDevice."Headphone" {
Comment "Headphone"
EnableSequence [
cdev "hw:sofsklhdacard"
cset "name='Headphone Playback Switch' on"
]
DisableSequence [
cdev "hw:sofsklhdacard"
cset "name='Headphone Playback Switch' off"
]
Value {
PlaybackPCM "hw:sofsklhdacard,0"
PlaybackChannels "2"
JackName "sof-skl_hda_card Headphone"
JackType "gpio"
JackSwitch "12"
JackControl "Headphone Jack"
}
}
SectionDevice."Speaker" {
Comment "Speaker"
EnableSequence [
cdev "hw:sofsklhdacard"
cset "name='Speaker Playback Switch' on"
]
DisableSequence [
cset "name='Speaker Playback Switch' off"
]
Value {
PlaybackPCM "hw:sofsklhdacard,0"
JackHWMute "Headphone"
PlaybackChannels "2"
}
}
SectionDevice."Headset" {
Comment "Headset Mic"
ConflictingDevice [
"DMIC Stereo"
]
EnableSequence [
cdev "hw:sofsklhdacard"
]
DisableSequence [
cdev "hw:sofsklhdacard"
]
Value {
CapturePCM "hw:0,0"
CaptureChannels "2"
JackControl "Mic Jack"
}
}
SectionDevice."Dmic" {
Comment "DMIC Stereo"
ConflictingDevice [
"Headset Mic"
]
EnableSequence [
cdev "hw:sofsklhdacard"
]
DisableSequence [
cdev "hw:sofsklhdacard"
]
Value {
CapturePCM "hw:0,6"
CaptureChannels "2"
}
}
SectionDevice."HDMI1" {
Comment "HDMI1/DP1 Output"
EnableSequence [
cdev "hw:sofsklhdacard"
cset "name='hif5-0 Jack Switch' on"
cset "name='Pin5-Port0 Mux' 1"
]
DisableSequence [
cdev "hw:sofsklhdacard"
cset "name='Pin5-Port0 Mux' 0"
cset "name='hif5-0 Jack Switch' off"
]
Value {
PlaybackPCM "hw:0,3"
PlaybackChannels "2"
JackControl "HDMI/DP, pcm=11 Jack"
}
}
SectionDevice."HDMI2" {
Comment "HDMI2/DP2 Output"
EnableSequence [
cdev "hw:sofsklhdacard"
cset "name='hif6-0 Jack Switch' on"
cset "name='Pin6-Port0 Mux' 2"
]
DisableSequence [
cdev "hw:sofsklhdacard"
cset "name='Pin6-Port0 Mux' 0"
cset "name='hif6-0 Jack Switch' off"
]
Value {
PlaybackPCM "hw:0,4"
PlaybackChannels "2"
JackControl "HDMI/DP, pcm=12 Jack"
}
}
SectionDevice."HDMI3" {
Comment "HDMI3/DP3 Output"
EnableSequence [
cdev "hw:sofsklhdacard"
cset "name='hif7-0 Jack Switch' on"
cset "name='Pin7-Port0 Mux' 3"
]
DisableSequence [
cdev "hw:sofsklhdacard"
cset "name='Pin7-Port0 Mux' 0"
cset "name='hif7-0 Jack Switch' off"
]
Value {
PlaybackPCM "hw:0,5"
PlaybackChannels "2"
JackControl "HDMI/DP, pcm=13 Jack"
}
}
EOT
echo finished creating /usr/share/alsa/ucm/sof-skl_hda_card/HiFi.conf -------
echo creating file /usr/share/alsa/ucm/sof-skl_hda_card/sof-skl_hda_card.conf ------
cat <<EOT >> /usr/share/alsa/ucm/sof-skl_hda_card/sof-skl_hda_card.conf
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Play HiFi quality Music"
}
EOT
echo finished creating /usr/share/alsa/ucm/sof-skl_hda_card/sof-skl_hda_card.conf -------
echo "Reboot and run alsamixer. Use F6 to select the sound card and F4 to go to Capture, then turn all of the channels up to 100"
echo "If there is no sound card detected, ‘dmesg | grep sof’ can be used to see what went wrong" |
This comment has been minimized.
This comment has been minimized.
Thank you! This script is working. I am using Ubuntu 19.10 with kernel But after rebooting, I have to switch output device to Speaker Cannon Point-LP High Definition Audio Controller. (after reboot, default is HDMI3/DP3 Output) |
This comment has been minimized.
This comment has been minimized.
Same for me, always when i disconnect via Bluetooth "HDMI3/DP4 Output" it was selected and i have to change manually to speaks output. Also my microphone sound is too low.. My computer: Lenovo Carbon x1 Gen 7, i7 u10710 |
This comment has been minimized.
This comment has been minimized.
Thank you. This has been a major drawback of an otherwise awesome notebook.
|
This comment has been minimized.
This comment has been minimized.
Does anyone have all 4 audio channels working? On my system (Ubuntu 19.10) the script only enables the bottom two speakers and not the top ones (near the hinges). |
This comment has been minimized.
This comment has been minimized.
Thanks for reminding, rwlove. I did forget to mention that, in addition to the issues above, I only get two speakers working. |
This comment has been minimized.
This comment has been minimized.
hey all, FYI:
|
This comment has been minimized.
This comment has been minimized.
Working great on Manjaro (5.4.6). Thanks @hamidzr! |
This comment has been minimized.
This comment has been minimized.
Just tried this on a fresh Manjaro (5.4.12) install configured with Architect and now no soundcard detected |
This comment has been minimized.
This comment has been minimized.
To reverse the effect you can probably just remove the two lines that the script adds from |
This comment has been minimized.
This comment has been minimized.
I agree, just did the manjaro update today and now the sound card is not recognized anymore. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Reverting to kernel 5.4.6 fixed the issue :
The latest 5.4.12 introduce an incompatibility with the sof driver I guess. |
This comment has been minimized.
This comment has been minimized.
Thank you! I used this script to fix my issue too. |
This comment has been minimized.
This comment has been minimized.
Kernel 5.5 on Arch is working fine for the record. |
This comment has been minimized.
This comment has been minimized.
@zaggash do you mean with or without this patch ? |
This comment has been minimized.
This comment has been minimized.
Kernel 5.5 with the patch |
This comment has been minimized.
This comment has been minimized.
I got these annoying click/pop sounds fixed ! :-) I created a script in /usr/local/bin/clicksoundfix.sh sudo chmod +x /usr/local/bin/clicksoundfix.sh then, to make it persistent after reboots, and to make it persistent after sleep mode ln -s /usr/local/bin/clicksoundfix.sh /lib/systemd/system-sleep/ Source: |
This comment has been minimized.
This comment has been minimized.
Am I the only one with X1C7 that experience bad quality sound. |
This comment has been minimized.
This comment has been minimized.
Same here. |
This comment has been minimized.
This comment has been minimized.
Try setting your speaker to 2.0 or 4.0 sound. Also try to change the volume of the rear speakers. You can do that for example in pavucontrol |
This comment has been minimized.
This comment has been minimized.
I actually already tried the following changes: In /usr/share/alsa/ucm/sof-skl_hda_card/HiFi.conf
Tried to change Using |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@yunjae2 $ sudo cp -f /usr/share/alsa/ucm2/sof-hda-dsp/HiFi.conf /usr/share/alsa/ucm/sof-skl_hda_card/HiFi.conf reboot |
This comment has been minimized.
This comment has been minimized.
Note that if you have Alsa 1.2.1, you should be able to download everything needed from ftp://ftp.alsa-project.org/pub/misc/sof/ which contains both the firmwares, the UCM files and the topology files. I didn't test it yet myself. |
This comment has been minimized.
This comment has been minimized.
The thing is with arch you can download this through pacman.
But doing so, alsa is starting correctly but pulseaudio failed to find the ucm config for some reason and do not load. |
This comment has been minimized.
This comment has been minimized.
@zaggash Is there any quick way to check if the sof-firmware and alsa-ucm-conf are installed on Ubuntu? |
This comment has been minimized.
This comment has been minimized.
On ubuntu I think the UCM files are installed as part of alsa-lib through the libasound2-data dependency. Interesting update is https://www.alsa-project.org/wiki/Detailed_changes_v1.1.9_v1.2.1#Changelog_between_1.0.29_and_1.2.1_releases_2
But I do not know why when installed, the ucm2 files are not found by pulseaudio. Here is the issue I ran into if someone is passing by and have an idea, I take it:
The sof driver 1.4.1 is loaded and detected but I have no sound because of the issue above, just the dummy output ! |
This comment has been minimized.
This comment has been minimized.
Fedora 31, sound & mic were working after applying this script, but updating to kernel 5.6 just broke both. Switching back to 5.5 (5.5.0-0.rc6.git1.1.vanilla.knurd.1.fc31.x86_64) returned sound & mic. |
This comment has been minimized.
This comment has been minimized.
@zaggash @yunjae2 I am also having the same terrible sound quality on my x1 carbon gen 7. After running this script on linux 5.5 with manjaro, I at least have sound when I didn't before. Looking in alsamixer, it seems the bass is entirely undetected: Perhaps relatedly, I am only able to see "Front Left" and "Front Right" and there is no option to switch to 4 channels, which did fully work on previous kernels without this patch. Here's my dmesg if interesting: https://pastebin.com/zWKRGFYS The microphone works quite well, however. |
This comment has been minimized.
This comment has been minimized.
I also have the exact same issue on my Thinkpad X1 Carbon 7th gen. It's been a huge headache... |
This comment has been minimized.
This comment has been minimized.
Thanks for the information, I have no deep understanding in audio things. |
This comment has been minimized.
This comment has been minimized.
Things are in flux at ALSA to move from ucm to ucm2. At Ubuntu they are working on a backwards compatible fix for bionic en eoan for this reasons. The bug report also lists that for 20.04 they are planning to use ucm2 and alsa-lib-1.2.1. They also give this alternative location for the UCM1 files: https://github.com/thesofproject/alsa-ucm-conf |
This comment has been minimized.
This comment has been minimized.
I'm on Ubuntu 19.10, X1C7. Out of the box clean install of Ubuntu, only the sound on the bottom two speakers worked. I used the bash script posted by @sagi, which resulted in "Speaker Cannon Point-LP High Definition Audio Controller" being listed as options for sound, and all four speakers + microphone working. However, recent firmware updates in the last two days reverted the four working speakers and microphone to non-functioning status. I un-did the bash script by removing the created directories and files. After several reboots, the four speakers are microphone are functioning. As a side note, I also added the file
|
This comment has been minimized.
This comment has been minimized.
With Linux 5.5.1, 1.4.2 firmware from Alsa and Alsa 1.2.1, everything seems fine with alsamixer but I am also hitting |
This comment has been minimized.
This comment has been minimized.
I have the same issue. You can add these two lines to
|
This comment has been minimized.
This comment has been minimized.
Same issue here with 5.5 kernel, sof-firmware 1.4.2 and running arch. |
This comment has been minimized.
This comment has been minimized.
yeah hey how do you reverse this??? i now have no sound :))) running pop_os 19.10, kernel 5.3+ |
This comment has been minimized.
This comment has been minimized.
I am running arch on my gen 7 x1 carbon, and the speakers were working great without After kernel 5.5, everything broke--running this script brought back sound, but I now have the same issue as @woutdp and @moreka. Very frustrating! On the plus side, my mic works now! |
This comment has been minimized.
This comment has been minimized.
I think you can rollback to the situation in 5.4 by using |
This comment has been minimized.
This comment has been minimized.
Still not confirmed but it seems that using this setup Bluetooth headset microphone is not correctly recognized, testing with apple airpods. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I disagree, I am using it and my bluetooth headset is working fine. |
This comment has been minimized.
This comment has been minimized.
@zaggash yes it seems that it's just related to Airpods' microphone, false alarm sorry. |
This comment has been minimized.
This comment has been minimized.
Bluetooth mic works fine for me although I'm still on kernel 5.4 on that machine. |
This comment has been minimized.
This comment has been minimized.
FYI, linux kernel commits d2cd795c4ece and 54a6a7dc107d (released in mainline kernel 5.5 and backported to stable kernel 5.4.12) change the legacy snd_hda_codec_realtek driver to assign the rear speakers on the X1 Carbon to the same internal output as the front speakers. This makes the mixer control work but it reduces the max output volume to ~60% of what it used to be. I submitted patches to move the rear speakers to a different internal output which brings back the max volume and allows independent control of front and back speakers. So far the audio maintainer doesn't seem eager to make that change and I haven't had the time to test with the latest pulseaudio, alsa, and so on as requested. Just mentioning this in case some other people notice that reduction in volume and are wondering where it comes from. |
This comment has been minimized.
This comment has been minimized.
...and in the second commit 54a6a7dc107d I see a typo "Thinkpad X1 Yoga 7th" instead of "... Yoga 4th". Can someone tell them? |
This comment has been minimized.
This comment has been minimized.
Oh, that's right, the most recent X1 Yoga is "4th" gen!
|
This comment has been minimized.
This comment has been minimized.
Hi all, happy new year. I am reading the discussion and I am wondering.... I am on |
This comment has been minimized.
This comment has been minimized.
Commits d2cd795c4ece and 54a6a7dc107d (and their backports) don't "break" sound (as far as I know). They reduce the max output volume and actually improve the mixer controls (see the comparison between "no quirk" and ALC285_FIXUP_SPEAKER2_TO_DAC1 here for details). However, those commits affect the snd_hda_codec_realtek driver only. Newer kernels (I believe from 5.5 onwards?) by default use a different driver (from the sof project), which is in fact what the script at the top of this thread was enabling. I haven't tried it but the arch wiki says that it works. Also note that even on a newer kernel, you can still use the older driver. As Vincent posted earlier:
This, in effect, makes the kernel use the legacy snd_hda_codec_realtek. My system still uses the legacy driver. It can be identified by looking at the content of and
I guess that will be different with the newer sof driver. |
This comment has been minimized.
This comment has been minimized.
Of course mate ;-) ...this is the output of my Yoga 4th gen
System Information
00:1f.3 Audio device [0403]: Intel Corporation Cannon Point-LP High Definition Audio Controller [8086:9dc8] (rev 11) (prog-if 80)
Subsystem Id: 0x17aa2292 |
This comment has been minimized.
This comment has been minimized.
Come back here again, i've tried today to route the audio to the hdmi outputs but of course, not worked as expected, trying to use of of the 4 hdmi outputs i get as a result a new "dummy output" device and no sound at all. Am i missing something ? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Can someone verify this? I can also give it a go this weekend. |
This comment has been minimized.
This comment has been minimized.
For me, I still need to tell PulseAudio where to find the source and the sink. Blacklisting |
This comment has been minimized.
This comment has been minimized.
Works perfectly fine for me on an X1 Carbon Gen 7 on Archlinux w/ linux-zen 5.5.7-1 |
This comment has been minimized.
This comment has been minimized.
Thanks so much, seems to have worked well on X1 Carbon Gen 7 ubuntu 19.10 with 5.3.0-40-generic |
This comment has been minimized.
This comment has been minimized.
You're right, I had forgotten I did that a while ago. I've updated my post to reflect this one additional step. Only difference between what worked for me and that post is that I used |
This comment has been minimized.
This comment has been minimized.
@vincentbernat Thanks for reporting that to the PulseAudio people. From the comments on PulseAudio bug tracker it seems like this fix will now make it into Linux 5.5. Too bad that Ubuntu 20.04 LTS will most likely be on Linux 5.4 so that this fix will not end up in that unless its backported once more. Would we need to notify the Ubuntu kernel maintainers of that again? It's really quite amazing to see how many moving parts there are required to get this microphone to work. Many more months will be needed for all parts to align and for all distro's to have it work out of the box. |
This comment has been minimized.
This comment has been minimized.
According to PulseAudio people, we should use |
This comment has been minimized.
This comment has been minimized.
Also, when letting PulseAudio determines the profile, I am losing the bass speaker. The tricker to disable "Speaker" to get it back doesn't work as it also mutes "Master". |
This comment has been minimized.
This comment has been minimized.
I followed the scripts above and also changed the /etc/pulse/default.pa file. Works well on X1 Yoga Gen 4, Manjaro Linux 5.5.7-1. However, the alsamixer setting does not persist between reboots. |
This comment has been minimized.
This comment has been minimized.
I can confirm that following this archlinux wiki guide I have mic and 4 speakers working on Arch and 5.5.7 kernel. Same as a few posts up |
This comment has been minimized.
This comment has been minimized.
Being on linux mint, I can't install the sof-firmware with pacman (or with apt). curl -L https://github.hamidzare.xyz/dl/sof-hda-generic.tplg -o /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg
ln -s /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg /lib/firmware/intel/sof-tplg/sof-hda-generic.tplg I made sure to follow what was given a few posts above with aslamixer. The sound is working, but I can't use the keyboard to set the volume level or mute it. Also the mic isn't working. Would you mind letting me know @vincentbernat how you did it on Ubuntu? |
This comment has been minimized.
This comment has been minimized.
@hamidzr if you don't mind, would you be able to show your output for On my side I'm on 5.5.7 with latest firmware/tplg, I managed to get 4 channels on the microphone (but I needed to bypass UCM for that), but I'm still stuck with 2 speakers, and no sound on HDMI |
This comment has been minimized.
This comment has been minimized.
@Tbaut, I am on Debian unstable. I have:
So, not really something mainstream. And I don't have the bass speaker working. |
This comment has been minimized.
This comment has been minimized.
Hey @vincentbernat if you have a minute, I'm curious as I'm running almost the same config as you do (currently running 5.6-rc4) |
This comment has been minimized.
This comment has been minimized.
@vikmik You are right, no sound from rear speakers either. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Thanks @hamidzr . Yeah more or less same boat here (comparing what you posted to my output) Looking at your Using |
This comment has been minimized.
This comment has been minimized.
In this bug report for Fedora, there are people saying they were able to get the 4 speakers work. However, this is not confirmed. https://bugzilla.redhat.com/show_bug.cgi?id=1772498#c164 It seems the UCM file has to be modified to add a |
This comment has been minimized.
This comment has been minimized.
Also, maybe |
This comment has been minimized.
This comment has been minimized.
As far as I understand, in general the UCM files are only used by PulseAudio to create the profiles. This is just a much nicer way to add all the sinks/sources/etc than manually adding stuff via When we use However if we do But I'm also suspicious of something at a lower level. I tried to understand how all the pins work as well but I'm far from it :)
On the other hand, I may also be totally confused... this commit message in particular makes me wonder what we're looking for: torvalds/linux@d2cd795
Since this was merged (5.5-rc6), then I don't understand how we could ever get 4 channels in PulseAudio. |
This comment has been minimized.
This comment has been minimized.
So I think stereo controls makes total sense for a laptop (I don't really want 4 channels in PA honestly), but somehow the sound needs to be mixed properly to use all available speakers in a decent way. To me, a |
This comment has been minimized.
This comment has been minimized.
@vikmik commit d2cd795c4ece is misleading. See my earlier comments about that commit in this thread. |
This comment has been minimized.
This comment has been minimized.
Yep I saw - thanks for mentioning this commit :) Anyway, I think this is the question (and answer) I was looking for: https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/X1-Carbon-7th-gen-speaker-problem/m-p/4504142?page=1 . Only some specific stuff will be rendered through the rear speakers (explanation in that forum thread, with some samples), so I really shouldn't expect them to play everything like the front speakers with Morale of the story, it's not a real 4.1 system as 2 speakers don't support the full usual frequency bandwidth. Playing actual music/movies, it's actually pretty good. 2 channels in PulseAudio makes sense, and I still get sound on all 4 speakers as long as I don't try to play sine waves or artificial sound samples (for which the rear speakers may barely be used). In any case, providing The good news is that things (speakers, 4 channel microphone) work almost entirely out of the box (for me) with all the latest bits (alsa-ucm, pulseaudio, firmware, topology, kernel 5.6). The only missing piece is the |
This comment has been minimized.
This comment has been minimized.
Do you know what installing I'm still struggling to understand / sum up what has been said in the past comments. Following the step from this comment except point 2), after having executed the script, results in the soundcard not being discovered. |
This comment has been minimized.
This comment has been minimized.
@vikmik From my understanding, |
This comment has been minimized.
This comment has been minimized.
@vincentbernat no it's the test condition to check for @Tbaut take this with a grain of salt, but if you install sof-firmware normally there are 2 gotchas I know of:
|
This comment has been minimized.
This comment has been minimized.
@vikmik I have just updated to current master (soon 5.6-rc5) and everything seems to work out of the box. |
This comment has been minimized.
This comment has been minimized.
Nice, so that makes 2 of us :) This seems to be the past of least resistance now |
This comment has been minimized.
This comment has been minimized.
That's an interesting quote (in https://forums.lenovo.com/topic/findpost/1301/4504142/4526221). FYI, in my case, still using the old snd_hda_codec_realtek driver with a self-compiled 5.4 kernel with the patches I posted earlier (https://salsa.debian.org/bpoirier-guest/linux/-/tree/sid-snd_hda_codec_realtek), I get clear four-channel definition and the rear speakers sound louder than the front. With the test tracks at https://www2.iis.fraunhofer.de/AAC/multichannel.html (played via the browser through pulseaudio set to "Analog Surround 4.0 Output"), FC is center mixed and the LFE track is inaudible, the other announcements (FL, FR, RS, LS) are clearly audible on the expected single speakers. RS and LS sound louder than FL and FR.
When using speaker-test as above, each channel plays individually and the rear speakers sound louder, as in the Fraunhofer tracks. However, both rear speakers are labeled as "LFE". I hope the result is at least as good with the sof driver.
@vincentbernat If you don't mind, can you post an overview of the steps to test on Debian unstable? |
This comment has been minimized.
This comment has been minimized.
That's all for me. I also find the loudness is not the same as with the hda codec but it's hard to know if it's what expected. As for the channels, I als |
This comment has been minimized.
This comment has been minimized.
Thanks for the feedback @gobenji ! What you describe seems totally different from what I have here.
You'll probably be disappointed! I should try the old driver to compare (and your patches). That being said, the messages in the Lenovo forum thread I posted above seem to match exactly what I have. And I suppose most (if not all) of these folks were running Windows... so that's interesting at the very least :) @vincentbernat Just for reference, on Debian testing (bullseye), I have:
Also one other thing I noticed while parsing all the various threads this week, is that not all X1C7 have the exact same audio chip. Mine identifies as:
It seems others have a different device ID (9dc8 instead of 02c8), like: Also for reference, this is the laptop I have:
|
This comment has been minimized.
This comment has been minimized.
Actually, the answer to my PCI device ID question is there: https://patchwork.kernel.org/patch/10932285/#22626941 . |
This comment has been minimized.
This comment has been minimized.
@gobenji I just tested with your patch and the snd_hda_intel driver on a 5.6 kernel - it definitely makes a difference compared to using SOF:
Besides volume and instability with headphones with your patch, hard to say for me which was better between sof and snd-hda-intel and - I also asked my wife who has a much better ear and she didn't see a noticeable difference. But it's difficult to compare with a reboot in the middle. For me most of the difference is when playing multichannel sound, but I couldn't care less on that laptop :) It's been mentioned before, but it's also worth noting that for multi-channel sound, LFE remixing in PulseAudio is required even when wearing headphones. |
This comment has been minimized.
This comment has been minimized.
In mine, I have:
|
This comment has been minimized.
This comment has been minimized.
@vikmik With HDA intel, did you try to mute the speaker in ALSA? For me, it sounds better this way. Otherwise, the bass are missing. With SOF, it seems like the bass are only half way there. |
This comment has been minimized.
This comment has been minimized.
@vincentbernat I tried: with snd_hda_intel, master, speaker and bass speaker are all linked in alsamixer. If I mute one, all the others are also muted. And I need to reenable all 3 to unmute the sound. I tried with the speaker volume maxed out (that trick is mentioned somewhere I believe), it made no difference. I did this test in 5.6-rc4 too. |
This comment has been minimized.
This comment has been minimized.
I did not try with 5.6-rc4, but with 5.5 and SOF modules blacklisted, I was able to mute/unmute "Speaker" separately. Maybe this is due to the difference between our sound chips. It's sad to take so much time to just get sound working... |
This comment has been minimized.
This comment has been minimized.
fully fixed my X1 7th gen w/ 5.5.8-200.fc31.x86_64 kernel, thanks |
This comment has been minimized.
This comment has been minimized.
I am running vanilla 5.5.9, released yesterday, and everything from 5.6.0-rc5 has been backported, including the out-of-the-box support for PulseAudio and the synchronization with the LEDs on the keyboard. I didn't stay on 5.6.0-rc5 since the dual screen setup with the dock isn't working anymore. |
This comment has been minimized.
This comment has been minimized.
Now would be nice to find a working solution for Ubuntu 18.04, where we are stuck with 5.3. |
This comment has been minimized.
This comment has been minimized.
Did you test HDMI as output sink in PulseAudio? |
This comment has been minimized.
This comment has been minimized.
5.3 not being a LTS release, I think you shouldn't hold your breath. You can test the mainline kernels available in a dedicated PPA. However, it is not enough, you also need ALSA 1.2.2 and PulseAudio 13.99.1. Your best luck is to upgrade to Ubuntu Focal which seems to have everything needed. However, it will only comes with 5.4 and I think SOF support is not being backported to 5.4. But then, you could use the mainline kernel PPA. |
This comment has been minimized.
This comment has been minimized.
I did not. They appear "normally". |
This comment has been minimized.
This comment has been minimized.
So they did do for me, when I last tested SOF couple of months a go, but they didn't actually work. Wondering if that's fixed as well now.
I wouldn't be surprised if we have to wait for Ubuntu 20.10 for a fully out of the box experience. |
This comment has been minimized.
This comment has been minimized.
Thanks for these instructions. I tested with 5.5.9 and got it working as you describe. Sounds like we have a similar setup, I also run dual screens with the dock! Personally, I mostly care about having the volume as loud as it used to be before commit d2cd795c4ece. Sadly, that's not the case at the moment with the sof driver. This is influenced by the connection of node 0x17 which can be seen by looking at
I described the effect of the different connections in this (rejected) patch log In order to test output volume objectively, I set all relevant mixer controls to 100%, play some samples and measure the sound level using an app on my phone. As long as I leave the laptop and phone in the same position between tests, the numbers are reproducible within 2-3dB. Specifically, I used the following apps: I tested with white noise generated by Audacity at amplitude 1. This should show up as a horizontal line on the spectrum analyzer. However, what I really care about is to have a loud and clear terminal bell! I noticed that the difference in volume of the terminal bell is more proeminent than the difference of white noise. That's the reason I'm annoyed by the lower sound volume! In my case, I use the following config for the terminal bell:
For these tests, I simply open a bash shell, press and hold the tab key to have a busy-loop of bells.
As we can see, the sound output is louder when using connection 0x03, especially with the bell sample. Furthermore, with the patched driver, when setting the pulseaudio mixer level to 65%, I get a reading of 52dB for the bell loop. This corresponds to the level of the mainline driver at 100%. That's where I got the "Weak (~60%) max output volume" figure that I wrote in the patch log. Finally, here's what the spectrum looks like:
The green bars are the instant transform and should be ignored. You should look at the yellow line which is a 60s average. Note that the vertical scale is not exactly the same between the two graphs and also that these measurements were just done with my phone, not a scientific instrument! Nevertheless, it's interesting to see that the low end (40-1000Hz) response is what differs the most between the two connections. In particular, with 0x03, the peak is at a lower frequency and higher amplitude. To end on a positive note, I can also confirm that the mic works with the sof driver. |
This comment has been minimized.
This comment has been minimized.
hi, I'm on Linux Mint with a 5.3 Kernel. I run the script and the dmesg output looks good, I do see the sound card as But I am using Jack (with Cadence) and when I try to start Jack here is the error I get: Here is the error I get in the dmesg: did anyone manage to run Jack together with the configuration of the script? thank you! |
This comment has been minimized.
This comment has been minimized.
Using default 5.5.10 arch kernel. When I unplug the headset, I have to manually set the profile from Off to Hifi with pavucontrol. |
This comment has been minimized.
This comment has been minimized.
Confirmed, @srwareham answer works as a charm. Muting the "speaker" with alsamixer solved the volume not being loud enough issue. Tested on Lenovo x1 Carbon, Manjaro with Linux kernel 5.5 |
This comment has been minimized.
This comment has been minimized.
Hello guys, thanks a lot for helping me. I'm using Fedora 31, kernel 5.5.9-200.fc31.x86_64, UEFI enabled. I've just done the followings steps to make work the microphone and the 4 speakers without running the script. Remove alsa-firmware if you've installed it previously Using the new alsa-sof-firmware package released in fedora 32: Edit the Microphone section to 2 channels: Hifi.conf
Add these two lines to /etc/pulse/default.pa
Reboot the computer. Once is up again: Setting the Speaker to mute (Check out the value using alsamixer): To store the amix config for the next reboot: (Avoid to set to mute again) Any questions, let me know!. Updates: |
This comment has been minimized.
This comment has been minimized.
Guys, anyone can help me/? I tried to run the script and doesn't works... |
This comment has been minimized.
This comment has been minimized.
I'm getting stuck on here @bleiva:
Any suggestions? |
This comment has been minimized.
Can you please give read access to the file:
https://doc-10-b8-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/7t71hb9oj6s3685orp1d8pla9lt85dfi/1570903200000/15300322596821392769/*/1RXZPSVL7JtIBUziLPC3oPCmtLftO9ccq?e=download
The script is failing because of that....
Thanks ;)