Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #158420 > unrolled thread

A mouse and keyboard problem (randomly lose keystrokes)

Started byAlfonso García <alfon.gz@gmail.com>
First post2015-09-29 20:20 +0200
Last post2015-10-02 20:00 +0200
Articles 11 — 6 participants

Back to article view | Back to linux.debian.user


Contents

  A mouse and keyboard problem (randomly lose keystrokes) Alfonso García <alfon.gz@gmail.com> - 2015-09-29 20:20 +0200
    Re: A mouse and keyboard problem (randomly lose keystrokes) Lisi Reisz <lisi.reisz@gmail.com> - 2015-09-29 22:30 +0200
      Re: A mouse and keyboard problem (randomly lose keystrokes) alfon <alfon.gz@gmail.com> - 2015-09-30 09:10 +0200
    Re: A mouse and keyboard problem (randomly lose keystrokes) Sven Arvidsson <sa@whiz.se> - 2015-09-29 22:40 +0200
    Re: A mouse and keyboard problem (randomly lose keystrokes) Gergely Nagy <algernon@madhouse-project.org> - 2015-09-30 10:30 +0200
      Re: A mouse and keyboard problem (randomly lose keystrokes) Václav Ovsík <vaclav.ovsik@gmail.com> - 2015-09-30 21:20 +0200
        Re: A mouse and keyboard problem (randomly lose keystrokes) Sven Arvidsson <sa@whiz.se> - 2015-09-30 22:10 +0200
          Re: A mouse and keyboard problem (randomly lose keystrokes) Václav Ovsík <vaclav.ovsik@gmail.com> - 2015-09-30 22:40 +0200
          Re: A mouse and keyboard problem (randomly lose keystrokes) Václav Ovsík <vaclav.ovsik@gmail.com> - 2015-10-01 11:00 +0200
            Re: A mouse and keyboard problem (randomly lose keystrokes) alfon <alfon.gz@gmail.com> - 2015-10-01 11:20 +0200
      Re: A mouse and keyboard problem (randomly lose keystrokes) Alfonso García <alfon.gz@gmail.com> - 2015-10-02 20:00 +0200

#158420 — A mouse and keyboard problem (randomly lose keystrokes)

FromAlfonso García <alfon.gz@gmail.com>
Date2015-09-29 20:20 +0200
SubjectA mouse and keyboard problem (randomly lose keystrokes)
Message-ID<qe7Fp-5O1-31@gated-at.bofh.it>
Hi, I experience a mouse and keyboard strange behavior since debian 7 to 8
update. Sometimes, when X windows system started, the USB mouse doesn't work
and the USB keyboard loses randomly groups of keystrokes. This not happen
ever and sometimes every works fine

This happened some of you before?

I'm not sure if this is a problem of the X edev driver or the udev device
manager

Note: When this happen, unplug and plug again the USB mouse connector fix
the mouse problem. Not so with the keyboard, which continues to lose
keystrokes randomly

I'm desperate :_(

Thanks in advance

[toc] | [next] | [standalone]


#158425

FromLisi Reisz <lisi.reisz@gmail.com>
Date2015-09-29 22:30 +0200
Message-ID<qe9Hc-dy-21@gated-at.bofh.it>
In reply to#158420
On Tuesday 29 September 2015 19:16:03 Alfonso García wrote:
> Hi, I experience a mouse and keyboard strange behavior since debian 7 to 8
> update. Sometimes, when X windows system started, the USB mouse doesn't
> work and the USB keyboard loses randomly groups of keystrokes. This not
> happen ever and sometimes every works fine
>
> This happened some of you before?
>
> I'm not sure if this is a problem of the X edev driver or the udev device
> manager
>
> Note: When this happen, unplug and plug again the USB mouse connector fix
> the mouse problem. Not so with the keyboard, which continues to lose
> keystrokes randomly
>
> I'm desperate :_(
>
> Thanks in advance

Have you checked the hardware?  Does the keyboard work elsewhere, or does 
another USB keyboard work on this computer?

