As I rejoiced in the achievement of finally finding a Linux distro which plays well with my Dell XPS 13 (2019 edition, model 9380), I plugged in my Moto test device, intending to continue working on an Android app. Pressing the Run button promptly made Android Studio (3.4) do its compilation magic, but got stopped in its tracks rather quickly. An angry-looking error message awaited me:

error: insufficient permissions for device: udev requires plugdev group membership

Oops, no device debugging for you.

Android Studio also left a note pointing me to their developer page on the subject. As I suspected, it seemed I had some configuration work left to get device debugging working on Linux. However, following Google’s instructions on setting up adb didn’t do much to resolve my problem. The part about adding yourself to the udev group is important, though, as it’s linked to the actual solution described in the next paragraph.

sudo usermod -aG plugdev $LOGNAME

Adds your user to the plugdev group.

Update: Someone mentioned recently that the below steps may not actually be required; just logging out and back in again at this point, should also do the trick. YMMV of course :-).

An ill-timed dog walk (let’s just say I hadn’t expected to be caught in the middle of a downpour), and a few mildly frustrated Google searches later, I ran across a blog post from 2013 (!) on the subject of “Adding udev rules for USB debugging Android devices“, by Janos Gyerik.

I will not pretend to know why this extra configuration is required, but it describes looking up the device’s identifier and adding it to the aforementioned plugdev access group, so Android Studio can properly access the USB device.

And there you go, a working USB debugging connection to my Android device, thanks to some great advice from 2013!

Previous ArticleNext Article

Leave a Reply

Your email address will not be published. Required fields are marked *


Proper High DPI font scaling in Firefox on Linux

macOS supports high DPI displays particularly well and exposes DPI scaling as a 5-step gradient. Over on the Linux-side, however, things are far less rosy, with wild differences between distros.

Linux Mint, the distro I ended up settling on, had no trouble consistently recognizing my 4K display, over my [way too expensive] USB-C-to-HDMI interface. DPI scaling is chiefly exposed as Text Scaling, which works fine for the most part. However, there are still applications that don’t always pick up on this setting and insist on displaying text at its na[t]ive resolution. It’s pretty obvious that displaying text at 1080p on a 13″ screen, or 4K on a 27″ display, is far from ideal…

On such app is Firefox, for some reason. Luckily, Firefox’s intrepid about:config dialog exposes just the setting we need to override whatever its default behavior is. As describes it:

find the key layout.css.devPixelsPerPx and then change the value from -1.0 to 2

Screenshot by

For reference, I set mine to 1.5 for a 4K screen displayed on a 27″ display. Note that the entirety of Firefox’s UI scales along with any web content. If you’re running multiple screens with different resolutions and sizes, you will notice that this value is system-global, as opposed to per-screen. In other words, it won’t be a one-size-fits-all solution, but good enough for me, for now.