Just received this USB-C dock i picked from this list.
From a quick test, i can confirm, that the devices (kbd, mouse, lan, power, hdmi, sd-card) of the dock appear to work well. It took some tries though to get the HDMI connection to the screen up …
Wrt. power, i think something is broken. Librem 5 claim that it is powered by the dock and that it would take 2h8m to fully charge it from 87% first now with estimates quickly rising to 3h34m. The battery was fully loaded before.
Unfortunately this situation continued when i unplugged the dock and put the regular power supply back into the librem5. The situation persisted a reboot and got finally resolved when i powered the device down and removed the battery for a moment. Now the Power shows 100% and “Charging” again.
Is this work in progress or should i use a newer kernel or something? Perhaps turn the USB-C plug? And then which one, that in the librem5 or that in the dock? Any /sys file to figure out the precise charging situation?
I don’t think that solves the problem. I expect it would simply reflect the confusion, which I too have seen. Sometimes a reboot seems to be the only way to get the percentage to reflect reality - although if you are confident that you know reality then you can ignore the percentage displayed and not reboot.
In case it helps, I am using values in /sys/class/power_supply/max170xx_battery
Any dock/cradle for the L5 will probably require a lot of current. My Samsung Note 9 even requires external power to the cradle itself, just to run the whole desktop environment with keyboard and mouse and HDMI out. Without external power to the cradle itself, the phone won’t even enter DEX mode. For the L5 with the larger battery in addition to all of that, I would use at least a 3-Amp charger minimum to start, and maybe even four or five amps might be required. A USB-C charger made for a tablet is what I would look for unless the charger that comes big enough, by default.
Using an over-sized charger (excess current not excess voltage) shouldn’t harm anything if it is too big. Your hardware will only draw the amount of current that it needs if it meets the USB-C specification. But the voltage is likely to drop if the charger is undersized and your device might not run in that case. It’s like a large car with a very small engine trying to climb a steep hill. Going down hill, it doesn’t matter if the (metaphoric) engine is too big. The voltage shouldn’t be an issue other than if you try to draw too much current from a power source that is too small. Just make sure to stay with a charger made for USB-C. The USB-C specification goes as high as 20V at 5A, for 100W max. If your phone can’t handle the higher voltage, the communications between the phone and the charger should cause the phone to tell the charger what the voltage limit should be, assuming that the L5 follows the USB-C specification. The size of the cable matters too. A cable made for 3A will not deliver more than 3A. I think the most you can get is a 5A cable.
Though i thought it would be clear from the post, the dock is connected the power supply delivered with the L5.
Now the charger, the dock and the L5 are not just silly circuits, but (could potentially and should) negotiate the power provided. As a result the L5 could get over- or under-charged. To summarize, @StevenR, i think you emphasize on the later case pointing out that the L5 will most likely not be damaged that way. And in fact it did not heat up or anything. But normally, if not actively set to higher current, the power supply or the dock would only provide minimal default power to the best of my knowledge.
Whether the dock draws and provides enough power despite the indications in the power settings could be determined experimentally, which i did not so far. Practically, the dock could be used if only the indicator would be irritated, but the L5 would be charged anyway. Thank you, @irvinewade, to point that out. I can try that test … but i have not much hope as the power provided must be successfully negotiated between the devices and the power settings indicate that it was not.
Not sure (not researching this now either) how much current it provides as your docking station needs some power as well. In your shoes (if PD charger used) I’d read charger numbers for sure and follow this advice:
And, thanks for sharing what is going on! I need to experiment further (when I get more time, with my PinePhone and some other docking station) but my current proposal or current thought would be:
a) turnoff your Librem 5 and put it aside,
b) connect power supply (30W+) to USB-C Power Delivery port of your i-tec docking station,
c) connect i-tec docking station with a single cable (14 cm) into your L5 USB-C (turn it on).
Note: once you disconnect L5 from this docking station do not reconnect it back as charging power (regular one of 1.6A will drop down several times and this causes problem that might easily be provoked from docking station “switch” and not from the L5 one).
This product datasheet states: “If you disconnect the USB-C power adapter from the docking station, then the docking station may in some cases restart, i.e. disconnect and reconnect all connected devices.”
Again this is just my current thought, that I need to proof as well (need more time), some kind of first help, nothing serious, especially if not helping.
And please do not forget to use Powersupply app and follow Battery Status Charging or Discharging numbers (Watt), especially if you want to proof what I like to point out in this post, either charge or discharge L5 it properly (do not change direction of PD current as you suddenly “need” to do so, please), don’t allow to external device to “decide” what is proper charging current for this connecting/disconnecting “live” mode. Just thinking quickly here as do not have much time now, but hope you understand my brief advice. Actually proof my advice here and let us move forward together.
Therefore my point here would be: either use mentioned external device as described above (charging) or in only discharging mode (OTG mode).
As good as i understand USB, this is a just a regular procedure and not a particularity of this device. It is just, that the altered changing situation is re-negotiated with the devices.
If you go through a USB-C hub and plug each device separately and directly in to the hub, then it seems like each device should negotiate independently with the hub, to provide the needed power to each respective device. The L5 will probably be the biggest power draw, while a keyboard might draw very little current. When the load is higher (higher resistance), the voltage has to be turned up to force the intended voltage (5V to 6V in to the load) in to the L5 battery while also satisfying the load of the phone itself at the same time. If the keyboard were in that same circuit, it might see 20V under these conditions. That is why each device should be plugged directly in to the hub, in to a different port. So it’s probably about finding the right smart hub. The article where a laptop docking station is the power supply is best idea in my opinion. I didn’t think of that myself until I read the article. Laptop batteries require a lot of charging power. A USB-C with Thunderbolt 3 might be overkill for the Librem 5. But it will probably work. I have a USB-C with Thunderbolt 3 as a docking station for a Lenovo laptop. It is just a glorified power supply without the plastic shell to snap the laptop in to. The power supply / Thunderbolt 3 brick just sits on the table next to the laptop (could be phone).
If you want to, you could build yourself a USB-C input/output adaptor that would allow you to break in to the circuit to take a current measurement. Just be careful not to take a current measurement directly accross an unconnected load (except your connected current meter). I carelessly did that recently and was surprised that it only destroyed my power supply and left the meter un-damaged. I forgot to change the meter to measure voltage before making that connection.
@StevenR, i’ve seen elsewhere, that the L5 does not work with Thunderbolt. It is not clear to me yet, whether this is a restriction of the L5’s hardware or software. The other way round, if a dock supports Thunderbold does not necessarily mean, that it does not work with the L5.
You are probably correct. Maybe the Thunderbolt can not recognize the L5 and doesn’t know how to deal with it. I wonder if Purism was assigned a number to identify the device. A programmer at work that reports to me says that if you publish a new USB device driver, that you should register it somewhere so that anyone in the world who encounters your device, will know who you are and how to talk to your device. If you use unregistered numbers or someone else’s numbers, your device might only work for the hardware you got it working with in your own self-written driver. I don’t know the name of the organization that issues these numbers.
The USB id comes with the device. With the firmware on it, to be more precise. So a driver will only look for the id but need not provide a new one. Only if one flashes a new firmware to the device with different abilities than the original one might run into needing a different id.
No wonder so many software suppliers (even some bigger ones) tell you to ignore Microsoft’s big red-type warnings that tell you that the drivers have not been tested and may not be safe. What a racket. I wonder if Purism registered. Someone in the open-source community should start a counterpart organization and charge only $10 for registration or free if you interface with a database to register it yourself. That might work in Linux anyway.
So you are saying that you know (in advance), without reading Powersupply numbers or any further testing (by choosing some more accurate/adequate testing method, external measurement device that you put in between involved/testing devices, their ports and cables in particular) that the electricity power draw from any to it provided charger (for example original one) is always the same (and sufficient), with this i-tec docking station (therefore original Important note cited), whichever cable (source or end device) you connect first, in direction of the L5 (or from it)? I’m simply not an expert and therefore asking.
@Quarnero. Err, …, yes and no. If the drivers and devices behave as they should, you should be able to (un-)plug everything in any order.
Basically, what is normally happening, is that the USB (root-) hub (in the L5) initially provides enough power to a new device to power it up enough so that it can announce itself. After so knowing the power demands of the device, the hub provides the power the device want, if it can, and set the devices into another, more power-demanding state.
What we here, is i think USB-PD, where power is not only delivered from the PC downstream to the devices, but upstream. Again, this need to be negotiated in some way, which i conjecture might go wrong right now. The L5 would be responsible to collect the power needs and abilities and manage their power settings.
I like your explanation, and openness, thank you! Now is clear to me what I supposed that you want to achieve … get answer/promise that problems, as you described those in your first post, should not happen (at this point of development) with the recommended docking station, that should be 100% compatible with the Librem 5 (don’t know, but agree and respect your evaluation, current state evaluation).
Now that a 5.11 kernel is released. i gave it a shot:
# uname -a
Linux pureos 5.11.0-1-librem5 #1 SMP PREEMPT Thu Feb 25 00:39:01 PST 2021 aarch64 GNU/Linux
The result is, that the dock now appears to behave as it should. Most particular, i do not spot any suspicious kernel messages any more, i do see the usb-id (2109:0102) of the dock in lsubs (which was not the case before) and the dock appears to be properly powering the L5.
I did not intensively test the dock yet, but i plugged in the monitor and it connected absolutely smooth, which was not the case earlier. I ran iperf on the LAN:
$ iperf -c 192.168.0.134
------------------------------------------------------------
Client connecting to 192.168.0.134, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.17 port 54176 connected with 192.168.0.134 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0000-10.0038 sec 405 MBytes 339 Mbits/sec
Well, not exactly gigabit lan, but much faster than my wlan connection.
$ iperf -c 192.168.0.129
------------------------------------------------------------
Client connecting to 192.168.0.129, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.0.17 port 58506 connected with 192.168.0.129 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0000-10.3139 sec 4.25 MBytes 3.46 Mbits/sec
Keyboard and mouse (i.e. usb connectors) work well too, and so do the SD/TF card slots and the even the head phone adaptor in the dock. All thumbs up.
From that findings, my search for just any dock with a power supply and enough connections ends here, with a good outcome. The result is, that the newer kernel fixes the issues i’ve so far seen with it.
Thanks for sharing (again)! Looks like that here related docking station of yours is based on VL102 controller. I’ve just read this description anyway.
Hmm, it is not obvious, how to open the device, so i cannot check this easily by looking at the chip.
Oh my goodness – these docks are such interface-ninjas. The equation L5+dock=RegularPc definitely holds.
As one can expect that such docks to become more common in the near future, one could find one at the customer for some spontaneous work, even when one has not carried a dock with the L5.
Yes, this would fit both from vendor (2109) and product (0102) id. You are most probably right and it is good to know that this chip is likely to appear in other product. Unfortunately, it is very difficult to get any technical information about most technical products before one actually buys them. They are often re-branded and the product sheet typically shows few more but an all happy family, including the dog.
I was a bit reserved, because i could not find any document that directly links the usb-id to the chip. Additionally, the usb-id of such chips can often be set to any other value. Also, i-tec claims that the dock is Thunderbolt-3 compatible, while the brief of the chip does not mentions Thunderbolt at all. But again, i think your finding is right.
I’ll probe some other docks i have here with the newer kernel and chances are, that the outcome might also be much better.