You are not logged in.
Pages: 1
Topic closed
I'd like to charge my smartphone over usb even if I closed the lid, although this should work only if my laptop power supply is connected.
How do I set this up?
Many thanks in advance.
Last edited by brdvlps (2015-12-25 13:37:08)
Offline
You mean like when laptop is in sleep? I don't think that's possible (while that would be really cool). But if you're fine having your laptop awake while lid is closed, then you can do by editing /etc/systemd/logind.conf *
especifically, telling it to ignore the LidSwitch.
But you can do the same thing by using power setting in your DE (all of them must have a setting for that.)
* assuming you're using systemctl.
Last edited by bibek22 (2015-12-19 14:52:20)
Offline
AFAIK whether the USB supplies power in different power states depends on the board/bios setting.
For example, my ASUS desktop board always has power supply for USB ports in S3 (suspend), and also S4 (hiberate) unless I enabled "Deep S4" in UEFI. Not sure if the rating will be lowered though. It even has an option called "USB Charging in S5", which means there will be power to the ports after shutdown.
FWIW you can also check /proc/acpi/wakeup:
[tom@localhost ~]$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
...
EHC1 S4 *enabled pci:0000:00:1d.0
EHC2 S4 *enabled pci:0000:00:1a.0
XHC S4 *enabled pci:0000:00:14.0
...If the usb controllers has "S3" or above for "S-state", that might imply that it's capable of supplying power while sleeping. In that case, you can also try `echo $Device > /proc/acpi/wakup` to toggle their status to "enabled" if it's "disabled" to see if it change the behaviour. Note that this might also make your usb devices capable of waking the laptop and hence requires further fine-tuning in the sysfs. The changes are volatile to a reboot unless you use a udev rule btw.
Last edited by tom.ty89 (2015-12-21 14:21:33)
Offline
Agree with tom.
In my laptop Bios gives option to keep power available through USB, but only when charging cable is connected.
Arch is home!
https://github.com/Docbroke
Online
Thanks for your responses!
Haven't known the possibility to change the usb power behavior in the BIOS yet. So I did this, and now it works (unfortunately also in battery mode, but for now I'm fine with that).
Offline
Don't forget to mark this thread solved by editing your first post title.
Arch is home!
https://github.com/Docbroke
Online
If I enable wakeup for XHC1 in /proc/acpi/wakeup I get power on USB ports when suspended, but I also experience random wakeups from suspend mode. Is there a way to get powered USB ports while preventing the waking-up issue?
Offline
please create new thread
Arch is home!
https://github.com/Docbroke
Online
please create new thread
Agree. Closing this thread.
brdvlps, should you need this thread reopened, please use the report function and drop us a note.
Thanks.
Last edited by ewaller (2016-02-09 16:05:58)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Pages: 1
Topic closed