Lisi

[toc] | [prev] | [next] | [standalone]


#158449

Fromalfon <alfon.gz@gmail.com>
Date2015-09-30 09:10 +0200
Message-ID<qejGy-6cN-19@gated-at.bofh.it>
In reply to#158425
> Have you checked the hardware?  Does the keyboard work elsewhere, or does
> another USB keyboard work on this computer?

Hi,

The keyboard works fine on my Rpi and on other laptop, seems that it
is not a hardware problem (I'm experiencing this misbehavior since I
updated Debian 7 update, not before)

Some tricks (perhaps this give you some clues)

1.- Reboot the computer fix the mouse and keyboard problem (sometime no)

2.- Unplug and plug the USB connector fix the mouse problem (but not
the keyboard problem)

3.- If I do a serie of right clicks the mouse comes alive for some
time (yes, it sound strange)

4.- It happens the same as in point 3 if restart udev (the mouse works
for some time - less than a minute - after it dies again)

On 29 September 2015 at 22:25, Lisi Reisz <lisi.reisz@gmail.com> wrote:
> On Tuesday 29 September 2015 19:16:03 Alfonso García wrote:
>> Hi, I experience a mouse and keyboard strange behavior since debian 7 to 8
>> update. Sometimes, when X windows system started, the USB mouse doesn't
>> work and the USB keyboard loses randomly groups of keystrokes. This not
>> happen ever and sometimes every works fine
>>
>> This happened some of you before?
>>
>> I'm not sure if this is a problem of the X edev driver or the udev device
>> manager
>>
>> Note: When this happen, unplug and plug again the USB mouse connector fix
>> the mouse problem. Not so with the keyboard, which continues to lose
>> keystrokes randomly
>>
>> I'm desperate :_(
>>
>> Thanks in advance
>
> Have you checked the hardware?  Does the keyboard work elsewhere, or does
> another USB keyboard work on this computer?
>
> Lisi
>

[toc] | [prev] | [next] | [standalone]


#158426

FromSven Arvidsson <sa@whiz.se>
Date2015-09-29 22:40 +0200
Message-ID<qe9QS-oL-15@gated-at.bofh.it>
In reply to#158420

[Multipart message — attachments visible in raw view] — view raw

On Tue, 2015-09-29 at 20:16 +0200, Alfonso García wrote:
> Hi, I experience a mouse and keyboard strange behavior since debian 7
> to 8
> update. Sometimes, when X windows system started, the USB mouse
> doesn't work
> and the USB keyboard loses randomly groups of keystrokes. This not
> happen
> ever and sometimes every works fine
> 
> This happened some of you before?
> 
> I'm not sure if this is a problem of the X edev driver or the udev
> device
> manager
> 
> Note: When this happen, unplug and plug again the USB mouse connector
> fix
> the mouse problem. Not so with the keyboard, which continues to lose
> keystrokes randomly

Check the mouse and keyboard on another system to rule out hardware
problems. You might also want to try another hub or USB port.

Check dmesg after the mouse or keyboard has dropped out.

Try turning of any USB power management / suspend to see if that makes
any difference.  

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5



[toc] | [prev] | [next] | [standalone]


#158451

FromGergely Nagy <algernon@madhouse-project.org>
Date2015-09-30 10:30 +0200
Message-ID<qekVY-7TY-5@gated-at.bofh.it>
In reply to#158420
>>>>> "Alfonso" == Alfonso García <alfon.gz@gmail.com> writes:

    Alfonso> Hi, I experience a mouse and keyboard strange behavior since debian 7 to 8
    Alfonso> update. Sometimes, when X windows system started, the USB mouse doesn't work
    Alfonso> and the USB keyboard loses randomly groups of keystrokes. This not happen
    Alfonso> ever and sometimes every works fine

    Alfonso> This happened some of you before?

I had similar problems. The hardware works fine elsewhere, and on Debian
7 too, hardware failure is out of the question. I also had the same
problem on the TTY, so it's not an X thing either. I also tried about
half a dozen USB keyboards, no luck.

In the end, downgrading the kernel to 3.16 fixed the problem for me, and
have reported #793377 with my findings back then.

Hope this helps.

-- 
|8]

[toc] | [prev] | [next] | [standalone]


#158481

FromVáclav Ovsík <vaclav.ovsik@gmail.com>
Date2015-09-30 21:20 +0200
Message-ID<qev50-5JG-11@gated-at.bofh.it>
In reply to#158451
Hi,

On Wed, Sep 30, 2015 at 10:05:26AM +0200, Gergely Nagy wrote:
> >>>>> "Alfonso" == Alfonso García <alfon.gz@gmail.com> writes:
> 
>     Alfonso> Hi, I experience a mouse and keyboard strange behavior since debian 7 to 8
>     Alfonso> update. Sometimes, when X windows system started, the USB mouse doesn't work
>     Alfonso> and the USB keyboard loses randomly groups of keystrokes. This not happen
>     Alfonso> ever and sometimes every works fine
> 
>     Alfonso> This happened some of you before?
> 
> I had similar problems. The hardware works fine elsewhere, and on Debian
> 7 too, hardware failure is out of the question. I also had the same
> problem on the TTY, so it's not an X thing either. I also tried about
> half a dozen USB keyboards, no luck.
> 
> In the end, downgrading the kernel to 3.16 fixed the problem for me, and
> have reported #793377 with my findings back then.

I have similar symptoms. Until this I met this thread I thought this is
hardware problem of my notebook Dell Latitude E6520.

My symptoms:

After reboot there is some delay time (several seconds), that when USB
keyboard or mouse is idle longer than this delay it froze.
Next keystroke after this delay is lost, but this lost keystroke wakes
keyboard up and next keystrokes are sent again, until there is another
longer delay. Mouse must be woke-up by pressing button. This woke-up
click is lost, but mouse works, until another delay normally.

Simple disconnect and reconnect both devices fixes this problem till
another reboot.

-- 
Zito

[toc] | [prev] | [next] | [standalone]


#158486

FromSven Arvidsson <sa@whiz.se>
Date2015-09-30 22:10 +0200
Message-ID<qevRn-6TJ-3@gated-at.bofh.it>
In reply to#158481

[Multipart message — attachments visible in raw view] — view raw

On Wed, 2015-09-30 at 21:18 +0200, Václav Ovsík wrote:
> After reboot there is some delay time (several seconds), that when
> USB
> keyboard or mouse is idle longer than this delay it froze.
> Next keystroke after this delay is lost, but this lost keystroke
> wakes
> keyboard up and next keystrokes are sent again, until there is
> another
> longer delay. Mouse must be woke-up by pressing button. This woke-up
> click is lost, but mouse works, until another delay normally.
> 
> Simple disconnect and reconnect both devices fixes this problem till
> another reboot.

Could you try this:
http://askubuntu.com/questions/80638/how-to-disable-auto-power-off-of-usb-devices-like-usb-mouse

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5



[toc] | [prev] | [next] | [standalone]


#158487

FromVáclav Ovsík <vaclav.ovsik@gmail.com>
Date2015-09-30 22:40 +0200
Message-ID<qewkp-7rR-15@gated-at.bofh.it>
In reply to#158486
On Wed, Sep 30, 2015 at 10:02:29PM +0200, Sven Arvidsson wrote:
> On Wed, 2015-09-30 at 21:18 +0200, Václav Ovsík wrote:
> > After reboot there is some delay time (several seconds), that when
> > USB
> > keyboard or mouse is idle longer than this delay it froze.
> > Next keystroke after this delay is lost, but this lost keystroke
> > wakes
> > keyboard up and next keystrokes are sent again, until there is
> > another
> > longer delay. Mouse must be woke-up by pressing button. This woke-up
> > click is lost, but mouse works, until another delay normally.
> > 
> > Simple disconnect and reconnect both devices fixes this problem till
> > another reboot.
> 
> Could you try this:
> http://askubuntu.com/questions/80638/how-to-disable-auto-power-off-of-usb-devices-like-usb-mouse

Looks very promising! Thanks!
I will sit in front of my notebook tomorrow.
I am on ssh connection tonight...
There is
    /etc/laptop-mode/conf.d/usb-autosuspend.conf
I will check usb autosuspend tomorrow.
Cheers
-- 
Zito

[toc] | [prev] | [next] | [standalone]


#158497

FromVáclav Ovsík <vaclav.ovsik@gmail.com>
Date2015-10-01 11:00 +0200
Message-ID<qeHSy-7yF-11@gated-at.bofh.it>
In reply to#158486
On Wed, Sep 30, 2015 at 10:02:29PM +0200, Sven Arvidsson wrote:
> On Wed, 2015-09-30 at 21:18 +0200, Václav Ovsík wrote:
> > After reboot there is some delay time (several seconds), that when
> > USB
> > keyboard or mouse is idle longer than this delay it froze.
> > Next keystroke after this delay is lost, but this lost keystroke
> > wakes
> > keyboard up and next keystrokes are sent again, until there is
> > another
> > longer delay. Mouse must be woke-up by pressing button. This woke-up
> > click is lost, but mouse works, until another delay normally.
> > 
> > Simple disconnect and reconnect both devices fixes this problem till
> > another reboot.
> 
> Could you try this:
> http://askubuntu.com/questions/80638/how-to-disable-auto-power-off-of-usb-devices-like-usb-mouse

My previous description wasn't accurate. The keyboard lost keystrokes
randomly really - not exactly the first hit when suspended.

 zito@bobek:~$ lsusb -t
 /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
         |__ Port 8: Dev 3, If 0, Class=Application Specific Interface, Driver=, 12M
         |__ Port 8: Dev 3, If 1, Class=Chip/SmartCard, Driver=, 12M
 /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
         |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
         |__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/3p, 480M
             |__ Port 1: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
             |__ Port 2: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
         |__ Port 4: Dev 5, If 0, Class=Wireless, Driver=btusb, 12M
         |__ Port 4: Dev 5, If 1, Class=Wireless, Driver=btusb, 12M
         |__ Port 4: Dev 5, If 2, Class=Vendor Specific Class, Driver=, 12M
         |__ Port 4: Dev 5, If 3, Class=Application Specific Interface, Driver=, 12M
 

After reboot the keyboard and the mouse autosuspends:

 zito@bobek:~$ for x in /sys/bus/usb/devices/*/power/autosuspend; do echo "$x: $(cat $x)"; done
 /sys/bus/usb/devices/1-1.1/power/autosuspend: 2
 /sys/bus/usb/devices/1-1.2.1/power/autosuspend: 2
 /sys/bus/usb/devices/1-1.2.2/power/autosuspend: 2
 /sys/bus/usb/devices/1-1.2/power/autosuspend: 2
 /sys/bus/usb/devices/1-1.4/power/autosuspend: 2
 /sys/bus/usb/devices/1-1/power/autosuspend: 2
 /sys/bus/usb/devices/2-1.8/power/autosuspend: 2
 /sys/bus/usb/devices/2-1/power/autosuspend: 2
 /sys/bus/usb/devices/usb1/power/autosuspend: 2
 /sys/bus/usb/devices/usb2/power/autosuspend: 2
 
 zito@bobek:~$ for x in /sys/bus/usb/devices/*/power/level; do echo "$x: $(cat $x)"; done
 /sys/bus/usb/devices/1-1.1/power/level: auto
 /sys/bus/usb/devices/1-1.2.1/power/level: auto
 /sys/bus/usb/devices/1-1.2.2/power/level: auto
 /sys/bus/usb/devices/1-1.2/power/level: auto
 /sys/bus/usb/devices/1-1.4/power/level: auto
 /sys/bus/usb/devices/1-1/power/level: auto
 /sys/bus/usb/devices/2-1.8/power/level: auto
 /sys/bus/usb/devices/2-1/power/level: auto
 /sys/bus/usb/devices/usb1/power/level: auto
 /sys/bus/usb/devices/usb2/power/level: auto


