If the device is powered off it requires a complete pass phrase to decrypt and is not susceptible to cold boot attacks. Beyond that I will adamantly refuse to turn over my passwords to ANYONE, EVER. Anybody who has a legitimate need to bypass my authentication has the ability to do so without my passwords (ala SSO at work). If that ends up with me being unjustly imprisoned, I will fight that battle when it happens.
My findings though are there are two types of border agents that ask inanely stupid things like having you login to a device. The first are bullies on a power trip. These guys will make spurious claims and try to hold you to them, hopefully their supervisors are more reasonable or things go South fast.
The second type are wheedling opportunists. These guys will ask for unreasonable things as an opening to negotiate a large bribe or because they think you'll play along and let them display a power trip to their nearby cronies. If you're adamant and serious, they'll usually just not target you.
The fact this sort of behavior is becoming commonplace in the "more civilized" parts of the world is truly worrisome though. Corruption in most Western governments tends to be at the top, not officers taking bribes. That means this behavior has the full backing of the law (or at least some semblance) and you play a real risk of your entire life being ruined if you don't comply. Personally I still plan to refuse and not give in, but that's not a reasonable choice for most people in this situation. The whole thing is disgusting.