Mouse problems in KDE [Solved]

Compiz, KDE, Gnome, Fluxbox, etc...

Moderator: Moderators

Mouse problems in KDE [Solved]

Postby Sqens » Fri May 07, 2010 22:02

Hey everyone. About a week ago, KDE started responding oddly to mouseclicks. When it would first start up (or upon restart), everything works fine, but after some amount of time it would just stop reading them*. This has usually coincided with having multiple windows open, but occasionally it has happened with just a single browser window. Closing all windows fixes the problem to the extent that I can click again, but once I open a new window the same thing happens almost immediately.

Restarting X allows me to continue working for a while, but eventually the problem always reappears. Unplugging/replugging the mouse does nothing. Xorg.o.log doesn't seem to show anything strange, but it's attached below anyway. The problem may have coincided with a kernel upgrade from 2.6.31 to 2.6.33, but reverting the kernel didn't fix anything. I posted this here and mention KDE because I haven't experienced this in Fluxbox, though I admit that may be because I haven't spent enough time in there.

* To be precise, what usually happens is that the middle button will stop working entirely, the left will work within one region (e.g. the main part of a browser, window borders, or menus), and sometimes right clicking will fix the problem until the next one left click, allowing me to move regions. Sometimes, though, all buttons stop responding entirely until all windows are closed. Scroll tends to work in the active region, independently of the location of the cursor, and movement always works.

Any suggestions? Thanks in advance.
Last edited by Sqens on Fri Jun 04, 2010 22:23, edited 2 times in total.
Sqens
Baby Hen
 
Posts: 19
Joined: Sat Feb 14, 2009 21:53

Re: Mouse problems in KDE

Postby Fitzcarraldo » Sun May 09, 2010 0:41

Very odd. Have you recently upgraded the X.Org Server (x11-base/xorg-server), by any chance? Try re-installing the X.Org driver x11-drivers/xf86-input-evdev and uninstalling x11-drivers/xf86-input-keyboard and x11-drivers/xf86-input-mouse to see what happens. If that makes no difference, install x11-drivers/xf86-input-keyboard and x11-drivers/xf86-input-mouse and uninstall x11-drivers/xf86-input-evdev to see what happens.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Mouse problems in KDE

Postby Sqens » Sun May 09, 2010 22:14

EDIT: It seems I spoke too soon. I experienced the problem again after following the first suggestion. The second suggestion (removing xf86-input-evdev) resulted in a completely nonresponsive mouse and keyboard. Any other ideas? I'm afraid I don't know if I recently updated the X.Org server. Is there a way I could check? I generally equo upgrade every week or so, if that helps.

Previous message: I'd like to wait another day or two to be sure before declaring this solved, but so far it looks like reinstalling xf86-input-evdev and uninstalling xf86-input-keyboard and xf86-input-mouse did the trick. Thanks!
Sqens
Baby Hen
 
Posts: 19
Joined: Sat Feb 14, 2009 21:53

Re: Mouse problems in KDE

Postby Fitzcarraldo » Mon May 10, 2010 0:43

What versions of xorg-server and xf86-input- packages do you have installed? Here are mine:

x11-drivers/xf86-input-evdev-2.4.0 (with the USE flags: -debug)
x11-drivers/xf86-input-keyboard-1.4.0 (with the USE flags: -debug)
x11-drivers/xf86-input-mouse-1.5.0 (with the USE flags: -debug)
x11-drivers/xf86-input-synaptics-1.2.2 (with the USE flags: hal -debug)
x11-drivers/xf86-input-void-1.3.0 (with the USE flags: -debug)
x11-base/xorg-server-1.7.6 (with the USE flags: hal kdrive nptl sdl xorg -debug -dmx -ipv6 -minimal -tslib)

You can use the eix utility to find out which packages are installed and what USE flags the Entropy package builder used to compile them:

Code: Select all
# eix -I xf86-input


Here is my /etc/X11/xorg.conf:

Code: Select all
Section "ServerLayout"
        Identifier     "Main Layout"
        Screen      0  "Screen 0" 0 0
EndSection

Section "Files"
EndSection