Disconnecting & reconnecting the keyboard and the mouse, the problem is gone:

zito@bobek:~$ for x in /sys/bus/usb/devices/*/power/autosuspend; do echo "$x: $(cat $x)"; done
/sys/bus/usb/devices/1-1.1/power/autosuspend: 2
/sys/bus/usb/devices/1-1.2.1/power/autosuspend: 2
/sys/bus/usb/devices/1-1.2.2/power/autosuspend: 2
/sys/bus/usb/devices/1-1.2/power/autosuspend: 2
/sys/bus/usb/devices/1-1.4/power/autosuspend: 2
/sys/bus/usb/devices/1-1/power/autosuspend: 2
/sys/bus/usb/devices/2-1.8/power/autosuspend: 2
/sys/bus/usb/devices/2-1/power/autosuspend: 2
/sys/bus/usb/devices/usb1/power/autosuspend: 2
/sys/bus/usb/devices/usb2/power/autosuspend: 2

zito@bobek:~$ for x in /sys/bus/usb/devices/*/power/level; do echo "$x: $(cat $x)"; done
/sys/bus/usb/devices/1-1.1/power/level: auto
/sys/bus/usb/devices/1-1.2.1/power/level: on
/sys/bus/usb/devices/1-1.2.2/power/level: on
/sys/bus/usb/devices/1-1.2/power/level: auto
/sys/bus/usb/devices/1-1.4/power/level: auto
/sys/bus/usb/devices/1-1/power/level: auto
/sys/bus/usb/devices/2-1.8/power/level: auto
/sys/bus/usb/devices/2-1/power/level: auto
/sys/bus/usb/devices/usb1/power/level: auto
/sys/bus/usb/devices/usb2/power/level: auto

Both reconnected HID devices has power level on.
-- 
Zito

[toc] | [prev] | [next] | [standalone]


#158498

Fromalfon <alfon.gz@gmail.com>
Date2015-10-01 11:20 +0200
Message-ID<qeIbU-8aj-11@gated-at.bofh.it>
In reply to#158497
Thank you for your answers.

I'll follow some of your recommendations and when I've some time I'll
tell you the results

Thank you all.

[toc] | [prev] | [next] | [standalone]


#158526

FromAlfonso García <alfon.gz@gmail.com>
Date2015-10-02 20:00 +0200
Message-ID<qfcMH-29a-9@gated-at.bofh.it>
In reply to#158451

[Multipart message — attachments visible in raw view] — view raw

> I had similar problems. The hardware works fine elsewhere, and on Debian
> 7 too, hardware failure is out of the question. I also had the same
> problem on the TTY, so it's not an X thing either. I also tried about
> half a dozen USB keyboards, no luck.
> 
> In the end, downgrading the kernel to 3.16 fixed the problem for me, and
> have reported #793377 with my findings back then.
>

Hi again,

The information reported on #793377 is very useful.

While I was reading and proving the things on that bug, I realised that the
problem was on USB autosuspend (or it seems to me)

I did this steps:

1.- Blacklist the USB devices on file
/etc/laptop-mode/conf.d/usb-autosuspend.conf

2.- /etc/init.d/laptop-mode restart

After that, the USB keyboard and USB mouse stoped working.

$> ./activa_usb.sh lst

05e3:0610 = 2, auto
05e3:0610 = 2, auto
046d:c31c = 2, auto
046d:c05a = 2, auto
1d6b:0002 = 2, auto
1d6b:0001 = 2, auto
1d6b:0001 = 2, auto
1d6b:0001 = 2, auto

The problem was fixed with this temporal workaround:

$> ./activa_usb.sh 046d:c05a on

$> ./activa_usb.sh 046d:c31c on

NOTE: the activa_usb.sh script is attached

Thank you all.
 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web