切换到root用户

切换到root用户

安装 Ubuntu 20.04 后,我发现根本没有声音。我还安装了 22.04,以为新版本可能已经修复了这个问题,但结果错了。22.04 也存在这个问题。
以下是输出,lspci -v以防万一:

hossein@hossein-pc:~$ sudo lspci -v
00:00.0 Host bridge: Intel Corporation Device 4668 (rev 02)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, fast devsel, latency 0
    Memory at <ignored> (32-bit, non-prefetchable)

00:01.0 PCI bridge: Intel Corporation Device 460d (rev 02) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 121
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
    I/O behind bridge: 00006000-00006fff [size=4K]
    Memory behind bridge: 84000000-850fffff [size=17M]
    Prefetchable memory behind bridge: 0000004000000000-0000004011ffffff [size=288M]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [98] Subsystem: ASUSTeK Computer Inc. Device 8694
    Capabilities: [a0] Power Management version 3
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [220] Access Control Services
    Capabilities: [150] Precision Time Measurement
    Capabilities: [a30] Secondary PCI Express
    Capabilities: [a90] Data Link Feature <?>
    Capabilities: [a9c] Physical Layer 16.0 GT/s <?>
    Capabilities: [edc] Lane Margining at the Receiver <?>
    Capabilities: [adc] Extended Capability ID 0x2a
    Capabilities: [b0c] Extended Capability ID 0x2b
    Kernel driver in use: pcieport

00:0a.0 Signal processing controller: Intel Corporation Device 467d (rev 01)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: fast devsel
    Memory at 4014210000 (64-bit, non-prefetchable) [size=32K]
    Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [d0] Power Management version 3
    Capabilities: [100] Designated Vendor-Specific <?>
    Capabilities: [110] Designated Vendor-Specific <?>
    Capabilities: [120] Designated Vendor-Specific <?>
    Kernel driver in use: intel-pmt
    Kernel modules: intel_pmt

00:0e.0 RAID bus controller: Intel Corporation Volume Management Device NVMe RAID Controller
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Volume Management Device NVMe RAID Controller
    Flags: bus master, fast devsel, latency 0
    Memory at 4012000000 (64-bit, non-prefetchable) [size=32M]
    Memory at 82000000 (32-bit, non-prefetchable) [size=32M]
    Memory at 4014100000 (64-bit, non-prefetchable) [size=1M]
    Capabilities: [80] MSI-X: Enable+ Count=19 Masked-
    Capabilities: [90] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [e0] Power Management version 3
    Kernel driver in use: vmd
    Kernel modules: vmd

00:14.0 USB controller: Intel Corporation Device 7ae0 (rev 11) (prog-if 30 [XHCI])
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, medium devsel, latency 0, IRQ 147
    Memory at 4014200000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [70] Power Management version 2
    Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
    Capabilities: [90] Vendor Specific Information: Len=14 <?>
    Capabilities: [b0] Vendor Specific Information: Len=00 <?>
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci

00:14.2 RAM memory: Intel Corporation Device 7aa7 (rev 11)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: fast devsel
    Memory at 4014220000 (64-bit, non-prefetchable) [disabled] [size=16K]
    Memory at 4014229000 (64-bit, non-prefetchable) [disabled] [size=4K]
    Capabilities: [80] Power Management version 3

00:14.3 Network controller: Intel Corporation Device 7af0 (rev 11)
    DeviceName: Onboard - Ethernet
    Subsystem: Intel Corporation Device 0074
    Flags: fast devsel, IRQ 18
    Memory at 401421c000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: [c8] Power Management version 3
    Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [40] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [80] MSI-X: Enable- Count=16 Masked-
    Capabilities: [100] Latency Tolerance Reporting
    Capabilities: [164] Vendor Specific Information: ID=0010 Rev=0 Len=014 <?>
    Kernel modules: iwlwifi

00:15.0 Serial bus controller [0c80]: Intel Corporation Device 7acc (rev 11)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, fast devsel, latency 0, IRQ 27
    Memory at 4014226000 (64-bit, non-prefetchable) [virtual] [size=4K]
    Capabilities: [80] Power Management version 3
    Capabilities: [90] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: intel-lpss
    Kernel modules: intel_lpss_pci

00:15.1 Serial bus controller [0c80]: Intel Corporation Device 7acd (rev 11)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, fast devsel, latency 0, IRQ 40
    Memory at 4014227000 (64-bit, non-prefetchable) [virtual] [size=4K]
    Capabilities: [80] Power Management version 3
    Capabilities: [90] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: intel-lpss
    Kernel modules: intel_lpss_pci

00:15.2 Serial bus controller [0c80]: Intel Corporation Device 7ace (rev 11)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, fast devsel, latency 0, IRQ 29
    Memory at 4014228000 (64-bit, non-prefetchable) [virtual] [size=4K]
    Capabilities: [80] Power Management version 3
    Capabilities: [90] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: intel-lpss
    Kernel modules: intel_lpss_pci

00:16.0 Communication controller: Intel Corporation Device 7ae8 (rev 11)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, fast devsel, latency 0, IRQ 167
    Memory at 4014225000 (64-bit, non-prefetchable) [size=4K]
    Capabilities: [50] Power Management version 3
    Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [a4] Vendor Specific Information: Len=14 <?>
    Kernel driver in use: mei_me
    Kernel modules: mei_me

00:17.0 SATA controller: Intel Corporation Device 7ae2 (rev 11) (prog-if 01 [AHCI 1.0])
    DeviceName: Onboard - SATA
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 146
    Memory at 86900000 (32-bit, non-prefetchable) [size=8K]
    Memory at 86903000 (32-bit, non-prefetchable) [size=256]
    I/O ports at 7050 [size=8]
    I/O ports at 7040 [size=4]
    I/O ports at 7020 [size=32]
    Memory at 86902000 (32-bit, non-prefetchable) [size=2K]
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [70] Power Management version 3
    Capabilities: [a8] SATA HBA v1.0
    Kernel driver in use: ahci
    Kernel modules: ahci

00:1a.0 PCI bridge: Intel Corporation Device 7ac8 (rev 11) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 122
    Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
    I/O behind bridge: 00005000-00005fff [size=4K]
    Memory behind bridge: 85b00000-864fffff [size=10M]
    Prefetchable memory behind bridge: 0000004014300000-00000040144fffff [size=2M]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [98] Subsystem: ASUSTeK Computer Inc. Device 8694
    Capabilities: [a0] Power Management version 3
    Kernel driver in use: pcieport

00:1c.0 PCI bridge: Intel Corporation Device 7ab8 (rev 11) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 123
    Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
    I/O behind bridge: 00004000-00004fff [size=4K]
    Memory behind bridge: 85100000-85afffff [size=10M]
    Prefetchable memory behind bridge: 0000004014500000-00000040146fffff [size=2M]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [98] Subsystem: ASUSTeK Computer Inc. Device 8694
    Capabilities: [a0] Power Management version 3
    Kernel driver in use: pcieport

00:1c.1 PCI bridge: Intel Corporation Device 7ab9 (rev 11) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 124
    Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
    I/O behind bridge: 00003000-00003fff [size=4K]
    Memory behind bridge: 86800000-868fffff [size=1M]
    Prefetchable memory behind bridge: [disabled]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [98] Subsystem: ASUSTeK Computer Inc. Device 8694
    Capabilities: [a0] Power Management version 3
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [220] Access Control Services
    Capabilities: [150] Precision Time Measurement
    Capabilities: [a30] Secondary PCI Express
    Capabilities: [a90] Data Link Feature <?>
    Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation Device 7abb (rev 11) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 125
    Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
    I/O behind bridge: [disabled]
    Memory behind bridge: 86500000-866fffff [size=2M]
    Prefetchable memory behind bridge: [disabled]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [98] Subsystem: ASUSTeK Computer Inc. Device 8694
    Capabilities: [a0] Power Management version 3
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [220] Access Control Services
    Capabilities: [150] Precision Time Measurement
    Capabilities: [a30] Secondary PCI Express
    Capabilities: [a90] Data Link Feature <?>
    Kernel driver in use: pcieport

00:1d.0 PCI bridge: Intel Corporation Device 7ab4 (rev 11) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0, IRQ 126
    Bus: primary=00, secondary=06, subordinate=06, sec-latency=0
    I/O behind bridge: [disabled]
    Memory behind bridge: 86700000-867fffff [size=1M]
    Prefetchable memory behind bridge: [disabled]
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [98] Subsystem: ASUSTeK Computer Inc. Device 8694
    Capabilities: [a0] Power Management version 3
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [220] Access Control Services
    Capabilities: [150] Precision Time Measurement
    Capabilities: [a30] Secondary PCI Express
    Capabilities: [a90] Data Link Feature <?>
    Capabilities: [a9c] Physical Layer 16.0 GT/s <?>
    Capabilities: [edc] Lane Margining at the Receiver <?>
    Kernel driver in use: pcieport

