Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Feb 2009 12:30:10 +1100
From:      Tony Maher <tonymaher@optusnet.com.au>
To:        stable@freebsd.org
Subject:   Re: 7.1 Release and usb keyboard/mouse problems (and Xorg)
Message-ID:  <49A0AAA2.7030104@optusnet.com.au>
In-Reply-To: <4971B18D.3090803@optusnet.com.au>
References:  <4971B18D.3090803@optusnet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Tony Maher wrote:
> Hello,
> 
> I have been running FreeBSD 7 from around 2008-10-20 and experienced
> the occasional problems with usb mouse and keyboard.  The mouse pointer
> slowly drift to a corner of the screen and not respond, and the keyboard
> would become unresponsive. Unplugging and plugging back in fixed the 
> problem.
> This would happen a few times per week.
> 
> However after I upgraded to 7.1-RELEASE-p2, I now get this problem
> every few hours if idle (hard to know exactly when it occurs since i am 
> not at keyboard) and a few minutes if doing a background compilation.
> The keyboard often shows one of the LEDs constantly flashing at high speed.
> Unplugging and replugging often does not work and needs to be done 
> several times (and use a different usb port).
> 
> I saw some email reports and tried in /boot/device.hints
> hint.atkbd.0.disable="1"
> hint.atkbdc.0.disable="1"
> 
> No change.
> 
> Tried a different mouse and it would continue to work but my normal mouse
> would disconnect.  Tried an identical keyboard and it exhibited the same
> problem ruling out a bad keyboard.  I then tried another keyboard and 
> have not had any problem since.
> 
> The main thing I can see different is the working keyboard is a Logitech
> and the two problematic keyboards are (very) cheap noname keyboards.
> Both the mice are Logitech but the mouse that has problems is very old
> (from around year 2000 - model M-BA47).  The working mouse is newer but
> still fairly old (Model M-UV96).
> 
> The box is a amd64 with Intel(R) Core(TM)2 Duo CPU  E6750  @ 2.66GH
> 4GB RAM and motherboard is Intel DP35DP.
> 
> So my setup now appears to be fine.  If anyone is having similar problems,
> I suggest trying  different (more modern) mice/keyboards.

Unfotunately things got worse after more port upgrades.
With Xorg 7.4 and gnome could not even get the logon screen - just a busy cursor.
The Xorg.0.log had a message like
  (EE) Logitech USB Keyboard: cannot open "/dev/ukbd0"
  (EE) PreInit failed for input device "Logitech USB Keyboard"
  (II) UnloadModule: "kbd"
which made me think this was the problem.  However I now have everything
working fine and still get this message.

Reverting X and gnome back and applications like xterms were slow
to start up plus mouse was slow to respond.  Tried lots of options but in the end gave
up and went for a clean install of 7.1 (First time I have ever had to do this
in over 10 years of using FreeBSD!)

Everything worked pretty good.
Did a cvsup and upgraded everything and all works fine.
The only problems I did encounter were/are:

1. my xorg.conf options were ignored

Section "InputDevice"
       Identifier  "Keyboard0"
       Driver      "kbd"
   Option      "XkbOptions" "ctrl:nocaps"
EndSection

Section "InputDevice"
       Identifier  "Mouse0"
       Driver      "mouse"
       Option      "Protocol" "auto"
       Option      "Device" "/dev/sysmouse"
       Option      "ZAxisMapping" "4 5 6 7"
EndSection


/var/log/Xorg.0.log shows

(WW) AllowEmptyInput is on, devices using drivers 'kbd' or 'mouse' will be disabled.

Not sure why this is. Man page says
   Option "AllowEmptyInput" "boolean"
             If  enabled,  don't add the standard keyboard and mouse drivers,
             if there are no input devices in the config  file.   Enabled  by
             default if AutoAddDevices and AutoEnableDevices is enabled, oth-
             erwise disabled.  If AllowEmptyInput is on,  devices  using  the
             kbd or mouse driver are ignored.

It is not set in my xorg.conf and neither are Auto* directives.
~:255 egrep 'Auto|Allow' /usr/local/etc/X11/xorg.conf
~:256 

To get the ctrl:nocaps used the gnome keyboard setting tool.
Mouse works fine except the side button does no work and fixed that by adding
moused_flags="-m2=4" to rc.conf.

2. gxine after upgrade would always segmentation fault.
  I used portupgrade -y -m BATCH=true gxine and this appears to be the problem.
  I rebuilt using make config selecting all options except lirc support.
  Did portupgrade -w -W gxine and it now works fine.

3. At some point along the line I (re)discovered the 'fc-cache -f -v'
   which fixed slow xterm startup.

I tried plugging in the old keyboard and mouse along side the more modern ones
I have been using since the problems started and they appear to be ok.
I was using the old mouse but the new keyboard (with the other two still attached).
I was going to say they worked fine but just before the start of this paragraph
I started to get '9' repeated across the screen and the keyboard
was unresponsive.  I had also just powered up a USB drive a few minutes before this
happened but I had run with this configuration all day yesterday without problems..
I have removed the older keyboard and mouse for now.

I was thinking maybe my problems stemmed from having two moused running
one from system start up and the other from hald but do not have any output
from the old system to confirm this was happening.

At this point everything is working perfectly.

I read someones advice who said make a copy or /usr/local and /var/db/pkg
before undertaking major port subsystem upgrades. I think this is an excellent
idea!


cheers
-- 
Tony Maher                    email: tonymaher@optusnet.com.au



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49A0AAA2.7030104>