LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-22-2013, 10:40 AM   #1
totaluser
LQ Newbie
 
Registered: Nov 2011
Posts: 29

Rep: Reputation: Disabled
keep USB powered after shutdown [ubuntu 12.04LTS]


Hello everybody,
my secondary PC has this specs
MSI 870-g54
AMD X3 455
2x2GB DDR3 1600MHz
ATi HD3650 PCIe
Seasonic S12II-480w

it is dualboot
Windows 7 x64 SP1 (up to date)
Ubuntu 12.04 LTS x64 (up to date, kernel 3.2.0-48)

when I shutdown Windows 7 (proper shutdown, no sleep no hibernate) USB3 ports keep providing 5.0 voltage
When I reboot into Ubuntu 12.04 and do shutdown, USB3 power is killed

what I want to achieve?
to keep usb3 powered even after shutting down Ubuntu
because I am powering a 120mm fan that is cooling my router and raspberry pi and powering small portable Lenovo speakers via USB that are attached to my raspberry and are occasionally used to play some radio etc...

since it works fine after powering off windows I assume that I tweaked BIOS correctly not to power down USB3 controller (usb2 controller is powered off even after shutting down windows)

how to tweak ubuntu not to kill power to USB3 controller after shutting down?
the controller seems to be renesas NEC usb3

thank you very much in advance


//edit:
when I suspend Ubuntu the power is present after that and everything works fine for me, but not after shutting it down

Last edited by totaluser; 06-22-2013 at 10:44 AM.
 
Old 06-22-2013, 03:30 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Power to system is part of the design of the hardware. Bios and acpi need to be set or if it can be set to do this. Some machines are sold as this as a feature. Otherwise, some settings of sleep, hibernate and non-fully power off states may do this task.
 
Old 06-25-2013, 04:05 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,288

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
The buios setting you want is something like "VSB on usb" which translated, means "Use standby voltage for usb, and if you set 'wake up on usb' you may be led to it.
 
Old 06-25-2013, 04:53 AM   #4
totaluser
LQ Newbie
 
Registered: Nov 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
The buios setting you want is something like "VSB on usb" which translated, means "Use standby voltage for usb, and if you set 'wake up on usb' you may be led to it.
so if it was a BIOS setting that would influence it, why would Windows 7 behave differently compared to Ubuntu 12.04 with the same BIOS setup?
I even tried to install 3.8.x kernel to ubuntu to test if it was not changed but it did not provide power after shutdown

any ideas how to tweak ACPI?
output of which commands would be helpful in trying to pin this one down?
 
Old 06-25-2013, 09:51 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,288

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Let's be clear: There are standby, suspend, hibernate, and power off states on many PCs. Nothing works on power off. Windows is most reluctant to power off. Your options are with the other stuff. There is also a 'virtual off' where vsb stays alive, and you can power up with a quick button press. I am presuming this is what you are referring to as shut down.

There is a BIOS setting such as I have described in many (but not all) BIOSes. The 'wake up on usb' stuff requires usb to be powered by vsb. m$ is big enough to call the shots to bios writers and manufacturers - just look at UEFI. I don't know how windows does it. They were required to document windows by the EC and they wrote incomprehensible gibberish and paid millions in fines until there was some settlement, and some version of their documentation was accepted. Perhaps you can access that and see for yourself how windows did it.
 
Old 06-25-2013, 10:33 AM   #6
totaluser
LQ Newbie
 
Registered: Nov 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
thanks for the reply
I checked the BIOS again especially the Wake on Events section
there is Wake by USB but only from S3 sleep, so it looks like this motherboard can not do it

so the only solution for me seems to be rebooting into windows and then shutting it down every time I finish working in Ubuntu
 
Old 06-26-2013, 03:54 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,288

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
There is a module for charging the junk we all plug into our usb sockets - forget the name. Have you tried loading that.
 
Old 06-26-2013, 04:10 AM   #8
totaluser
LQ Newbie
 
Registered: Nov 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
No I have not tried loading that. To be hones I never heard of such a kernel module.
I tried googling for something but apparently not with the right keywords as nothing obvious popped out.

if you or anybody else could tell me what the name of the module is, I would be very happy to try it out
thanks
 
Old 06-26-2013, 05:47 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,288

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I'm probably hopelessly wrong, but it may be the acpi battery.ko has the code. It's just a small tweak to turn on the usb psu. google is polluted with phones which won't allow charge from usb.

In any event, suspend goes to S3. Hibernate to S5. If you can suspend, why not?
Quote:
cat /sys/power/state
If it says 'mem' as part of the output, you can suspend to disk.
 
Old 06-26-2013, 07:11 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Example on how to see what is supported. I think you need S5

bash $ cat /proc/acpi/info
version: 20030619
states: S0 S1 S3 S4 S4 S5
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.bin file install failed on Ubuntu 10.04LTS but worked on Ubuntu 11.10 wh33t Linux - Software 8 01-18-2012 01:51 PM
How best to write Ubuntu 10.04LTS ISO to USB mounted CF card? jmglassy Linux - Embedded & Single-board computer 2 02-09-2011 04:07 PM
Cant install ubuntu 8.04LTS on my server. forcevision Linux - Server 6 05-26-2009 03:33 PM
[Ubuntu 8.04LTS] Kernel Recompiling laurens Linux - Newbie 0 04-29-2009 04:05 AM
Help for wine installation on Ubuntu 8.04LTS Ye Myint Linux - Newbie 4 09-29-2008 04:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration