iPad or iPhone doesn't charge until unlocked? When I plug my iPhone or iPad into my laptop with the USB cable, it doesn't start charging until I unlock the device with touch ID or code. Is there a way I can change this behavior? I don't think it used to work that way (years ago), and now I often forget to unlock it, so I think a device is charging and then hours later realize it's not. 

To clarify, I don't have to leave it unlocked. I unlock it, then the battery icon changes to indicate it's charging, then I can lock/sleep it again.
What you are observing is due to a security related change made in iOS 11.4.1.


Using USB accessories with iOS 11.4.1 and later



  Starting with iOS 11.4.1, if you use USB accessories with your iPhone, iPad, or iPod touch, or if you connect your device to a Mac or PC, you might need to unlock your device for it to recognize and use the accessory. Your accessory then remains connected, even if your device is subsequently locked.


This setting can be accessed on your iPhone/iPad by going to Settings app → Face ID &amp; Passcode → USB Accessories.


  When the USB Accessories setting is off, as in the image above, you might need to unlock your iOS device to connect USB accessories.


This is turned off by default for security reasons. If you turn it on, your iPhone/iPad will start charging instantly, without unlocking it's connected to your laptop.