Is it possible to turn off a specific USB port so it doesn't accept any device?
I have a lot of ports on my computer. I would like to turn off one of them, so when I connect my phone to that port, it only charges. I do want my phone to work with my computer in some occasions though, so I hope other ports are not affected.
I would just like to know how possible this is.
usb
add a comment |
I have a lot of ports on my computer. I would like to turn off one of them, so when I connect my phone to that port, it only charges. I do want my phone to work with my computer in some occasions though, so I hope other ports are not affected.
I would just like to know how possible this is.
usb
Possible.. But some hacks are needed to do this..
– Yuvaraj
Mar 9 '16 at 4:45
1
Hardware solution: Buy a male to female USB plug and cut/isolate/remove the center lines.
– Helio
Mar 18 '16 at 10:45
@Helio Then why do not I just buy a USB power station...?
– bfrguci
Mar 18 '16 at 16:39
add a comment |
I have a lot of ports on my computer. I would like to turn off one of them, so when I connect my phone to that port, it only charges. I do want my phone to work with my computer in some occasions though, so I hope other ports are not affected.
I would just like to know how possible this is.
usb
I have a lot of ports on my computer. I would like to turn off one of them, so when I connect my phone to that port, it only charges. I do want my phone to work with my computer in some occasions though, so I hope other ports are not affected.
I would just like to know how possible this is.
usb
usb
asked Mar 3 '16 at 20:11
bfrgucibfrguci
3631212
3631212
Possible.. But some hacks are needed to do this..
– Yuvaraj
Mar 9 '16 at 4:45
1
Hardware solution: Buy a male to female USB plug and cut/isolate/remove the center lines.
– Helio
Mar 18 '16 at 10:45
@Helio Then why do not I just buy a USB power station...?
– bfrguci
Mar 18 '16 at 16:39
add a comment |
Possible.. But some hacks are needed to do this..
– Yuvaraj
Mar 9 '16 at 4:45
1
Hardware solution: Buy a male to female USB plug and cut/isolate/remove the center lines.
– Helio
Mar 18 '16 at 10:45
@Helio Then why do not I just buy a USB power station...?
– bfrguci
Mar 18 '16 at 16:39
Possible.. But some hacks are needed to do this..
– Yuvaraj
Mar 9 '16 at 4:45
Possible.. But some hacks are needed to do this..
– Yuvaraj
Mar 9 '16 at 4:45
1
1
Hardware solution: Buy a male to female USB plug and cut/isolate/remove the center lines.
– Helio
Mar 18 '16 at 10:45
Hardware solution: Buy a male to female USB plug and cut/isolate/remove the center lines.
– Helio
Mar 18 '16 at 10:45
@Helio Then why do not I just buy a USB power station...?
– bfrguci
Mar 18 '16 at 16:39
@Helio Then why do not I just buy a USB power station...?
– bfrguci
Mar 18 '16 at 16:39
add a comment |
1 Answer
1
active
oldest
votes
First, run lsusb
.
The output should be like:
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1020
Bus 002 Device 009: ID 0bc2:a013 Seagate RSS LLC
Bus 002 Device 003: ID 0a5c:219c Broadcom Corp.
In the output, find the device number of the port to be disabled. For example, the Seagate drive in the example has Device 009
- that is its device number. Then the id will be usb[device number]
- such as usb9
Then, disable USB wake-up (do this only once):
Be sure to replace X
in usbX
with the device number.
echo disabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
Then turn it off:
echo suspend | sudo tee /sys/bus/usb/devices/usbX/power/level
Undo this:
echo enabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
echo on | sudo tee /sys/bus/usb/devices/usbX/power/level
Attempted the above commands and returned...tee: /sys/bus/usb/devices/usb11/power/wakeup: No such file or directory disabled
– Seek Truth
Jan 3 '18 at 4:05
found very helpful information in this thread USB Port Power
– Seek Truth
Jan 3 '18 at 5:31
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f741760%2fis-it-possible-to-turn-off-a-specific-usb-port-so-it-doesnt-accept-any-device%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
First, run lsusb
.
The output should be like:
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1020
Bus 002 Device 009: ID 0bc2:a013 Seagate RSS LLC
Bus 002 Device 003: ID 0a5c:219c Broadcom Corp.
In the output, find the device number of the port to be disabled. For example, the Seagate drive in the example has Device 009
- that is its device number. Then the id will be usb[device number]
- such as usb9
Then, disable USB wake-up (do this only once):
Be sure to replace X
in usbX
with the device number.
echo disabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
Then turn it off:
echo suspend | sudo tee /sys/bus/usb/devices/usbX/power/level
Undo this:
echo enabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
echo on | sudo tee /sys/bus/usb/devices/usbX/power/level
Attempted the above commands and returned...tee: /sys/bus/usb/devices/usb11/power/wakeup: No such file or directory disabled
– Seek Truth
Jan 3 '18 at 4:05
found very helpful information in this thread USB Port Power
– Seek Truth
Jan 3 '18 at 5:31
add a comment |
First, run lsusb
.
The output should be like:
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1020
Bus 002 Device 009: ID 0bc2:a013 Seagate RSS LLC
Bus 002 Device 003: ID 0a5c:219c Broadcom Corp.
In the output, find the device number of the port to be disabled. For example, the Seagate drive in the example has Device 009
- that is its device number. Then the id will be usb[device number]
- such as usb9
Then, disable USB wake-up (do this only once):
Be sure to replace X
in usbX
with the device number.
echo disabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
Then turn it off:
echo suspend | sudo tee /sys/bus/usb/devices/usbX/power/level
Undo this:
echo enabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
echo on | sudo tee /sys/bus/usb/devices/usbX/power/level
Attempted the above commands and returned...tee: /sys/bus/usb/devices/usb11/power/wakeup: No such file or directory disabled
– Seek Truth
Jan 3 '18 at 4:05
found very helpful information in this thread USB Port Power
– Seek Truth
Jan 3 '18 at 5:31
add a comment |
First, run lsusb
.
The output should be like:
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1020
Bus 002 Device 009: ID 0bc2:a013 Seagate RSS LLC
Bus 002 Device 003: ID 0a5c:219c Broadcom Corp.
In the output, find the device number of the port to be disabled. For example, the Seagate drive in the example has Device 009
- that is its device number. Then the id will be usb[device number]
- such as usb9
Then, disable USB wake-up (do this only once):
Be sure to replace X
in usbX
with the device number.
echo disabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
Then turn it off:
echo suspend | sudo tee /sys/bus/usb/devices/usbX/power/level
Undo this:
echo enabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
echo on | sudo tee /sys/bus/usb/devices/usbX/power/level
First, run lsusb
.
The output should be like:
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1020
Bus 002 Device 009: ID 0bc2:a013 Seagate RSS LLC
Bus 002 Device 003: ID 0a5c:219c Broadcom Corp.
In the output, find the device number of the port to be disabled. For example, the Seagate drive in the example has Device 009
- that is its device number. Then the id will be usb[device number]
- such as usb9
Then, disable USB wake-up (do this only once):
Be sure to replace X
in usbX
with the device number.
echo disabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
Then turn it off:
echo suspend | sudo tee /sys/bus/usb/devices/usbX/power/level
Undo this:
echo enabled | sudo tee /sys/bus/usb/devices/usbX/power/wakeup
echo on | sudo tee /sys/bus/usb/devices/usbX/power/level
edited Oct 6 '17 at 2:16
Stack Em Up
33
33
answered Mar 26 '16 at 16:29
UniversallyUniqueIDUniversallyUniqueID
3,47011743
3,47011743
Attempted the above commands and returned...tee: /sys/bus/usb/devices/usb11/power/wakeup: No such file or directory disabled
– Seek Truth
Jan 3 '18 at 4:05
found very helpful information in this thread USB Port Power
– Seek Truth
Jan 3 '18 at 5:31
add a comment |
Attempted the above commands and returned...tee: /sys/bus/usb/devices/usb11/power/wakeup: No such file or directory disabled
– Seek Truth
Jan 3 '18 at 4:05
found very helpful information in this thread USB Port Power
– Seek Truth
Jan 3 '18 at 5:31
Attempted the above commands and returned...
tee: /sys/bus/usb/devices/usb11/power/wakeup: No such file or directory disabled
– Seek Truth
Jan 3 '18 at 4:05
Attempted the above commands and returned...
tee: /sys/bus/usb/devices/usb11/power/wakeup: No such file or directory disabled
– Seek Truth
Jan 3 '18 at 4:05
found very helpful information in this thread USB Port Power
– Seek Truth
Jan 3 '18 at 5:31
found very helpful information in this thread USB Port Power
– Seek Truth
Jan 3 '18 at 5:31
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f741760%2fis-it-possible-to-turn-off-a-specific-usb-port-so-it-doesnt-accept-any-device%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Possible.. But some hacks are needed to do this..
– Yuvaraj
Mar 9 '16 at 4:45
1
Hardware solution: Buy a male to female USB plug and cut/isolate/remove the center lines.
– Helio
Mar 18 '16 at 10:45
@Helio Then why do not I just buy a USB power station...?
– bfrguci
Mar 18 '16 at 16:39