Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Charging USB devices using usbhid driver

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
turtles
Veteran
Veteran
User avatar
Posts: 1714
Joined: Fri Dec 31, 2004 7:30 am

Charging USB devices using usbhid driver

  • Quote

Post by turtles » Sun Apr 15, 2018 1:13 am

Greetings all, I was working on my Gentoo laptop today and my phone was going to die.
With no other chargers near by I plugged it in to my laptop.
And my phone started going nuts constantly notifying me the usb is plugged in then unpluged.
I had this happen before but never looked into it too much.

Code: Select all

[Sat Apr 14 16:50:02 2018] usb 3-2: new high-speed USB device number 3 using xhci_hcd
[Sat Apr 14 16:50:02 2018] usb 3-2: New USB device found, idVendor=1004, idProduct=6300
[Sat Apr 14 16:50:02 2018] usb 3-2: New USB device strings: Mfr=1, Product=4, SerialNumber=0
[Sat Apr 14 16:50:02 2018] usb 3-2: Product: USB Charge Only Interface
[Sat Apr 14 16:50:02 2018] usb 3-2: Manufacturer: LG Electronics Inc.
[Sat Apr 14 16:50:02 2018] usbhid 3-2:1.0: couldn't find an input interrupt endpoint
[Sat Apr 14 16:50:36 2018] usb 3-2: USB disconnect, device number 3
[Sat Apr 14 16:50:37 2018] usb 3-2: new high-speed USB device number 4 using xhci_hcd
[Sat Apr 14 16:50:37 2018] usb 3-2: New USB device found, idVendor=1004, idProduct=6300
[Sat Apr 14 16:50:37 2018] usb 3-2: New USB device strings: Mfr=1, Product=4, SerialNumber=0
[Sat Apr 14 16:50:37 2018] usb 3-2: Product: USB Charge Only Interface
[Sat Apr 14 16:50:37 2018] usb 3-2: Manufacturer: LG Electronics Inc.
[Sat Apr 14 16:50:37 2018] usbhid 3-2:1.0: couldn't find an input interrupt endpoint
[Sat Apr 14 16:50:39 2018] usb 3-2: USB disconnect, device number 4
[Sat Apr 14 16:50:41 2018] usb 3-2: new high-speed USB device number 5 using xhci_hcd
[Sat Apr 14 16:50:41 2018] usb 3-2: New USB device found, idVendor=1004, idProduct=6300
[Sat Apr 14 16:50:41 2018] usb 3-2: New USB device strings: Mfr=1, Product=4, SerialNumber=0
[Sat Apr 14 16:50:41 2018] usb 3-2: Product: USB Charge Only Interface
[Sat Apr 14 16:50:41 2018] usb 3-2: Manufacturer: LG Electronics Inc.
[Sat Apr 14 16:50:41 2018] usbhid 3-2:1.0: couldn't find an input interrupt endpoint
[Sat Apr 14 16:51:12 2018] usb 3-2: USB disconnect, device number 5
[Sat Apr 14 16:51:13 2018] usb 3-2: new high-speed USB device number 6 using xhci_hcd
[Sat Apr 14 16:51:13 2018] usb 3-2: New USB device found, idVendor=1004, idProduct=6300
[Sat Apr 14 16:51:13 2018] usb 3-2: New USB device strings: Mfr=1, Product=4, SerialNumber=0
[Sat Apr 14 16:51:13 2018] usb 3-2: Product: USB Charge Only Interface
[Sat Apr 14 16:51:13 2018] usb 3-2: Manufacturer: LG Electronics Inc.
I did some digging with

Code: Select all

lsusb -t
to discover I had plugged the phone into port 3-3 this time.
and RTFM https://www.kernel.org/doc/Documentatio ... gement.txt
Android phones ask what you want to do when you plug in to a computer.
they can
  • [1] Just charge or
    [2] Sync via MTP
    [3] Send images via PTP whatever that is.
    [4]or there it the ADB shell for developers.
If I select option 1 just charge, linux hid driver gets triggered.
This driver seems to want to power off the phone if there is no 'activity' in the amount of time listed in this file:

Code: Select all

/sys/bus/usb/devices/3-3/power/autosuspend_delay_ms

Code: Select all

echo 'on' > /sys/bus/usb/devices/3-3/power/control
echo '-1" > /sys/bus/usb/devices/3-3/power/autosuspend_delay_ms
This appeared to solve the problem of the phone going nuts.
But it still disconnects/reconnects less often (next I am going to see if I can read what the charging current is)
Has anyone messed around with this and made a udev rule or script or something for charging USB devices?
Or have i overlooked some common configuration?
I wonder why linux is giving the phone a new "device number" every time.
Cheers
Donate to Gentoo
Top
bunder
Bodhisattva
Bodhisattva
Posts: 5956
Joined: Sat Apr 10, 2004 5:13 am

  • Quote

Post by bunder » Sun Apr 15, 2018 7:13 am

I wonder why linux is giving the phone a new "device number" every time.
That's normal for USB I'm afraid. That said... Google didn't give me much, but is your usb cable or port damaged? If you can wiggle the cable around and it starts disconnecting, it's probably going bad.
Neddyseagoon wrote:The problem with leaving is that you can only do it once and it reduces your influence.
banned from #gentoo since sept 2017
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

Re: Charging USB devices using usbhid driver

  • Quote

Post by krinn » Sun Apr 15, 2018 8:10 am

turtles wrote:Android phones ask what you want to do when you plug in to a computer.
they can
  • [1] Just charge or
    [2] Sync via MTP
    [3] Send images via PTP whatever that is.
    [4]or there it the ADB shell for developers.
Nope, it depends on the implementation, mine just emit a little sound when plug-in, i get this in my dmesg, and it is just charging.

Code: Select all

[88311.517851] usb 1-5: new high-speed USB device number 5 using xhci_hcd
[88311.644620] usb 1-5: New USB device found, idVendor=04e8, idProduct=6860
[88311.644621] usb 1-5: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[88311.644622] usb 1-5: Product: SAMSUNG_Android
[88311.644622] usb 1-5: Manufacturer: SAMSUNG
[88311.660992] cdc_acm 1-5:1.1: ttyACM0: USB ACM device
[88311.661136] usbcore: registered new interface driver cdc_acm
[88311.661137] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Bus 001 Device 005: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Top
bunder
Bodhisattva
Bodhisattva
Posts: 5956
Joined: Sat Apr 10, 2004 5:13 am

Re: Charging USB devices using usbhid driver

  • Quote

Post by bunder » Sun Apr 15, 2018 10:21 am

krinn wrote:Nope, it depends on the implementation, mine just emit a little sound when plug-in, i get this in my dmesg, and it is just charging.

Code: Select all

Bus 001 Device 005: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Don't you get a popup complaining that it can't transfer files? That's what I get on mine after a couple minutes if I leave it in MTP mode. It still charges fine though, albeit at 500mAh. I can't stand how slow that is, so I usually just use my wall charger.
Neddyseagoon wrote:The problem with leaving is that you can only do it once and it reduces your influence.
banned from #gentoo since sept 2017
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

Re: Charging USB devices using usbhid driver

  • Quote

Post by krinn » Sun Apr 15, 2018 10:39 am

bunder wrote:
krinn wrote:Nope, it depends on the implementation, mine just emit a little sound when plug-in, i get this in my dmesg, and it is just charging.

Code: Select all

Bus 001 Device 005: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Don't you get a popup complaining that it can't transfer files?
No, the phone gets turn on, a little bip sound, usb icon appears, and charging status change, except that, nothing
for info: model is SM-G318H, android 4.4.4
Top
Post Reply

5 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic