[SOLVED: USB AUTOSUSPEND] USB port powers up and shuts down again: card reader, smartphone etc. not connecting

Message
Author
linux80

[SOLVED: USB AUTOSUSPEND] USB port powers up and shuts down again: card reader, smartphone etc. not connecting

#1 Post by linux80 »

Hello guys,

First of all, brand new MX LINUX user here. Been using this on a 10yo gaming laptop for 3 months now. This is the smoothest and most stable distro I have had uptil now, after having used several other ones like Mint, Ubuntu and "regular" Debian.

I am however experiencing a rather annoying problem with my USB ports.

Whenever I connect my card reader,
(i.e. ID chip / "smart" or bank chip card reader like this: Image)

or my smartphone or tablets,

they power up or charge for 2-3 seconds and then lose connection again.

In the case of my smartphones or tablets, I then have to change my phone's configuration to "File transfer mode" and then go to MX Linux File Manager and hit the Android phone or tablet, in order to restore connection. This is annoying but at least I can get it to work and charge.

In the case of my card reader, however, this one obviously is not visible in the File Manager, so it just remains dead.

I have tried several things already, so FYI:

- switching hard disks and getting back to the horribly slow Windows 7 solves the problem immediately. So I guess it has nothing to do with the cable or the reader.
- connecting to my other laptop with Debian Linux solves the problem too. Which makes me think it really is a distro-specific issue.
- even with the card reader seemingly dead, it is in reality still visible (but not usable) when I use the usb-devices command. The reader is in the list.
- resetting the usbmuxd just makes the whole thing start over again: it powers up for 3 seconds and then goes out.
- the same issue occurs on all 3 USB ports (2 left + 1 right port configuration).
- sliding a smart card in the reader does not make any difference; it stays dead.
- I have a wireless mouse with a USB dongle connected to one of the ports. This one works perfectly.

No idea as to what to do next... Since my distro has worked perfectly until now, I'd rather hear your opinions first, before starting to mess with configuration files and risking to lose my current stability. Thx in advance!
Last edited by linux80 on Tue Dec 18, 2018 3:26 pm, edited 1 time in total.

User avatar
Eadwine Rose
Administrator
Posts: 15345
Joined: Wed Jul 12, 2006 2:10 am

Re: USB port powers up for 3 seconds, then shuts down: card reader, smartphone etc. not connecting

#2 Post by Eadwine Rose »

Ah.. the banking card reader by the looks?

I know from my bank that Linux is not a supported OS and that's that. Connecting via USB is not going to work. I have to use the thing without the cable the old fashioned way.
MX-23.6_x64 July 31 2023 * 6.1.0-40amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

linux80

Re: USB port powers up for 3 seconds, then shuts down: card reader, smartphone etc. not connecting

#3 Post by linux80 »

Eadwine Rose wrote: Mon Dec 17, 2018 7:01 am Ah.. the banking card reader by the looks?

I know from my bank that Linux is not a supported OS and that's that. Connecting via USB is not going to work. I have to use the thing without the cable the old fashioned way.
Thx for your reply.

That could've been the reason but it isn't, because it works perfectly on Debian. Also, this would not explain why I have the exact same issue with my phone and tablets.

User avatar
dreamer
Posts: 961
Joined: Sun Oct 15, 2017 11:34 am

Re: USB port powers up for 3 seconds, then shuts down: card reader, smartphone etc. not connecting

#4 Post by dreamer »

linux80 wrote: Mon Dec 17, 2018 7:21 am That could've been the reason but it isn't, because it works perfectly on Debian. Also, this would not explain why I have the exact same issue with my phone and tablets.
Maybe TLP auto-suspends your USB-ports? Have a look at this link:
https://mxlinux.org/wiki/hardware/scanners#Canon

There are instructions for manual configuration of TLP and there is also a GUI called TLPUI I think.
It seems that the TLP power management that is automatically enabled in MX Linux autosuspends idle USB ports (except for hdi, i.e. mouse or keyboard ports). Most USB drivers are smart enough to wake up the ports when they need to, and the scanimage program does this when fed a device name which includes a libusb port ID. Unfortunately the plustek sane-backend code doesn't do that by itself, and neither do SimpleScan or Xsane. I wouldn't expect them to as they treat scanners the same regardless of the connection type, expecting the discovered sane-backend to deal with hardware issues.

But TLP is configurable, and USB autosuspend can be turned off by device ID. The Canon LIDE30 only draws about 250ma while in standby which is insignificant for a desktop, and if that 1.25 W draw is important on your notebook you can always unplug the USB cable when you're not scanning.
Note to self and others: SysVinit is a good option. However if you run into problems try with systemd first. This applies to AppImages, Flatpaks, GitHub packages and even some Debian packages.

linux80

Re: USB port powers up for 3 seconds, then shuts down: card reader, smartphone etc. not connecting

#5 Post by linux80 »

dreamer wrote: Mon Dec 17, 2018 9:37 pm
linux80 wrote: Mon Dec 17, 2018 7:21 am That could've been the reason but it isn't, because it works perfectly on Debian. Also, this would not explain why I have the exact same issue with my phone and tablets.
Maybe TLP auto-suspends your USB-ports? Have a look at this link:
https://mxlinux.org/wiki/hardware/scanners#Canon

There are instructions for manual configuration of TLP and there is also a GUI called TLPUI I think.
It seems that the TLP power management that is automatically enabled in MX Linux autosuspends idle USB ports (except for hdi, i.e. mouse or keyboard ports). Most USB drivers are smart enough to wake up the ports when they need to, and the scanimage program does this when fed a device name which includes a libusb port ID. Unfortunately the plustek sane-backend code doesn't do that by itself, and neither do SimpleScan or Xsane. I wouldn't expect them to as they treat scanners the same regardless of the connection type, expecting the discovered sane-backend to deal with hardware issues.

But TLP is configurable, and USB autosuspend can be turned off by device ID. The Canon LIDE30 only draws about 250ma while in standby which is insignificant for a desktop, and if that 1.25 W draw is important on your notebook you can always unplug the USB cable when you're not scanning.
Damn you hit the nail right on the head. You made my day, @dreamer. I've been looking for this for a VERY long time and since I didn't really know which keywords to use to describe the problem, I had a hard time finding a solution on the Linux forums...

Explanation for people who experience the same issue:

I made my life a bit easier and installed TLPUI through the Package Installer (Test Repo).

Run TLP-UI, go to USB > uncheck USB_AUTOSUSPEND.

Don't forget to save your settings by hitting File > Save, and entering your root PW.

You can also simply add your USB device ID to the blacklist, using TLP-UI.

If you prefer not to install the extra pack, you can easily follow the instructions that were provided in the link shared by dreamer. Exactly the same but without interface.

THANK YOU!

User avatar
dreamer
Posts: 961
Joined: Sun Oct 15, 2017 11:34 am

Re: USB port powers up for 3 seconds, then shuts down: card reader, smartphone etc. not connecting

#6 Post by dreamer »

linux80 wrote: Tue Dec 18, 2018 3:26 pm Damn you hit the nail right on the head. You made my day, @dreamer. I've been looking for this for a VERY long time and since I didn't really know which keywords to use to describe the problem, I had a hard time finding a solution on the Linux forums...

Explanation for people who experience the same issue:

I made my life a bit easier and installed TLPUI through the Package Installer (Test Repo).

Run TLP-UI, go to USB > uncheck USB_AUTOSUSPEND.

Don't forget to save your settings by hitting File > Save, and entering your root PW.

You can also simply add your USB device ID to the blacklist, using TLP-UI.

If you prefer not to install the extra pack, you can easily follow the instructions that were provided in the link shared by dreamer. Exactly the same but without interface.

THANK YOU!
I knew I would have to take a closer look at this myself some time. Thank you for the instructions. Good teamwork! :number1:
Note to self and others: SysVinit is a good option. However if you run into problems try with systemd first. This applies to AppImages, Flatpaks, GitHub packages and even some Debian packages.

User avatar
OoglaBoogla
Posts: 22
Joined: Tue Oct 27, 2020 2:34 am

Re: [SOLVED: USB AUTOSUSPEND] USB port powers up and shuts down again: card reader, smartphone etc. not connecting

#7 Post by OoglaBoogla »

Thank you so much. I was having this same problem, and I had gotten in the habit of always charging my android phone on my PC. After I started using MX Linux, I noticed my phone was dying. I knew exactly why, but had no idea how to change USB Autosuspend options. Thanks again. The forum is excellent. MX Linux is excellent. Maybe the MX Tweaks or MX Tools app could address this in the future?

linuxforever
Posts: 81
Joined: Fri Sep 25, 2020 11:04 am

Re: [SOLVED: USB AUTOSUSPEND] USB port powers up and shuts down again: card reader, smartphone etc. not connecting

#8 Post by linuxforever »

I went through the whole process thinking I had found a solution to my problem. Alas, every time i uncheck "usb auto-suspend", push the gliding button to the left and save the config, it automatically rechecks "usb auto-suspend".
Also I cannot edit "usb blacklist"...

PS I asking questions in a [SOLVED] subject even allowed...?
Last edited by linuxforever on Wed Jul 14, 2021 9:08 am, edited 1 time in total.

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: [SOLVED: USB AUTOSUSPEND] USB port powers up and shuts down again: card reader, smartphone etc. not connecting

#9 Post by JayM »

@linuxforever
Do not reply to others' existing topics to ask for help nor post multiple issues in one topic. Start a new topic for each issue. This helps to avoid confusion and chaos.

Do not reply to or "bump" old topics unless you have something useful to contribute. Do not unnecessarily bump your own topics. Wait at least 24 hours for a reply.
viewtopic.php?p=255061#p255061
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.


Post Reply

Return to “Hardware /Configuration”