00:1f.0 ISA bridge: Intel Corporation Device 7a84 (rev 11)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, fast devsel, latency 0

00:1f.3 Audio device: Intel Corporation Device 7ad0 (rev 11)
    DeviceName: Onboard - Sound
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: bus master, fast devsel, latency 32, IRQ 168
    Memory at 4014218000 (64-bit, non-prefetchable) [size=16K]
    Memory at 4014000000 (64-bit, non-prefetchable) [size=1M]
    Capabilities: [50] Power Management version 3
    Capabilities: [80] Vendor Specific Information: Len=14 <?>
    Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl

00:1f.4 SMBus: Intel Corporation Device 7aa3 (rev 11)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: medium devsel, IRQ 18
    Memory at 4014224000 (64-bit, non-prefetchable) [size=256]
    I/O ports at efa0 [size=32]
    Kernel driver in use: i801_smbus
    Kernel modules: i2c_i801

00:1f.5 Serial bus controller [0c80]: Intel Corporation Device 7aa4 (rev 11)
    DeviceName: Onboard - Other
    Subsystem: ASUSTeK Computer Inc. Device 8694
    Flags: fast devsel
    Memory at 80800000 (32-bit, non-prefetchable) [size=4K]

01:00.0 VGA compatible controller: NVIDIA Corporation Device 2206 (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Gigabyte Technology Co., Ltd Device 403f
    Flags: bus master, fast devsel, latency 0, IRQ 169
    Memory at 84000000 (32-bit, non-prefetchable) [size=16M]
    Memory at 4000000000 (64-bit, prefetchable) [size=256M]
    Memory at 4010000000 (64-bit, prefetchable) [size=32M]
    I/O ports at 6000 [size=128]
    Expansion ROM at 85000000 [virtual] [disabled] [size=512K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Legacy Endpoint, MSI 00
    Capabilities: [b4] Vendor Specific Information: Len=14 <?>
    Capabilities: [100] Virtual Channel
    Capabilities: [250] Latency Tolerance Reporting
    Capabilities: [258] L1 PM Substates
    Capabilities: [128] Power Budgeting <?>
    Capabilities: [420] Advanced Error Reporting
    Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
    Capabilities: [900] Secondary PCI Express
    Capabilities: [bb0] Resizable BAR <?>
    Capabilities: [c1c] Physical Layer 16.0 GT/s <?>
    Capabilities: [d00] Lane Margining at the Receiver <?>
    Capabilities: [e00] Data Link Feature <?>
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

01:00.1 Audio device: NVIDIA Corporation Device 1aef (rev a1)
    Subsystem: Gigabyte Technology Co., Ltd Device 403f
    Flags: bus master, fast devsel, latency 0, IRQ 17
    Memory at 85080000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [160] Data Link Feature <?>
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel

04:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) (prog-if 01 [AHCI 1.0])
    Subsystem: ASUSTeK Computer Inc. ASM1062 Serial ATA Controller
    Flags: bus master, fast devsel, latency 0, IRQ 154
    I/O ports at 3050 [size=8]
    I/O ports at 3040 [size=4]
    I/O ports at 3030 [size=8]
    I/O ports at 3020 [size=4]
    I/O ports at 3000 [size=32]
    Memory at 86800000 (32-bit, non-prefetchable) [size=512]
    Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [78] Power Management version 3
    Capabilities: [80] Express Legacy Endpoint, MSI 00
    Capabilities: [100] Virtual Channel
    Kernel driver in use: ahci
    Kernel modules: ahci

05:00.0 Ethernet controller: Intel Corporation Device 15f3 (rev 03)
    Subsystem: ASUSTeK Computer Inc. Device 87d2
    Flags: bus master, fast devsel, latency 0, IRQ 19
    Memory at 86500000 (32-bit, non-prefetchable) [size=1M]
    Memory at 86600000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
    Capabilities: [70] MSI-X: Enable+ Count=5 Masked-
    Capabilities: [a0] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Device Serial Number 04-42-1a-ff-ff-31-84-6b
    Capabilities: [1c0] Latency Tolerance Reporting
    Capabilities: [1f0] Precision Time Measurement
    Capabilities: [1e0] L1 PM Substates
    Kernel driver in use: igc
    Kernel modules: igc

06:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a809 (prog-if 02 [NVM Express])
    Subsystem: Samsung Electronics Co Ltd Device a801
    Flags: bus master, fast devsel, latency 0, IRQ 16, NUMA node 0
    Memory at 86700000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
    Capabilities: [70] Express Endpoint, MSI 00
    Capabilities: [b0] MSI-X: Enable+ Count=13 Masked-
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [148] Device Serial Number 00-00-00-00-00-00-00-00
    Capabilities: [158] Power Budgeting <?>
    Capabilities: [168] Secondary PCI Express
    Capabilities: [188] Latency Tolerance Reporting
    Capabilities: [190] L1 PM Substates
    Kernel driver in use: nvme
    Kernel modules: nvme

如您所见,似乎检测到了音频设备,但仍然没有任何声音!
我该如何解决这个问题?

更新 1:

我注意到后面板的声音似乎没问题,但前面板没有声音。我检查了一下,前面板和后面板在 Windows 下都有声音,但前面板仅在 Ubuntu 下不起作用!这怎么可能?这仍然是驱动程序问题吗?

答案1

一位用户贴出了答案,并附上了链接reddit 帖子其中包含解决此问题的解决方法。几分钟后,他不知怎么地删除了他的答案。我在上述 reddit 帖子的末尾找到了我的解决方法,它只有一行!

解决我的问题的方法是本文中解释的解决方法关联。我所做的只是运行以下命令:首先我使用了这个命令:

pacmd load-module module-alsa-sink name='Front Panel Headphone' device=1 device_id=2 control='PCM',1

这不起作用,但在运行以下命令后,前插孔开始正常工作:

pacmd load-module module-alsa-sink device=hw:Audio,1 control='PCM',1

名字device必须是hw:Audio,因为我从跑步中得到了它alsa-info (这里是我的信息仅供参考)

!!Soundcards recognised by ALSA
!!-----------------------------

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x4014218000 irq 184
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0x85080000 irq 17
 2 [Audio          ]: USB-Audio - USB Audio
                      Generic USB Audio at usb-0000:00:14.0-2, high speed

之后,我注意到设置/声音部分有一个新条目,幸运的是前后都有声音。

答案2

编辑:这个答案对我有用!请参阅以下答案:https://askubuntu.com/a/1420082/1602652。我运行了这两个命令,现在我在 Ubuntu 22.04 上有了声音,主板是 Z690,内核是 5.18。似乎它与内核无关,因为 OP 的答案有 5.15 内核。

此外,如果您希望此修复在重启后仍然有效,请在 /etc/pulse/default.pa 文件底部附近添加以下内容:pacmd load-module module-alsa-sink device=hw:Audio,1 control=PCM,1

确保文件中没有单引号或双引号

我和你遇到的问题是一样的,硬件也是一样的。据我所知,我们的声卡似乎还不受内核支持,或者 snd-hda-intel 驱动程序无法正确加载。

我们可能要倒霉一段时间了。我几乎尝试了所有方法,从编辑 alsa-base.conf 文件到将我的内核更新到 5.18.2,但都不起作用。

答案3

我已为 @Hossein 和 @jmose 点赞,感谢你们帮助我实现目标!我终于成功了。对于任何偶然发现这篇文章的人,如果有相同或类似的问题问题,我将多次记录我经历的完整过程,以便从 ISO 安装到 Debian 桌面时获得确切的步骤。我知道很多内容对 OP 来说没用,但可能会对其他人有所帮助。当我使用最新的每日构建时,我将 Pro Audio / ProAudio 作为“驱动程序”,但我在下面没有它,一切似乎都正常工作。

母板:华硕 ROG STRIX X670E-E 主板

集成 Wi-Fi:英特尔® Wi-Fi 6E AX210(型号:AX210NGW):

集成音频: ROG SupremeFX 7.1 环绕声高清音频编解码器 ALC4080

图形处理器:NVIDIA 3070

使用 ISO:debian-live-11.5.0-amd64-cinnamon+nonfree.iso(内核 5.10.0-18-amd64)

切换到root用户

#Switch user to root
su -l

#Add your account username to the SUDO list
adduser YourAccount sudo

让 Grub 检测其他分区上的其他操作系统

对于较新版本的 Grub,我了解到它们会因为安全问题而阻止搜索其他分区上的操作系统。这将启用搜索,检测安装,然后禁用搜索,这样您从一开始就可以检测到所有操作系统。

在仍然以 root 身份运行时,编辑 GRUB

nano /etc/default/grub

将其添加到底部

#使探测器能够检测其他分区上的操作系统

GRUB_DISABLE_OS_PROBER=false

保存并退出 - Ctrl+s、Ctrl+x

获取 Grub 来更新操作系统启动列表

sudo update-grub

防止 Grub 查找其他操作系统

sudo nano /etc/default/grub

注释掉 PROBER 行

保存并退出 - Ctrl+s、Ctrl+x

更新源和包

在仍然以 root 身份运行时,编辑源列表

nano /etc/apt/sources.list

(也可以使用apt edit-sources

删除所有内容并添加以下内容:

##--------------------------------------------------------------------------------------------------------

##2022-11-26 由 Aubs 添加以获取非免费和其他不稳定的软件包

#使用英国镜报

德布http://ftp.uk.debian.org/debian/bullseye 主要贡献 非自由

德布http://deb.debian.org/debian-securitybullseye-security 主要贡献 非自由

德布http://deb.debian.org/debianbullseye-updates 主要贡献 非自由

# 下一版本的建议更新

德布http://ftp.uk.debian.org/debianbullseye-proposed-updates 主要贡献 非自由

#BACKPORTS 更新

德布http://ftp.uk.debian.org/debianbullseye-backports 主要贡献 非自由

#测试更新

德布http://ftp.uk.debian.org/debian测试主要贡献 non-free

#UNSTABLE 的更新 - 不稳定与测试一样吗?

#debhttp://ftp.uk.debian.org/debian不稳定 主要贡献 非自由

##--------------------------------------------------------------------------------------------------------

保存并退出 - Ctrl+s、Ctrl+x

添加偏好设置以仅提供稳定版更新

nano /etc/apt/preferences

添加以下内容

包裹: *

Pin:释放 a=bullseye

Pin 优先级:500

包裹: *

Pin:release a=bullseye-backports

Pin 优先级:400

包裹: *

固定:发布 a=proposed-updates

Pin 优先级:300

包裹: *

Pin:发布 a=测试

Pin 优先级:200

保存并退出 - Ctrl+s、Ctrl+x

检查更新

apt update

检查需要更新的内容

apt list --upgradable

更新所有内容

apt upgrade

安装一些有用的软件包

apt install whois wget git

重启

reboot

为了确保您没有获得任何不稳定的更新,请注释掉不稳定的存储库(bullseye-proposed-updates / bullseye-backports / testing / stable),运行apt update/ apt upgrade,再次取消注释,运行apt update,应该没有任何剩余的软件包需要更新(All packages are up to date.)。这意味着您没有获得任何不稳定的更新。

将内核更新至 6.0(通过反向移植)

uname -rv

从 11.5 Cinnamon ISO 开始

5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02)

sudo apt list -a linux-image-amd64 linux-headers-amd64

linux-headers-amd64/测试 6.0.8-1 amd64

linux-headers-amd64/bullseye-backports,现在 6.0.3-1~bpo11+1 amd64

linux-headers-amd64/stable-security,建议更新 5.10.149-2 amd64

linux-headers-amd64/stable 5.10.140-1 amd64 [已安装,自动]

linux-image-amd64/测试 6.0.8-1 amd64

linux-image-amd64/bullseye-backports,现在 6.0.3-1~bpo11+1 amd64

linux-image-amd64/stable-security,建议更新 5.10.149-2 amd64

linux-image-amd64/stable 5.10.140-1 amd64 [已安装]

sudo apt -t bullseye-backports install linux-image-amd64 linux-headers-amd64
sudo reboot

启动后,再次检查版本

uname -rv

内核升级后

6.0.0-0.deb11.2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.3-1~bpo11+1 (2022-10-29)

设置音频

检查所有存储库中 alsa-utils 的最新版本

sudo apt list -a alsa-utils

alsa-utils/测试 1.2.7-1 amd64

alsa-utils/stable,stable,now 1.2.4-1 amd64 [已安装,自动]

安装测试版的最新版本

sudo apt -t testing install alsa-utils
alsaucm reload

检查所有存储库中 pulseaudio 的最新版本

sudo apt list -a pulseaudio

pulseaudio/测试,现在 16.1+dfsg1-2+b1 amd64

pulseaudio/stable 14.2-2 amd64 [已安装,自动]

安装测试版的最新版本

sudo apt -t testing install pulseaudio
sudo reboot now

下一步将采取这里

检查正在使用哪个设备,设备名称用于设置 [device=hw:Audio] 下一步

cat /proc/asound/cards

0 [NVidia ]: HDA-英特尔 - HDA NVidia

1 [通用]:HDA-Intel - HD-Audio 通用

2 [音频]:USB-音频 - USB 音频

通用 USB 音频,位于 usb-0000:10:00.0-6,高速

pacmd load-module module-alsa-sink name='Front Panel Headphone' device=1 device_id=2 control='PCM',1
pacmd load-module module-alsa-sink device=hw:Audio,1 control='PCM',1

编辑默认的 Pulse Audio 配置,以确保每次重启后音频都能正常工作

sudo nano /etc/pulse/default.pa

添加到底部(只有一行代码,但其余的注释是为了在将来提醒您它来自哪里!)

##------------------------------------------------------------------------------------------------------------------------------------------------

##Aubs 添加了 2022-11-26,以在重启之间保留音频

##取自https://askubuntu.com/a/1420082/689452

##$ cat /proc/asound/cards

##输出>> 2 [音频]:USB 音频 - USB 音频

##$ pacmd load-module module-alsa-sink name='前面板耳机' device=1 device_id=2 control='PCM',1

##确保 [device=hw:Audio] 与上面的 OUTPUT 匹配

##$ pacmd 加载模块 module-alsa-sink 设备=hw:Audio,1 控制='PCM',1

加载模块模块alsa接收器设备=hw:音频,1控制=PCM,1

##------------------------------------------------------------------------------------------------------------------------------------------------

保存并退出 - Ctrl+s、Ctrl+x

下一步将采取这里

下载最新的 alsa-ucm-conf

cd ~/Downloads
git clone https://github.com/alsa-project/alsa-ucm-conf
cd alsa-ucm-conf

备份现有的 ucm2 文件夹

sudo mv /usr/share/alsa/ucm2 /usr/share/alsa/ucm2_bak/

创建从下载到实时文件夹的符号链接 - 最好将 ucm2 移动到实时位置

sudo ln -s `pwd`/ucm2 /usr/share/alsa/ucm2

重新加载 alsa,终止 PulseAudio 并重新启动其守护进程

alsaucm reload
pulseaudio -k && pulseaudio -D

alsamixer(Alsa Mixer)和帕武控制(PulseAudio 音量控制实用程序)很有用。 不要使用反向移植或测试版本,因为它们会损坏!

sudo apt install alsamixer pavucontrol
  • 运行alsamixer,按 F6,选择声卡,确保它可见。按 Esc 退出。
  • 运行pavucontrol,查看分配给每个设备的配置文件。
  • 运行cinnamon-settings sound(或打开声音设置)查看音频是否配置正确。

安装 Nvidia(无需 Nouveau 获取最新驱动程序)

选项 A

注意:检查通过 APT 提供的最新版本是否与下载的版本相同,最好通过 APT 安装它!

sudo apt list -a nvidia-driver

然后安装

sudo apt -t testing install nvidia-driver

选项 B

否则,说明这里

此方法使用最新的驱动程序(或测试版)安装 NVIDIA 并删除 Nouveau/OpenCL 等。

从以下位置下载最新驱动程序这里

下一步将采取这里

删除 NVIDIA 和其他公司的所有残余

sudo apt remove nvidia-driver
sudo apt purge nvidia-driver
sudo apt purge nvidia*

查找所有已安装的提供 libOpenCL 的软件包,然后清除它们 sudo dpkg -S libOpenCL

我必须删除以下内容 sudo apt purge ocl-icd-libopencl1

删除所有剩余文件

find / -name libOpenCL\* -print0 | xargs -0 rm -rf
sudo apt remove hashcat

手动删除以下发现的所有应用程序:

sudo apt list --installed | grep 'OpenCL CL SDK CUDA'

我没什么可删除的

sudo apt autoremove
sudo apt install ocl-icd-libopencl1 opencl-headers clinfo
sudo reboot

防止 Nouveau 启动

sudo nano /etc/modprobe.d/nvidia-aubs-disable-nouveau.conf

加入

#由 aubs 生成,用于 NVIDIA 安装

新黑名单

选项 nouveau modeset=0

保存并退出 - Ctrl+s、Ctrl+x

sudo update-initramfs -u
sudo reboot

它可能无法启动到桌面,请将显示器连接到主板上的 HDMI 端口而不是 GPU,然后登录

如果屏幕没有亮起,当出现 grub 菜单时,按e 然后添加nomodeset到 Linux 行的末尾,最后按 F10 进行启动

Ctrl+Alt+F1 并登录

sudo service lightdm stop
cd ~/Documents

安装最新的驱动程序,但检查文件名是否与下载的文件名匹配

sudo sh NVIDIA-Linux-x86_64-525.53.run
sudo reboot

相关内容