Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
serial mouse working in 2.4 but not in 2.6
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
butchie
n00b
n00b


Joined: 13 Oct 2004
Posts: 48

PostPosted: Mon Nov 29, 2004 2:23 pm    Post subject: serial mouse working in 2.4 but not in 2.6 Reply with quote

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
View user's profile Send private message
dtor
Guru
Guru


Joined: 19 Jan 2004
Posts: 461
Location: Indiana, USA

PostPosted: Mon Nov 29, 2004 2:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
butchie
n00b
n00b


Joined: 13 Oct 2004
Posts: 48

PostPosted: Mon Nov 29, 2004 3:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
dtor
Guru
Guru


Joined: 19 Jan 2004
Posts: 461
Location: Indiana, USA

PostPosted: Mon Nov 29, 2004 3:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
butchie
n00b
n00b


Joined: 13 Oct 2004
Posts: 48

PostPosted: Mon Nov 29, 2004 5:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
butchie
n00b
n00b


Joined: 13 Oct 2004
Posts: 48

PostPosted: Mon Nov 29, 2004 6:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
robet
l33t
l33t


Joined: 06 Sep 2004
Posts: 807
Location: Earth/NorthAmerica/USA/NY

PostPosted: Mon Nov 29, 2004 7:43 pm    Post subject: Reply with quote

Try g++ inputattach -O2[O2 is not really necessary] -o inputattach.c
_________________
no software patents in europe! | adopt an unanswered post.


Last edited by robet on Mon Nov 29, 2004 7:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
robet
l33t
l33t


Joined: 06 Sep 2004
Posts: 807
Location: Earth/NorthAmerica/USA/NY

PostPosted: Mon Nov 29, 2004 7:44 pm    Post subject: Reply with quote

I think you may also be doing your compile wrong, try g++ inputattach.c -o [-O2 here if you really want]inputattach[.h i think, maybe nothing].
_________________
no software patents in europe! | adopt an unanswered post.
Back to top
View user's profile Send private message
dtor
Guru
Guru


Joined: 19 Jan 2004
Posts: 461
Location: Indiana, USA

PostPosted: Tue Nov 30, 2004 5:57 am    Post subject: Reply with quote

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
View user's profile Send private message
butchie
n00b
n00b


Joined: 13 Oct 2004
Posts: 48

PostPosted: Tue Nov 30, 2004 1:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
dtor
Guru
Guru


Joined: 19 Jan 2004
Posts: 461
Location: Indiana, USA

PostPosted: Tue Nov 30, 2004 2:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
butchie
n00b
n00b


Joined: 13 Oct 2004
Posts: 48

PostPosted: Tue Nov 30, 2004 2:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
butchie
n00b
n00b


Joined: 13 Oct 2004
Posts: 48

PostPosted: Wed Dec 01, 2004 11:08 am    Post subject: Reply with quote

:D 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 :oops: : 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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum