AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-279105

pedda's questions

Martin Hope
pedda
Asked: 2025-02-24 21:45:27 +0800 CST

在 2 个微型 SD 卡单元上进行 Rsync,组合为 luks 加密的 LVM,在 fscrypt 之上:Fscrypt 似乎会不时锁定,如何避免?

  • 6

希望有人能提供提示,如果 fscrypt 可以替代我备份主文件夹(位于不同的 PV 组中,luks 加密,ecryptfs 主文件夹)中容易出错的 ecyryptfs,那么可以帮我解决这个问题:

   +-----------------------------------+        +-----------------------------------+
   |          Source: Home             |        |         Destination: Backup       |
   |     (eCryptfs on Home Partition)  |        |     (fscrypt on Backup Partition) |
   +-----------------------------------+        +-----------------------------------+
                \|/               |                   ^         \|/
                 |                |___________________|          |
                 |              (rsync from Home to Backup)      | 
                 v                                               v
   +-----------------------------------+        +-----------------------------------+
   |   eCryptfs Layer (Home Folder)    |        | fscrypt Layer (BackupHome)        |
   +-----------------------------------+        +-----------------------------------+
   |       Home Partition              |        |       BackupHome Partition        |
   +-----------------------------------+        +-----------------------------------+   
   |   LVM Volume (Home)               |        |   LVM Volume (BackupHome)         |
   +-----------------------------------+        +-----------------------------------+ 
   |   LVM: PV Group (Main SSD)        |        |   LVM: PV Group (USB Stick)       |
   +-----------------------------------+        +-----------------------------------+   
   |   LUKS Encrypted (Main SSD)       |        |   LUKS Encrypted (µSD Slot 1)     |
   +-----------------------------------+        +-----------------------------------+ 
   |   Physical Layer (Main SSD)       |        |   LUKS Encrypted (µSD Slot 2)     |
   +-----------------------------------+        +-----------------------------------+
                 \|/                            |           Physical Layer          |
                  |                             +-----------------------------------+
                  |                                             \|/
   +-----------------------------------+        +-----------------------------------+
   | Physical Layer (4 TB SSD)         |        |   Physical Layer (USB Stick)      |
   | Dual Boot Windows/Linux (LVM)     |        |   Combined 2 x 1.5TB µSD with     |
   | LUKS LVM in part.6, part.5 /boot  |        |                                   |
   | (root, home, swap)in 3.1TB Volume |        |   LVM into 2.8TB Volume           |
   +-----------------------------------+        +-----------------------------------+

现在我想使用以下命令备份我的数据:

rsync -avvh --inplace --size-only --info=progress2 /home/userXXX/  /backupHome/userXXX/

我时不时会随机收到不同的错误消息,例如这些(日志下方的侧面信息):

