Linux USB device keeps disconnecting and reconnecting



  • I’ve got a computer running Linux Mint 19.1 that needs to have a touchscreen hooked up to it. Unfortunately, the screen is old (about ten years) and made by a company that seems to have liked rolling their own. When I plug it into the computer, it fails to work — tapping the screen produces no response.

    The manufacturer’s web site does have Linux drivers for it, but those are almost a decade old as well; since Mint is Ubuntu-based, I decided to try the Ubuntu 10.10 drivers just in case they would get the screen to work. No such luck: instead, all USB devices stopped working. The computer ran fine, but touchscreen, mouse and keyboard were all non-functional. I had to plug in PS/2 mouse and keyboard to be able to uninstall the driver, after which things luckily were back to where I was before.

    Then I did some more digging, and found that the screen keeps disconnecting. Here’s (some of) the relevant output from dmesg:

    [  381.716262] usb 1-2: new full-speed USB device number 8 using xhci_hcd
    [  381.865856] usb 1-2: New USB device found, idVendor=1870, idProduct=0001
    [  381.865863] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [  381.865867] usb 1-2: Product: iNexio TouchDevice
    [  381.865871] usb 1-2: Manufacturer: iNexio
    [  438.486178] usb 1-2: USB disconnect, device number 8
    [  443.716266] usb 1-2: new full-speed USB device number 9 using xhci_hcd
    [  443.866426] usb 1-2: New USB device found, idVendor=1870, idProduct=0001
    [  443.866432] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [  443.866436] usb 1-2: Product: iNexio TouchDevice
    [  443.866440] usb 1-2: Manufacturer: iNexio
    [  500.485050] usb 1-2: USB disconnect, device number 9
    [  505.712251] usb 1-2: new full-speed USB device number 10 using xhci_hcd
    [  505.862500] usb 1-2: New USB device found, idVendor=1870, idProduct=0001
    [  505.862506] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [  505.862511] usb 1-2: Product: iNexio TouchDevice
    [  505.862514] usb 1-2: Manufacturer: iNexio
    [  562.485517] usb 1-2: USB disconnect, device number 10
    

    At more or less regular intervals, the screen disconnects, only to be recognised as a new device about five seconds later, with its device number one higher than before; repeat. During the time it’s connected, tapping the screen still produces no response.

    The machine loads usbtouchscreen the first time it discovers the screen, and that driver appears to support iNexio devices — so why does mine refuse to work? Or more importantly: how do I get it to work?


  • Discourse touched me in a no-no place

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    [  438.486178] usb 1-2: USB disconnect, device number 8
    [  500.485050] usb 1-2: USB disconnect, device number 9
    [  562.485517] usb 1-2: USB disconnect, device number 10
    

    That's looking like a 62 second timeout on something the driver is expecting, but not getting, from the hardware.

    (My initial thought on seeing the subject was maybe a loose wire, but that's too regular.)



  • @PJH There’s more strangeness going on than that. The broken cable had occurred to me too, so we opened up the back of the screen, unplugged the USB cable (it turned out to be a USB-A-to-B cable plugged into a jack inside the screen’s innards then tacked in place with hot glue) and tried a different cable. That seemed to resolve the problem: the computer recognised the screen and didn’t keep dis- and reconnecting it every minute or so. It still didn’t work, and a method I’d found to make sure the X server loads it as an input device didn’t either.

    More restarting and looking at output of dmesg out and similar commands gives me the impression something screwy is going on. After some boots, the screen connects once and stays connected — but not functional — while after other boots, it keeps getting dropped and found again. Sometimes the dmesg output says it the screen is located at /devices/lotsofstuff/inputs/input<number>, other times that line isn’t present at all.

    Next attempt: seeing if I can still apt-get (old versions of) the software I need with Ubuntu 10.10, and if so, sticking that onto the PC and hope iNexio’s own touchscreen driver actually works. (This will be a completely isolated machine, so it could run Windows 3.1 for all I care as long as I can stop people breaking out of the kiosk environment.)



  • @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    as long as I can stop people breaking out of the kiosk environment

    They're closing the full-screen browser?



  • @TimeBandit Not AFAIK, but I’m just saying: someone might, and in that case I would like a computer where they can’t cause any real harm right away.

    I’m getting really fed up with this machine, though. The screen refuses to work under Mint 19, but Ubuntu 10.10 refuses to install on the computer … It throws a kernel panic within about two seconds of beginning to load, regardless of whether I choose the test environment, to install right away, or to test the install medium for defects. I’m starting to think about the only way forward is obtaining a Windows licence, since the screen at least worked under that previously (once the drivers were installed and told to rotate the touch coordinates through 180 degrees).


  • 🚽 Regular

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    I’m starting to think about the only way forward is obtaining a Windows licence

    After having developed a USB device I know that Windows is pretty forgiving of less-than-compliant USB HID devices. It's definitely a possibility that your device isn't particularly compliant and Windows might like it better.



  • @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    Ubuntu 10.10

    You should ask them for a more recent driver, that version of Ubuntu was released in October 2010 🤷♂



  • @Cursorkeys said in Linux USB device keeps disconnecting and reconnecting:

    After having developed a USB device I know that Windows is pretty forgiving of less-than-compliant USB HID devices. It's definitely a possibility that your device isn't particularly compliant and Windows might like it better.

    It’s looking like about the only option left. More digging turned up a company called Touch-Base, who sell Windows, macOS and Linux drivers for a variety of touchscreens, so I asked for a trial version of a Linux one that supports iNexio screens. Within about half an hour they mailed me a link, and after installing it, the screen still didn’t work: their software kept popping up a “device connected” message followed by “device disconnected” before you could even read the first one. Then a little while later, it’d do it again. Mailing them about it, with diagnostic info provided by their driver, got the response that they could see why the software did that, but they figured it might be caused by a hardware problem or some other issue on the screen’s side that they didn’t have the time (or inclination?) to delve into for now.

    @TimeBandit said in Linux USB device keeps disconnecting and reconnecting:

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    Ubuntu 10.10

    You should ask them for a more recent driver, that version of Ubuntu was released in October 2010 🤷♂

    I know … But if their drivers for Linux are for:—

    Linux drivers.png

    then trying an OS version that old soon becomes one of the few options you’ve got left. If they haven’t supported their hardware for Linux for over about years, then I doubt they’d put up a newer version of the software just because I ask nicely.

    Short version: don’t buy iNexio screens.



  • @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    then trying an OS version that old soon becomes one of the few options you’ve got left. If stye haven’t supported their hardware for Linux for over about years, then I doubt they’d put up a newer version of the software just because I ask nicely.

    If they don't provide one, ask for the source code 🍹

    Short version: don’t buy iNexio screens.

    Already noted 😉



  • @TimeBandit said in Linux USB device keeps disconnecting and reconnecting:

    If they don't provide one, ask for the source code 🍹

    That might solve the problem for you, but not for me :) I can code, but I’m not a seasoned developer with the necessary knowledge or inclination to get deep into someone else’s source code to figure out what it does(n’t do) and how to fix it to my requirements.



  • @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    That might solve the problem for you, but not for me :)

    I wouldn't really know what to do with it either 🤷♂

    But we could probably figure out what changed in the kernel ABI and adapt it.
    Maybe....



  • @Gurth This could be drivers, but it smells like hardware to me. The fact that one distro kernel panicks is another clue.

    Can you try a modern Ubuntu, like 16.04 or 18.04?



  • This post is deleted!


  • @TimeBandit It’d still be far simpler and quicker to get an old version of Ubuntu to work and run the touchscreen off that. But even that didn’t work, like I said above.

    It gets funnier, though (because when things go this badly, eventually all you can do is laugh).

    This is for a museum, where the screen was first on another computer about as old as the screen, running Windows Vista. It worked on that, with the iNexio-provided driver, but has now been given a new purpose, which entailed it needing to run its own web server and PHP to provide the desired functionality (I find it much easier and more flexible to build these things as web pages).

    I’ve recently put up several new touchscreens there that I used Mint 19 for, so I wanted to put that on this repurposed machine too. This way, if someone has to change something behind the scenes, all the machines will be the same, so there’s no need for confusion or separate sets of instructions or whatever. (I didn’t have anything do with the choice for the Vista machine a decade or so ago.)

    So, I install Mint 19 on the old computer, and it works fine. Until I start a web browser, which almost invariably — but not quite always — totally freezes the computer, regardless of whether I tried Firefox or Chromium. That, of course, made the whole thing unusable: you can’t have an interactive device in a museum that doesn’t respond.

    Next attempt: put Vista back on this machine. I happen to own a Vista install DVD, so I put that in, figuring to input the product key on the side of the machine and be up and running. Nope, it complained about a missing device driver and refused to even begin installation. This, we traced to the SATA DVD player built into the computer … plugging an IDE one into the motherboard did the trick, but then it wouldn’t accept the product key …

    After much searching, we dug up the computer’s recovery DVDs and managed to re-install it, using the product key on the side of the machine as I originally planned to. With that done, the touchscreen also worked, and after removing all the shovelware Acer helpfully pre-installed for me (once some of that crap had done its thing, that is, because you couldn’t shut it down manually) I set about putting a WAMP stack onto it. Not that I need a database, but a pre-packaged package seemed like the smarter option than installing Apache and PHP myself.

    Three different WAMP stacks later, I gave up on that plan, because none of them worked properly or even at all on a Windows this old. Sure, I could have gone digging for old enough versions that might work, but it was another of those points where you decide to cut your losses and start again.

    The next attempt was to say, “To hell with this machine” and order a new one. Stick Mint 19 on that — works fine, of course — plus Apache and PHP — same — and then get the touchscreen to work … For what happened after that, scroll to the top of this thread.



  • @Captain said in Linux USB device keeps disconnecting and reconnecting:

    @Gurth This could be drivers, but it smells like hardware to me. The fact that one distro kernel panicks is another clue.

    10.10 panics, within seconds of starting up. I have a feeling it’s because the hardware is too new or something — well, that’s the only reason I can think of, really.

    Can you try a modern Ubuntu, like 16.04 or 18.04?

    Mint 19.1 works fine, but as I mentioned somewhere earlier, trying the 10.10 driver with it kills all the USB ports: not even the Num Lock light on the keyboard goes on when that touchscreen driver is loaded.

    I think I have two real options: buy Windows (but I find €145 a lot of money for an OS — I’m kind of used to getting OSes for free), or get the old PC out again and see if that’ll run Ubuntu 10.10 (but then we’ve wasted the money on the new one).


  • Discourse touched me in a no-no place

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    I think I have two real options: buy Windows (but I find €145 a lot of money for an OS — I’m kind of used to getting OSes for free)

    You can at least try Windows for free, so you'll know if it works before buying the license.


  • Notification Spam Recipient

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    told to rotate the touch coordinates through 180 degrees)

    Ah! That means the wire is backwards, just flip the connector to the sensor.



  • @loopback0 said in Linux USB device keeps disconnecting and reconnecting:

    You can at least try Windows for free, so you'll know if it works before buying the license.

    True, and that reminds me I forgot a minor but somewhat important part of this story, as regards to Windows.

    I had managed to find where to download a Windows ISO from Microsoft, and then went to put it onto a USB stick. Result: the program I used for that warned me that it looked like I was trying to put a Windows image onto a USB stick, and that it wouldn’t be bootable unless I used some other program. It recommended a few, but the only one available to me from those was Boot Camp Assistant — which when I tried it, apparently only works for putting Windows onto your hard drive, not a USB stick.



  • @Tsaukpaetra said in Linux USB device keeps disconnecting and reconnecting:

    Ah! That means the wire is backwards, just flip the connector to the sensor.

    Thanks, I had thought about that too but not looked into it yet. The screen was refurbished recently after it stopped working properly, so chances are that whoever repaired it, put the connector on backward.



  • @Gurth If you have a working Windows install to use it on, I recommend using Rufus to build bootable USB OS installers. Unlike other shitty software I've used, this one actually produces a working result.



  • @hungrier Nothing that isn’t in a VM, or newer than XP … Though I could go to the museum and try to make the thing there.



  • Looks like your screen should be supported out-of-the-box

    e1796732-8109-4f9d-a9a7-fe5a73c2295a-image.png



  • @TimeBandit said in Linux USB device keeps disconnecting and reconnecting:

    Looks like your screen should be supported out-of-the-box

    I :hanzo:’d you with that already in my opening post :)


  • Discourse touched me in a no-no place

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    I had managed to find where to download a Windows ISO from Microsoft, and then went to put it onto a USB stick.

    Microsoft provide a tool to create a USB stick.



  • @loopback0 said in Linux USB device keeps disconnecting and reconnecting:

    Microsoft provide a tool to create a USB stick.

    Somehow I suspect that won’t run well under macOS.


  • Discourse touched me in a no-no place

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    @loopback0 said in Linux USB device keeps disconnecting and reconnecting:

    Microsoft provide a tool to create a USB stick.

    Somehow I suspect that won’t run well under macOS.

    No but you can download Windows VMs from Microsoft for free (for like 90 days) and run the proper tool on that.



  • @TimeBandit Yep, this is why it smells like hardware to me. It should just work in a modern Linux.

    It could be that the kernel driver has bugs, but... I figure @Gurth would have found talk about that in his searches.



  • @loopback0 said in Linux USB device keeps disconnecting and reconnecting:

    No but you can download Windows VMs from Microsoft for free (for like 90 days) and run the proper tool on that.

    Thanks for the tip. I’ll see if it works under one of my XP VMs first, and if not, can see about an MS-provided one.



  • @Captain said in Linux USB device keeps disconnecting and reconnecting:

    this is why it smells like hardware to me

    That's most likely it


  • Discourse touched me in a no-no place

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    This is for a museum..

    It's starting to sound like it wants to be one of the exhibits...


  • Notification Spam Recipient

    @Gurth said in Linux USB device keeps disconnecting and reconnecting:

    @loopback0 said in Linux USB device keeps disconnecting and reconnecting:

    Microsoft provide a tool to create a USB stick.

    Somehow I suspect that won’t run well under macOS.

    ITT trying to do Windows work on non-Windows is a mistake.



  • @Tsaukpaetra And def stay away from Linux hardware...





  • @Sebastian-Parschauer Welcome to the forum!

    @Gurth Now that I see this thread for the first time, I'm wondering why you never tried installing Ubuntu 10.10 in a VM and using USB passthrough.



  • @Sebastian-Parschauer I like the heading of the readme

    e72615af-3220-4c74-b490-5d7e195657a3-image.png



  • @dfdub said in Linux USB device keeps disconnecting and reconnecting:

    @Gurth Now that I see this thread for the first time, I'm wondering why you never tried installing Ubuntu 10.10 in a VM and using USB passthrough.

    It didn’t occur to me at all to try that, is the only answer I have to that question. It might have solved a lot of trouble, though, so I may need to keep that in mind in case another touchscreen needs to be put up and all we’ve got available is some old piece of shit computer to run it on.


Log in to reply