fwupd / fwupd

A system daemon to allow session software to update firmware
GNU Lesser General Public License v2.1
2.79k stars 426 forks source link

UEFI update just reboots after printing "fwupd-efi version 1.4" #6012

Closed yejingchen closed 6 months ago

yejingchen commented 1 year ago

Describe the bug My Laptop is HP EliteBook 845 14 inch G9 Notebook PC. After using fwupdmgr update to update system firmware, and accept the reboot prompt, the system reboots, prints fwupd-efi version 1.4, but after <5 seconds the system reboots again into Arch Linux, without actually updating the firmware.

After booting into Arch, fwupdmgr get-history says failed to run update on reboot.

Steps to Reproduce

Expected behavior After printin fwupd-efi version 1.4, the update continues, then the HP firmware update screen shows up and handles the rest.

fwupd version information Please provide the version of the daemon and client.

% fwupdmgr --version
compile   org.freedesktop.fwupd         1.9.3
compile   com.hughsie.libxmlb           0.3.11
compile   com.hughsie.libjcat           0.1.14
runtime   org.freedesktop.fwupd-efi     1.4
compile   org.freedesktop.gusb          0.4.6
runtime   com.hughsie.libjcat           0.1.14
runtime   com.dell.libsmbios            2.4
runtime   org.freedesktop.gusb          0.4.6
runtime   org.kernel                    6.4.3-arch1-2
runtime   org.freedesktop.fwupd         1.9.3

Please note how you installed it (apt, dnf, pacman, source, etc): Arch Linux packages using pacman:

fwupd 1.9.3-1
fwupd-efi 1.4-1
**fwupd device information** Please provide the output of the fwupd devices recognized in your system. ```shell % LANGUAGE= LANG=C.UTF-8 fwupdmgr get-devices --show-all-devices HP HP EliteBook 845 14 inch G9 Notebook PC │ ├─ELAN0767:00 04F3:31EC: │ Device ID: 903986b371e59b3d3dcf12a32c7f339fbb56a29f │ Summary: Touchpad │ Current version: 0x0007 │ Bootloader Version: 0x0001 │ Vendor: ELAN Microelectronics (HIDRAW:0x04F3) │ GUIDs: 51b98b32-da4e-5171-9310-3c2859f6a6fb ← HIDRAW\VEN_04F3&DEV_31EC │ d421b6c5-038e-517a-a525-ce89bcc2032d ← HIDRAW\VEN_04F3&DEV_31EC&MOD_001D │ 15e96dd6-4f5e-5d56-a991-2e63e82d1bd2 ← ELANTP\ICTYPE_11 │ fc637c95-0376-54a4-9c37-c5b077e71327 ← ELANTP\ICTYPE_11&MOD_001D │ 5830ebc2-7952-5ca5-a0c1-569243b6f7ea ← ELANTP\ICTYPE_11&MOD_001D&DRIVER_HID │ Device Flags: • Internal device │ • Updatable │ ├─AMD Ryzen 7 PRO 6850HS with Radeon Graphics: │ │ Device ID: 4bde70ba4e39b28f9eab1628f9dd6e6244c03027 │ │ Current version: 0x0a404102 │ │ Vendor: Advanced Micro Devices, Inc. │ │ GUIDs: b9a2dd81-159e-5537-a7db-e7101d164d3f ← cpu │ │ 22f9ecf4-588d-5c0a-8326-6ebff3655c6d ← CPUID\PRO_0&FAM_19 │ │ 52f8f9af-1ca9-5352-bef4-ceb232c888a5 ← CPUID\PRO_0&FAM_19&MOD_44 │ │ e94372a3-3ffb-5d1c-a579-c415b7313e52 ← CPUID\PRO_0&FAM_19&MOD_44&STP_1 │ │ Device Flags: • Internal device │ │ │ ├─GPIO controller: │ │ Device ID: f685512aa07369c9e77742acef941d779d31e766 │ │ GUID: 37b440a9-2473-5087-a39b-db84f32a8ed8 ← GPIO\ID_AMDI0030:00 │ │ │ ├─Graphics Processing Unit (GPU): │ │ Device ID: 2287ee908298807e95f89a9b7c1a435c1a634e33 │ │ Current version: 113-REMBRANDT-X35 │ │ Vendor: Advanced Micro Devices, Inc. [AMD/ATI] (PCI:0x1002) │ │ GUIDs: 817e27b3-d1bb-591a-a1cc-e039d0a60be6 ← PCI\VEN_1002&DEV_1681 │ │ 8e4358e9-34cc-593b-81b0-a96d1b9e346d ← PCI\VEN_1002&DEV_1681&SUBSYS_103C8990 │ │ Device Flags: • Internal device │ │ │ ├─Secure Processor: │ │ Device ID: c54ab0237d7a8db8c717b68e0be78e4374a2a079 │ │ Vendor: Advanced Micro Devices, Inc. (PCI:0x1022) │ │ GUIDs: 9844da3e-1df2-52fe-9413-d4378af6221e ← PCI\VEN_1022&DEV_1649 │ │ 346087e4-e3d3-5b44-ad6e-3323d1388621 ← PCI\VEN_1022&DEV_1649&SUBSYS_10221649 │ │ Device Flags: • Internal device │ │ │ ├─System Management Unit (SMU): │ │ Device ID: db0330716216c629bb2c07256e5d018f499eb6ce │ │ Summary: Microcontroller used within CPU/APU program 4 │ │ Current version: 69.48.168 │ │ Vendor: Advanced Micro Devices, Inc. │ │ GUID: 79307ae6-a2ea-52e1-bf56-6abbaf3547ad ← /sys/devices/platform/AMDI0007:00 │ │ Device Flags: • Internal device │ │ │ ├─USB4 host controller: │ │ Device ID: 4cdd3f9870542f43e562c7ad5e56173ccb22db60 │ │ Summary: Unmatched performance for high-speed I/O │ │ GUID: e72e778e-94f7-5ed2-b560-1c1262ee217c ← TBT-fixed │ │ Device Flags: • Internal device │ │ • System requires external power source │ │ │ └─USB4 host controller: │ Device ID: 9b8543f5fc515e6315b10dd901b6d91ced674a5b │ Summary: Unmatched performance for high-speed I/O │ GUID: e72e778e-94f7-5ed2-b560-1c1262ee217c ← TBT-fixed │ Device Flags: • Internal device │ • System requires external power source │ ├─Prometheus: │ │ Device ID: 23ec719b6aabc2d2dac5176c232f0da7a21881b0 │ │ Summary: Fingerprint reader │ │ Current version: 10.01.3478575 │ │ Vendor: Synaptics (USB:0x06CB) │ │ Install Duration: 2 seconds │ │ Serial Number: 28844331238531 │ │ GUID: b2ef1610-d207-57bc-9053-e4161c05b732 ← USB\VID_06CB&PID_00F0 │ │ Device Flags: • Updatable │ │ • Supported on remote server │ │ • Cryptographic hash verification is available │ │ • Signed Payload │ │ │ └─Prometheus IOTA Config: │ Device ID: 1c9da4ef563b0ccf0e36e409e3281a1ac62309af │ Summary: Fingerprint reader config │ Current version: 0005 │ Minimum Version: 0005 │ Vendor: Synaptics (USB:0x06CB) │ GUIDs: 88e57a95-5647-5d9d-a363-604f22a0bb26 ← USB\VID_06CB&PID_00F0-cfg │ 3b55d37a-0636-53a0-84db-a92ba3f6302c ← USB\VID_06CB&PID_00F0&CFG1_3633&CFG2_0 │ Device Flags: • Updatable │ • Supported on remote server │ • Only version upgrades are allowed │ • Signed Payload │ ├─System Firmware: │ │ Device ID: a45df35ac0e948ee180fe216a5f703f32dda163f │ │ Summary: UEFI ESRT device │ │ Current version: 0x01010c00 │ │ Minimum Version: 0x00000001 │ │ Vendor: HP (DMI:HP) │ │ Update State: Success │ │ GUIDs: 7c4a03ad-1274-429e-942f-4e2f1ba19ecb │ │ 230c8b18-8d9b-53ec-838b-6cfc0383493a ← main-system-firmware │ │ Device Flags: • Internal device │ │ • Updatable │ │ • System requires external power source │ │ • Supported on remote server │ │ • Needs a reboot after installation │ │ • Cryptographic hash verification is available │ │ • Device is usable for the duration of the update │ │ │ ├─UEFI Platform Key: │ │ Device ID: 6924110cde4fa051bfdc600a60620dc7aa9d3c6a │ │ Summary: Ye Jingchen's Secure Boot PK │ │ GUID: 5bd8addc-3f8b-52be-9ec0-b636785e9ebe ← UEFI\CRT_782CC6AF89066551E3F9F472E8C848AD0F58F2D7 │ │ │ └─UEFI dbx: │ Device ID: 362301da643102b9f38477387e2193e57abaa590 │ Summary: UEFI revocation database │ Current version: 83 │ Minimum Version: 83 │ Vendor: UEFI:Linux Foundation │ Install Duration: 1 second │ GUIDs: 0b1df0c6-703a-56bb-a35f-9f1d728c108c ← UEFI\CRT_A0D44BACF6D33E99CE87571EA2A7570602C802D5B239FA3A01D575CB69F77A53 │ a90424fd-9d8d-58c9-ab9b-8a360d2bd833 ← UEFI\CRT_A0D44BACF6D33E99CE87571EA2A7570602C802D5B239FA3A01D575CB69F77A53&ARCH_X64 │ Device Flags: • Internal device │ • Updatable │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ • Only version upgrades are allowed │ • Signed Payload │ ├─TPM: │ Device ID: c6a80ac3a22083423992a3cb15018989f37834d6 │ Current version: 15.21.64.11776 │ Vendor: Infineon (TPM:IFX) │ GUIDs: ff71992e-52f7-5eea-94ef-883e56e034c6 ← system-tpm │ 5eebb112-75ad-5536-b173-a11eb3399402 ← TPM\VEN_IFX&DEV_0000 │ 0df86b23-72b8-5128-9fc2-3377446e8ecf ← TPM\VEN_IFX&MOD_SLB9672 │ 6d81ab63-db2e-50ac-934f-6be9accf5e02 ← TPM\VEN_IFX&DEV_0000&VER_2.0 │ 13249df8-c159-574a-b877-b045aa40bc54 ← TPM\VEN_IFX&MOD_SLB9672&VER_2.0 │ Device Flags: • Internal device │ • System requires external power source │ • Needs a reboot after installation │ • Device can recover flash failures │ • Full disk encryption secrets may be invalidated when updating │ • Signed Payload │ ├─UEFI Device Firmware: │ Device ID: 349bb341230b1a86e5effe7dfe4337e1590227bd │ Summary: UEFI ESRT device │ Current version: 355401728 │ Minimum Version: 1 │ Vendor: DMI:HP │ Update State: Success │ GUID: bae9716c-e96d-6083-96e2-a86da2ac80f6 │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: 2292ae5236790b47884e37cf162dcf23bfcd1c60 │ Summary: UEFI ESRT device │ Current version: 369557504 │ Minimum Version: 1 │ Vendor: DMI:HP │ Update State: Success │ GUID: ca1146a5-1403-4385-9661-619f4e9eefbb │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: f95c9218acd12697af946874bfe4239587209232 │ Summary: UEFI ESRT device │ Current version: 890515205 │ Minimum Version: 1 │ Vendor: DMI:HP │ Update State: Success │ GUID: aaa08f4f-bc42-40c2-adf8-aa5a3e62e8e5 │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ └─WD PC SN810 SDCPNRY-512G-1006: Device ID: 03281da317dccd2b18de2bd1cc70a782df40ed7e Summary: NVM Express solid state drive Current version: HPS2 Vendor: Sandisk Corp (NVME:0x15B7) Serial Number: 220721456312 GUIDs: 887c0622-74ea-5036-99bd-c6c63082bd37 ← NVME\VEN_15B7&DEV_5011 b029d0ec-3f85-5cb7-a403-85c6f3bb4d83 ← NVME\VEN_15B7&DEV_5011&SUBSYS_15B75011 f87423fb-e365-5a28-afb5-97816a1cf0ac ← WD PC SN810 SDCPNRY-512G-1006 Device Flags: • Internal device • Updatable • System requires external power source • Needs a reboot after installation • Device is usable for the duration of the update ──────────────────────────────────────────────── Devices that were not updated correctly: • System Firmware (0x01010c00 → 0x01060000) Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices. Upload report now? (Requires internet connection) [Y|n]: n Do you want to disable this feature for future updates? [y|N]: n Declined upload ```