[..]
testdaten/shrinkMpegxxDB.log
          9,02G   0%  117,23MB/s    0:01:13 (xfr#915, to-chk=655/497427)
testdaten/yyy.zzz/
testdaten/scripts/
rsync: [receiver] open "/backupHome/userXXX/testdaten/shrinkMpegxxDB.log" failed: Required key not available (126)
          9,02G   0%  117,23MB/s    0:01:13 (xfr#915, to-chk=0/497427)  

sent 9,04G bytes  received 42,04K bytes  121,37M bytes/sec
total size is 1,75T  speedup is 194,06
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]


[..]

rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/menus" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/xxxx/.config/mpv" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nautilus" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nemo" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/nomacs" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/procps" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/pulse" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/qimgv" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/remmina" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/simple-scan" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/systemd" failed: Required key not available (126)
*** Skipping any contents from this failed directory ***
rsync: [generator] recv_generator: mkdir "/backupHome/userXXX/.config/teamviewer" failed: Required key not available (126)

[..]

        103,23M   0%    2,26MB/s    0:00:43 (xfr#1034, ir-chk=1028/476659)
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 1024 bytes, did move
[sender] expand file_list pointer array to 4096 bytes, did not move
[sender] expand file_list pointer array to 16384 bytes, did not move
[sender] expand file_list pointer array to 32768 bytes, did move
        103,23M   0%    2,24MB/s    0:00:44 (xfr#1034, ir-chk=2841/479500)
[..]
total: matches=0  hash_hits=0  false_alarms=0 data=103226155

sent 124,32M bytes  received 46,81M bytes  3,20M bytes/sec
total size is 1,75T  speedup is 10.254,91
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]

完整备份为 1.8 TB。加上传输的第一“块”数据(每次都因错误而中断),共计 747 GB。文件访问被禁止。我尝试使用 bash 命令,但同样失败,因此它与有关fscrypt。

每次我一次又一次地解锁房屋(每次取消后),它都会继续工作。因为 USB 棒变得非常热,所以我用冰箱里的一些冷却冰块给它降温:

fscrypt unlock /backupHome/userXXX

那么你的想法是什么?我对错误原因的建议是:

  • 设备过热(冷却并再次解锁后,一次传输 1TB 的数据)
  • 我是否在解锁 fscrypted backupHome 文件夹时意外犯了一个错误?
  • LUKS/LVM/2µSD 配置在 µSD 扩展 USB 模块中绑定在一起是否有问题?

我希望有人能帮忙!

[编辑] 根据@SteffenUlrich 和我自己的假设,这可能强烈指向硬件问题,因为

  • SD 可能与 ext4fs 兼容性不太好,主要仅支持 FAT/FAT32/exFat
  • 系统过热(因为冷却有助于完美地加载至少 1TB 的数据块。)(但这对我来说并没有得到证实,因为我无法正确评估其他错误来源,所以当天 dm-7 设备的日志显示了一些提示:
# journalctl -k | grep -Ei "excryptfs|error"
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: pcieport 0000:00:1c.4: DPC: error containment capabilities: Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 4, DL_ActiveErr+
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: pcieport 0000:00:1d.4: DPC: error containment capabilities: Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 4, DL_ActiveErr+
Oct 17 19:15:16 HP-ENVY-Laptop-13-aq1176ng kernel: RAS: Correctable Errors collector initialized.
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: hp_wmi: query 0x4c returned error 0x6
Feb 20 00:05:36 HP-ENVY-Laptop-13-aq1176ng kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_TZ.ETMD], AE_NOT_FOUND (20230628/psargs-332)
Feb 20 00:05:36 HP-ENVY-Laptop-13-aq1176ng kernel: ACPI Error: Aborting method \_SB.IETM._OSC due to previous error (AE_NOT_FOUND) (20230628/psparse-529)
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read
Feb 20 09:41:07 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 0, async page read

[.. many more ..]

Feb 20 09:41:52 HP-ENVY-Laptop-13-aq1176ng kernel: buffer_io_error: 6 callbacks suppressed

[.. many more ..]

Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 8192, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 8192, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 16384, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on dev dm-7, logical block 16384, async page read
Feb 20 09:42:01 HP-ENVY-Laptop-13-aq1176ng kernel: Buffer I/O error on 

[.. many more ..]

Feb 23 14:43:21 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 23 16:19:36 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 23 20:43:48 HP-ENVY-Laptop-13-aq1176ng kernel:  filemap_fdatawait_range_keep_errors+0x12/0x50
Feb 25 04:04:24 HP-ENVY-Laptop-13-aq1176ng kernel: ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4]
Feb 25 04:04:24 HP-ENVY-Laptop-13-aq1176ng kernel: ecryptfs_read_folio: Error decrypting page; rc = [-4]
ecryptfs_read_folio: Error decrypting page; rc = [-4]

[.. man more ..]

usb
  • 1 个回答
  • 27 Views
Martin Hope
pedda
Asked: 2025-02-13 09:20:18 +0800 CST

Linux Mint 22:initramfs 的设置问题(luks 加密分区,带有用于 root、home、swap 的 LVM)

  • 9

我的设置:先决条件:

  • 双启动 Windows 10/以前为 Ubuntu 24.04(来自 22.04)
  • 分区表:
    /dev/nvme0n1p7                   202G   96M  202G   1% 
    /ntfs_data
    /dev/nvme0n1p3                   230G   54G  177G  24% 
    /windows
    /dev/nvme0n1p5                   3,0G  288M  2,6G  11% /boot
    /dev/mapper/ubuntu--vg-home      2,8T  1,7T  964G  64% /home
    /dev/nvme0n1p1                   256M  158M   99M  62% 
    /boot/efi
    tmpfs                            1,6G  300K  1,6G   1% /run/user/1000
    /home/xxx/.Private               2,8T  1,7T  964G  64% /home/xxx
    /dev/mapper/usb1TB_202304_crypt  938G  890G  559M 100% 
    /backup1TB
    /backup1TB/home_xxx_bck          938G  890G  559M 100% 
    /backup1TB/home_xxx_bck
    
    我的 SSD 分区表的 gparted 屏幕截图
  • /dev/nvme0n1p6 是配置了 LVM 的 luks 加密设备:
    • 根 (243 GB)
    • 家庭 (2.8 TB)
    • 交换 ( 16 GB)

安装导致initramfs出错的步骤:

我使用了 Linux Mint 22 USB 安装程序(图片下载于 2025 年 1 月)。我设法安装了 LVM2 和 cryptsetup 包以获得 LVM 和 LUKS 的帮助。我在 2022 年在 Ubuntu 22.04 下配置了 LVM,如下所示:

# vgs
  WARNING: Couldn't find device with uuid CQVk01-WJQL-pjIi-opcT-oESN-UOb1-judhlH.
  WARNING: Couldn't find device with uuid I5OUXJ-OkxW-403c-rEVJ-BmyG-Rd4M-r7SSFs.
  WARNING: VG ubuntu-vg is missing PV CQVk01-WJQL-pjIi-opcT-oESN-UOb1-judhlH (last written to /dev/mapper/ubuntu-vg1).
  WARNING: VG ubuntu-vg is missing PV I5OUXJ-OkxW-403c-rEVJ-BmyG-Rd4M-r7SSFs (last written to /dev/mapper/ubuntu-vg2).
  VG        #PV #LV #SN Attr   VSize  VFree   
  ubuntu-vg   3   4   0 wz-pn- <6,01t <180,97g

# pvs
  WARNING: Couldn't find device with uuid CQVk01-WJQL-pjIi-opcT-oESN-UOb1-judhlH.
  WARNING: Couldn't find device with uuid I5OUXJ-OkxW-403c-rEVJ-BmyG-Rd4M-r7SSFs.
  WARNING: VG ubuntu-vg is missing PV CQVk01-WJQL-pjIi-opcT-oESN-UOb1-judhlH (last written to /dev/mapper/ubuntu-vg1).
  WARNING: VG ubuntu-vg is missing PV I5OUXJ-OkxW-403c-rEVJ-BmyG-Rd4M-r7SSFs (last written to /dev/mapper/ubuntu-vg2).
  PV                      VG        Fmt  Attr PSize  PFree   
  /dev/mapper/ubuntu-luks ubuntu-vg lvm2 a--   3,21t <180,97g
  [unknown]               ubuntu-vg lvm2 a-m  <1,40t       0 
  [unknown]               ubuntu-vg lvm2 a-m  <1,40t       0 

# lvs
  LV         VG        Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  backupHome ubuntu-vg -wi-----p-    2,79t                                                    
  home       ubuntu-vg -wi-ao----    2,78t                                                    
  root       ubuntu-vg -wi-ao---- <247,33g                                                    
  swap_1     ubuntu-vg -wi-ao----   16,00g  

我打开了一个 bash,然后打开 LUKS 并将 LVM 设置为活动状态(LVM 以前是在 2022 年的 22.04 下创建的):

# cryptsetup luksOpen /dev/nvmeon1p6 ubuntu-luks
# lvchange -ay ubuntu-vg

然后我启动了安装应用程序,并选择手动模式,在分配分区时,我按照上面所示进行配置,将根和 /dev/nvme0n1p5 格式化为(未加密)/boot 分区。

之后,我启动了新安装的 Linux Mint 22。但有趣的是,除了第一次启动时,启动顺序中的图形密码对话框只弹出一次并解密了 luks,但无法正确分配 LVM 分区。之后甚至找不到或检测到 LUKS 加密卷,在每种情况下,我最终都在繁忙的盒装 initramfs 中等待了很长时间。

在这里我总是必须重复上述两个指令,然后才能退出 initramfs 并继续启动我的系统。

我发现 /etc/crypttab 中没有 crypttab,于是我安装了一个

# cat /etc/crypttab 
# <target name>         <source device>                           <key file>      <options>
# mounted /, /home, swap_1
ubuntu-luks             UUID=b910aded-9314-403f-a350-7892ba95ffd5 none            luks
# mounted as /backupHome LV part1, partial Loading (mustn't be present during boot)
ubuntu-luks_backupHome1 UUID=b1d9ec9c-7dac-445f-998b-695b2ddf6daa none            luks
#ubuntu-luks_backupHome1 UUID=b1d9ec9c-7dac-445f-998b-695b2ddf6daa none            luks,noauto
# mounted as /backupHome LV part2, partial loading (mustn't be present during boot)
ubuntu-luks_backupHome2 UUID=9c5b65e8-5785-44be-85c7-3009cbc1e02a none            luks
#ubuntu-luks_backupHome2 UUID=9c5b65e8-5785-44be-85c7-3009cbc1e02a none            luks,noauto
usb1TB_202304_luks      UUID=4c4b603f-9146-4cb0-9621-9aa098ec592c none            luks

# ubuntu-luks             UUID=b910aded-9314-403f-a350-7892ba95ffd5 none            luks  # mounted on /
# ubuntu-luks_backupHome1 UUID=b1d9ec9c-7dac-445f-998b-695b2ddf6daa none            luks,noauto  # mounted as /backupHome, part1
# ubuntu-luks_backupHome2 UUID=9c5b65e8-5785-44be-85c7-3009cbc1e02a none            luks,noauto  # mounted as /backupHome, part2

和 /etc/fstab:

# cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system>                           <mount point>   <type>  <options>                 <dump>  <pass>
/dev/mapper/ubuntu--vg-root               /               ext4    errors=remount-ro         0       1
# /boot was on /dev/nvme0n1p5 during installation
UUID=712868f5-29cc-429a-b535-375a3d868fa3 /boot           ext4    defaults                  0       2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=E079-2792                            /boot/efi       vfat    umask=0077                0       1
/dev/mapper/ubuntu--vg-home               /home           ext4    defaults                  0       2
# /ntfs_data was on /dev/nvme0n1p7 during installation
UUID=3B269E2A1843CA0B                     /ntfs_data      ntfs    defaults,umask=007,gid=46 0       0
# /windows was on /dev/nvme0n1p3 during installation
UUID=4C30FF1730FF06AC                     /windows        ntfs    defaults,umask=007,gid=46 0       0
/dev/mapper/ubuntu--vg-swap_1             none            swap    sw                        0       0
/dev/mapper/ubuntu--vg-backupHome         /backupHome     ext4    defaults,nofail           0       2

然后我更新了 initramfs $ sudo update-initramfs -k all -c

现在我永久修复了 luks 加密(因此对话框每次启动时都会出现,就像描述的一样)但是 lvm 的激活 $ lvchange -ay ubuntu-vg 不是在 initramfs 中完成的!

我如何才能实现最后一步——激活 LV 组?

  • 注意:作为 USB 驱动器的备份 lvm 媒体通常在启动期间不存在!
    # mounted as /backupHome LV part1, partial Loading (mustn't be present during boot)
    ubuntu-luks_backupHome1  UUID=xxx none            luks
    #ubuntu-luks_backupHome1 UUID=xxx none            luks,noauto
    # mounted as /backupHome LV part2, partial loading (mustn't be present during boot) 
    ubuntu-luks_backupHome2  UUID=xxx none            luks
    #ubuntu-luks_backupHome2 UUID=xxx none            luks,noauto
    

[编辑 101502013]:今天它启动时出现类似以下错误

/sbin/lvchange not found

在 initramfs 中。我发现在 中有一个不同之处initrams,那就是lvm的命令(如lvs, pvs, vgs, lvchange, lvcreate等)仅使用主命令lvm作为前缀。我还发现在/sbin中initramfs只有一个符号链接,即奇怪的别名 lvm -> vgchange,似乎在应用链接后 arg0 变成了 arg1。这是我接下来尝试的方法,将此链接放入 initramfs 中。

[EDIT2] 我首先将 lvm 启动和激活脚本放入 local-top,然后放入 init-bottom,最后放入 local-bottom,并相应地更新了 initramfs, update-initramfs -k all -c 但没有任何成功,LUKS 已解密,但脚本要么未运行,要么运行得太早,每次它最终都会出现在 initramfs 控制台及其 busybox 中。当我手动执行脚本并退出时,它每次都会继续启动。但这非常不舒服,而且由于时间滞后很多,因此同样耗时,它不是执行脚本,而是无休止地重复产生此输出行:

mdadm: No array found in config file or automatically

这是我的脚本的实际位置:

# tree /etc/initramfs-tools/
/etc/initramfs-tools/
├── conf.d
│   └── cryptsetup
├── hooks
├── initramfs.conf
├── modules
├── scripts
│   ├── init-bottom
│   ├── init-premount
│   ├── init-top
│   ├── local-bottom
│   │   └── lvm
│   ├── local-premount
│   ├── local-top
│   ├── nfs-bottom
│   ├── nfs-premount
│   ├── nfs-top
│   └── panic
└── update-initramfs.conf

14 directories, 5 files

该脚本看起来可以执行如下:

#!/bin/sh
# Check and activate LVM volumes regardless of input arguments

# Log the intention to activate LVM volumes
echo "Activating LVM volumes..." > /dev/console

# Activate the volume group
if /sbin/vgchange -ay ubuntu-vg; then
    echo "Logical volume group ubuntu-vg successfully activated." > /dev/console
    /sbin/lvm lvchange -ay ubuntu-vg --activationmode partial
else
    echo "Failed to activate logical volume group ubuntu-vg." > /dev/console
fi

在这期间,我压缩了一个 initrd 映像以查看 cryptsetup 命令的运行位置,但它似乎有点复杂: unmkinitramfs -v initrd.img-6.8.0-53-generic /tmp/initrd 然后我搜索了cryptsetup :

# find /tmp/initrd/ -type f -iname "*" -exec grep -Hn "cryptsetup " {} \;
grep: /tmp/initrd/main/usr/sbin/cryptsetup: binary file matches
grep: /tmp/initrd/main/usr/lib/x86_64-linux-gnu/libcryptsetup.so.12.10.0: binary file matches
grep: /tmp/initrd/main/usr/lib/x86_64-linux-gnu/libmount.so.1.1.0: binary file matches
/tmp/initrd/main/usr/lib/cryptsetup/functions:320:        if [ -e "$CRYPTTAB_OPTION_header" ] && /sbin/cryptsetup isLuks -- "$CRYPTTAB_OPTION_header"; then
/tmp/initrd/main/usr/lib/cryptsetup/functions:324:        if /sbin/cryptsetup isLuks -- "$s"; then
/tmp/initrd/main/usr/lib/cryptsetup/functions:366:    /sbin/cryptsetup -T1 \
/tmp/initrd/main/usr/lib/cryptsetup/functions:396:    /sbin/cryptsetup -T1 \
/tmp/initrd/main/usr/bin/cryptroot-unlock:89:# birth date) of the cryptsetup process with same $CRYPTTAB_NAME.
/tmp/initrd/main/usr/bin/cryptroot-unlock:118:  # find the cryptsetup process with same $CRYPTTAB_NAME
/tmp/initrd/main/usr/bin/cryptroot-unlock:173:      echo "cryptsetup: cryptsetup failed, bad password or options?" >&2
/tmp/initrd/main/scripts/local-top/cryptroot:127:    # our `cryptroot-unlock` script searches for cryptsetup processes
/tmp/initrd/main/scripts/local-top/cryptroot:164:            cryptsetup_message "ERROR: $CRYPTTAB_NAME: cryptsetup failed, bad password or options?"
/tmp/initrd/main/scripts/local-top/cryptroot:177:                /sbin/cryptsetup remove -- "$CRYPTTAB_NAME"

**有什么想法吗?我做错了什么,或者可以做些什么不同的事情?**

linux-mint
  • 1 个回答
  • 53 Views
Martin Hope
pedda
Asked: 2025-02-13 00:30:21 +0800 CST

Linux Mint 22:HP Envy 13 aq1176ng-RDP 上仅有声音,但没有耳机或扬声器

  • 5

首先:通过 RDP(远程桌面连接)虚拟声音 iE NoMachine运行良好,只有内置扬声器和耳机没有声音。声音驱动程序(声音开放固件由 github 源 v2.2(在最近的 v2.12 之前)安装)。声卡是英特尔snd_hda_intel。

在此处输入图片描述

我关注了网络上关于 Linux Mint 或 Ubuntu 22 的几个链接,它们总是类似这样的:

  • 安装 ALSA
  • 重新安装音响系统并重新启动 alsa
  • (重新)安装管线
  • 安装并配置 hdajackretask(我认为这是最没有希望的方法)

包括重新启动 alsa,

# dmesg | grep snd
[  659.315312] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[  659.315388] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[  659.678692] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[  659.678695] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[  659.678697] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[  659.678698] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[  659.678699] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[  659.678699] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19

获取系统信息(最后两行音频):

# inxi -SMA
System:
  Host: HP-ENVY-Laptop-13-aq1176ng Kernel: 6.8.0-52-generic arch: x86_64
    bits: 64
  Desktop: Cinnamon v: 6.4.6 Distro: Linux Mint 22.1 Xia
Machine:
  Type: Laptop System: HP product: HP ENVY Laptop 13-aq1xxx
    v: Type1ProductConfigId serial: 8CG0165VNF
  Mobo: HP model: 86AE v: 83.18 serial: PJEKT1DHCDM061 UEFI: Insyde v: F.22
    date: 11/24/2023
Audio:
  Device-1: Intel Comet Lake PCH-LP cAVS driver: sof-audio-pci-intel-cnl
  API: ALSA v: k6.8.0-52-generic status: kernel-api

启动过程中‘snd’的日志重新硬化结果对我来说看起来很好:

$ journalctl -b -x | grep -i snd
Oct 17 19:15:17 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
Oct 17 19:15:17 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:    inputs:
Feb 20 00:05:30 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:    inputs:
Feb 20 01:17:31 HP-ENVY-Laptop-13-aq1176ng kernel: snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19

到目前为止还没有结果。唯一可行的是,如果你通过 NoMachine 连接,声音就会传输到远程计算机。

所以我认为声音是产生的,但在操作系统抽象层到硬件之间的某个地方存在问题。我恳求您提供想法或解决方案(树)!

[编辑]

aplay-l输出

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

lspci 输出:

# lspci
00:00.0 Host bridge: Intel Corporation Comet Lake-U v1 4c Host Bridge/DRAM Controller (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation CometLake-U GT2 [UHD Graphics] (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Comet Lake Thermal Subsytem
00:14.0 USB controller: Intel Corporation Comet Lake PCH-LP USB 3.1 xHCI Host Controller
00:14.2 RAM memory: Intel Corporation Comet Lake PCH-LP Shared SRAM
00:14.3 Network controller: Intel Corporation Comet Lake PCH-LP CNVi WiFi
00:14.5 SD Host controller: Intel Corporation Comet Lake PCH-LP SCS3
00:15.0 Serial bus controller: Intel Corporation Serial IO I2C Host Controller
00:15.1 Serial bus controller: Intel Corporation Comet Lake Serial IO I2C Host Controller
00:16.0 Communication controller: Intel Corporation Comet Lake Management Engine Interface
00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode]
00:1c.0 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #1 (rev f0)
00:1c.4 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #5 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #9 (rev f0)
00:1d.4 PCI bridge: Intel Corporation Comet Lake PCI Express Root Port #13 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Comet Lake PCH-LP LPC Premium Controller/eSPI Controller
00:1f.3 Multimedia audio controller: Intel Corporation Comet Lake PCH-LP cAVS
00:1f.4 SMBus: Intel Corporation Comet Lake PCH-LP SMBus Host Controller
00:1f.5 Serial bus controller: Intel Corporation Comet Lake SPI (flash) Controller
02:00.0 3D controller: NVIDIA Corporation GP108BM [GeForce MX250] (rev a1)
04:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller S4LV008[Pascal]

dmesg|grep audio的输出

# dmesg |grep audio
[   15.060429] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   15.060582] sof-audio-pci-intel-cnl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   15.060596] sof-audio-pci-intel-cnl 0000:00:1f.3: enabling device (0000 -> 0002)
[   15.060801] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   15.060876] sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   15.067813] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
[   15.108086] sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 5
[   15.108092] sof-audio-pci-intel-cnl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   15.108097] sof-audio-pci-intel-cnl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[   15.113689] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware paths/files for ipc type 0:
[   15.113694] sof-audio-pci-intel-cnl 0000:00:1f.3:  Firmware file:     intel/sof/sof-cml.ri
[   15.113697] sof-audio-pci-intel-cnl 0000:00:1f.3:  Topology file:     intel/sof-tplg/sof-hda-generic-2ch.tplg
[   15.116471] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[   15.116474] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   15.116481] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[   15.216153] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[   15.216160] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[   15.236595] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[   15.257684] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   15.257692] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   15.257695] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   15.257697] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[   15.257699] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[   15.257701] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
[ 4302.743485] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 4302.743565] sof-audio-pci-intel-cnl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 4302.744012] sof-audio-pci-intel-cnl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 4302.744080] sof-audio-pci-intel-cnl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 4302.750643] sof-audio-pci-intel-cnl 0000:00:1f.3: use msi interrupt mode
[ 4302.764441] sof-audio-pci-intel-cnl 0000:00:1f.3: hda codecs found, mask 5
[ 4302.764450] sof-audio-pci-intel-cnl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 4302.764457] sof-audio-pci-intel-cnl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[ 4302.766353] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware paths/files for ipc type 0:
[ 4302.766357] sof-audio-pci-intel-cnl 0000:00:1f.3:  Firmware file:     intel/sof/sof-cml.ri
[ 4302.766358] sof-audio-pci-intel-cnl 0000:00:1f.3:  Topology file:     intel/sof-tplg/sof-hda-generic-2ch.tplg
[ 4302.768019] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[ 4302.768022] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[ 4302.768029] sof-audio-pci-intel-cnl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[ 4302.880559] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[ 4302.880569] sof-audio-pci-intel-cnl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[ 4302.881182] sof-audio-pci-intel-cnl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[ 4302.897218] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[ 4302.897226] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 4302.897229] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 4302.897232] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[ 4302.897233] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[ 4302.897235] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19

[编辑 3] Alsamixer 的图片。如果设备在列中的数字周围是绿色,则表示设备已静音,反之亦然?另外还有声卡列表,实际上是默认声卡和 sof-hda-default。 在此处输入图片描述 但在 alsamixer 中更改音量或静音不会改变扬声器中缺失的声音,并且所做的更改在启动后不会保留: 在此处输入图片描述

linux-mint
  • 1 个回答
  • 89 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve