linux-surface / surface-uefi-firmware

UEFI firmware updates for surface using fwupd. WIP, be careful.
111 stars 9 forks source link

[SP7P] Downgrade failure: "No supported devices found" #36

Closed Pairman closed 9 months ago

Pairman commented 9 months ago

Hello. I'm using repack.sh to downgrade UEFI firmware for my Surface Pro 7+, to boot Fedora installation successfully. I'm using a Fedora 39 live CD with Ventoy to do this. Repacking is successful, but installation says "No supported devices found".

This is my environment:

uname -a
Linux localhost-live 6.5.6-300.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Oct  6 19:57:21 UTC 2023 x86_64 GNU/Linux

sudo tree /boot
/boot
├── config-6.5.6-300.fc39.x86_64
├── efi
│   ├── EFI
│   │   ├── BOOT
│   │   │   ├── BOOTIA32.EFI
│   │   │   ├── BOOTX64.EFI
│   │   │   ├── fbia32.efi
│   │   │   └── fbx64.efi
│   │   └── fedora
│   │       ├── BOOTIA32.CSV
│   │       ├── BOOTX64.CSV
│   │       ├── gcdia32.efi
│   │       ├── gcdx64.efi
│   │       ├── grubia32.efi
│   │       ├── grubx64.efi
│   │       ├── mmia32.efi
│   │       ├── mmx64.efi
│   │       ├── shim.efi
│   │       ├── shimia32.efi
│   │       └── shimx64.efi
│   ├── mach_kernel
│   └── System
│       └── Library
│           └── CoreServices
│               └── SystemVersion.plist
├── grub2
│   ├── fonts
│   │   └── unicode.pf2
│   └── grubenv
├── initramfs-6.5.6-300.fc39.x86_64.img
├── loader
│   └── entries
│       ├── 45fb50b78de24460a059bec0ad00f01c-0-rescue.conf
│       └── 45fb50b78de24460a059bec0ad00f01c-6.5.6-300.fc39.x86_64.conf
├── symvers-6.5.6-300.fc39.x86_64.xz -> /lib/modules/6.5.6-300.fc39.x86_64/symvers.xz
├── System.map-6.5.6-300.fc39.x86_64
└── vmlinuz-6.5.6-300.fc39.x86_64

12 directories, 26 files

sudo cat /etc/fwupd/fwupd.conf
# use `man 5 fwupd.conf` for documentation
[fwupd]
DisabledPlugins=test;test_ble
OnlyTrusted=false
AllowEmulation=false

The original cab comes from https://www.catalog.update.microsoft.com/Search.aspx?q=22.102.143.0 (whose version number comes from https://support.microsoft.com/en-us/surface/surface-pro-7-update-history-fc2c14a8-0e72-4acc-851d-ae96f608c397 ). It was then repacked successfully:

./repack.sh 12ed8dd6-1131-4fb4-a9a6-0b33cf2dc006_5513e857d2cc8b01cadca69bc0b35e9ca52ed4d8.cab
==> Extracting 12ed8dd6-1131-4fb4-a9a6-0b33cf2dc006_5513e857d2cc8b01cadca69bc0b35e9ca52ed4d8.cab
==> Repacking ./tmp.4m73E6ReY9/SurfaceUEFI.inf
Success!
If you wish, you may now install the firmware like so:

  sudo fwupdmgr install --allow-older --allow-reinstall --no-reboot-check --force 'fwupdates/tmp.4m73E6ReY9_22.0.26255_371f28d9-5d0f-49f1-a61a-3f16e3c53506.cab'

But the installation failed:

sudo fwupdmgr install --allow-older --allow-reinstall --no-reboot-check --force fwupdates/tmp.4m73E6ReY9_22.0.26255_371f28d9-5d0f-49f1-a61a-3f16e3c53506.cab
(fwupdmgr:6883): GLib-DEBUG: 00:24:01.104: setenv()/putenv() are not thread-safe and should not be used after threads are created
(fwupdmgr:6883): GLib-GIO-DEBUG: 00:24:01.105: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.105: watch_fast: "/system/proxy/" (establishing: 0, active: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: watch_fast: "/system/proxy/http/" (establishing: 0, active: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: watch_fast: "/system/proxy/https/" (establishing: 0, active: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: watch_fast: "/system/proxy/ftp/" (establishing: 0, active: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: watch_fast: "/system/proxy/socks/" (establishing: 0, active: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: unwatch_fast: "/system/proxy/" (active: 0, establishing: 1)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: unwatch_fast: "/system/proxy/http/" (active: 0, establishing: 1)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: unwatch_fast: "/system/proxy/https/" (active: 0, establishing: 1)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: unwatch_fast: "/system/proxy/ftp/" (active: 0, establishing: 1)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.106: unwatch_fast: "/system/proxy/socks/" (active: 0, establishing: 1)
(fwupdmgr:6883): GLib-GIO-DEBUG: 00:24:01.107: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
(fwupdmgr:6883): pxbackend-DEBUG: 00:24:01.107: px_config_sysconfig_set_config_file: Could not read file /etc/sysconfig/proxy
(fwupdmgr:6883): pxbackend-DEBUG: 00:24:01.107: Active config plugins:
(fwupdmgr:6883): pxbackend-DEBUG: 00:24:01.107:  - config-env
(fwupdmgr:6883): pxbackend-DEBUG: 00:24:01.107:  - config-kde
(fwupdmgr:6883): pxbackend-DEBUG: 00:24:01.107:  - config-gnome
(fwupdmgr:6883): pxbackend-DEBUG: 00:24:01.107:  - config-sysconfig
(fwupdmgr:6883): GLib-GIO-DEBUG: 00:24:01.108: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(fwupdmgr:6883): GLib-GIO-DEBUG: 00:24:01.108: Failed to initialize portal (GNetworkMonitorPortal) for gio-network-monitor: Not using portals
(fwupdmgr:6883): GLib-GIO-DEBUG: 00:24:01.108: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.109: watch_established: "/system/proxy/" (establishing: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.109: watch_established: "/system/proxy/http/" (establishing: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.109: watch_established: "/system/proxy/https/" (establishing: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.110: watch_established: "/system/proxy/ftp/" (establishing: 0)
(fwupdmgr:6883): dconf-DEBUG: 00:24:01.110: watch_established: "/system/proxy/socks/" (establishing: 0)
(fwupdmgr:6883): GLib-GIO-DEBUG: 00:24:01.110: _g_io_module_get_default: Found default implementation networkmanager (GNetworkMonitorNM) for ‘gio-network-monitor’
(fwupdmgr:6883): pxbackend-DEBUG: 00:24:01.110: px_manager_on_network_changed: Network connection changed, clearing pac data
(fwupdmgr:6883): pxbackend-DEBUG: 00:24:01.110: px_manager_constructed: Up and running
(fwupdmgr:6883): GLib-GIO-DEBUG: 00:24:01.110: _g_io_module_get_default: Found default implementation libproxy (GLibproxyResolver) for ‘gio-proxy-resolver’
(fwupdmgr:6883): Fwupd-DEBUG: 00:24:01.111: Emitting ::status-changed() [idle]
(fwupdmgr:6883): Fwupd-DEBUG: 00:24:01.114: Emitting ::status-changed() [decompressing]
Decompressing…           [ -                                     ]Decompressing…           [ -                                     ]Decompressing…           [  -                                    ](fwupdmgr:6883): Fwupd-DEBUG: 00:24:01.186: Emitting ::status-changed() [idle]

No supported devices found

Details of the output cab file says "Unknown Device", other than "UEFI Firmware" (or something similar, sorry for forgetting to save sudo fwupdmgr get-devices logs):

fwupdmgr get-details fwupdates/tmp.4m73E6ReY9_22.0.26255_371f28d9-5d0f-49f1-a61a-3f16e3c53506.cab
Decompressing…           [ -                                     ]Decompressing…           [ -                                     ]Decompressing…           [  -                                    ]
Microsoft Corporation Surface Pro 7+
│
└─Unknown Device:
  │   Description:        
  │   Updating the firmware on your device improves performance and adds new features.
  │   Update Error:       Device was not found
  │   GUID:               371f28d9-5d0f-49f1-a61a-3f16e3c53506
  │ 
  └─Surface Firmware System Update:
        New version:      22.0.26255
        Summary:          Firmware for 371f28d9-5d0f-49f1-a61a-3f16e3c53506
        License:          Proprietary
        Size:             6.3 MB
        Created:          2023-08-06
        Vendor:           Microsoft
        Description:      
        Please visit the Microsoft homepage to find more information about this update.

        The computer will be restarted automatically after updating completely. Do NOT turn off your computer or remove the AC adaptor while update is in progress.
        Checksum:         288e7053f23a24c5a41c3afe9e5001a660196bda80fef5a53f34822d7eb5917e
StollD commented 9 months ago

The SP7+ is f3e47718-bcbb-4691-b67f-5408c8f8105f and not 371f28d9-5d0f-49f1-a61a-3f16e3c53506, checked by downloading the full driver MSI bundle and repacking it.

You can get all available cab files by searching for UEFI\RES_{f3e47718-bcbb-4691-b67f-5408c8f8105f} on the MS Catalog.

But that doesn't give you 22.102.143.0, only 22.103.143.0 and newer, plus a bunch of older versions. Maybe 22.102.143.0 was released only on Windows Insiders and never went out to Windows Update? In that case the Catalog wouldn't have it.

Pairman commented 9 months ago

The SP7+ is f3e47718-bcbb-4691-b67f-5408c8f8105f and not 371f28d9-5d0f-49f1-a61a-3f16e3c53506, checked by downloading the full driver MSI bundle and repacking it.

You can get all available cab files by searching for UEFI\RES_{f3e47718-bcbb-4691-b67f-5408c8f8105f} on the MS Catalog.

But that doesn't give you 22.102.143.0, only 22.103.143.0 and newer, plus a bunch of older versions. Maybe 22.102.143.0 was released only on Windows Insiders and never went out to Windows Update? In that case the Catalog wouldn't have it.

Thanks! I used Surface - Firmware - 18.200.143.0 from the search results and installed successfully.