Android Studio, Linux Laptop and High Power Usage of Specific USB Devices

73 views Asked by At

I'm new to Linux and could use a clue stick to track down why the battery usage of my laptop goes up when Android Studio (AS) is running. I know Android Studio uses more of the processor and memory while running, but I did not expect my internal USB devices to be drawing more power. Of particular interest is the power usage of my camera (I'm not doing anything with it in relation to AS) and fingerprint reader when AS is running (from powertop):

The battery reports a discharge rate of 9.48 W
The energy consumed was 201 J
The estimated remaining time is 4 hours, 15 minutes

Summary: 2656.5 wakeups/second,  0.0 GPU ops/seconds, 0.0 VFS ops/sec and 49.1% CPU use

Power est.              Usage       Events/s    Category       Description
  6.18 W     25.5 pkts/s                Device         Network interface: wlp2s0 (ath11k_pci)
  2.81 W     94.9%                      Device         Display backlight
  1.44 W    100.0%                      Device         USB device: Integrated Camera (Generic)
  138 mW    100.0%                      Device         USB device: Goodix USB2.0 MISC (Goodix Technology Co., Ltd.)

I don't have a phone connected, am not using the emulator, and closing AS removes the last two USB devices from powertop.

So, what's going on and why do these go nuts when AS is running? My About Android Studio:

Android Studio Hedgehog | 2023.1.1
Build #AI-231.9392.1.2311.11076708, built on November 9, 2023
Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.6.15-amd64
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
    external.system.auto.import.disabled=true
    ide.text.editor.with.preview.show.floating.toolbar=false

Non-Bundled Plugins:
    dev.patrickpichler.darculaPitchBlackTheme (1.0.0)

Current Desktop: KDE

Thanks.

1

There are 1 answers

0
Bink On BEST ANSWER

I was able to resolve the issue by configuring Android Studio to use libusb by going to the following:

  1. File
  2. Settings
  3. Build, Execution, Deployment
  4. Debugger
  5. Scrolling down to Android Debug Bridge
  6. Checking Use libusb backend and clicking OK