Section "Module"
        SubSection "extmod"
                Option      "omit xfree86-dga"
        EndSubSection
        Load  "i2c"
        Load  "ddc"
        Load  "vbe"
        Load  "dri"
        Load  "glx"
        Load  "synaptics"
EndSection

Section "ServerFlags"
        Option      "AllowMouseOpenFail" "true"
        Option      "Xinerama" "off"
EndSection

Section "Monitor"
        Identifier   "Generic Monitor"
        HorizSync    28.0 - 80.0
        VertRefresh  43.0 - 60.0
EndSection

Section "Device"

    #BusID    "PCI:01:00"
    #Option "RenderAccel" "on"
    #Option "XAANoOffscreenPixmaps"
    #Option "BusType" "PCI"
    #Option "ColorTiling" "on"
    #Option "EnablePageFlip" "on"
        Identifier  "SabayonVga0"
        Driver      "fglrx"
        Option      "UseEvents" "True"
        Option      "LogoPath" "/usr/share/backgrounds/sabayonlinux-nvidia.png"
EndSection

Section "Screen"

    #Option       "AddARGBGLXVisuals" "true"
        Identifier "Screen 0"
        Device     "SabayonVga0"
        Monitor    "Generic Monitor"
        DefaultDepth     24
        SubSection "Display"

        #Modes          "1024x768" "800x600" "640x480"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"

        #Modes          "1024x768" "800x600" "640x480"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"

        #Modes          "1024x768" "800x600" "640x480"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "DRI"
        Mode         0666
EndSection


The HAL daemon is running:

Code: Select all
# rc-update show -v | grep hal
                 hald |                            boot

and the HAL policy files for keyboard and evdev drivers are:

Code: Select all
# pwd
/etc/hal/fdi/policy
# ls
10-keymap.fdi  10-ntfs3g.fdi  10-x11-input.fdi
# cat 10-keymap.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">gb</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
</deviceinfo>

# cat 10-x11-input.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>

    <!-- KVM emulates a USB graphics tablet which works in absolute coordinate mode -->
    <match key="input.product" contains="QEMU USB Tablet">
       <merge key="input.x11_driver" type="string">evdev</merge>
    </match>

    <!-- FIXME: Support tablets too. -->
    <match key="info.capabilities" contains="input.mouse">
      <merge key="input.x11_driver" type="string">mouse</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
    </match>

    <match key="info.capabilities" contains="input.tablet">
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
    </match>

    <match key="info.capabilities" contains="input.touchpad">
      <merge key="input.x11_driver" type="string">mouse</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.x11_driver" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
    </match>
  </device>
</deviceinfo>

The Synaptics policy file is:

Code: Select all
# cat /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <!-- Arbitrary options can be passed to the driver using
             the input.x11_options property since xorg-server-1.5. -->
        <!-- EXAMPLES:
        Switch on shared memory, enables the driver to be configured at runtime
        <merge key="input.x11_options.SHMConfig" type="string">true</merge>

        Maximum movement of the finger for detecting a tap
        <merge key="input.x11_options.MaxTapMove" type="string">2000</merge>

        Enable vertical scrolling when dragging along the right edge
        <merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>

        Enable vertical scrolling when dragging with two fingers anywhere on the touchpad
        <merge key="input.x11_options.VertTwoFingerScroll" type="string">true</merge>

        Enable horizontal scrolling when dragging with two fingers anywhere on the touchpad
        <merge key="input.x11_options.HorizTwoFingerScroll" type="string">true</merge>

        If on, circular scrolling is used
        <merge key="input.x11_options.CircularScrolling" type="string">true</merge>

        For other possible options, check CONFIGURATION DETAILS in synaptics man page
        -->
    </match>
  </device>
</deviceinfo>


Kickoff > Computer > System Settings > Keyboard & Mouse > Mouse > Advanced has the following settings on my laptop:

Pointer acceleration: 2.0 x
Pointer threshold: 4 pixels
Double click interval: 400 msec
Drag start time: 500 msec
Drag start distance: 4 pixels
Mouse wheel scrolls by: 3 lines

Kickoff > Regional & Language > Keyboard Layout > Layout has Keyboard model: Evdev-managed keyboard

Compare what you've got with all the above (ignoring all the video stuff in xorg.conf, as my video hardware is probably completely different to yours).
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Mouse problems in KDE

Postby Fitzcarraldo » Mon May 10, 2010 1:47

I forgot to mention that, if you are still unable to use the keyboard and/or mouse at all after rebooting (even to the extent that you cannot do a Ctrl-Alt-F1/2/3/4/5/6 to get to a TTY console) then you can chroot to your HDD installation's root user in order to make further changes (install packages/reinstall packages/uninstall packages/edit files and so on). The method of doing this is explained below.

To chroot to the root user of the SL installation on the HDD, boot a Linux LiveCD or LiveDVD, open a Konsole/Terminal window and do the following if you do not have a separate boot partition:

Code: Select all
$ su
Password:
# swapon /dev/sda7  <---- change the "/dev/sda7" to whatever device your HDD swap partition is on
# mkdir /mnt/sabayon
# mount /dev/sda5 /mnt/sabayon  <--- change the "/dev/sda5" to whatever device your HDD root partition is on
# mount -t proc none /mnt/sabayon/proc
# mount -o bind /dev /mnt/sabayon/dev
# chroot /mnt/sabayon /bin/bash
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"
(chroot) # grep -v rootfs /proc/mounts > /etc/mtab

Now you can proceed as the root user of your installed version of SL. So you can install packages, uninstall packages and so on.

To exit from the chroot back to the LiveCD/DVD environment:

Code: Select all
(chroot} # exit
# umount /mnt/sabayon/dev
# umount /mnt/sabayon/proc
# umount /mnt/sabayon

(To get a reminder of all the current mount points, type "mount" with no parameters.)

If you have a separate boot partition to your root partition then the procedure is:

Code: Select all
$ su
Password:
# swapon /dev/sda7  <---- change the "/dev/sda7" to whatever device your HDD swap partition is on
# mkdir /mnt/sabayon
# mkdir /mnt/boot
# mount /dev/sda5 /mnt/sabayon  <--- change the "/dev/sda5" to whatever device your HDD root partition is on
# mount /dev/sda3 /mnt/boot  <--- change the "/dev/sda3" to whatever device your HDD /boot partition is on
# mount -t proc none /mnt/sabayon/proc
# mount -o bind /dev /mnt/sabayon/dev
# chroot /mnt/sabayon /bin/bash
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"
(chroot) # cp /proc/mounts /etc/mtab

Now you can proceed as the root user of your installed version of SL. So you can install packages, uninstall packages and so on.

To exit from the chroot back to the LiveCD/DVD environment:

Code: Select all
(chroot) # exit
# umount /mnt/sabayon/dev
# umount /mnt/sabayon/proc
# umount /mnt/sabayon
# umount /mnt/boot


EDIT (June 11, 2010 18:29 BST): Added the missing update to /etc/mtab for the chroot environment.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Mouse problems in KDE

Postby Sqens » Mon May 10, 2010 7:33

The only difference in the listed packages is that I have

x11-drivers/xf86-input-synaptics-1.2.1

as 1.2.2 does not appear in Entropy. I don't see any substantial differences in my xorg.conf, but here it is anyways.

Code: Select all
Section "Module"
    SubSection  "extmod"
       Option    "omit xfree86-dga"
    EndSubSection
    Load    "i2c"
    Load    "ddc"
    Load    "vbe"
    Load    "dri"
    Load    "glx"
    Load    "synaptics"
EndSection

Section "ServerFlags"
     Option    "AllowMouseOpenFail"    "true"
EndSection

Section "Monitor"
    Identifier    "Generic Monitor"
    VertRefresh    43 - 60
    HorizSync      28 - 80
EndSection


Section "Device"

    Identifier  "SabayonVga0"
    Driver      "nvidia"
    #BusID    "PCI:01:00"
    #Option "RenderAccel" "on"
    #Option "XAANoOffscreenPixmaps"
    #Option "BusType" "PCI"
    #Option "ColorTiling" "on"
    #Option "EnablePageFlip" "on"
    Option "UseEvents" "True"
    Option "LogoPath" "/usr/share/backgrounds/sabayonlinux-nvidia.png"
    Option "FlatPanelProperties" "Scaling = Centered"

