LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-13-2010, 11:12 AM   #1
rpigna
LQ Newbie
 
Registered: Jun 2004
Location: Trento (Italy)
Distribution: Kubuntu 9.10
Posts: 27

Rep: Reputation: 15
Mouse wheel does not work properly


Hi, I just installed kubuntu 9.10 on my new PC (HP Pavillion). I'm new to ubuntu, I had some experience before with mandriva.

Most things work properly but there is a strange problem with the mouse (USB), and more precisely with that little wheel which stands between the two buttons.

Turning it when the pointer is on some web page (using firefox) I expect the page to scroll.

So I turn the wheel in one direction and the page scroll up. Good!
Then I turn the wheel in the opposite direction and the page scroll... up again!

I tried with other programs (konqueror, kmail)... and still the same happens, I can only scroll to the top.

Anybody has ideas on how to solve it?
 
Old 01-14-2010, 10:21 AM   #2
Laurens73
Member
 
Registered: Aug 2009
Location: Zeewolde, Flevoland NL
Distribution: Debian squeeze (Gnome) on netbooks; Debian Lenny on servers and Debian wheezy (XFCE) on new laptops
Posts: 144

Rep: Reputation: 23
In most cases it's very easy to configure that setting by editing /etc/X11/xorg.conf as root or sudoer:

In the part wich could look like this:
Code:
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/mouse"
you should enter the next line in the part of the options as an extra line among them (the order makes no difference):

Code:
Option "ZAxisMapping" "4 5"
After restarting X the mouse should work as you wish.
 
Old 01-14-2010, 10:34 AM   #3
rpigna
LQ Newbie
 
Registered: Jun 2004
Location: Trento (Italy)
Distribution: Kubuntu 9.10
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for your help.

As I mentioned, I'm new to ubuntu.
It seems there is no xorg.conf file anywhere.

Code:
pignatel@pignatel:~$ sudo less /etc/X11/xorg.conf
/etc/X11/xorg.conf: Nessun file o directory
pignatel@pignatel:~$ sudo ls /etc/X11/
app-defaults  cursors  de  default-display-manager  fonts  fr  ja  rgb.txt  ro  sv  X  xinit  xkb  Xresources  Xsession  Xsession.d  Xsession.options  XvMCConfig  Xwrapper.config
pignatel@pignatel:~$ cd /
pignatel@pignatel:/$ sudo find -name xorg.conf
find: "xorg.conf": Nessun file o directory
Where is the mouse configuration?
 
Old 01-14-2010, 11:58 AM   #4
Laurens73
Member
 
Registered: Aug 2009
Location: Zeewolde, Flevoland NL
Distribution: Debian squeeze (Gnome) on netbooks; Debian Lenny on servers and Debian wheezy (XFCE) on new laptops
Posts: 144

Rep: Reputation: 23
Hmmm... indeed in the newer versions the file isnīt created automaticly if not needed. If the file isn't there the system will autodetect every setting. Well... let's create one by our own. If this version doesn't work, we'll need to create a full version with keyboard, mouse, video, etc, just uncomment the other parts if X asks for it. If you use an other video card like ATI or Intel, I'll provide you an other version if you need all of them.

/etc/X11/Xorg.conf
Code:
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

# This part loads modules to use extended character sets, fonts and OpenGL.
Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

#If using twin view uncomment this part
Section "ServerFlags"
#    Option         "Xinerama" "0"
EndSection

# Mouse settings:
Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

#Here you can choose your keyboard layout and general behaviour:
Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "CoreKeyboard"
    Option         "XkbRules"         "xorg"
    Option         "XkbModel"         "pc105"
    Option         "XkbLayout"        "us"
    Option         "XkbVariant"       "alt-intl"
    Option         "XkbOptions"       "lv3:ralt_switch"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
#    VendorName     "Unknown"
#    ModelName      "BenQ FP931"
#    HorizSync       31.0 - 83.0
#    VertRefresh     56.0 - 76.0
#    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
#    Driver         "nvidia"
#    VendorName     "NVIDIA Corporation"
#    BoardName      "GeForce 9800 GTX/9800 GTX+"
#    Option         "NoLogo" "True"
#Coolbits provide NVIDIA overclocking with nvclock
#    Option         "Coolbits" "1"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
#    Option         "TwinView" "1"
#    Option         "TwinViewXineramaInfoOrder" "CRT-0"
#    Option         "metamodes" "CRT: nvidia-auto-select +0+0, DFP: 1280x720 +0+1024"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
If you use an other type of NVIDIA card, just install the proprietrary drivers in the driver management (if that's allowed in your country, some countries don't allow the use of proprietrary software in open source machines, like USA), and uncomment the driver part in the screen section to use overclocking and the use of OpenGL 3D.

But... perhaps the best thing to do first is testing if the new file works with your existing configuration before starting some other things
 
Old 01-18-2010, 08:26 AM   #5
rpigna
LQ Newbie
 
Registered: Jun 2004
Location: Trento (Italy)
Distribution: Kubuntu 9.10
Posts: 27

Original Poster
Rep: Reputation: 15
I'm back to work after the week end, and I tried your solution.

Well, now I have a /etc/X11/xorg.conf file, with the content you posted. Then I have restarted the computer and... no change at all. The wheel keep scrolling in only one direction...
 
Old 01-18-2010, 10:31 AM   #6
Laurens73
Member
 
Registered: Aug 2009
Location: Zeewolde, Flevoland NL
Distribution: Debian squeeze (Gnome) on netbooks; Debian Lenny on servers and Debian wheezy (XFCE) on new laptops
Posts: 144

Rep: Reputation: 23
Strange... well in that case you're free to remove the file we've created.

An other thing you can do (will give an effect immediatly, but will not be saved automaticly) is the next command:

Code:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
This forces the mapping of your currently used mouse. I don't know exactly wich position stands for wich button or scroll direction, but 123 are the first three mouse buttons, and depending on the model 45 stands for a scroll wheel and 67 can mean a scroll wheel or the 4th and 5th button. Feel free to expiriment with the order of the numbers. If you got a mouse with 4 buttons or more, or 2 scroll wheels or more you also can expiriment with maps above the number 8 and above in it.

If you've found out the right combination, and if it works at your machine, we can put this into ~/.xinitrc as an extra command wich will be executed every time X starts.
 
1 members found this post helpful.
Old 01-18-2010, 10:52 AM   #7
rpigna
LQ Newbie
 
Registered: Jun 2004
Location: Trento (Italy)
Distribution: Kubuntu 9.10
Posts: 27

Original Poster
Rep: Reputation: 15
This was of great help, I think. Now I'm convinced it is an hardware problem.

Normally, does not matter in which direction I roll, it scrolls up.

If I run

Code:
pignatel@pignatel:~$ xmodmap -e "pointer = 1 2 3 7 5 6 4 8"
Warning: Only changing the first 8 of 32 buttons.
then the scroll up does not work anymore and the scroll down works... rarely. I mean, If I keep rolling, every couple of seconds it moves a bit (in the right direction). Similarly for other change which affect 4 but not 5.

My opinion is that my new mouse is broken and there is some contact inside it. When I scroll down it send only rarely the correct signal of "Page Down" and often the wrong signal "Page Up". Usually I can't see the few correct "Page Down" because of the many "Page Up".

Is it reasonable?
 
Old 01-18-2010, 11:02 AM   #8
rpigna
LQ Newbie
 
Registered: Jun 2004
Location: Trento (Italy)
Distribution: Kubuntu 9.10
Posts: 27

Original Poster
Rep: Reputation: 15
Solved.

I just took my old mouse and... works!

Thanks for your help!
 
Old 01-18-2010, 11:05 AM   #9
Laurens73
Member
 
Registered: Aug 2009
Location: Zeewolde, Flevoland NL
Distribution: Debian squeeze (Gnome) on netbooks; Debian Lenny on servers and Debian wheezy (XFCE) on new laptops
Posts: 144

Rep: Reputation: 23
You always can test it by connecting an other mouse if the problem persists. If the mouse is broken, the effects can be very strange idd. Is your problem after changing still there, then it has to be a software problem, or your usb or ps/2 port is broken.
 
Old 01-18-2010, 11:06 AM   #10
Laurens73
Member
 
Registered: Aug 2009
Location: Zeewolde, Flevoland NL
Distribution: Debian squeeze (Gnome) on netbooks; Debian Lenny on servers and Debian wheezy (XFCE) on new laptops
Posts: 144

Rep: Reputation: 23
Quote:
Originally Posted by rpigna View Post
Solved.

I just took my old mouse and... works!

Thanks for your help!
Ah, looks like we've been posting at the same time You're welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kanotix: computer recognizes PS/2 optical wheel mouse, but mouse does not work.. karisu123 Linux - Hardware 1 01-02-2007 03:30 AM
ge mouse - scroll wheel doesn't work schneidz Linux - Hardware 5 12-08-2006 02:13 AM
Getting the Mouse Wheel to work TheHateCrew Linux - Hardware 3 09-15-2004 02:21 AM
I know, I know... but please I cant my wheel mouse to work dcruz Linux - Newbie 3 07-10-2003 02:41 AM
USB mouse wheel not working properly bongski55 Slackware 2 06-17-2003 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 11:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration