LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-31-2005, 03:46 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
PS/2 and USB mouse with Kernel 2.6


Hi,

My problem is a little complicated(may or may not be but for now it seems so). I will explain it in some detail.

Situation 1:
My Debian system (stable) was running fine with 2.6.8-2-386 kernel version. I mean the PS/2 mouse was working fine and I was able to boot into X Windows. At that time in my BIOS, I had disabled the 'USB booting and Legacy' option. Everything worked fine.
My Xorg.conf file looked like:
Code:
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands:
#
#   cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom
#   sudo sh -c 'md5sum /etc/X11/xorg.conf >/var/lib/xfree86/xorg.conf.md5sum'
#   sudo dpkg-reconfigure xserver-xorg

Section "Files"
	FontPath	"unix/:7100"			# local font server
	# if the local font server has problems, we can fall back on these
	FontPath	"/usr/lib/X11/fonts/misc"
	FontPath	"/usr/lib/X11/fonts/cyrillic"
	FontPath	"/usr/lib/X11/fonts/100dpi/:unscaled"
	FontPath	"/usr/lib/X11/fonts/75dpi/:unscaled"
	FontPath	"/usr/lib/X11/fonts/Type1"
	FontPath	"/usr/lib/X11/fonts/CID"
	FontPath	"/usr/lib/X11/fonts/100dpi"
	FontPath	"/usr/lib/X11/fonts/75dpi"
        # paths to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection

Section "Module"
	Load	"GLcore"
	Load	"bitmap"
	Load	"dbe"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"record"
	Load	"type1"
	Load	"v4l"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"keyboard"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"true"
	Option		"ZAxisMapping"		"4 5"
EndSection
Section "InputDevice"
	Identifier	"Generic Mouse"
	Driver		"mouse"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"PS/2"
	Option		"Emulate3Buttons"	"true"
	Option		"ZAxisMapping"		"4 5"
EndSection

Section "Device"
	Identifier	"Intel Corporation 82852/855GM Integrated Graphics Device"
	Driver		"i810"
	BusID		"PCI:0:2:0"
	VideoRam	8192
	Option		"UseFBDev"		"true"
EndSection

Section "Monitor"
	Identifier	"Generic Monitor"
	Option		"DPMS"
	HorizSync	28-50
	VertRefresh	43-75
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"Intel Corporation 82852/855GM Integrated Graphics Device"
	Monitor		"Generic Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		1
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice	"Generic Mouse"
EndSection

Section "DRI"
	Mode	0666
EndSection
Situation 2:
Now for some reason I realized that I will have to enable the ''USB booting and Legacy' as in future I would want to boot through USB device also. Basically this option simulates the USB keyborad and Mouse as PS/2 keyboard and mouse. As soon as I enable this option, my X-windows won;t start and it says cannot find core pointer and takes me to the text mode after disableing the X session.

Situation 3:
Then I found that the mandrake LE 2005 version would just work fine with that 'USB legacy.." option enabled. My mouse worked and I was able to go into Graphical mode. The kernel version was 2.6.11-6. So I downloaded the linux kernel source 2.6.11.6 and copied the config file of Mandrake on to my Debian system and compiled the kernel with the same configuration with which mandrake was working fine.

When I booted my debian system with mandrake compiled kernel and the 'USB...' option enabled in the BIOS, I was able to go to into the X-windows system but my mouse won;t work. My keyboard worked fine. So basically everything was fine except that my system won;t work with the PS/2 mouse. Then I attached the USB mouse to my system and the USB mouse worked fine but my PS/2 won't work. The Xorg.conf file is same as the one above posted,


I visited a couple of discussion in this forrum to get my PS/2 mouse working with the 'USB booting and legacy option enabled' as below but they did not worked for me:
http://www.linuxquestions.org/questi...05/04/1/309545
http://www.linuxquestions.org/questi...hreadid=305242

Then I installed the program gpm and mdetect. They seemed to work fine but still my PS/2 mouse won;t work in X-windows system.

One interesting observation was that with Debian Kernel 2.4 everything is working fine. PS/2 mouse works. But for that I had to make the following change in my xorg.conf file:
I removed the Generic Mouse section and made the following changes so now I had only one mouse section as compared to two in kernel 2.6
Code:
Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"true"
	Option		"ZAxisMapping"		"4 5"
EndSection
I have heard that there was been some major changes in PS/2 mouse configuration in upgrading from kernel 2.4 to 2.6 as referred by this article:
http://www.informatik.uni-freiburg.d...#serio_userdev


Let me know if you guys need any more information(like lspci or ls of some directory). I will be glad to post it.

So the bottom line is How can I get my PS/2 mouse working in Debian Kernel 2.6 with "USB booting and Legacy option' enabled.

Thank you for the patience.
 
Old 08-31-2005, 04:57 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Have you checked that your mouse is actually being detected on /dev/psaux or /dev/input/mice? If you're running gpm, does it work with the mouse? If so, you should probably be activating gpm's repeat mode and using /dev/gpmdata for the device.
 
Old 08-31-2005, 05:17 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Yes the mouse is detected on /dev/psaux and /dev/input/mice. This is because my USB mouse works fine when attached but PS/2 mouse does not work.

When i do:

cat /dev/psaux

and

cat /dev/input/mice

and when I move the USB mouse I get garbled characters on the screen which means both the devices are attached with the USB mouse.

Any thoughts?
 
