dell / thunderbolt-nvm-linux

Thunderbolt NVM updates for Linux
104 stars 12 forks source link

Failed to force device to 1 (ret -3) #3

Closed benruijl closed 7 years ago

benruijl commented 7 years ago

When I run sudo ./force_dell_tbt 1 on my XPS 13 9360 with kernel 4.13.3-1, I get the error:

Failed to force device to 1 (ret -3)

The journalctl output is:

DMAR: Allocating domain for dcdbas failed
superm1 commented 7 years ago

@benruijl Does that consistently happen for you? It seems to me that the kernel couldn't allocate the buffer needed to do a SMI request.

Also FYI, this tool is no longer needed with http://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git/commit/ce6a90027c10f970f872de5db0294f9e3e969f1c and https://github.com/hughsie/fwupd/blob/master/plugins/thunderbolt-power/fu-plugin-thunderbolt-power.c

benruijl commented 7 years ago

It happens consistently.

Are you saying that I can use fwupd now to update to NVM21? Or do I not have to force the device anymore?

superm1 commented 7 years ago

Do other SMI requests fail too? Can you check on your BIOS version?

Force powering the device is only needed if you don't have something plugged in to type-C. If you plug something in the TBT controller will wake up. fwupd can do the update now yes.

This repository is less relevant, but I haven't updated readme to reflect it .

benruijl commented 7 years ago

How can I test that? This is the output of fwupd:

Intel AMT (unprovisioned) DeviceID: /dev/mei Guid: 2800f812-b7b4-2d4b-aca8-46e0ff65814c Plugin: amt Flags: internal|registered Version: 11.7.0 VersionBootloader: 11.7.0 Created: 2017-10-05

XPS 13 9360 System Firmware DeviceID: UEFI-5ffdbc0d-f340-441c-a803-8439c8c0ae10-dev0 Guid: 5ffdbc0d-f340-441c-a803-8439c8c0ae10 Plugin: uefi Flags: internal|updatable|require-ac|supported|registered|needs-reboot Version: 0.2.2.1 VersionLowest: 0.2.2.1 Created: 2017-10-05

USB 10/100/1000 LAN DeviceID: usb:00:01:04 Guid: f62863ee-133d-511b-903c-d6dfa8f9fdf4 Guid: 3ee73ec0-43ce-5b01-aed8-ce23fd193367 Plugin: usb Flags: registered DeviceVendorId: USB:0x0BDA Version: 48.0 Created: 2017-10-05

BILLBOARD DEVICE DeviceID: usb:00:01:03 Guid: 7a51fe38-0180-525c-af99-90ad3e5432a2 Guid: fb4dabbd-f4c3-5119-99fc-ecbcf783d7f7 Plugin: usb Flags: registered DeviceVendorId: USB:0x0835 Version: 1.70 Created: 2017-10-05

Integrated Webcam HD DeviceID: usb:00:05 Guid: 4ec19583-c132-5c27-a9cf-061419e838dc Guid: 6b31e6e6-ba7c-5251-8f4c-7f2571612251 Plugin: usb Flags: registered DeviceVendorId: USB:0x0C45 Version: 86.38 Created: 2017-10-05

Touchscreen DeviceID: usb:00:04 Guid: 31cc46f6-9bdc-5b1e-b48b-1c791781dcdc Guid: 9fd88db6-a96d-505b-bbea-92aee9d07455 Plugin: usb Flags: registered DeviceVendorId: USB:0x04F3 Version: 17.18 Created: 2017-10-05

USB-PS/2 Optical Mouse DeviceID: usb:00:01:01 Guid: f6d86ffd-e625-5ea7-bc24-316dd19e8c6f Guid: 40766b88-7f2e-53d7-84d2-a93cc70659d8 Plugin: usb Flags: registered DeviceVendorId: USB:0x046D Version: 36.48 Created: 2017-10-05

HD Graphics 620 DeviceID: ro__sys_devices_pci0000_00_0000_00_02_0 Guid: 3ec3df3a-2290-56e5-9d2f-eda62e9ab50b Plugin: udev Flags: internal|registered DeviceVendor: Intel Corporation DeviceVendorId: PCI:0x8086 Created: 2017-10-05

I do not see the my thunderbolt device there, but I do see devices that belong to my DA200, such as the ethernet port. I also don't know how I can check the firmware version for thunderbolt, since the DKMS module doesn't compile anymore on 4.13.

Cheers,

Ben

Op do 5 okt. 2017 om 16:25 schreef Mario Limonciello < notifications@github.com>:

Do other SMI requests fail too? Can you check on your BIOS version?

Force powering the device is only needed if you don't have something plugged in to type-C. If you plug something in the TBT controller will wake up. fwupd can do the update now yes.

This repository is less relevant, but I haven't updated readme to reflect it .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dell/thunderbolt-nvm-linux/issues/3#issuecomment-334481172, or mute the thread https://github.com/notifications/unsubscribe-auth/AARGGY4i6yGACOgo8ngrR-FQ_GzMWLrEks5spObTgaJpZM4Pu_je .

superm1 commented 7 years ago

What's your fwupd version? fwupd --version

benruijl commented 7 years ago

fwupdmgr --version client version: 0.9.7 daemon version: 0.9.7 compile-time dependency versions appstream-glib: 0.6.13 gusb: 0.2.11

Op do 5 okt. 2017 om 16:36 schreef Mario Limonciello < notifications@github.com>:

What's your fwupd version? fwupd --version

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dell/thunderbolt-nvm-linux/issues/3#issuecomment-334484572, or mute the thread https://github.com/notifications/unsubscribe-auth/AARGGTSLo5CviWXh9ra6yaTagtbZDy_Qks5spOlhgaJpZM4Pu_je .

superm1 commented 7 years ago

Hmm, thunderbolt plugin did land in fwupd 0.9.7. Is it compiled into your build? What distro? Do you not have a thunderbolt kernel module? modinfo thunderbolt

benruijl commented 7 years ago

I use Arch Linux, everything vanilla. I do have the module:

filename: /lib/modules/4.13.3-1-ARCH/kernel/drivers/thunderbolt/thunderbolt.ko.gz license: GPL alias: pci:v00008086d000015DEsvsdbcsci alias: pci:v00008086d000015D2svsdbcsci alias: pci:v00008086d000015D9svsdbcsci alias: pci:v00008086d000015DCsvsdbcsci alias: pci:v00008086d000015BFsvsdbcsci alias: pci:v00008086d000015DDsvsdbcsci alias: pci:v00008086d00001577svsdbcsci alias: pci:v00008086d00001575svsdbcsci alias: pci:v00008086d0000156Csvsdbc08sc80i00 alias: pci:v00008086d0000156Asvsdbc08sc80i00 alias: pci:v00008086d00001547sv00002222sd00001111bc08sc80i00 alias: pci:v00008086d00001513sv00002222sd00001111bc08sc80i00 depends: intree: Y name: thunderbolt vermagic: 4.13.3-1-ARCH SMP preempt mod_unload modversions

How can I see the version of the firmware? /sys/bus/thunderbolt/devices/ is empty (also after modprobe).

Op do 5 okt. 2017 om 16:40 schreef Mario Limonciello < notifications@github.com>:

Hmm, thunderbolt plugin did land in fwupd 0.9.7. Is it compiled into your build? What distro? Do you not have a thunderbolt kernel module? modinfo thunderbolt

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dell/thunderbolt-nvm-linux/issues/3#issuecomment-334486024, or mute the thread https://github.com/notifications/unsubscribe-auth/AARGGTNJfnBh3HZPi24T2MIFInBtHNXtks5spOp2gaJpZM4Pu_je .

superm1 commented 7 years ago

Well I guess the controller is only waking up if it's a Thunderbolt device hooked up, not any type C device. Do you have one you can hook up?

If not, backport that kernel patch I linked above to your kernel and you should be able to wake it up using that.

benruijl commented 7 years ago

Sadly I don't have one at hand. I'll see what I can do. Thanks for the help!