Convergence - Librem 5 on a Big Monitor

I purchased a small cradle with several USB ports (to plug in a keyboard and mouse), an SD Card port, an HDMI port, and a USB-C charging port, on Amazon. It cost $29. I was skeptical about whether or not it would work for convergence. But I had to start somewhere.

It actually does work… Kind of. I got a high resolution display on my 25" monitor. The mouse works. But I had trouble with the keyboard. I couldn’t troubleshoot the keyboard issue because you get maybe one minute maximum before the phone battery gets really hot and the phone connection to the cradle quits working. The battery temperature issue happens quickly, whether or not you provide external power to the cradle.

I think that the Lapdoc is way over priced. In addition, I want a small cradle that you can throw in to a small bag with plenty of room to spare. I want to use the keyboard, mouse, and monitor where ever I am going, not carry those things with me. Something that costs $549 and has a base the size of a regular laptop pc does not appeal to me at all. You might just as well buy a Librem Mini at that point or carry a laptop instead.

As an electronics engineer myself, I spend many of my days at work, designing circuits and circuit boards. Unlike a lot of other electronics engineers who hand their designs off to a Technician who completes the job after the design work is complete, I also lay the boards out myself, generate the artwork (Gerber files), and place the order for circuit boards from the board fabrication house, myself. For someone who knows how to do it, you can use free and opensource CAD software to generate very professional quality circuit boards.

So here is my question. Where can I find the electrical specifications that are required to implement Purism’s protocols that are used for the Librem 5 convergence? I can do the traditional USB design stuff myself. But Purism also appears to have embedded a display port protocol that passes through the USB-C port output from the Librem 5, in addition to the USB communications. My existing cradle does this, but there appear to be bugs in the USB capability as a result. In addition, there appears to be some charging control communications that need to take place. So we have 1.) Shared USB/Display Port communications and 2.) Battery charging communications. These are the electrical specifications that I am looking for on an Engineering level, not looking for simple product specifications. In addition, there is a 5.8Ah battery in the lapdoc product. Is this required to make the protocol work? If an MCU or flash memory chip is used in the design, I would also need the code to program these devices. I assume that all of these specifications are opensource?

What I want to do is to build a schematic that meets the Librem 5 convergence requirements. Then take the circuit board out of my Amazon-bought convergence cradle and lay out a printed circuit board to exactly match the one I took out of the cradle. Every USB, HDMI, SD Card, and USB-C placement on my circuit board can be placed exactly where its counterpart was on the old circuit board. Then replace the old circuit board in the existing cradle with my new one that is custom designed to work with my Librem 5. That board should cost me around $20, plus the cost of components.

Can anyone here point me to the needed technical and engineering specifications? The more developed, the better. If I can have full access to Purism’s Lapdoc design documents, I can reverse engineer and copy from there. Is this stuff kept secret, or opensourced? The goal is to build a small $50 device to replace the need for a much larger $550 device.

2 Likes

tl;dr, but I think you are asking for hardware specs and such. This may have what you are looking for: Librem5 / l5-schematic · GitLab

1 Like

It’s just the standard USB-C PD DisplayPort Alternate Mode.

2 Likes

How do they handle the severe power draw on the Librem 5 battery? Does the 5.8Amp battery in the lapdoc provide adequate power buffering on its own without any special power-related communications needed?

1 Like

“Special power-related communications” is called USB Power Delivery.

1 Like

When the power delivery requirements to or from the Librem 5 increase significantly and then a NexDock 360 with a 5.8Ah battery is in to the loop, one of two things will happen.

1.) The charging circuit in the Librem 5 will simply adapt and everything will just work just fine. This appears to be the case for the NexDock 360, or

2.) The charging circuit in the Librem 5 will be overwhelmed with the task of managing far more current than it was designed to accommodate. This appears to be the case for low cost docking stations and cradles.

Which of these possibilities will happen is dependent on the specifications of the power control/battery-charging chip and on how the drive strength of the display image is delivered to the display. I suspect now that the reason for the additional 5.8Ah battery in the NexDock 360 could be to provide the power requirements of the built-in display (even as small as the display is in the NexDock 360). Getting the display to take power from that NexDock 360 battery instead of trying to suck all of the power it needs from the Librem 5 seems to be the trick. And I suspect a drive strength requirements of the image as the problem with low cost docking and cradle solutions, since my 25” monitor plugs in to its own power supply. The Librem 5 can meet the drive strength requirements to create a good image for short amounts of time using its own battery, but at the cost of over-driving the Librem 5 battery until the phone shuts off. Maybe the system will balance itself out by simply adding a bigger power source to the cradle and possibly sending power to the external monitor (along with the image) via the HDMI bus instead of via USB from the Librem 5. I don’t know without doing further research, whether or not the HDMI bus can transfer power like that and at high enough current levels, to make that work. Potentially, an amplifier might have to be added to boost the image drive strength of the Librem 5 image without forcing the Librem 5 to draw higher current levels from its internal battery. In any event, it appears as though the power draw requirements on the Librem 5 during convergence using low cost cradles or docking solutions must be reduced or managed some other way before the use of low cost docking or cradle solutions can be made to work.

1 Like

You should start by reading up on the USB PD protocol, as otherwise you end up just assuming things out of thin air that lead you astray. There’s no way to get the DisplayPort signal out of the phone without speaking PD anyway.

3 Likes

I think you are correct dos. This sounds like a much more painful way to go than just adding a battery or re-routing the power lines. But if you are correct, then learning to speak PD might be the only fix to this issue. If the code or settings aren’t in the public domain, then finding where the firmware exists and learning how to write or alter it may not be as easy. Then again, not everything worth doing is easy. But I know I can implement any hardware changes, no matter how complex that might get, if I can figure out exactly what is going on in the circuit. New circuit boards and lectronic components are usually very inexpensive.

1 Like

PD is a standard protocol and there are many off-the-shelf PD controllers available (microcontrollers often have integrated ones as well), so designing a board to get the DisplayPort signal out shouldn’t be a problem. In fact, I made a board to speak PD myself one time and I’m definitely not an EE :stuck_out_tongue:

2 Likes

So, to expand on this a bit, I’ve used a couple of different docks with my Librem 5 and I think I experience something similar to what you are describing, however:

  • I am not an Electrical Engineer (my degree was in software, Computer Science)
  • My theory is that it was not the battery that dies on my Librem 5, but rather an overheating of the processing and GPU capabilities

Specifically, in my case when I use one of many possible docks between the Librem 5, one of many possible keyboards I have floating around in my man cave, one of the various mice, and my rather large 4K monitor, what happens to me is that the Librem 5 often chokes and won’t output to the 4K monitor. But if I can get it to output to the 4K monitor at a slightly reduced resolution, the display output resolution appears to correlate highly with how long before the Librem 5 overheats and refuses to dock and stuff. Because of this, what I found was that if I could connect to the monitor, quickly go into Settings > Display and then set the resolution down to 720p at 1280 x 720 to get generally the same aspect ratio as my 4K monitor but at this much lower resolution, then after doing that I could sit and work on the Librem 5 in “convergence” docked mode for hours.

If you’re having the same problem that I did, and if my layman theory that it was the GPU / processor heating up and not the battery is correct, then reinventing the PCB of the power circuitry might not help. Am I wrong to think this?

One of the things that I really wanted to do with my Librem 5 back when I first got it was to entirely remove the battery and then use the device as a PC with a mouse, keyboard, and monitor, while knowing that I could sit and use it for hours and hours without adversely impacting the battery. I have noticed with my laptops across the years that when I leave a laptop plugged into the wall charger and use the laptop as if it was a PC for a month at a time, when I later unplug it and go back to using it as a laptop the battery is never the same. Apparently this practice really burns out batteries.

So I thought, surely I could avoid that on the Librem 5 because the battery is so easy to remove. However, it turns out nobody at Purism seems to have ever thought of this or made it a major focus for the device, because of how much it obviously doesn’t work. I’ve tried at least 4 different docks with probably 5 or so different USB-C chargers, and nothing that I have ever done has ever been able to boot the Librem 5 when it has no battery. The Librem 5 will happily boot without a battery when connected directly to its official Purism provided charger (directly to the wall), but as soon as I insert a dock of some sort between the Librem 5 and the charger, I’ve never been able to get it to boot.

I think it was probably @dos or someone smart on these forums a few years ago who gave me the tip that it’s possible to remove the Librem 5 battery while the device is on and already booted, which is a bit fascinating to me and did not occur to me naturally. It definitely feels like a hack but I have been able to use the Librem 5 at the 1280 x 720 resolution docked to my 4K monitor sometimes for 20 or 30 minutes, maybe even 45 minutes, with no battery in the Librem 5 treating it convergently as a computer in this way. But usually after those 45 minutes, or sooner based on how busy the Librem 5 is, it will shut off sporadically. My layman understanding of why this happens is that sometimes when it spins up apparently it needs more power draw that only the battery is able to provide, and docks are not.

Since learning all of that, I bought a Librem 14 from Purism as a way to support the Librem 5’s financially because I enjoyed the device so much. But this created a problem. The Librem 14 software and Librem 5 software are so similar, that I have completely stopped trying to use convergent mode on my Librem 5 for about a year despite daily driving it as my only phone for over 2 years. Any time that I want a serious mouse and keyboard, I use either the Librem 14 (which is a better experience than a Lapdock by an order of magnitude) or if I want to use a mouse/keyboard/monitor, then I plug the mouse/keyboard/monitor that I had long ago tried to use “convergently” with the Librem 5 and instead I plug the same dock into the Librem 14. Then I basically have a desktop-style experience, it runs 4K monitors perfectly, and does all sorts of things and just about everything I could need.

If you’re going to invest engineering time and effort into a convergent docking system, is it possible that instead of a Lapdock that tries to use an arm phone processor to run a real-sized computer, that it might be much smarter to make a Phonedock product that uses the processor and capabilities of a more serious and well-supported computer such as the Librem 14, but outputting to a Librem-5-sized display-only control unit? I’m picturing this would basically be the inverse of a Lapdock. That way it’s convergent in a similar way, but you can have 32 GB of RAM and a big serious processor. This is just an idea, maybe there’s a reason it wouldn’t work. There are definitely 100% times that I carry around my Librem 5 without taking the Librem 14 with me (but those are also times I don’t bring a dock).

1 Like

FWIW in the past I’ve been using a Librem 5 docked to a 1920x1080 screen for extended periods of time with battery inside with no troubles as long as I put a small USB-powered fan nearby (of course the dock has to provide enough power at 5V, but if it doesn’t then you’ll notice that the battery is slowly discharging).

4 Likes

I noticed by the time I bought a Nexdock that they were really pushing for wireless everywhere. I like wires and would have rathered to have a wired one, but they weren’t selling that anymore that I could see. If the future of docking is wireless… then why don’t we have a device like a Librem Mini that plugs into a wall somewhere, or maybe optionally has a big battery, which then uses a Lapdock or this imaginary “Phonedock” concept whenever one of them gets close to it. Basically a physical laptop shaped shell or a phone shaped shell, which in either case are used as IO for the Librem Mini plugged into a wall nearby.

Either Nexdock wireless is a scam, or else if wireless docking works then I don’t understand why we don’t want have this Librem-Mini-as-the-computer kind of future – with compatibility for any shape of human interface IO unit.

NOTE:

I do not personally have nor own a Librem Mini.

Edit:

(In the scenario imagined above, presumably the Librem-Mini-shaped brains behind the computing would be the one to house a broadmobi & SIM card. When traveling on the go you could probably attach it to a battery and keep it in a backpack or somewhere nearby, while interfacing to it using the “Phonedock” type of thing, like a lapdock concept where we use hardware in the shape of a phone but with no brains of its own and have it just pass-through to the nearby “brains of the computing”)

1 Like

GLES3 and LOCKDOWN will help for Temp SINK.

1 Like

I just found a third phone cradle that I forgot I had, until today. It’s my old Samsung Dex mode cradle. This cradle performs much better than either the USB-C dock or the new cradle that I recently purchased. Using that older cradle, the Librem 5 didn’t heat up at first. I configured the display to a reasonably high resolution, and opened a few desktop programs on the Librem 5.

The problems started after I opened KiCad and attempted to start building a schematic. The program ran out of memory and then crashed every time I restarted it. The crashes started the first time I tried to open a library and place a component on the palate. If all you want to do is look at a blank schematic palate, that works just fine. After around the fourth crash following each respective attempt to place a component on to the palate, the phone finally shut itself off. I put my hand on the back of the phone at that point and it was really hot. I think that dlonk was correct. It’s probably not the battery that gets hot, but the cpu.

I did some research on the USB PD and that looks really easy to implement in some cases. A discrete USB power chip has a small matrix that makes it easy to change the charging direction and power levels using an MCU. I took apart my new phone cradle and there were only four IC’s inside. The display port to HDMI conversion chip was big enough that I was able to get a part number and find the datasheet for it. That chip has an integrated MCU, although some other USB PD chips just use resistor pull-ups to set the power levels. One chip inside of this cradle was completely unmarked. I’ve never seen that before. The other two chips were too small for me to read, even with a magnifying glass. I’ll take it to work and use a microscope there to get those other part numbers. But I think that dos is correct. It may be easier to just build the application from scratch and build it to work on the Librem 5 specifically. But if the Librem 5 itself isn’t up to the task of running my favorite desktop applications, then it’s time to consider whether or not it’s worth the time it’ll take to do build a good convergence device at all. These days with product reference designs and datasheets that show examples of working circuits, you don’t have to be an EE to design and build these kinds of devices. You just hook things up and program the MCU to control the other chips based on their respective datasheets.

I do think it might be worth the effort to build a small USB test port device with an MCU to control the power levels to it, and install a few momentary contact buttons to control the selections. One button would toggle the direction. A second button could step through each power level. LEDs corresponding to each setting could verify the selections. Then a person could use that device as a tool when building other USB applications. If your monitor starts flickering or your battery isn’t charging, you could just bump-up to the next power setting to see how that one works. If you’re burning a lot of power, you could lower the settings and see if everything still works. Then your final application can implement permanent settings either in MCU code or via pull-up resistors to the settings pins.

4 Likes