Tiny Core Linux

Tiny Core Base => CorePlus => Topic started by: t18 on December 14, 2024, 12:39:36 AM

Title: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 14, 2024, 12:39:36 AM
That's the last piece for my Pentium 166 mosaic.

I've put the following snippet in xorg.conf.d but unsuccessfully:

Code: [Select]
Section "InputClass"
Identifier "Mouse0"
MatchIsPointer "On"
MatchDevicePath "/dev/ttyS0"
MatchDriver "mouse"
Option "EmulateWheel" "On"
Option "EmulateWheelButton" "2"
EndSection

Trying to use xorg.conf in the traditional way instead, the following snippet disables the keyboard as well:

Code: [Select]
Section "ServerFlags"
Option "AutoAddDevices" "False"
EndSection

Anything I can do?
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: Juanito on December 14, 2024, 02:36:14 AM
You could try starting the gui without any xorg conf or snippets and then examine the xorg log to see what is detected and if any errors are found.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 14, 2024, 07:51:17 AM
The attached one is the Xorg.0.log without any config file.

It seems there is no track of pointers.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: Juanito on December 14, 2024, 08:25:02 AM
I'm not sure if libinput and/or xf86-input-libinput can handle a serial mouse?

You might need to go back to xf86-input-evdev, but I would check the libinput documentation first.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 14, 2024, 10:16:43 AM
It seems not to be any track of serial devices on the Libinput documentation.

I've found somewhere references to evdev + input-attach or xf86-input-mouse (not xf86-input-VMmouse, I guess). Are there packages available on TCL?
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: Rich on December 14, 2024, 10:24:20 AM
Hi t18
Try adding the boot code:
Code: [Select]
i8042.nopnpReboot and see if anything changed.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: Juanito on December 14, 2024, 10:48:55 AM
You would need to build xf86-input-evdev, see http://www.tinycorelinux.net/7.x/x86/tcz/src/xf86-input-evdev/ or xf86-input-mouse.

It might be easier to install tc-5.x and see if it’s going to work first.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 14, 2024, 02:16:55 PM
Hi t18
Try adding the boot code:
Code: [Select]
i8042.nopnpReboot and see if anything changed.

Everything slower and no mouse detection.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 14, 2024, 02:18:36 PM
You would need to build xf86-input-evdev, see http://www.tinycorelinux.net/7.x/x86/tcz/src/xf86-input-evdev/ or xf86-input-mouse.

It might be easier to install tc-5.x and see if it’s going to work first.

I'll try 5.x as soon as I find another hard drive.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: CNK on December 16, 2024, 10:33:24 PM
On x86_64 I'm using the last xf86-input-evdev.tcz extension (from TC13) instead of libinput with the current Xorg in TC15 and it works. I haven't tried a serial mouse though. I do know that Xvesa works with serial mice.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 21, 2024, 11:17:54 AM
Installed TCL 5.4 but evdev doesn't detect any pointer.

Installed also xf86-input-mouse without any changes. I haven't found any reference on how configuring it (if necessary). The posts available on the web are generally outdated and it's difficult to align them to a specific Xorg version.

Yes, Xvesa supports serial mice but the available screen resolutions are lower than on Xorg.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: Juanito on December 21, 2024, 11:33:31 AM
Do you need something like this:
Code: [Select]
Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
# Option     "Protocol" "auto"
# Option     "Device" "/dev/mouse"
# Option     "ZAxisMapping" "4 5 6 7"
    Option "Protocol"    "Microsoft"
    Option "Device"      "/dev/ttyS0"
    Option "Emulate3Buttons"
