hid-remapper icon indicating copy to clipboard operation
hid-remapper copied to clipboard

Unresponsive after shutdown startup, needing replug

Open BangDroid opened this issue 2 years ago • 27 comments

Single Pico variant, latest firmware. Connected to Elecom Huge wired. After shutting down Windows (10 21H2) and restarting the next day, no input was detected, neither the indicator led on the Pico was lighting. Unplugging the the Pico (with Huge still connected) and re-plugging resumed correct function. Pico is connected directly to computer rear USB not a hub. Any ideas what could cause this? TIA

BangDroid avatar Aug 04 '23 16:08 BangDroid

Does this happen every time?

jfedor2 avatar Aug 04 '23 19:08 jfedor2

I have the same issue with a single pico variant plugged to the computer rear usb and a jfedor trackball. i can unplug the trackball from the pico and it wakes up. it happens every boot, but using older remapper.uf2 firmware only was happening once every 10 boots.

I made a previous post requesting a watchdog timer which i closed https://github.com/jfedor2/hid-remapper/issues/69

itsnoteasy avatar Aug 05 '23 14:08 itsnoteasy

Appears to be happening every time. I tested multiple times over the past few days and while connected to the remapper the Huge always becomes unresponsive, but without the remapper the Huge behaves as expected.

Also as itsnoteasy mentioned, unplugging the Huge from the Pico is sufficient to resume normal operation.

BangDroid avatar Aug 06 '23 05:08 BangDroid

Thanks for the reports. I need to try and reproduce this.

jfedor2 avatar Aug 06 '23 09:08 jfedor2

I have done some more testing, and it appears that if i reboot with shutdown -r now, then the trackball does not become unresponsive. it only becomes unresponsive after a cold boot. While unresponsive, there are no messages within the monitor tab at https://www.jfedor.org/hid-remapper-config/ but i can open the device, and load all the settings from it.

itsnoteasy avatar Aug 06 '23 13:08 itsnoteasy

Just sharing more information and experience. Logging in today with the Huge connected to Pico it was unresponsive on login screen, after logging in and waiting a few moments, I noticed the DPI indicator on the Huge flash and the Huge woke up and was fully responsive. The wait was maybe 30 seconds. I'll admit I was probably impatient the previous times, standard HID behavior is usually immediate, but I suspect this is what's happening. For whatever reason the Huge is slow to wake when connected to Pico. I may not have created this issue knowing this, it's certainly acceptable to me to have a delay, compared the having to un/replug. I will leave this open for now as maybe it's an indicator of something undesired.

BangDroid avatar Aug 07 '23 14:08 BangDroid

I stopped using the hid-remapper because i detested replugging, but it turned out that my trackball needed to be replugged, so i must retract my bug report, as it could have been the trackball causing the issue. my gut feeling is that both jfedor devices, the jfedor trackball and the remapper have the same bug, but i haven't used an oem mouse enough to compare with. my current workaround is to solder a normally closed microswitch in series in the 5v usb wire. when it locks up after boot, i click the switch. I have started to use the remapper again today, because the workaround seems to reset both devices. I have also installed a ryzen cpu and new mobo in my system, so that eliminates my system as a fault. edit: a little searching indicates that there appears to be a bug in linux causing the usb issues.

itsnoteasy avatar Aug 27 '23 19:08 itsnoteasy

I think I have almost the same issue, but with Elecom Huge Wireless.

I was using an older version of your firmware. After updated to latest version, the Pico is not working after a cold boot. I need to unplug and plug again the start working.

If I flash the older version, it is back to working flawless.

  1. Update to latest firmware. It start to work, including reboots.
  2. At night, shutdown the computer.
  3. Next day, Pico is not working anymore.
  4. Unplug Pico and plug again and it work again.
  5. Flash older firmware and it work again after cold boot at morning.

Older firmware compiled by me: 1a4eec1 . Pi Pico single. Windows 10.

LeoKesler avatar Sep 10 '23 10:09 LeoKesler

I have also tried this older firmware linked by leokesler. It has fixed my cold boot replug issue, but I haven't been able to program it with the browser since the tap and hold feature is missing. i noticed that with the new firmware my cursor tended to jump 5mm about once a minute on the screen. i thought that it was dust on my sensor causing it, but it is completely absent with the older firmware. edit: cursor jumping has reappeared, so belay that complaint.

itsnoteasy avatar Sep 10 '23 21:09 itsnoteasy

This is a good lead, I should be able to git bisect, except I don't think I'm getting the issue on my PC. Will try to look around.

jfedor2 avatar Sep 11 '23 09:09 jfedor2

i have updated to the latest release and the cold boot issue appears to be gone. good work jfedor. had you intentionally fixed it or was the fix by accident?

itsnoteasy avatar Oct 09 '23 12:10 itsnoteasy

I haven't done anything to fix this specifically. It's possible that something changed internally in TinyUSB and we got a behavior change when we pulled the latest version in.

jfedor2 avatar Oct 09 '23 13:10 jfedor2

So, I'm in a similar-ish boat:

  • Single Pico variant, running r2024-02-14 connected to Elecom Huge wired.
  • Pico is connected to a powered USB hub, which is then connected to a Chromebook + external monitor + external keyboard
  • If I let the Chromebook go to sleep overnight and then wake it using the keyboard, input from the Elecom Huge + Single Pico isn't registered until I unplug and replug the Elecom Huge from the Pico.

@itsnoteasy @LeoKesler do you know what versions of the firmware you're currently running and whether or not you have the problem with it?

jasonanovak avatar Mar 14 '24 03:03 jasonanovak

I don't use a usb hub, and i dismantled the jfedor trackball, but i upgraded to r2024-02-14 single pico variant with the kensington expert wired. the pc boots without issue with my ryzen 5. I haven't tried sleep modes, as i have them disabled. I think there's an old linux kernel bug with sleep modes so your issue may not be hid-remapper's fault.

itsnoteasy avatar Mar 14 '24 13:03 itsnoteasy

@jasonanovak I am not using Elecom Huge Wireless anymore, because the many issues with connect / disconect and battery issues. It was a huge mistake to buy the wireless version.

Currently, I am using the Protoarc EM03. It is wireless too, but I never got a disconect from it. Almost perfect device, except for the size ( I have big hands) and the lack of additional button at right side, like Elecom Huge.

LeoKesler avatar Mar 20 '24 21:03 LeoKesler

Same issue here with single pico and Elecom Huge wired. After the PC wakes from sleep or reboot, it needs to be unplugged and replugged. I tried several other devices but only the Elecom Huge is like this. Windows 11. Using the latest firmware, r2024-06-27.

222Phoenix avatar Aug 07 '24 18:08 222Phoenix