dell / thunderbolt-nvm-linux

Thunderbolt NVM updates for Linux
104 stars 12 forks source link

Attempted FW update on previous Windows machine #18

Closed steevee closed 5 years ago

steevee commented 5 years ago

Received error when trying to update FW on an XPS 13 9350 running Ubuntu 17.10 (Kernel 4.15.8) that originally came with Windows installed (system id: 0x0704).

I'm yet to restart and wondering how to rectify (downgrading FW is an option!) (Given issues in #17 I'm worried about getting another could not start ICM firmware if I restart!)

Steps taken:

  1. Noticed older thunderbolt firmware version:

    XPS 13 9350 Thunderbolt Controller
    DeviceID:             cf030000-0000-8f08-a208-32ca02c4d016
    Guid:                 dbbe0ed9-df91-529c-ac86-8976b78f726d
    Description:          <p>Updating the thunderbolt NVM improves performance and stability.</p>
    Plugin:               thunderbolt
    Flags:                internal|updatable|supported|registered
    DeviceVendor:         DELL
    DeviceVendorId:       TBT:0x00D4
    Version:              12.0
    Created:              2018-12-03
  2. fwdupdmgr refresh was giving me errors Failed to download https://s3.amazonaws.com/lvfsbucket/downloads/firmware.xml.gz: Not Found so I updated fwupdate from 0.97 to 1.1.4 via snap.

  3. Refreshed fwupdate metadata, ran update, and received a similar error to reported above:

    $ sudo fwupd.fwupdmgr refresh 
    Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz
    Downloading…           [*                                      ] Less than one minute remaDownloading…           
    [***************************************]
    Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc
    
    $ sudo fwupd.fwupdmgr update
    Downloading 16.00 for XPS 13 9350 Thunderbolt Controller...
    Fetching firmware https://fwupd.org/downloads/75984aeb95d33ed7fab857b18b28ffe317cb870d-8FDJ2_NVM16.00.cab
    Downloading…           [***************************************]
    Decompressing…         [***************************************]
    Authenticating…        [***************************************]
    Updating XPS 13 9350 Thunderbolt Controller…                   ]
    Restarting device…     [***************************************]failed to run update_attach() on thunderbolt: failed to read 'nvm_authenticate: Invalid argument
  4. dmesg -w output during FW update

  5. cat /sys/bus/thunderbolt/devices/0-0/nvm_authenticate reads 0x0

  6. Device still appears in fwupdate and works with displayport, but no longer registers when unplugging a thunderbolt-network

    sudo fwupd.fwupdmgr get-devices
    XPS 13 9350 Thunderbolt Controller
    DeviceId:             210d24afec6b138edd9cd49bbd545bde1194ddd7
    Guid:                 dbbe0ed9-df91-529c-ac86-8976b78f726d
    Summary:              Unmatched performance for high-speed I/O
    Plugin:               thunderbolt
    Flags:                internal|updatable|supported|registered
    Vendor:               Dell
    VendorId:             TBT:0x00D4
    Version:              16.00
    Icon:                 computer
    Created:              2018-12-03
    UpdateError:          failed to run update_attach() on thunderbolt: failed to read 'nvm_authenticate: Invalid argument
  7. Have tried manually reinstalling, but always get same error fwupd.fwupdmgr install ~/Downloads/d09142be32326f9aa588bff45cd1f5fe7136b369-ThunderboltFirmwareUpdateLinux_4.26.13.002.cab (with/without TBT device ID)

superm1 commented 5 years ago

Well it's intentional that it goes away if nothing Thundebolt is plugged in (it powers off). However let's make sure everything looks good to guarantee no bout of bad luck here.

Can you try to stop the fwupd service (IIRC something like systemctl stop snap.fwupd.fwupd) and restart it? Does it still show up the device or the error?

If it doesn't show the error (but shows the device) then I think we might have a separate fwupd issue, race condition or something related to force power. We can dig more into the exact circumstances of your upgrade if so.

Also can you try to manually read /sys/bus/thunderbolt/devices/0-0/nvm_version? I think you should get 16.0 out of it when plugged into something Thunderbolt.

steevee commented 5 years ago

OK, good news, post restarting the snap.fwupd.fwupd service and running fwdupd.fwupdmagr get-devices, I can see the TBT controller, without an error, and on the newer version:

XPS 13 9350 Thunderbolt Controller
  DeviceId:             210d24afec6b138edd9cd49bbd545bde1194ddd7
  Guid:                 dbbe0ed9-df91-529c-ac86-8976b78f726d
  Summary:              Unmatched performance for high-speed I/O
  Plugin:               thunderbolt
  Flags:                internal|updatable|supported|registered
  Vendor:               Dell
  VendorId:             TBT:0x00D4
  Version:              16.00
  Icon:                 computer
  Created:              2018-12-03

Also cat /sys/bus/thunderbolt/devices/0-0/nvm_version reads 16.0

Throwing caution to the wind, I just rebooted and everything is fine and running on 16.0. Apologies for the panic!

I'm unsure what the error message failed to run update_attach() on thunderbolt: failed to read nvm_authenticate: Invalid argument was about, but happy to close if you are.

Thanks for the help!

superm1 commented 5 years ago

Well glad the controller is in good shape. Can you please file a bug at https://github.com/hughise/fwupd though with more details about how this all happened? I think we have some operational problem with the re-attaching.

Specifically want to know what devices were plugged in when (from boot until the update was run). Also if there is anything in the journal for snap.fwupd.fwupd.service please share it there.