X1 Carbon fwupdmgr not persisting

Hey community :wave:

I recently got a monitor that I can’t seem to get working. It’s been quite the journey and I’ve been picking up some good knowledge around NixOS and managing it. Unfortunately, all this exploring hasn’t lead me to any sort of fix.

My machine is an X1 Carbon 7th gen and I’m trying to link it to the monitor via USB-C. I’ve made sure the monitor works through my housemate’s laptops.

My current configuration.nix looks as follows: https://gist.github.com/FintanH/ae67d653d7d05434d89cf42fe800a01a and I have the following set up:

sudo nixos-version 
21.03pre252388.069f183f16c (Okapi)

$ uname -a
Linux nixos 5.10.0-rc3 #1-NixOS SMP Mon Nov 9 00:10:16 UTC 2020 x86_64 GNU/Linux

I’m trying to rule out the issues described in this article https://www.notebookcheck.net/ThinkPad-Thunderbolt-3-failure-What-s-happening-why-it-s-happening-and-how-to-fix-it.451207.0.html. I think this may be the issue since I ran:

$ boltctl list

and there was no output, despite the USB-C being plugged in and the laptop is charging.

I’m trying to update the firmware by running:

$ sudo fwupdmgr upgrade
udo fwupdmgr update
[sudo] password for haptop: 
Devices with no available firmware updates: 
 • INTEL SSDPEKKF010T8L
 • Intel Management Engine
 • UEFI Device Firmware
 • UEFI Device Firmware
 • UEFI dbx
Upgrade available for Embedded Controller from 0.1.10 to 0.1.20
20QDCTO1WW must remain plugged into a power source for the duration of the update to avoid damage. Continue with update? [Y|n]: Y
Downloading…             [***************************************]
Decompressing…           [***************************************]
Authenticating…          [                              /        ]
Authenticating…          [***************************************]
Updating Embedded Controller…                            /       ]
Scheduling…              [***************************************]
Successfully installed firmware
Devices with the latest available firmware version:
 • Prometheus
 • Prometheus IOTA Config
Upgrade available for System Firmware from 0.1.20 to 0.1.41
20QDCTO1WW must remain plugged into a power source for the duration of the update to avoid damage. Continue with update? [Y|n]: Y
Downloading…             [***************************************]
Decompressing…           [***************************************]
Authenticating…          [                          |            ]
Authenticating…          [***************************************]
Updating System Firmware…[                          |            ]
Scheduling…              [***************************************]
Successfully installed firmware
 • Touchpad

An update requires a reboot to complete. Restart now? [y|N]:

I press y and it reboots. Then if I do the same command it goes through the same update process for both these components. Is there something else I have to do to get these updates to stick? I’d really like to rule this out.

Any help is very much appreciated, and if I can help my situation by providing more information let me know :grin:

As far as I know, fwupd needs to run some code after rebooting to complete the installation of the capsule.

Whether a reboot is necessary for a particular device can be checked with sudo fwupdmgr get-devices and looking for “Needs a reboot”.

Usually, the next boot entry can be set through either EFI variables (which shouldn’t be the case here).
In the case of systemd-boot, the boot configuration can be checked with bootctl.

See this Reddit thread for a temporary solution: https://old.reddit.com/r/archlinux/comments/h17bnh/fwupdmgr_updates_not_getting_applied_on_reboot/

Thanks for the reply @berbiche!

Running sudo fwudpmgr get-devices I have a few entries saying “Needs a reboot”

20QDCTO1WW
│
├─Embedded Controller:
│     Device ID:          c085a3cbf4dc1d60d110b7616816e2ffd279b64e
│     Current version:    0.1.10
│     Minimum Version:    0.1.10
│     Vendor:             DMI:LENOVO
│     Update State:       success
│     Last modified:      2020-11-21 12:13
│     GUIDs:              f72e048b-65bd-4e71-9071-1ac7045223e5
│                         9cd54062-d764-51a7-a780-51a3695beae2 ← UEFI\RES_{F72E048B-65BD-4E71-9071-1AC7045223E5}
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Supported on remote server
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│   
├─INTEL SSDPEKKF010T8L:
│     Device ID:          3743975ad7f64f8d6575a9ae49fb3a8856fe186f
│     Summary:            NVM Express Solid State Drive
│     Current version:    L12P
│     Vendor:             Intel Corporation (NVME:0x8086)
│     Serial Number:      PHHP933606JD1P0D
│     GUIDs:              f91a5c60-8696-539e-9d0a-57d194f74ac4 ← NVME\VEN_8086&DEV_F1A6&SUBSYS_8086390B&REV_03
│                         396fb4fd-7656-564f-88b5-381e83ca30c0 ← NVME\VEN_8086&DEV_F1A6&SUBSYS_8086390B
│                         79517f86-8df8-5d6e-a18b-33f0b36a78e9 ← NVME\VEN_8086&DEV_F1A6&REV_03
│                         68db11e5-b0cf-5bc9-a94e-17e28496e505 ← NVME\VEN_8086&DEV_F1A6
│                         691bd9e3-7825-50b0-837e-2cfe70fe7e87 ← INTEL SSDPEKKF010T8L
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│   
├─Intel Management Engine:
│     Device ID:          f5275562e72a2f6cb4b09e559ff4e2860eff55d8
│     Current version:    192.40.1433
│     Minimum Version:    0.0.1
│     Vendor:             DMI:LENOVO
│     GUIDs:              32c6986c-23ac-4dff-8d8b-d43a58ec48f7
│                         b6853b1a-417a-5a50-a1f9-980094fc7acd ← UEFI\RES_{32C6986C-23AC-4DFF-8D8B-D43A58EC48F7}
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│   
├─Prometheus:
│ │   Device ID:          d432baa2162a32c1554ef24bd8281953b9d07c11
│ │   Summary:            Fingerprint reader
│ │   Current version:    10.01.3158804
│ │   Vendor:             Synaptics (USB:0x06CB)
│ │   Install Duration:   2 seconds
│ │   Serial Number:      255439761664815
│ │   GUIDs:              09e8bf16-3e69-50f5-bb66-c7a040248352 ← USB\VID_06CB&PID_00BD&REV_0000
│ │                       8088f861-6318-5b1e-9ce4-fbddbedb09ac ← USB\VID_06CB&PID_00BD
│ │   Device Flags:       • Updatable
│ │                       • Supported on remote server
│ │                       • Cryptographic hash verification is available
│ │ 
│ └─Prometheus IOTA Config:
│       Device ID:        8dcffb5d059857368caa2b7b22371ebd831b0c0c
│       Current version:  0021
│       Minimum Version:  0021
│       Vendor:           Synaptics (USB:0x06CB)
│       GUIDs:            7c5a1e62-38fa-5859-9337-09dbac6377e4 ← USB\VID_06CB&PID_00BD-cfg
│                         21a62213-7012-552c-9f1a-a51d07c87242 ← USB\VID_06CB&PID_00BD&CFG1_3462&CFG2_0
│       Device Flags:     • Updatable
│                         • Supported on remote server
│     
├─System Firmware:
│ │   Device ID:          f09b748a98b31bb5c7c64d83f24ddbc80dff7c5f
│ │   Current version:    0.1.20
│ │   Minimum Version:    0.0.1
│ │   Vendor:             LENOVO (DMI:LENOVO)
│ │   Update State:       success
│ │   Last modified:      2020-11-21 12:13
│ │   GUIDs:              4bbc40fa-f81e-4206-bc70-a1f7b744d964
│ │                       230c8b18-8d9b-53ec-838b-6cfc0383493a ← main-system-firmware
│ │                       171d8529-50f6-550b-9db6-7f21af7414ef ← UEFI\RES_{4BBC40FA-F81E-4206-BC70-A1F7B744D964}
│ │   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 dbx:
│       Device ID:        362301da643102b9f38477387e2193e57abaa590
│       Summary:          UEFI Revocation Database
│       Current version:  77
│       Minimum Version:  77
│       Vendor:           UEFI:Linux Foundation
│       Install Duration: 1 second
│       GUIDs:            14503b3d-73ce-5d06-8137-77c68972a341 ← UEFI\CRT_A9087D1044AD18F7A94916D284CBC01827CF23CD8F60B79072C9CAA1FEF4D649
│                         5971a208-da00-5fce-b5f5-1234342f9cf7 ← UEFI\CRT_A9087D1044AD18F7A94916D284CBC01827CF23CD8F60B79072C9CAA1FEF4D649&ARCH_X64
│                         c6682ade-b5ec-57c4-b687-676351208742 ← UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503
│                         f8ba2887-9411-5c36-9cee-88995bb39731 ← UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503&ARCH_X64
│       Device Flags:     • Internal device
│                         • Updatable
│                         • Needs a reboot after installation
│     
├─Touchpad:
│     Device ID:          2bd025a21741529fac39d6f088b9debfee7d4c9a
│     Current version:    1.3.3013337
│     Bootloader Version: 8.0.0
│     Vendor:             Synaptics (HIDRAW:0x06CB)
│     GUIDs:              4150912a-f249-5f7e-bfa7-2d49e9c9de8c ← HIDRAW\VEN_06CB&DEV_CD8B&REV_00
│                         9c27eba7-52a4-5e6f-b28c-b5d9a3991e35 ← HIDRAW\VEN_06CB&DEV_CD8B
│                         19326b41-711b-5b64-89a0-6c86f3139bf1 ← SYNAPTICS_RMI\TM3467-010
│                         54ed5b90-c4f7-5551-a4cc-e6ac9957a4a8 ← SYNAPTICS_RMI\TM3467
│     Device Flags:       • Internal device
│                         • Updatable
│                         • Supported on remote server
│   
├─UEFI Device Firmware:
│     Device ID:          b596f8dec94a959248534b35641fe2341e27ed06
│     Current version:    16785559
│     Minimum Version:    1
│     Vendor:             DMI:LENOVO
│     GUIDs:              9045ae09-34ab-46d6-826d-b02f859dd20b
│                         56aa226c-4831-532f-a1c4-896f57b8e8d8 ← UEFI\RES_{9045AE09-34AB-46D6-826D-B02F859DD20B}
│     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:          97d441c3228fe8615f883b166a8809389803f9e2
      Current version:    26403
      Minimum Version:    1
      Vendor:             DMI:LENOVO
      GUIDs:              68d3b08f-6ed2-43ca-86f0-f1ad6e41b390
                          64c2832d-137c-5b2f-af14-028dc25b659a ← UEFI\RES_{68D3B08F-6ED2-43CA-86F0-F1AD6E41B390}
      Device Flags:       • Internal device
                          • Updatable
                          • System requires external power source
                          • Needs a reboot after installation
                          • Device is usable for the duration of the update

Following that reddit post, I looked into tree -a /boot/

/boot/
├── 405c7f4b907041528aaa214699e78dad
├── 67867db1890746a78758f3233980e0be
├── b74beca51d814050ae612611164f59a6
├── EFI
│   ├── arch
│   │   ├── fw
│   │   └── fwupdx64.efi
│   ├── BOOT
│   │   └── BOOTX64.EFI
│   ├── Linux
│   ├── nixos
│   │   ├── fw
│   │   │   ├── fwupd-4bbc40fa-f81e-4206-bc70-a1f7b744d964.cap
│   │   │   └── fwupd-f72e048b-65bd-4e71-9071-1ac7045223e5.cap
│   │   ├── fwupdx64.efi
│   │   ├── rlyz7g8dv4ydbrsmwf27n051inlmw7hp-initrd-linux-5.10-rc3-initrd.efi
│   │   └── sywq11dwgv92m2gppij9xkfqzjkhmmbb-linux-5.10-rc3-bzImage.efi
│   └── systemd
│       └── systemd-bootx64.efi
├── fbfa1febacce483cb3d7ba2a4c2ae554
├── FSCK0000.REC
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── initramfs-linux-lts-fallback.img
├── initramfs-linux-lts.img
├── intel-ucode.img
├── loader
│   ├── entries
│   │   ├── arch.conf
│   │   ├── nixos-generation-57.conf
│   │   ├── nixos-generation-58.conf
│   │   └── nixos-generation-59.conf
│   ├── loader.conf
│   └── random-seed
├── vmlinuz-linux
└── vmlinuz-linux-lts

and efitbootmgr -v does have the following entry:

Boot0001* Linux-Firmware-Updater        HD(1,GPT,3ac6dbcf-6e51-4cc3-a182-a37d6bd6acb5,0x800,0x100000)/File(\EFI\nixos\fwupdx64.efi)

Which looks like it lines up with my /boot directory. And the output of bootctl looks good from what I can tell as well:

bootctl 
System:
     Firmware: UEFI 2.60 (Lenovo 0.4608)
  Secure Boot: disabled
   Setup Mode: user
 Boot into FW: supported

Current Boot Loader:
      Product: systemd-boot 246
     Features: ✓ Boot counting
               ✓ Menu timeout control
               ✓ One-shot menu timeout control
               ✓ Default entry control
               ✓ One-shot entry control
               ✓ Support for XBOOTLDR partition
               ✓ Support for passing random seed to OS
               ✓ Boot loader sets ESP partition information
          ESP: /dev/disk/by-partuuid/3ac6dbcf-6e51-4cc3-a182-a37d6bd6acb5
         File: └─/EFI/BOOT/BOOTX64.EFI

Random Seed:
 Passed to OS: yes
 System Token: set
       Exists: yes

Available Boot Loaders on ESP:
          ESP: /boot (/dev/disk/by-partuuid/3ac6dbcf-6e51-4cc3-a182-a37d6bd6acb5)
         File: └─/EFI/systemd/systemd-bootx64.efi (systemd-boot 246)
         File: └─/EFI/BOOT/BOOTX64.EFI (systemd-boot 246)

Boot Loaders Listed in EFI Variables:
        Title: Windows Boot Manager
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/3ac6dbcf-6e51-4cc3-a182-a37d6bd6acb5
         File: └─/EFI/Microsoft/Boot/bootmgfw.efi

        Title: Linux-Firmware-Updater
           ID: 0x0001
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/3ac6dbcf-6e51-4cc3-a182-a37d6bd6acb5
         File: └─/EFI/nixos/fwupdx64.efi

Boot Loader Entries:
        $BOOT: /boot (/dev/disk/by-partuuid/3ac6dbcf-6e51-4cc3-a182-a37d6bd6acb5)

Default Boot Loader Entry:
        title: NixOS (Generation 59 NixOS 21.03pre252388.069f183f16c, Linux Kernel 5.10.0-rc3, Built on 2020-11-21)
           id: nixos-generation-59.conf
       source: /boot/loader/entries/nixos-generation-59.conf
      version: Generation 59 NixOS 21.03pre252388.069f183f16c, Linux Kernel 5.10.0-rc3, Built on 2020-11-21
   machine-id: b74beca51d814050ae612611164f59a6
        linux: /efi/nixos/sywq11dwgv92m2gppij9xkfqzjkhmmbb-linux-5.10-rc3-bzImage.efi
       initrd: /efi/nixos/rlyz7g8dv4ydbrsmwf27n051inlmw7hp-initrd-linux-5.10-rc3-initrd.efi
      options: systemConfig=/nix/store/sdkipfj36qa6z4bsdv9qbspnafdac6ll-nixos-system-nixos-21.03pre252388.069f183f16c init=/nix/store/sdkipfj36qa6z4bsdv9qbspnafdac6ll-nixos-system-nixos-21.03pre252388.069f183f16c/init loglevel=4

Probably a dumb question, but have you enabled support for fwupd in your configuration.nix? https://nixos.org/manual/nixos/stable/options.html#opt-services.fwupd.enable

Completely fair question :sweat_smile: it’s good to rule out all the stupid stuff first!

But ya I have here: https://gist.github.com/FintanH/ae67d653d7d05434d89cf42fe800a01a#file-configuration-nix-L130

So I read a bit more into that post and saw that the OP added boot loader /boot/loader/entries/firmware_update.conf, which I added as well like:

title          Linux Fireware Updater
efi            /EFI/nixos/fwupdx64.efi

When I rebooted I chose the Linux Fireware Updater (just noticing they had a typo and I copy-pasted :sweat_smile:). The firmware update did its business and the updates persisted :grin:

That’s the good news. The bad news is that there’s still no signal getting to my monitor :weary: at this point I’m thinking about seeing if I could get a replacement under my warranty.

2 Likes

It might not be broken at all, it might just be broken on linux :-(. Try it with windows, and see if it runs with that. You probably find that there is some proprietary microsoft/lenovo driver that is doing magic…if that doesn’t work, this it’s magically broken.

I tried booting Windows 10 from a USB but I’m getting to a point that makes me nervous where it complains about not finding drivers and ask me to Browse to find them. So I bailed out of that.

I’d find this weird, because I know at least two people who have the same computer, run NixOS, and use monitors. I think I have a magic hardware curse :smile:

Hmm,…beware of same…, i’ve seen two pieces of hardware, same manufacture , have completely different firmware, chips or even motherboards… Something made in January, can be completely different to something made in February!! The devil is the details… especially with hardware revisions and firmware revisions…sometimes it’s even caused by the bios!!!

Lucky everyone is cursed with hardware problems like this… hopefully risc-v based computers my get us out of this hell.

Good luck…

1 Like

Have you tried disabling Thunderbold security in BIOS? https://support.lenovo.com/ca/en/solutions/ht503639

Ya, I tried setting it to “No Security” and still no love. I’m gonna send my laptop off for repair and hope for the best :crossed_fingers: Have all my stuff backed up, a USB with NixOS on it, and my configuration.nix ready to go again :grin: