You are not logged in.

#1 2024-10-25 06:53:29

triplc
Member
From: Hanoi, Vietnam
Registered: 2009-08-23
Posts: 41

How to turn off usb power when the externel sound card not needed?

How to turn off power of an USB port?

I have my sound card (TEYUN Q26) connected via an USB port. It does not have a power button, so, it is powered on all the time. I think that might be not good for my computer, a mini PC with very limited power supply.

I can see the connection:

$ lsusb | grep TEYUN
Bus 001 Device 006: ID 31b2:0023 Shenzhen Ulanzi Technology Co. Ltd. TEYUN Q26

How to turn off that USB port, power off? Using command line.

I've googled but did not find any working answer.

Some answer tells

$ echo 0 | sudo tee /sys/bus/usb/devices/usbX/power/autosuspend_delay_ms
$ echo auto | sudo tee /sys/bus/usb/devices/usbX/power/control

But I do not know which usbX to chose. In above-mentioned code, lsusb only tell me that it is Bus 001 Device 006: ID 31b2:0023, which I do not know how to read it as usb1 or usbX. Moreover, that commands do not always turn off the power, I think.

Some answer tells

$ echo "1-4.4.4" | sudo tee /sys/bus/usb/drivers/usb/unbind

But I do not know to get the ID "1-4.4.4".

Please help.

(sorry for my English, I am not a native English-spoken)

Last edited by triplc (2024-10-25 06:56:02)

Offline

#2 2024-10-25 08:14:23

cryptearth
Member
Registered: 2024-02-03
Posts: 974

Re: How to turn off usb power when the externel sound card not needed?

from a quick google the interface is connected via usb2.0 - which is specified at 500mA @ 5 V = 2.5W - which is what a standard usb port provides after the device has requested it
otherwise devices are limited to 100mA @ 5V = 0.5W

so - what exactly is the requirement behind the idea? to save power? 2.5W x 24h = 60Wh = 0,06 kWh per day just for the interface - sums up to 21,9 kWh/year IF you keep it running full 24/7/365 - that's within the margin of error of a normal houshold using somewhat about 1.500 - 4.000 kWh per year

Offline

#3 2024-10-25 10:50:15

triplc
Member
From: Hanoi, Vietnam
Registered: 2009-08-23
Posts: 41

Re: How to turn off usb power when the externel sound card not needed?

Oh... that's small power. Anyway, I am using mini PC, not a desktop, so I was worried about the power consumption.

So? We archies cannot to turn the power off for USB port?

Offline

#4 2024-10-25 13:37:12

cryptearth
Member
Registered: 2024-02-03
Posts: 974

Re: How to turn off usb power when the externel sound card not needed?

there sure is a way to do so with the driver as, although I don't know exactly, it's the driver which has to actively enable the highpower state - so it sure would have a way to kill the port completely
anyway - any system, even your mini-pc, is designed with all its power drawing connections the max spec - if the port you connect it to is a usb3.0 host port it's actually designed to get up to 900 mA @ 5V = 4,5W - which was done due to external spinning hdds before ssds became more common
so - you don't have to mind if you audio interface is powered all the time your system is running - its board and the power supply is designed to provide that constantly

Offline

#5 2024-10-25 14:46:51

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,196

Re: How to turn off usb power when the externel sound card not needed?

cryptearth wrote:

if the port you connect it to is a usb3.0 host port it's actually designed to get up to 900 mA @ 5V = 4,5W - which was done due to external spinning hdds before ssds became more common

I think it was also done to allow the charging of USB devices.     

Out of curiosity, how did you arrive at your estimate for annual energy use of a typical household?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2024-10-25 17:35:22

cryptearth
Member
Registered: 2024-02-03
Posts: 974

Re: How to turn off usb power when the externel sound card not needed?

ewaller wrote:

Out of curiosity, how did you arrive at your estimate for annual energy use of a typical household?

because I'm a customer service agent in the energy industry since december 2014 and these are "standard" values for 1-3 person rental households without additional appliances like electric water heating, which is the broad majority of customers - they come from the Federal Statistical Office of Germany
1 person: about 1.200-1.700 kWh/a
2 person: about 2.200-3.000 kWh/a
3 person: about 3.500-4.500 kWh/a
additional appliances like electric water heating or other form of electric heating or other high power applianaces has to be considered on top of that (yes, there're also statistical numbers for that, too - but I don't have them from the top of my head as the last time I had to deal with electrical heating is quite some time ago)
anyway - so even with a 4.5W usb3 device (which this is not according to its spec) we end up with about 40kWh for an entire year - given by the above statistics this is the margin of error about reading the meter value a week ealier or later- so nothin to be really concered about if the goal is to save energy or money

Last edited by cryptearth (2024-10-25 17:38:39)

Offline

#7 2024-10-25 17:47:55

seth
Member
Registered: 2012-09-03
Posts: 58,698

Re: How to turn off usb power when the externel sound card not needed?

they come from the Federal Statistical Office of Germany

Try to google the average annual energy use of a typical US household - make sure you're sitting at the time.

Offline

#8 2024-10-25 17:55:54

cryptearth
Member
Registered: 2024-02-03
Posts: 974

Re: How to turn off usb power when the externel sound card not needed?

well - a number I found is about 10.800 kWh/a - but I guess this also includes electric water heating, a/c with high (above 50%) usage and likely other high energy appliances like big freezers - all together not in a rental appartment but a free standing single-family house
but even then worry about a 4.5W audio interface is even more negligible than living in a 2-room rental flat with central heating and good insulation so no a/c

I live all by myself with my cat - yet my typical electricuty usage is above what others use as a couple with a child - but I'm an enthusiast so my high power appliance is my computer

Offline

#9 2024-10-25 18:11:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,196

Re: How to turn off usb power when the externel sound card not needed?

seth wrote:

they come from the Federal Statistical Office of Germany

Try to google the average annual energy use of a typical US household - make sure you're sitting at the time.

That is why I was interested.   I thought I was pretty good as to power use.  185m^2 single family home with gas hot water.  Electric ovens, gas stove and hot water.  Modest television and lots of computers.  Two refrigerators, no pool.
My average power for this home is about 500W which puts me at the high end of cryptearth's numbers.   I am about half the neighborhood average.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2024-11-11 08:59:32

hans456
Member
Registered: 2022-07-15
Posts: 8

Re: How to turn off usb power when the externel sound card not needed?

back on subject:
https://github.com/mvp/uhubctl?tab=readme-ov-file

It is working for me on the usb hub that is built in in a Dell P2415Q monitor.

uhubctl -a toggle -l 2-2 -p 3 -S

Last edited by hans456 (2024-11-11 09:03:25)

Offline

Board footer

Powered by FluxBB