EndSection
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: CNK on December 21, 2024, 10:45:32 PM
I can't find the exact man pages for the Xorg version in TC15, but this is for Debian with Xorg 21.1.7 vs 21.1.9 in TC15:
xorg.conf(5) (https://manpages.debian.org/bookworm/xserver-xorg-core/xorg.conf.5.en.html)
mouse(4) (https://manpages.debian.org/bookworm/xserver-xorg-input-mouse/mousedrv.4.en.html)
evdev(4) (https://manpages.debian.org/bookworm/xserver-xorg-input-evdev/evdev.4.en.html)
libinput(4) (https://manpages.debian.org/bookworm/xserver-xorg-input-libinput/libinput.4.en.html)
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 22, 2024, 05:11:08 AM
I can't find the exact man pages for the Xorg version in TC15...

It seems some pages are just missing.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 22, 2024, 05:19:17 AM
Do you need something like this:
Code: [Select]
Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
# Option     "Protocol" "auto"
# Option     "Device" "/dev/mouse"
# Option     "ZAxisMapping" "4 5 6 7"
    Option "Protocol"    "Microsoft"
    Option "Device"      "/dev/ttyS0"
    Option "Emulate3Buttons"
EndSection

Putting it in a 01-mouse.conf file, either alone or along with the above posted InputClass, has no effect.

Also putting Xorg-7.7 after the xf86-input-mouse entry in onboot.lst has no effect.

Finally, I haven't found the manner to disable hotplugging without locking the whole system.

Attached is my Xorg.0.log.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: Juanito on December 22, 2024, 05:44:42 AM
Check which driver extensions are loaded using:
Code: [Select]
tce-status -i | grep xf86
I suggest you try with xf86-input-evdev loaded, but not xf86-input-libinput or xf86-input-mouse and see what happens.

(I assume 01-mouse.conf  is placed in /usr/local/share/X11/xorg.conf.d)

Also, it would be good to check which input your mouse is using with this:
Code: [Select]
dmesg | grep ttyS
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 22, 2024, 08:51:22 AM
Check which driver extensions are loaded using:
Code: [Select]
tce-status -i | grep xf86
I suggest you try with xf86-input-evdev loaded, but not xf86-input-libinput or xf86-input-mouse and see what happens.


xf86-input-mouse removed fron onboot.lst, xorg.0.log attached.

Code: [Select]
libXxf86dga
libXxf86vm
xf86-input-evdev
xf86-video-fbdev
xf86-video-vesa


Quote
(I assume 01-mouse.conf  is placed in /usr/local/share/X11/xorg.conf.d)
Yes, it is.

Quote
Also, it would be good to check which input your mouse is using with this:
Code: [Select]
dmesg | grep ttyS


Mouse plugged in to COM1.

Code: [Select]
00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0d: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: Juanito on December 22, 2024, 09:40:51 AM
So your keyboard is ttyS0?

Sorry, but I've run out of ideas - I don't have the hardware to test.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 22, 2024, 11:03:55 AM
AFAIK the serial port 1 is ttyS0 and the mouse is usually plugged in to it.
While the serial port 2 is ttyS1, used for modems or digitizer.
On my pc the keyboard is plugged in to the AT port.
Anyway thank you so much for the time you have devoted to me, I'll keep it like that.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: CNK on December 22, 2024, 07:13:47 PM
I guess by disabling hotplugging you're trying to stop this in the Xorg log:
Code: [Select]
Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.

The 'mouse' driver accesses the mouse directly from the serial devices like in Juanitos configuration, but it's being disabled.

The other drivers rely on the Linux kernel having detected/configured the serial mouse correctly as described here (https://www.kernel.org/doc/html/v6.6/input/input.html). But that page doesn't mention serial mice.

I wonder if the Linux kernel's serial mouse driver ("sermouse" - built into the kernel according to the "CONFIG_MOUSE_SERIAL=y" settings in the build configuration (http://tinycorelinux.net/15.x/x86/release/src/kernel/config-6.6.8-tinycore)) isn't working, so the only way is to force Xorg to access the serial port directly via its 'mouse' driver (maybe by not loading either xf86-input-libinput or xf86-input-evdev but just xf86-input-mouse)?

It sounds like if the sermouse driver is working you should have a /dev/input/mice device that can be used like a PS/2 mouse by X.

I gather you can also check the Linux serial mouse device by loading libinput.tcz and running:

Code: [Select]
sudo libinput list-devices

And see if it lists a /dev/input/event* device that matches your serial mouse.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: gadget42 on December 23, 2024, 06:23:25 AM
@t18, if/when you have the opportunity it would be interesting to investigate @CNK hypotheses and see what your results are.

Happy Holidays and keep us posted. thanks.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on December 25, 2024, 04:45:16 AM
@t18, if/when you have the opportunity it would be interesting to investigate @CNK hypotheses and see what your results are.

Happy Holidays and keep us posted. thanks.

Will do. I'll have to find some time.

Best wishes you all.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on January 01, 2025, 04:34:15 PM
I wonder if the Linux kernel's serial mouse driver ("sermouse" - built into the kernel according to the "CONFIG_MOUSE_SERIAL=y" settings in the build configuration (http://tinycorelinux.net/15.x/x86/release/src/kernel/config-6.6.8-tinycore)) isn't working, so the only way is to force Xorg to access the serial port directly via its 'mouse' driver (maybe by not loading either xf86-input-libinput or xf86-input-evdev but just xf86-input-mouse)?

xf86-input-evdev loads even though removed from onboot.lst
xf86-input-libinput is not available on TCL 5.4.

Quote
It sounds like if the sermouse driver is working you should have a /dev/input/mice device that can be used like a PS/2 mouse by X.

I gather you can also check the Linux serial mouse device by loading libinput.tcz and running:

Code: [Select]
sudo libinput list-devices

And see if it lists a /dev/input/event* device that matches your serial mouse.

libinput.tcz is not available on TCL 5.4.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: CNK on January 01, 2025, 06:03:02 PM
I wonder if the Linux kernel's serial mouse driver ("sermouse" - built into the kernel according to the "CONFIG_MOUSE_SERIAL=y" settings in the build configuration (http://tinycorelinux.net/15.x/x86/release/src/kernel/config-6.6.8-tinycore)) isn't working, so the only way is to force Xorg to access the serial port directly via its 'mouse' driver (maybe by not loading either xf86-input-libinput or xf86-input-evdev but just xf86-input-mouse)?

xf86-input-evdev loads even though removed from onboot.lst

You could delete the symlink at "/usr/local/lib/xorg/modules/input/evdev_drv.so".

Quote
It sounds like if the sermouse driver is working you should have a /dev/input/mice device that can be used like a PS/2 mouse by X.

I gather you can also check the Linux serial mouse device by loading libinput.tcz and running:

Code: [Select]
sudo libinput list-devices

And see if it lists a /dev/input/event* device that matches your serial mouse.

libinput.tcz is not available on TCL 5.4.

If you can't try TC15 again then I'm not sure what the options are for viewing mice in TC5. You could try testing the emulated PS/2 mouse device in Xorg or with GPM, as described in the Linux kernel mouse driver documentation link.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: Rich on January 01, 2025, 10:00:24 PM
Hi t18
... xf86-input-evdev loads even though removed from onboot.lst ...
Remove  xf86-input-evdev.tcz  from your local copy of  Xorg-7.7.tcz.dep.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on January 02, 2025, 06:59:35 AM
You would need to build xf86-input-evdev, see http://www.tinycorelinux.net/7.x/x86/tcz/src/xf86-input-evdev/ or xf86-input-mouse.

It might be easier to install tc-5.x and see if it’s going to work first.

That's what I've done.


If you can't try TC15 again then I'm not sure what the options are for viewing mice in TC5. You could try testing the emulated PS/2 mouse device in Xorg or with GPM, as described in the Linux kernel mouse driver documentation link.

Yes, I can use TCL 15 again. But the aim would be to find the correct settings on TCL 5.x and then put them on TCL 15.
That's what I've caught.


Hi t18
... xf86-input-evdev loads even though removed from onboot.lst ...
Remove  xf86-input-evdev.tcz  from your local copy of  Xorg-7.7.tcz.dep.

For mouse settings I'm using TCL 5.x as Juanito suggested.
I'll check if it's possible to remove evdev from it.

Title: Re: Can the recent Xorg detect a serial mouse?
Post by: t18 on January 05, 2025, 10:39:52 AM
Hi t18
... xf86-input-evdev loads even though removed from onboot.lst ...
Remove  xf86-input-evdev.tcz  from your local copy of  Xorg-7.7.tcz.dep.

Removing it the keyboard gets disabled, so I can't switch to prompt and check the Xorg.0.log.
Title: Re: Can the recent Xorg detect a serial mouse?
Post by: CNK on January 05, 2025, 04:51:29 PM
You might need to configure the kbd driver too, like Juanito's example for the mouse driver. But if the mouse didn't work, I'm not sure there's anything more to do in order to make Xorg use the direct mouse driver.