Ubuntu 14.04 mouse freeze issue

I am trying to find this topic in the history but without luck.

The hardware is a brand new Jetson TK1 with pre-installed L4T on it. I found the mouse point freezes once in a while especially when the board is loading a webpage or reading a file. I tried different mouse (Microsoft, Logitech), I plugged the mouse directly on the USB 3.0 port or the OTG port with an adapter cable. No luck.

I downloaded the newest 2.2.1 JetPack released on 2016/07/13 with L4T 21.5, I spent sometime installed it on the board. And the mouse is still freezing the way.

Eventually I won’t use Ubuntu for my final system, but I am wondering if someone is having the similar issue with a solution.

Thanks!

I don’t know for sure what the cause is, but there were issues in the original R19.2 (what JTK1 ships with) where interaction with some parts of the display (mouse over event) was finding bugs in the software beneath it (handler of mouseover events, though I don’t remember which software that was). So far as I know this was fixed though, and the R21.x and newer did not have that problem (which is what the newer JetPacks have).

What you may want to do is install “htop” package (or you could just use “top”, but htop is nicer) and see if something starts churning away at CPU use when this happens. Doing so from the GUI should work so long as it is just the mouse driver which is failing. If not, then use a remote machine and ssh in…if networking fails too, you’re best off with using the serial console (which is immune to all those issues). And if it is possible and the freeze is momentary (thus allowing typing soon after freeze event), or if you have a serial console active, check the “dmesg | tail -n 100” output and see if something sticks out; similarly, you can watch the tail of “/var/log/Xorg.0.log”. dmesg should tell you about things the kernel sees, Xorg.0.log should tell you about things X11 sees.

I pulled the dmesg. every time when the mouse freezes, I will get “utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS”.

Doing some Google research now… :/

[ 46.923321] usb 3-1: new full-speed USB device number 2 using tegra-ehci
[ 46.959207] usb 3-1: New USB device found, idVendor=046d, idProduct=c52b
[ 46.959220] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 46.959228] usb 3-1: Product: USB Receiver
[ 46.959235] usb 3-1: Manufacturer: Logitech
[ 46.973911] logitech-djreceiver 0003:046D:C52B.0005: ,: USB HID v1.11 Device [Logitech USB Receiver] on usb-tegra-ehci.0-1/input2
[ 46.976521] input: Logitech Unifying Device. Wireless PID:101b as /devices/platform/tegra-ehci.0/usb3/3-1/3-1:1.2/0003:046D:C52B.0005/input/input4
[ 46.976960] logitech-djdevice 0003:046D:C52B.0006: input: USB HID v1.11 Mouse [Logitech Unifying Device. Wireless PID:101b] on usb-tegra-ehci.0-1:1
[ 47.051353] as3722-adc-extcon as3722-adc-extcon.2: USB-Host is connected
[ 53.592505] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 74.351676] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 92.896508] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 107.252737] systemd-hostnamed[2097]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[ 307.319708] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 765.089719] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 765.131503] tegradc tegradc.1: nominal-pclk:154012000 parent:462000000 div:3.0 pclk:154000000 152471880~167873080
[ 792.992011] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 850.811677] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 855.632795] gk20a gk20a.0: fifo_error_isr: channel reset initated from fifo_error_isr
[ 855.899473] gk20a gk20a.0: fifo_error_isr: channel reset initated from fifo_error_isr
[ 1087.723682] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 1109.750125] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 1117.731398] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
[ 1129.734186] utmi_phy_restore_end: timeout waiting for USB_USBCMD_RS
jetson_tk1_usb_issue.png

Just to be sure about suspend and power saving is not getting in the way, I recommend going here and setting for max performance at all times…pay particular attention to USB auto-suspend on this URL:
http://elinux.org/Jetson/Performance
…see if this changes the error.

This is a good article. Thanks!

Start: The mouse freezes after 3 seconds inactive, as long as the mouse keeps moving, it won’t freeze (looks like something went suspend after mouse inactive for exactly ONLY 3 seconds, this is NOT happening with keyboard…)

Step 1:

root@tegra-ubuntu:/home/ubuntu# echo -1 > /sys/module/usbcore/parameters/autosuspend

At this point, the mouse is still freezing.

Step 2:
Unplug the mouse from USB OTG port, and plug it back.

Result: Mouse is NOT freezing. The problem is temporarily solved.

New questions:

  1. My /etc/rc.local does not work, how to set it permanently?
  2. Is there a better way to set it than put the command in start up script? (I still have to re-plug the mouse after I set it)
  3. It looks like some setting defined the 3 seconds, I wondering where is it? (kernel, X11?)

You are probably running into the init script which sets up power save triggers. rc.local would work, but then a later event would alter your settings. Try this:

sudo update-rc.d -f ondemand remove

…once this is done whatever changes you make in rc.local should stick.