I am currently evaluating the power consumption of the Tegra K1 based on the Jetson board and I am especially interested in finding low power modes.
I am running grinch-19.3.6 kernel and I have USB 3.0 enabled.
I have a very interesting finding that when I boot the Jetson with only having Ethernet connected it consumes 0.25A@12V in idle. When I then connect a USB device (keyboard or just a USB hub without any connected devices) and unplug that USB device again the consumption lowers to 0.2A@12V. It looks like it doesn’t matter if that device is USB 2.0 or 3.0.
I couldn’t find any difference in the power states (/sys/devices/platform/tegra-xhci) or in the regulators.
Anybody can confirm this and hopefully explain it?
USB offers power to any device plugged into it…this is the standard. An example would be a keyboard with an LED which does not need a battery. Even a HUB plugged into a computer’s USB has logic needing power…and it takes it from the host it plugged into. Every USB device has information it replies with when queried (try lsusb and view some of it), and that logic needs power.
The standard allows for a certain amount of power to be drawn from the host…but an alternative is that the standard also allows for powered HUBS. If you want your USB devices to not consume power, look for a powered HUB. Power is still drawn, but not from the host; more power is allowed from a powered HUB than from a host. Measuring your host’s consumption without attached peripheral consumption would require a powered HUB.
I think you misunderstood my post. It is not about the current drawn by USB devices.
When I boot without any USB devices connected and keep the Jetson idle, it takes 0.25A @ 12V.
When I then connect some USB device of course it takes the additional current for that device. But as soon as I disconnect the device, the consumption goes down to 0.20A @ 12V. Thus the board takes 20% less current than before I’ve connected a device.
I can show this very repeatably and the device only needs to be connected for a few seconds…
I can show this without any other devices connected (no screen, no Ethernet, …)
If you execute this at boot, does your power usage go down?
sudo sh -c "echo 1 > /sys/module/usbcore/parameters/autosuspend"
By default autosuspend is set to -1 (disabled). However it may be that this parameter only applies to connected USB devices (of which you have none), not TK1’s USB controller (this is the bit I’m unsure about).
I’d agree with dustin_franklin that it may be related to components of autosuspend which change depending on how things were plugged in. There may be log messages about modes which offer a clue. Plugging a device in can change the root HUB, and unplugging a device could leave part of those changes still running. But it is pretty much guessing unless you can reproduce the change manually.
I also wonder if anything at all is still plugged in, like a hub? Sounds like you got that unplugged as well, but just double checking.
I’ve tested with autosuspend enabled. No difference.
Yes, I confirm that I don’t have anything attached to the USB plug.
- I boot up without anything connected to the USB plug. (Only power and Ethernet is connected). Jetson takes 25mA.
- I connect a simple, USB-powered USB 2.0 hub to the Jetson without any device connected. Power consumption drops to 21mA!
Nov 4 10:38:21 tegra-ubuntu kernel: [ 73.144437] usb 1-3: new high-speed USB device number 2 using tegra-xhci Nov 4 10:38:21 tegra-ubuntu kernel: [ 73.158895] usb 1-3: New USB device found, idVendor=05e3, idProduct=0608 Nov 4 10:38:21 tegra-ubuntu kernel: [ 73.158946] usb 1-3: New USB device strings: Mfr=0, Product=1, SerialNumber=0 Nov 4 10:38:21 tegra-ubuntu kernel: [ 73.158985] usb 1-3: Product: USB2.0 Hub Nov 4 10:38:21 tegra-ubuntu kernel: [ 73.165996] hub 1-3:1.0: USB hub found Nov 4 10:38:21 tegra-ubuntu kernel: [ 73.167942] hub 1-3:1.0: 4 ports detected
- I wait a few seconds and then I disconnect the USB hub, so again no USB device connected at all. Power consumption now drops to 20mA!
Nov 4 10:38:38 tegra-ubuntu kernel: [ 90.325923] usb 1-3: USB disconnect, device number 2
This is very reproducable. It looks like the Jetson take 5mA until a first USB device or hub is connected…
All I can do is give a wild speculative guess that initially it may be part of how the power regulation works. With nothing connected sometimes the waste heat actually goes up on some power regulator designs. Drawing a very slight amount of power can actually improve regulation and total consumption on some voltage regulation schemes.
The fact that disconnecting a device later keeps power down and drops requirements even more seems like there must be some internal USB configuration scheme which in turn drops power through software, e.g., perhaps software triggered from hot plug device disconnect is not the same state as a newly configured USB root HUB. If this is true, then the initial software state of a reset HUB could have power draw reduced by purposely and artificially telling the USB to pretend a device was just disconnected. The concept being to cause reset to equal USB disconnect, which is apparently not the same thing with current software.
For your information, the phenomena disappears with R21.1. Thus with R21.1 the power consumption is the same before adding a USB device and after add&remove of a device.
Which does the newer software total power match from older software:
- initial boot power draw pre-USB add/remove, or
- the power draw post USB device removal?
I’m curious if power draw became better or worse.
I did some comparison measurements between R21.1 and R19.3 (grinch 19.3.6 kernel). Disclaimer: the measurements were done with two different Jetson boards, thus I can’t say if that has some influence. The power consumption is slightly higher with R21.1 in idle (10-20mA), but consumption is significantly lower under GPU load! In my application (and with max GPU frequency) I use 0.87A with R19.3 and 0.78A with R21.1. What is also interesting is that the processing frame rate is more constant and also the consumption is more stable under load.