How to limit power output from a USB port?

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
senjoz
Level 5
Level 5
Posts: 890
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

How to limit power output from a USB port?

Post by senjoz »

I would like to limit electric current output from one USB port on my notebook to a maximum of 100 mA. Is this possible in Linux Mint?

I have a small notebook without keyboard illumination. To be able to use it in a dark environment I bought a USB LED light. Unfortunately I could not get the light I wished, 0.5 W 45 lumen. Now I have 1.2 W light. It is too bright and it consumes too much power. I would like to limit current from USB port to 100 mA to get light power 0.5 W. I am aware that that may not work because LED diodes need some minimum current to start emitting light but I would like to try it anyway.

Regards, Jože


Battery power consumption in idle state with 5 % screen brightness
Screenshot from 2021-12-03 19-30-57.png

Battery power consumption in idle state with 5 % screen brightness an LED light in USB port
Screenshot from 2021-12-03 19-52-12.png

Code: Select all

~$ inxi -Fxxxrz
System:    Kernel: 5.13.0-22-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.0.7 tk: GTK 3.24.20
           wm: muffin 5.0.2 vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal
Machine:   Type: Laptop System: ASUSTeK product: VivoBook_ASUS Laptop E210MA_L210MA v: 1.0 serial: <filter>
           Mobo: ASUSTeK model: E210MA v: 1.0 serial: <filter> UEFI: American Megatrends v: E210MA.308 date: 05/07/2021
Battery:   ID-1: BAT0 charge: 23.5 Wh (63.7%) condition: 36.9/38.0 Wh (97.0%) volts: 7.9 min: 7.9 model: ASUSTeK ASUS Battery
           type: Li-ion serial: N/A status: Not charging
CPU:       Info: Dual Core model: Intel Celeron N4020 bits: 64 type: MCP arch: Goldmont Plus rev: 8 cache: L2: 4 MiB
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 4377
           Speed: 1303 MHz min/max: 800/2800 MHz Core speeds (MHz): 1: 1303 2: 1160
Graphics:  Device-1: Intel UHD Graphics 605 vendor: ASUSTeK driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3185
           class-ID: 0300
           Device-2: IMC Networks USB2.0 VGA UVC WebCam type: USB driver: uvcvideo bus-ID: 1-5:3 chip-ID: 13d3:5a11
           class-ID: 0e02
           Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting unloaded: fbdev,vesa resolution: 1366x768~60Hz
           s-dpi: 96
           OpenGL: renderer: Mesa Intel UHD Graphics 600 (GLK 2) v: 4.6 Mesa 21.0.3 direct render: Yes
Audio:     Device-1: Intel vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:0e.0 chip-ID: 8086:3198 class-ID: 0403
           Sound Server-1: ALSA v: k5.13.0-22-generic running: yes
           Sound Server-2: PulseAudio v: 13.99.1 running: yes
Network:   Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel bus-ID: 02:00.0 chip-ID: 8086:24fd class-ID: 0280
           IF: wlo1 state: up mac: <filter>
Drives:    Local Storage: total: 116.48 GiB used: 8.73 GiB (7.5%)
           ID-1: /dev/mmcblk0 vendor: SanDisk model: DA4128 size: 116.48 GiB type: SSD serial: <filter> rev: 0x8 scheme: GPT
Partition: ID-1: / size: 31.25 GiB used: 8.7 GiB (27.9%) fs: ext4 dev: /dev/mmcblk0p4
           ID-2: /boot/efi size: 511 MiB used: 30.5 MiB (6.0%) fs: vfat dev: /dev/mmcblk0p1
Swap:      ID-1: swap-1 type: file size: 1.48 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
Sensors:   System Temperatures: cpu: 35.0 C mobo: N/A
           Fan Speeds (RPM): cpu: 0
Repos:     Packages: apt: 1996
           No active apt repos in: /etc/apt/sources.list
           Active apt repos in: /etc/apt/sources.list.d/linrunner-tlp-focal.list
           1: deb http://ppa.launchpad.net/linrunner/tlp/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
           1: deb http://packages.linuxmint.com uma main upstream import backport
           2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:      Processes: 181 Uptime: 3h 35m wakeups: 1 Memory: 3.66 GiB used: 1.53 GiB (41.9%) Init: systemd v: 245 runlevel: 5
           target: graphical.target Compilers: gcc: 9.3.0 alt: 9 Shell: Bash v: 5.0.17 running-in: gnome-terminal inxi: 3.3.08
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Hardware Support”