EndSection



Section "Screen"

    Identifier    "Screen 0"
    Device        "SabayonVga0"
    Monitor       "Generic Monitor"
    Option       "AddARGBGLXVisuals" "true"

    DefaultDepth 24

    SubSection "Display"
        Depth           8
        ViewPort        0 0
        #Modes          "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           16
        ViewPort        0 0
        #Modes          "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           24
        ViewPort        0 0
        #Modes          "1024x768" "800x600" "640x480"
    EndSubsection

EndSection


Section "DRI"
    Mode 0666
EndSection

Section "ServerLayout"
    Identifier   "Main Layout"
    Screen 0    "Screen 0"
EndSection

Section "Extensions"
   #Option "Composite" "Enable"
EndSection


Hald is set to start at boot, and policy files 10-keymap.fdi and 10-x11-input.fdi are identical to yours, save for the keyboard layout. My Synaptics policy file is substantially different, but I can't figure out what my settings mean. Also, my policy folder is laid out slightly differently, but that probably doesn't matter.

Code: Select all
# pwd
/etc/hal/fdi/policy
# ls
10-keymap.fdi  10-ntfs3g.fdi  10-x11-input.fdi  11-x11-synaptics.fdi  90-vboxguest.fdi  99-keymap.fdi
# cat 11-x11-synaptics.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <!-- Arbitrary options can be passed to the driver using
             the input.x11_options property since xorg-server-1.5. -->

        <!-- Switch on shared memory, enables the driver to be configured at runtime -->
        <merge key="input.x11_options.SHMConfig" type="string">true</merge>

        <!-- Maximum movement of the finger for detecting a tap -->
        <merge key="input.x11_options.MaxTapMove" type="string">2000</merge>

        <!-- Enable vertical scrolling when dragging along the right edge -->
        <merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>

        <!-- Enable vertical scrolling when dragging with two fingers anywhere on the touchpad -->
        <merge key="input.x11_options.VertTwoFingerScroll" type="string">true</merge>

        <!-- Enable horizontal scrolling when dragging with two fingers anywhere on the touchpad -->
        <merge key="input.x11_options.HorizTwoFingerScroll" type="string">true</merge>

        <!-- Disable circular scrolling by default, this could cause issue to some touchpads -->
        <merge key="input.x11_options.CircularScrolling" type="string">false</merge>

        <!-- Strictly define buttons used for tapping -->
        <merge key="input.x11_options.TapButton1" type="string">1</merge>
        <merge key="input.x11_options.TapButton2" type="string">2</merge>
        <merge key="input.x11_options.TapButton3" type="string">3</merge>

    </match>

    <!-- MacBook 5 touchpad support -->
    <match key="info.capabilities" contains="input.touchpad">
      <match key="info.product" contains="Synaptics TouchPad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <!-- Arbitrary options can be passed to the driver using
             the input.x11_options property since xorg-server-1.5. -->
        <!-- EXAMPLE:
        <merge key="input.x11_options.LeftEdge" type="string">120</merge>
        -->
      </match>
      <match key="info.product" contains="AlpsPS/2 ALPS">
        <merge key="input.x11_driver" type="string">synaptics</merge>
      </match>
      <match key="info.product" contains="appletouch">
        <merge key="input.x11_driver" type="string">synaptics</merge>
      </match>
      <match key="info.product" contains="bcm5974">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.LeftEdge" type="string">0</merge>
        <merge key="input.x11_options.RightEdge" type="string">1280</merge>
        <merge key="input.x11_options.TopEdge" type="string">0</merge>
        <merge key="input.x11_options.BottomEdge" type="string">800</merge>
        <merge key="input.x11_options.ClickFinger1" type="string">1</merge>
        <merge key="input.x11_options.ClickFinger2" type="string">3</merge>
        <merge key="input.x11_options.ClickFinger3" type="string">2</merge>
        <merge key="input.x11_options.HorizEdgeScroll" type="string">0</merge>
        <merge key="input.x11_options.VertEdgeScroll" type="string">0</merge>
        <merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge>
        <merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge>
        <merge key="input.x11_options.HorizScrollDelta" type="string">0</merge>
        <merge key="input.x11_options.VertScrollDelta" type="string">40</merge>
        <merge key="input.x11_options.PressureMotionMinZ" type="string">10</merge>
        <merge key="input.x11_options.FingerLow" type="string">16</merge>
        <merge key="input.x11_options.FingerHigh" type="string">80</merge>
        <merge key="input.x11_options.FingerPress" type="string">256</merge>
        <merge key="input.x11_options.PalmDetect" type="string">1</merge>
        <merge key="input.x11_options.PalmMinWidth" type="string">10</merge>
        <merge key="input.x11_options.PalmMinZ" type="string">200</merge>
        <merge key="input.x11_options.MinSpeed" type="string">0.8</merge>
        <merge key="input.x11_options.MaxSpeed" type="string">1.2</merge>
        <merge key="input.x11_options.AccelFactor" type="string">0.10</merge>
        <merge key="input.x11_options.MaxTapMove" type="string">25</merge>
        <merge key="input.x11_options.MaxTapTime" type="string">223</merge>
        <merge key="input.x11_options.MaxDoubleTapTime" type="string">200</merge>
        <merge key="input.x11_options.TapButton1" type="string">0</merge>
        <merge key="input.x11_options.TapButton2" type="string">0</merge>
        <merge key="input.x11_options.TapButton3" type="string">0</merge>
        <merge key="input.x11_options.RTCornerButton" type="string">0</merge>
        <merge key="input.x11_options.RBCornerButton" type="string">0</merge>
        <merge key="input.x11_options.LTCornerButton" type="string">0</merge>
        <merge key="input.x11_options.LBCornerButton" type="string">0</merge>
      </match>
    </match>

  </device>
</deviceinfo>


My KDE mouse settings are the same as yours, and my keyboard model is set to Generic 104-key PC. Any of that help?
Sqens
Baby Hen
 
Posts: 19
Joined: Sat Feb 14, 2009 21:53

Re: Mouse problems in KDE

Postby Fitzcarraldo » Mon May 10, 2010 8:00

I would suggest doing the following as root user in a Konsole window:

Code: Select all
emerge --sync
layman -S
emerge -1v xf86-input-synaptics
emerge -1v xf86-input-evdev
equo database spmsync

i.e. compile and install via Portage the latest synaptics driver and evdev driver to match the X.Org Server you have installed. The last command is simply to tell Entropy what you have done via Portage.

(I would also recommend changing your keyboard layout to Evdev-managed keyboard, although that is very unlikely to have anything to do with your mouse.)

Give those a try.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Mouse problems in KDE

Postby Sqens » Tue May 11, 2010 18:35

Merging those brought in a bunch of dependencies, including xorg-server-1.8, which broke X. I tried emerging nvidia-drivers, but it wouldn't compile. Eventually I reverted to the entropy packages and started over with --nodeps. We'll see if it helps.

UPDATE: Nope, didn't help.
Sqens
Baby Hen
 
Posts: 19
Joined: Sat Feb 14, 2009 21:53

Re: Mouse problems in KDE

Postby Fitzcarraldo » Tue May 11, 2010 23:19

OK. I assume you've still got xorg-server-1.7.6 installed? You can stop the merge pulling in xorg-server-1.8.0 by adding the following line to the file /etc/portage/package.mask

Code: Select all
>=x11-base/xorg-server-1.8.0


Then try merging those X.Org driver packages again.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Mouse problems in KDE

Postby Sqens » Wed May 12, 2010 8:46

With xorg-server-1.8.0 masked, there are no other dependencies to pull in, so it should give the same result as with --nodeps, right?
Sqens
Baby Hen
 
Posts: 19
Joined: Sat Feb 14, 2009 21:53

Next

Return to 3D Desktops and Window Managers

Who is online

Users browsing this forum: No registered users and 1 guest