StarLabsLtd / firmware

68 stars 4 forks source link

[StarBook Mk V] Unable to update firmware #158

Closed mezpahlan closed 2 months ago

mezpahlan commented 2 months ago

Hi there I am unable to update the firmware on my Mk V. Similar to #147 however I am running a slightly different OS, Ubuntu.

Ubuntu 22.04.4 LTS 6.5.0-28-generic

The service seems to be timing out with an error that I don't understand.

$ sudo fwupdmgr update
Failed to connect to daemon: Error calling StartServiceByName for org.freedesktop.fwupd: Failed to activate service 'org.freedesktop.fwupd': timed out (service_start_timeout=25000ms)
$  cat /sys/class/dmi/id/bios_version
8.05

$ cat /sys/class/dmi/id/ec_firmware_release
1.3

Some more output based on the suggestions in #147 .

$ systemctl status fwupd.service
× fwupd.service - Firmware update daemon
     Loaded: loaded (/lib/systemd/system/fwupd.service; static)
     Active: failed (Result: exit-code) since Mon 2024-05-06 17:19:03 BST; 7s ago
       Docs: https://fwupd.org/
    Process: 17022 ExecStart=/usr/libexec/fwupd/fwupd (code=exited, status=1/FAILURE)
   Main PID: 17022 (code=exited, status=1/FAILURE)
        CPU: 353ms

fwupd[17022]: 16:19:03.148 FuPluginFlashrom     Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
fwupd[17022]: New value is 0x8b.
fwupd[17022]: 16:19:03.148 FuPluginFlashrom     At least some flash regions are write protected. For write operations,
fwupd[17022]: you should use a flash layout and include only writable regions. See
fwupd[17022]: manpage for more details.
fwupd[17022]: 16:19:03.151 FuPluginUefiCapsule  SMBIOS BIOS Characteristics Extension Byte 2 is invalid -- UEFI Specification is unsupported, but /sys/firmware/efi exist>
fwupd[17022]: Failed to load daemon: failed to load engine: Failed to prepare SQL to get history: no such column: version_format
systemd[1]: fwupd.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: fwupd.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Firmware update daemon.
$ journalctl -xeu fwupd.service
fwupd[17022]: Failed to load daemon: failed to load engine: Failed to prepare SQL to get history: no such column: version_format
systemd[1]: fwupd.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ 
░░ An ExecStart= process belonging to unit fwupd.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
systemd[1]: fwupd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ 
░░ The unit fwupd.service has entered the 'failed' state with result 'exit-code'.
systemd[1]: Failed to start Firmware update daemon.
░░ Subject: A start job for unit fwupd.service has failed
░░ Defined-By: systemd
░░ 
░░ A start job for unit fwupd.service has finished with a failure.
░░ 
░░ The job identifier is 4458 and the job result is failed.
$ sudo flashrom -p internal
flashrom 1.4.0-devel on Linux 6.5.0-28-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Cannot open file stream for /dev/mtd0
coreboot table found at 0x76b26000.
Found chipset "Intel Tiger Lake U Premium".
Enabling flash write... Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.
SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-only.
FREG1: BIOS region (0x00500000-0x00ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x004fffff) is read-only.
Not all flash regions are freely accessible by flashrom. This is most likely
due to an active ME. Please see https://flashrom.org/ME for details.
At least some flash regions are write protected. For write operations,
you should use a flash layout and include only writable regions. See
manpage for more details.
OK.
Found Winbond flash chip "W25Q128.V" (16384 kB, Programmer-specific) on internal.
No operations were specified.
$ sudo fwupdtool get-devices --plugins flashrom --show-all 
Loading…                 [-                                      ]16:05:19.875 FuPluginFlashrom     Cannot open file stream for /dev/mtd0
16:05:19.876 FuPluginFlashrom     Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.
16:05:19.876 FuPluginFlashrom     At least some flash regions are write protected. For write operations,
you should use a flash layout and include only writable regions. See
manpage for more details.
Loading…                 [************************************** ]
Failed to prepare SQL to get history: no such column: version_format

Also suggested in #147 was to purge the Starlabs PPAs and try the stock packages. This did work but tells me I have no devices to update. According to this page I should have quite a few updates in the Coreboot firmware.

I appreciate the help, cheers!

mezpahlan commented 2 months ago

Ahh....... my bad. I did not search hard enough :smile:

There are some instructions on this troubleshooting page that recommends this command for when the update service times out.

$ sudo rm /var/lib/fwupd/pending.db

That allowed me to run these commands successfully:

$ fwupdmgr refresh
$ fwupdmgr update

I'll leave this open just in case you want to review this issue and you spot something else in the logs I've pasted but otherwise feel free to close it.