View previous topic :: View next topic |
Author |
Message |
butchie n00b
Joined: 13 Oct 2004 Posts: 48
|
Posted: Mon Nov 29, 2004 2:23 pm Post subject: serial mouse working in 2.4 but not in 2.6 |
|
|
As a normal newbie, I installed gentoo 2.4 at first and learned a lot while configuring everything to work. Then I upgraded to a 2.6 kernel, checked the necessaty serial mouse support in the menuconfig, did the necessary change in xorg.conf
Code: | # For kernel 2.6
Option "Device" "/dev/input/mice"
# For kernel 2.4
# Option "Device" "/dev/ttyS0" |
X loads, kdm show up, KDE works but the mouse is not working.
Code: | cat /dev/input/mice |
doesn't give any console output when I move the mouse.
If I try to load X with /dev/ttyS0 I get an error. If I choose the 2.4 kernel in GRUB, I get my mouse back.
Loading the 2.6 kernel, I do have a strange message in dmesg :
Code: | Failed to disable AUX port, but continuing anyway... Is this a SiS?
If AUX port is really absent please use the 'i8042.noaux' option.
(...)
mice: PS/2 mouse device common for all mice |
Could this i8042.noaux thing an issue ? Where to put this option ?
In summary, how can I get my serial mouse working with linux 2.6 ? |
|
Back to top |
|
|
dtor Guru
Joined: 19 Jan 2004 Posts: 461 Location: Indiana, USA
|
Posted: Mon Nov 29, 2004 2:58 pm Post subject: |
|
|
You would need to load serport and sermouse modules and also find and use inputattach utility that does mouse initialization from userspace. _________________ Dmitry |
|
Back to top |
|
|
butchie n00b
Joined: 13 Oct 2004 Posts: 48
|
Posted: Mon Nov 29, 2004 3:20 pm Post subject: |
|
|
dtor wrote: | You would need to load serport and sermouse modules and also find and use inputattach utility that does mouse initialization from userspace. |
Thanks, but ... can you explain a little, for a new to linux ? Is it in make menuconfig that I activate these serport and sermouse modules ?
And where do I find inputattach (I didn't find it in portage)?
Thanks for your help. |
|
Back to top |
|
|
dtor Guru
Joined: 19 Jan 2004 Posts: 461 Location: Indiana, USA
|
Posted: Mon Nov 29, 2004 3:53 pm Post subject: |
|
|
Look here:
Device Drivers ---> Input device support ---> Serial port line discipline
Device Drivers ---> Input device support ---> Mice -> Serial mouse
You could grab inputattach sources from here:
http://cvs.sourceforge.net/viewcvs.py/linuxconsole/ruby/utils/inputattach.c?rev=1.21
Just comile and run.
Btw, you could still use /dev/ttyS0 to access mouse in 2.6. ALthough this method is deprecated it still should work. _________________ Dmitry |
|
Back to top |
|
|
butchie n00b
Joined: 13 Oct 2004 Posts: 48
|
Posted: Mon Nov 29, 2004 5:14 pm Post subject: |
|
|
Quote: | Device Drivers ---> Input device support ---> Serial port line discipline
Device Drivers ---> Input device support ---> Mice -> Serial mouse |
These are ok in my kernel.
Whith /dev/ttyS0, I get
Code: | root@tux fb # cat /dev/ttyS0
cat: /dev/ttyS0: Aucun périphérique ou adresse |
which I don't get with /dev/input/mice
I must be really dumb but how to you compile a .c file ? I must say that what I liked in gentoo is "emerge" etc... But I understand knowing how to compile a .c program must be usefull. I am googling through some howto pages ... but if you can give me a hint or two, I will appreciate. |
|
Back to top |
|
|
butchie n00b
Joined: 13 Oct 2004 Posts: 48
|
Posted: Mon Nov 29, 2004 6:21 pm Post subject: |
|
|
I tried Code: | gcc -O2 -o inputattach inputattach.c | but it didn't do it (got a bunch of error message and no binary) |
|
Back to top |
|
|
robet l33t
Joined: 06 Sep 2004 Posts: 807 Location: Earth/NorthAmerica/USA/NY
|
|
Back to top |
|
|
robet l33t
Joined: 06 Sep 2004 Posts: 807 Location: Earth/NorthAmerica/USA/NY
|
|
Back to top |
|
|
dtor Guru
Joined: 19 Jan 2004 Posts: 461 Location: Indiana, USA
|
Posted: Tue Nov 30, 2004 5:57 am Post subject: |
|
|
Ok, a better version here: http://www.geocities.com/dt_or/misc/
inputattach.gz contains precompiled executable if you care to run it. It is dynamically liked so it may not run (depending on your glibc version). _________________ Dmitry |
|
Back to top |
|
|
butchie n00b
Joined: 13 Oct 2004 Posts: 48
|
Posted: Tue Nov 30, 2004 1:12 pm Post subject: |
|
|
dtor wrote: | Ok, a better version here: http://www.geocities.com/dt_or/misc/
inputattach.gz contains precompiled executable if you care to run it. It is dynamically liked so it may not run (depending on your glibc version). |
I gunzip the file, chmod 777 and tried to execute inputattach but I get :
Code: | -bash: inputattach: command not found | Do I miss something about making a file executable ?
When I try to compile le source file ( g++ inputattach.c -o inputattach with or without -O2) i get a bunch of errors such as :
Code: | In file included from /usr/include/linux/jiffies.h:7,
from /usr/include/linux/sched.h:12,
from /usr/include/asm/irq.h:14,
from /usr/include/linux/irq.h:20,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:12,
from /usr/include/linux/serio.h:13,
from inputattach.c:36:
/usr/include/linux/seqlock.h: Dans function « void write_seqlock(seqlock_t*) »:
/usr/include/linux/seqlock.h:52: error: `spin_lock' undeclared (first use this
function)
/usr/include/linux/seqlock.h:52: error: (Each undeclared identifier is reported
only once for each function it appears in.)
/usr/include/linux/seqlock.h: Dans function « void write_sequnlock(seqlock_t*)
»:
/usr/include/linux/seqlock.h:61: error: `spin_unlock' undeclared (first use
this function)
/usr/include/linux/seqlock.h: Dans function « int write_tryseqlock(seqlock_t*)
»:
/usr/include/linux/seqlock.h:66: error: `spin_trylock' undeclared (first use
this function)
In file included from /usr/include/linux/sched.h:13,
from /usr/include/asm/irq.h:14,
from /usr/include/linux/irq.h:20,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:12,
from /usr/include/linux/serio.h:13,
from inputattach.c:36:
/usr/include/linux/rbtree.h: At global scope:
/usr/include/linux/rbtree.h:128: error: erreur d'analyse syntaxique before `new
'
In file included from /usr/include/asm/semaphore.h:39,
from /usr/include/linux/sched.h:18,
from /usr/include/asm/irq.h:14,
from /usr/include/linux/irq.h:20,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:12,
from /usr/include/linux/serio.h:13,
from inputattach.c:36:
/usr/include/linux/wait.h: Dans function « int
waitqueue_active(wait_queue_head_t*) »:
/usr/include/linux/wait.h:79: error: `list_empty' undeclared (first use this
function)
(... and more) |
I could probably buy a ps/2 mouse but I would like to learn something about this... |
|
Back to top |
|
|
dtor Guru
Joined: 19 Jan 2004 Posts: 461 Location: Indiana, USA
|
Posted: Tue Nov 30, 2004 2:23 pm Post subject: |
|
|
Hmm.. how did you try to run it? Simply "inputattach" or "./inputattach". The second form shoudl work. The first form would likely not work since current directory is very seldom included in PATH because it is very insecure.
As far as compiling - I am not sure.. Do you have kernel headers installed? _________________ Dmitry |
|
Back to top |
|
|
butchie n00b
Joined: 13 Oct 2004 Posts: 48
|
Posted: Tue Nov 30, 2004 2:49 pm Post subject: |
|
|
dtor wrote: | Hmm.. how did you try to run it? Simply "inputattach" or "./inputattach". The second form shoudl work. The first form would likely not work since current directory is very seldom included in PATH because it is very insecure. |
Thank you for this explaination. Yes, it launched but it says "Bad address" (I used the microsoft option as it is a regular 2 btn ms mouse).
dtor wrote: | As far as compiling - I am not sure.. Do you have kernel headers installed? | Well, apparently I have the linux-headers installed (for 2.4 kernel) but not the linux26-headers. Currently emerging them. |
|
Back to top |
|
|
butchie n00b
Joined: 13 Oct 2004 Posts: 48
|
Posted: Wed Dec 01, 2004 11:08 am Post subject: |
|
|
OK now it works !
dmesg shows
Code: | Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
mice: PS/2 mouse device common for all mice
|
then cat /dev/ttyS0 showed the waited garbage. A last change to xorg.conf to reflect this and here we go : the mouse is working.
But I'm a bad boy : I did several things at the same time : recompiled the kernel with serial mouse and ps/2 mouse support and emerged the linux26-headers and emerged glibc.
So I don't which of these or all of these were necessary. Anyway thanks ! |
|
Back to top |
|
|
|