I keep all my carry-on electronics in a one or more clear ziploc freezer bags (gallon size). Has solved problem for me re secondary searches, unless I happen to get caught on a true "random".
Oh, and I did have one TSO bark at me that I could only use quart-size ziplocs, until I kindly pointed out that my gallon bag was full of electronics, not liquids. He sheepishly replied, "Oh." and let me pass with no further discussion.
I would recommend the separate ziploc(s) with all your electronics to any traveler.