System UEFI configuration Please provide the output of the following commands:

efibootmgr -v
BootCurrent: 0007
Timeout: 0 seconds
BootOrder: 0007,0005,0006,0003,0004,0001,0000
Boot0000* Linux Firmware Updater        HD(1,GPT,f7bee283-8520-164a-9502-23faf00df9fb,0x800,0x100000)/File(\EFI\arch\fwupdx64.efi)
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 00 10 00 00 00 00 00 83 e2 be f7 20 85 4a 16 95 02 23 fa f0 0d f9 fb 02 02 / 04 04 32 00 5c 00 45 00 46 00 49 00 5c 00 61 00 72 00 63 00 68 00 5c 00 66 00 77 00 75 00 70 00 64 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
Boot0001* Wi-Fi IPV6 Network    PciRoot(0x0)/Pci(0x2,0x2)/Pci(0x0,0x0)/MAC(d88083b53f87,1)/Wi-Fi(00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00)/IPv6([::]:<->[::]:,0,0)4eac0881119f594d850ee21a522c59b21940000049535048
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 02 02 / 01 01 06 00 00 00 / 03 0b 25 00 d8 80 83 b5 3f 87 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 / 03 1c 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0d 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 4e ac 08 81 11 9f 59 4d 85 0e e2 1a 52 2c 59 b2 19 40 00 00 49 53 50 48
Boot0003  USB NETWORK BOOT:     PciRoot(0x0)/Pci(0x8,0x3)/Pci(0x0,0x3)/USB(1,0)/MAC(3c18a0c7c9ea,0)/IPv6([::]:<->[::]:,0,0)4eac0881119f594d850ee21a522c59b21b30000049535048
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 03 08 / 01 01 06 00 03 00 / 03 05 06 00 01 00 / 03 0b 25 00 3c 18 a0 c7 c9 ea 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0d 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 4e ac 08 81 11 9f 59 4d 85 0e e2 1a 52 2c 59 b2 1b 30 00 00 49 53 50 48
Boot0004* Wi-Fi IPV4 Network    PciRoot(0x0)/Pci(0x2,0x2)/Pci(0x0,0x0)/MAC(d88083b53f87,1)/Wi-Fi(00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00)/IPv4(0.0.0.00.0.0.0,0,0)4eac0881119f594d850ee21a522c59b21938000049535048
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 02 02 / 01 01 06 00 00 00 / 03 0b 25 00 d8 80 83 b5 3f 87 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 / 03 1c 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0c 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 4e ac 08 81 11 9f 59 4d 85 0e e2 1a 52 2c 59 b2 19 38 00 00 49 53 50 48
Boot0005  USB:          PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)4eac0881119f594d850ee21a522c59b20b18000049535048
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 01 08 / 01 01 06 00 03 00 / 7f ff 04 00
    data: 4e ac 08 81 11 9f 59 4d 85 0e e2 1a 52 2c 59 b2 0b 18 00 00 49 53 50 48
