我几乎拿到了我的新戴尔 XPS 笔记本电脑设置正确,但仍有几点不太对劲。其中一个主要问题是音频。
首先,我一直没能让系统识别出它有内置扬声器。我唯一能让音频正常工作的方法是将 USB 3.0 耳机连接到 USB-C 集线器。
这台笔记本电脑有 4 个 USB-C 端口。我尝试使用来自不同制造商的 3 或 4 种不同的 USB-C 集线器类型设备。我目前使用的是从亚马逊购买的 Anker 的几个。有些比其他的好用。通常我需要拔下并重新插入甚至重新启动才能识别连接到 USB 集线器的设备。
大约 95% 的时间里,HDMI 端口可以正常工作,但大约 20% 的时间里,键盘和鼠标无法被识别。当我插入 USB 耳机时,有时它们会在很长时间后(1 分钟或更长时间)被识别,其他时候我必须重新启动。
非常奇怪的是,我注意到:
- 如果我使用 USB-C 集线器和所有连接好的设备从关机状态冷启动,Ubuntu 将无法完全启动
- 如果我在 Ubuntu 启动过程中(Ubuntu 徽标之后,登录屏幕显示之前)“在正确的时间”插入 USB-C 集线器,它有时会起作用
- 如果我在登录后插入 USB-C 集线器,通常显示器可以工作,但音频会滞后
- 如果我在未连接任何设备的情况下启动,登录后连接 USB-C 集线器,然后重新启动,则一切都可以正常启动,并且我的耳机很快就能被识别
我已遵循以下帖子的建议......
- https://help.ubuntu.com/stable/ubuntu-help/sound-nosound.html.en
- https://askubuntu.com/a/1249071/1425297
- https://askubuntu.com/a/1234436/1425297
- https://askubuntu.com/a/1234141/1425297
- https://askubuntu.com/a/1232093/1425297
- https://stackoverflow.com/a/66009679
...但仍然遇到这些音频问题。
以下是我做过的一些调查:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ sudo lspci | grep audio
[sudo] password for geoff:
0000:00:1f.3 Multimedia audio controller: Intel Corporation Device 43c8 (rev 11)
$ sudo lshw -C multimedia
*-multimedia
description: Audio device
product: NVIDIA Corporation
vendor: NVIDIA Corporation
physical id: 0.1
bus info: pci@0000:01:00.1
version: a1
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=snd_hda_intel latency=0
resources: irq:17 memory:ac000000-ac003fff
*-usb:1
description: Audio device
product: Plantronics GameCom 780/788
vendor: Plantronics
physical id: 2
bus info: usb@3:4.2
version: 1.00
capabilities: usb-1.10 audio-control
configuration: driver=usbhid maxpower=500mA speed=12Mbit/s
*-usb:2
description: Video
product: Integrated_Webcam_HD
vendor: CN07JX4K8LG0016KD8L9A00
physical id: b
bus info: usb@3:b
version: 9.11
capabilities: usb-2.01
configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
*-multimedia
description: Multimedia audio controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 1f.3
bus info: pci@0000:00:1f.3
version: 11
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=snd_hda_intel latency=64
resources: iomemory:620-61f iomemory:620-61f irq:225 memory:628f2d8000-628f2dbfff memory:628f000000-628f0fffff
我安装了 pulseaudio,但似乎没有产生任何作用。
不确定这是否足以继续下去,但我很乐意尝试任何其他的事情。
编辑1:
根据马蒂戈之后,我尝试安装 Hui Wang 的自定义内核:https://people.canonical.com/~hwang4/9710/
它没有起作用。以下是输出
$ sudo dpkg -i linux-image-unsigned-5.11.0-33-generic_5.11.0-33.35_amd64.deb linux-modules-5.11.0-33-generic_5.11.0-33.35_amd64.deb linux-modules-extra-5.11.0-33-generic_5.11.0-33.35_amd64.deb
(Reading database ... 256692 files and directories currently installed.)
Preparing to unpack linux-image-unsigned-5.11.0-33-generic_5.11.0-33.35_amd64.deb ...
Unpacking linux-image-unsigned-5.11.0-33-generic (5.11.0-33.35) over (5.11.0-33.35) ...
Preparing to unpack linux-modules-5.11.0-33-generic_5.11.0-33.35_amd64.deb ...
Unpacking linux-modules-5.11.0-33-generic (5.11.0-33.35) over (5.11.0-33.35) ...
Preparing to unpack linux-modules-extra-5.11.0-33-generic_5.11.0-33.35_amd64.deb ...
Unpacking linux-modules-extra-5.11.0-33-generic (5.11.0-33.35) over (5.11.0-33.35) ...
Setting up linux-image-unsigned-5.11.0-33-generic (5.11.0-33.35) ...
Setting up linux-modules-5.11.0-33-generic (5.11.0-33.35) ...
Setting up linux-modules-extra-5.11.0-33-generic (5.11.0-33.35) ...
Processing triggers for linux-image-unsigned-5.11.0-33-generic (5.11.0-33.35) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.11.0-33-generic
Error! Your kernel headers for kernel 5.11.0-33-generic cannot be found.
Please install the linux-headers-5.11.0-33-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-33-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p5
I: (UUID=21e10181-5587-4c05-b581-4dcc1bb6b268)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.11.0-34-generic
Found initrd image: /boot/initrd.img-5.11.0-34-generic
Found linux image: /boot/vmlinuz-5.11.0-33-generic
Found initrd image: /boot/initrd.img-5.11.0-33-generic
Found linux image: /boot/vmlinuz-5.11.0-27-generic
Found initrd image: /boot/initrd.img-5.11.0-27-generic
Found linux image: /boot/vmlinuz-5.4.0-84-generic
Found initrd image: /boot/initrd.img-5.4.0-84-generic
Adding boot menu entry for UEFI Firmware Settings
done
这是否意味着我需要将内核从 5.11.0-34 降级到 5.11.0-33?
编辑2:
该系统已经有 5.11.0-34,所以 Hui Wang 的预发布音频驱动程序无法找到 Linux 标头,因为它正在寻找 5.11.0-33。
请参阅下面的完整输出。
$ sudo apt install linux-headers-$(uname -r)
[sudo] password for geoff:
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-5.11.0-34-generic is already the newest version (5.11.0-34.36~20.04.1).
linux-headers-5.11.0-34-generic set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
我不知道如何降级到 5.11.0-33。我一度考虑将 5.11.0-34 符号链接为 5.11.0-33,但不想冒系统崩溃的风险。
我也觉得很奇怪这个答案描述了在哪里下载特定版本的 Linux 源代码但当我跟随Linux 源代码链接,版本 5.11 完全没有出现在列表中。
编辑3:
根据其中一条评论,我做了一些研究如何更新 Ubuntu 20 内核-- 当我运行 5.13.16 的更新程序时,我得到:
dpkg: error processing package linux-headers-5.13.16-051316-generic (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-5.13.16-051316-lowlatency:
linux-headers-5.13.16-051316-lowlatency depends on libc6 (>= 2.34); however:
Version of libc6:amd64 on system is 2.31-0ubuntu9.2.
我尝试修复它,但遇到了libc6兼容性问题...
$ sudo dpkg -i *.deb
(Reading database ... 322081 files and directories currently installed.)
Preparing to unpack linux-headers-5.13.16-051316_5.13.16-051316.202109120831_all.deb ...
Unpacking linux-headers-5.13.16-051316 (5.13.16-051316.202109120831) over (5.13.16-051316.202109120831) ...
Selecting previously unselected package linux-headers-5.13.16-051316-generic.
Preparing to unpack linux-headers-5.13.16-051316-generic_5.13.16-051316.202109120831_amd64.deb ...
Unpacking linux-headers-5.13.16-051316-generic (5.13.16-051316.202109120831) ...
Preparing to unpack linux-image-unsigned-5.13.16-051316-generic_5.13.16-051316.202109120831_amd64.deb ...
Unpacking linux-image-unsigned-5.13.16-051316-generic (5.13.16-051316.202109120831) over (5.13.16-051316.202109120831) ...
Preparing to unpack linux-modules-5.13.16-051316-generic_5.13.16-051316.202109120831_amd64.deb ...
Unpacking linux-modules-5.13.16-051316-generic (5.13.16-051316.202109120831) over (5.13.16-051316.202109120831) ...
Setting up linux-headers-5.13.16-051316 (5.13.16-051316.202109120831) ...
dpkg: dependency problems prevent configuration of linux-headers-5.13.16-051316-generic:
linux-headers-5.13.16-051316-generic depends on libc6 (>= 2.34); however:
Version of libc6:amd64 on system is 2.31-0ubuntu9.2.
dpkg: error processing package linux-headers-5.13.16-051316-generic (--install):
dependency problems - leaving unconfigured
Setting up linux-image-unsigned-5.13.16-051316-generic (5.13.16-051316.202109120831) ...
I: /boot/initrd.img.old is now a symlink to initrd.img-5.13.16-051316-generic
Setting up linux-modules-5.13.16-051316-generic (5.13.16-051316.202109120831) ...
Processing triggers for linux-image-unsigned-5.13.16-051316-generic (5.13.16-051316.202109120831) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.13.16-051316-generic
Kernel preparation unnecessary for this kernel. Skipping...
applying patch disable_fstack-clash-protection_fcf-protection.patch...patching file Kbuild
Hunk #1 succeeded at 82 (offset 11 lines).
Building module:
cleaning build area...(bad exit status: 2)
unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j16 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.13.16-051316-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.13.16-051316-generic/build LD=/usr/bin/ld.bfd modules.....(bad exit status: 2)
ERROR (dkms apport): kernel package linux-headers-5.13.16-051316-generic is not supported
Error! Bad return status for module build on kernel: 5.13.16-051316-generic (x86_64)
Consult /var/lib/dkms/nvidia/470.63.01/build/make.log for more information.
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.16-051316-generic
sudo apt-gI: The initramfs will attempt to resume from /dev/nvme0n1p5
I: (UUID=21e10181-5587-4c05-b581-4dcc1bb6b268)
I: Set the RESUME variable to override this.
et/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.14.3-051403-lowlatency
Found initrd image: /boot/initrd.img-5.14.3-051403-lowlatency
Found linux image: /boot/vmlinuz-5.14.3-051403-generic
Found initrd image: /boot/initrd.img-5.14.3-051403-generic
Found linux image: /boot/vmlinuz-5.13.16-051316-lowlatency
Found initrd image: /boot/initrd.img-5.13.16-051316-lowlatency
Found linux image: /boot/vmlinuz-5.13.16-051316-generic
Found initrd image: /boot/initrd.img-5.13.16-051316-generic
Found linux image: /boot/vmlinuz-5.11.0-34-generic
Found initrd image: /boot/initrd.img-5.11.0-34-generic
Found linux image: /boot/vmlinuz-5.11.0-33-generic
Found initrd image: /boot/initrd.img-5.11.0-33-generic
Found linux image: /boot/vmlinuz-5.11.0-27-generic
Found initrd image: /boot/initrd.img-5.11.0-27-generic
Found linux image: /boot/vmlinuz-5.4.0-84-generic
Found initrd image: /boot/initrd.img-5.4.0-84-generic
Adding boot menu entry for UEFI Firmware Settings
done
Errors were encountered while processing:
linux-headers-5.13.16-051316-generic
geoff@gdhxps ~/Downloads/UbuntuKernel_5.13.16 $ sudo apt-get install -y libc6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version (2.31-0ubuntu9.2).
libc6 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-headers-5.13.16-051316-generic : Depends: libc6 (>= 2.34) but 2.31-0ubuntu9.2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
geoff@gdhxps ~/Downloads/UbuntuKernel_5.13.16 $ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
linux-headers-5.13.16-051316-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 22.0 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 331423 files and directories currently installed.)
Removing linux-headers-5.13.16-051316-generic (5.13.16-051316.202109120831) ...
geoff@gdhxps ~/Downloads/UbuntuKernel_5.13.16 $ sudo apt-get install libc6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version (2.31-0ubuntu9.2).
libc6 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
每当事情变得如此危险时,我通常都会认为我做错了什么。
我尝试过Ubuntu 主线内核脚本反而。
$ sudo ubuntu-mainline-kernel.sh -i v5.14.3
Downloading index from kernel.ubuntu.com
It seems version v5.14.3 is already installed, continue? (y/N)
Will download 6 files from kernel.ubuntu.com:
Downloading amd64/linux-headers-5.14.3-051403-generic_5.14.3-051403.202109120431_amd64.deb: 100%
Downloading amd64/linux-headers-5.14.3-051403_5.14.3-051403.202109120431_all.deb: 100%
Downloading amd64/linux-image-unsigned-5.14.3-051403-generic_5.14.3-051403.202109120431_amd64.deb: 100%
Downloading amd64/linux-modules-5.14.3-051403-generic_5.14.3-051403.202109120431_amd64.deb: 100%
Downloading amd64/CHECKSUMS: 100%
Downloading amd64/CHECKSUMS.gpg: 100%
Importing kernel-ppa gpg key ok
Signature of checksum file has been successfully verified
Checksums of deb files have been successfully verified with sha256sum
Installing 4 packages
Cleaning up work folder
1:戴尔 XPS 17 (9710) / 第 11 代英特尔® 酷睿™ i9-11900H(24MB 缓存,最高 4.9 GHz,8 核)/ NVIDIA® GeForce RTX™ 3060 6GB GDDR6 [70W] / 32GB DDR4 3200MHz,2x16GB / 1TB M.2 PCIe NVMe 固态硬盘
答案1
未来的内核版本将针对音频芯片组进行修复,但您现在就可以使用 Hui Wang 的自定义内核来使其正常运行:https://people.canonical.com/~hwang4/9710/
安装方法:
- 确保在 UEFI/BIOS 中禁用“安全启动”
- 确保已安装 Linux Headers:
sudo apt install linux-headers-$(uname -r)
- 从 Hui 的网站下载文件
.deb
打开终端并导航到包含文件的目录- 使用以下方式安装
dpkg
:sudo dpkg -i linux-image-unsigned-5.11.0-33-generic_5.11.0-33.35_amd64.deb linux-modules-5.11.0-33-generic_5.11.0-33.35_amd64.deb linux-modules-extra-5.11.0-33-generic_5.11.0-33.35_amd64.deb
- 重启
已经确认此功能适用于 20.04 和 21.04 版本的 Dell XPS 9710 机器。
答案2
上述答案都不适用于我,因为我的机器已经有了较新的内核:
Error! Your kernel headers for kernel 5.11.0-33-generic cannot be found.
Please install the linux-headers-5.11.0-33-generic package,
$ uname -a
Linux 5.11.0-34-generic #37~20.04.1-Ubuntu
因此我订阅了 Canonical 支持并与他们的技术人员合作解决了这个问题。
注意:使用风险自负。此解决方案涉及安装预发布软件(2021 年 9 月)。
以下是在笔记本电脑上安装 5.11.0-35 内核的步骤:
- 通过将存储库信息写入 /etc/apt/sources.list 来启用焦点建议存储库
echo "deb http://us.archive.ubuntu.com/ubuntu/ focal-proposed main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
- 更新存储库元数据
sudo apt update
- 安装5.11.0-35内核
sudo apt install linux-image-5.11.0-35-generic linux-modules-5.11.0-35-generic linux-modules-extra-5.11.0-35-generic linux-headers-5.11.0-35-generic
- 删除 /etc/apt/sources.list 中的焦点建议
请注意:focal-proposed 的软件包仍在测试中,因此不要从那里安装除内核 5.11.0-35 之外的任何其他软件包
打开 /etc/apt/sources.list 并在底部用您在步骤 1 中添加的 deb 注释掉最后一行。
sudo vim /etc/apt/sources.list
- 从 /etc/apt/sources.list 中删除 focal-proposed 后,再次更新存储库元数据
sudo apt update
- 重新启动机器并验证音频是否正常工作