Old 08-31-2005, 05:19 PM   #4
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally posted by Matir
Have you checked that your mouse is actually being detected on /dev/psaux or /dev/input/mice? If you're running gpm, does it work with the mouse? If so, you should probably be activating gpm's repeat mode and using /dev/gpmdata for the device.
Also how do I activate gpm's repeat mode and use /dev/gpmdata?
 
Old 08-31-2005, 05:30 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
man gpm(8):
Quote:
-R[name]
Causes gpm to act as a repeater: any mouse data received while
in graphic mode will be produced on the fifo /dev/gpmdata in
protocol name, given as an optional argument (no space in
between !). In principle, you can use the same names as for the
-t option, although repeating into some protocols may not be
implemented for a while. In addition, you can specify raw as
the name, to repeat the mouse data byte by byte, without any
protocol translation. If name is omitted, it defaults to msc.
Using gpm in repeater mode, you can configure the X server to
use its fifo as a mouse device. This option is useful for bus-
mouse owners to override the single-open limitation. It is also
an easy way to manage those stupid dual-mode mice which force
you to keep the middle button down while changing video mode.
The option is forced on by the -M option.
Then just place /dev/gpmdata in the place of /dev/input/mice or /dev/psaux in your X config.
 
Old 08-31-2005, 06:42 PM   #6
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
I tried what you suggested, but the behaviour remains the same. Is there any way by which I can find if there is any data generated on the PS/2 port. There has to be something with the Debian settings which requires tweaking because as I said earlier it works fine with Mandrake 10.2(LE 2005).

Any one has any idea?
 
Old 09-01-2005, 09:55 AM   #7
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Rep: Reputation: 30
I had problems with the 2.6 kernel and the mouse. I admit I have no usb mouse, just a PS2 one. First problem where X would not start at all was fixed by Modprobe mousedev. Then X would start but the mouse pointer was frozen. Modprobe psmouse fixed this and all has been ok since then. If by some chance this does work. Add psmouse on a separate line in /etc/modules. Nigel. aka farpoint.
 
Old 09-01-2005, 11:56 AM   #8
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
I have tried loading the mousedev mopdule also but my PS/2 would just freeze if I enable t he 'USB booting and Legacy' ooption. I don;t blame the BISO for this because RedHat, Fedora and Mandrake(all are the derivatives of RedHat) all seems to work fine in this situation as I said before.

Still need some help. Does anyone know how Fedora and Debian are different while talking to the PS/2 mouse? I mean do they directly talk to the Hardware device or they depend upon the BIOS to talk to the Hardware.
 
Old 09-01-2005, 12:43 PM   #9
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Hrrm... with gpm running, the mouse works in the console?
 
Old 09-01-2005, 12:57 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Yes the USB mouse works fine in text mode console and in GNOME also. But when only PS/2 mouse is attached the pointer just freezes on the screen although my keyboard works fine? Also somebody suggested me to load the usb driver/module first and then the psmouse module while booting. How can I do that? Do I have to add something in /etc/rc.S/ directory.

Please help me.
 
Old 09-01-2005, 01:04 PM   #11
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you are trying to fix the PS/2 mouse, why would you need the usb driver?

Also, does the PS/2 mouse work in the console with GPM? If not, the problem is kernel-level. If so, the problem is with X.
 
Old 09-01-2005, 02:14 PM   #12
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
thanks for looking into my mysterious problem.

Well, actually, I want that the users should be able to use both the mouse, which ever they prefer : PS/2 and USB.

No my PS/2 mouse does not work with GPM nor without GPM. It does not work at all. The system works fine with USB mouse.

And as I told before the Mandrake and Fedora works fine i.e PS/2 mouse and USB mouse both work. How can I compare the mouse settings of the two system(debian and Mandrake/Fedora) at the kernel level. What parameters do I need to inspect. I am compling psmouse as a module right now.

Also does anyone knows about the how we change the order in which the kernel loads the modules?
 
Old 09-01-2005, 02:34 PM   #13
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Look in the kernel config files to compare the kernel setups. However, virtually all kernels should have psmouse support. Have you tried 'dmesg | grep -i mouse'?
 
Old 09-01-2005, 03:12 PM   #14
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
I took the .config file from the Mandrake(kerenel version 2.6.11-6-upGB) and compiled the Linux kernel on debian with it. I downloaded the linux-2.6.11 source code from kernel.org. But nothing helped much. The situation remains the same.

Here is the output of the command that you had asked:

Code:
debian:~# dmesg | grep -i mouse
input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1d.0-2
mice: PS/2 mouse device common for all mice
debian:~#
 
Old 09-01-2005, 05:42 PM   #15
rednuht
Member
 
Registered: Aug 2005
Posts: 239
Blog Entries: 1

Rep: Reputation: 31
what is the ouput of (as root)
lsmod
?
 
  


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
USB Mouse on a 2.6.5 Kernel atheist Linux - Software 1 06-11-2004 06:30 PM
kernel 2.6.5 and my USB mouse ababkin Linux - Newbie 4 04-04-2004 02:27 PM
Kernel 2.6.4 -- no USB mouse dushkinup Slackware 2 03-31-2004 02:46 PM
ms usb mouse with 2.6 kernel mindcry Linux - Hardware 1 01-06-2004 04:55 AM
usb mouse and kernel N_A_J_M Linux - Software 2 11-05-2002 08:34 PM

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

All times are GMT -5. The time now is 01:11 AM.

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