Boot0006  USB NETWORK BOOT:     PciRoot(0x0)/Pci(0x8,0x3)/Pci(0x0,0x3)/USB(1,0)/MAC(3c18a0c7c9ea,0)/IPv4(0.0.0.00.0.0.0,0,0)4eac0881119f594d850ee21a522c59b21f28000049535048
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 03 08 / 01 01 06 00 03 00 / 03 05 06 00 01 00 / 03 0b 25 00 3c 18 a0 c7 c9 ea 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0c 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 4e ac 08 81 11 9f 59 4d 85 0e e2 1a 52 2c 59 b2 1f 28 00 00 49 53 50 48
Boot0007* rEFInd Boot Manager   HD(1,GPT,f7bee283-8520-164a-9502-23faf00df9fb,0x800,0x100000)/File(\EFI\refind\refind_x64.efi)0400000049535048
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 00 10 00 00 00 00 00 83 e2 be f7 20 85 4a 16 95 02 23 fa f0 0d f9 fb 02 02 / 04 04 3a 00 5c 00 45 00 46 00 49 00 5c 00 72 00 65 00 66 00 69 00 6e 00 64 00 5c 00 72 00 65 00 66 00 69 00 6e 00 64 00 5f 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
    data: 04 00 00 00 49 53 50 48
efivar -l | grep fw
0abba7dc-e516-4167-bbf5-4d9d1c739416-fwupd-7c4a03ad-1274-429e-942f-4e2f1ba19ecb-0
tree /boot
/boot
├── amd-ucode.img
├── initramfs-linux.img
├── refind_linux.conf
└── vmlinuz-linux

1 directory, 4 files

By the way my ESP is mounted on /efi, and the to-be-applied firmware is indeed there:

% tree /efi/EFI/arch 
/efi/EFI/arch
├── fw
│   └── fwupd-7c4a03ad-1274-429e-942f-4e2f1ba19ecb.cap
└── fwupdx64.efi

2 directories, 2 files

Additional questions

superm1 commented 1 year ago

Can you please make sure that your ESP is marked as an ESP in parted?

yejingchen commented 1 year ago

Can you please make sure that your ESP is marked as an ESP in parted?

I think this means ESP is correctly marked as ESP?

% LANGUAGE= LANG=C.UTF-8 sudo parted /dev/nvme0n1 print
Model: WD PC SN810 SDCPNRY-512G-1006 (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name  Flags
 1      1049kB  538MB  537MB  fat32              boot, esp
 2      538MB   512GB  512GB

BTw this is the only drive in this laptop, so no multi ESP.

superm1 commented 1 year ago

To me this looks like a BIOS bug then. @hughsie agree?

Thinking about a workaround for a similar BIOS bug, you can try to make the directory structure on the ESP and touch /EFI/boot/bootx64.efi. Contents don't matter, just try to touch the file and see if it helps.

yejingchen commented 1 year ago

Thinking about a workaround for a similar BIOS bug, you can try to make the directory structure on the ESP and touch /EFI/boot/bootx64.efi. Contents don't matter, just try to touch the file and see if it helps.

Touch the file and tried fwupdmgr update again, but didn't seem to make a difference: still reboot after printing version line.

% tree /efi/EFI/boot 
/efi/EFI/boot
└── bootx64.efi
hughsie commented 1 year ago

@yejingchen can you try with https://github.com/fwupd/fwupd/pull/6028 applied to your fwupd please? If that works I'll respin a new fwupd tarball.

yejingchen commented 1 year ago

@yejingchen can you try with #6028 applied to your fwupd please? If that works I'll respin a new fwupd tarball.

fdisk says my SSD sector size is indeed 512 bytes, should I just try it?

% sudo LANGUAGE= LANG=C.UTF-8 fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: WD PC SN810 SDCPNRY-512G-1006           
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
hughsie commented 1 year ago

If it's 512 bytes then I don't think that PR is going to help much.

yejingchen commented 6 months ago

As HP released a new firmware version 0x1070000 I decided to try this again, only to hit the same result.

However, I was able to reinstall the current version running fwupdmgr --allow-reinstall install U82_01011200.cab after downloading from https://fwupd.org/lvfs/devices/com.hp.laptop.system.U82.firmware, and I can go beyond the fwupd-efi version 1.4 reboot to the updating screen, so I guess the reboot after fwupd-efi version 1.4 is the intended behavior, not fwupd's fault.

So I am closing this as probably only HP can do something with the firmware update process :(