Solved X Does Not Detect PS/2 Middle Mouse Button

Greetings. I have a Dell E6510 laptop that I just upgraded from FreeBSD 12.1-RELEASE to 12.2-RELEASE. This laptop has a 2-button touchpad and a 3-button point stick. Prior to the upgrade I had been using a combination of moused (console) and sysmouse (Xorg) to achieve middle button scrolling with the point stick. Now, the middle button only works in the console. In X the middle button doesn't work at all. Instead, I have to click the left and right mouse buttons at the same time to get a middle click.

What do I have to change to get middle button scrolling and clicking with the trackpoint? I don't use the track pad and I don't use the mouse in the console often, so if I don't need moused I'd just disable it.

Here are the moused settings in my rc.conf.
Code:
moused_enable="YES"
moused_flags="-V -U 3 -L 2 -l 1"

Here are the input-related settings in my xorg.conf.
Code:
Section "ServerLayout"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection
 
Here are the input-related settings in my xorg.conf.
Remove all of it. They're pretty useless as Xorg has been detecting the keyboard and mouse through automatic means for a long time (first through devd(8), nowadays it happens through evdev/udev).

Code:
[    33.753] (==) Automatically adding devices
[    33.753] (==) Automatically enabling devices

This has nothing to do with the FreeBSD version. I'm going to guess you also updated your packages and this is what's causing the problems. I assume you haven't updated your packages in while either?
 
I got those X.org settings off a stale forum post here. My mistake.

I included the FreeBSD version in case the issue had anything to do with changes to psm or moused.

This started when 12.2-RELEASE first became available, I upgraded pretty soon after that. Just haven't been able to figure out the issue since. Packages I upgrade pretty frequently, and I did do one right around the upgrade.

Which packages do you suspect?
 
First post your Xorg.0.log so we can actually see what's being detected and where things might have gone wrong.

cat /var/log/Xorg.0.log | nc termbin.com 9999

Unless you have some specific settings I would suggest removing any xorg.conf files you have, you rarely need one nowadays. If there are some tweaks to be made this is done through 'snippets' of configuration files in /usr/local/etc/X11/xorg.conf.d. There's no need for that huge monolithic xorg.conf file anymore.
 
This may be related, but I don't have this package installed and never have. I've always just had x11-drivers/xf86-input-libinput.

First post your Xorg.0.log so we can actually see what's being detected and where things might have gone wrong.

cat /var/log/Xorg.0.log | nc termbin.com 9999

Unless you have some specific settings I would suggest removing any xorg.conf files you have, you rarely need one nowadays. If there are some tweaks to be made this is done through 'snippets' of configuration files in /usr/local/etc/X11/xorg.conf.d. There's no need for that huge monolithic xorg.conf file anymore.

ng termbin.com 9999 < /var/log/Xorg.0.log
https://termbin.com/lvek

Thank you for all your help. The only other X.org configuration I have is for proper Nvidia display driver configuration and tweaks. Without those, X starts up with a distorted, broken display. This file has always lived in /usr/local/etc/X11/xorg.conf, but it sounds like it should be renamed or broken up from what you're saying.
 
I did some more reading and configuration testing to see if I could get my middle mouse button back but I still haven't been able to.

To be clear, I don't think it's the hardware. The middle mouse button still lets me paste in the console with moused

The first thing I did was go back through the handbook again to see if I missed something. In Example 5.10 it mentions setting the number of mouse buttons for X.org, which I did. That didn't do anything. It also mentioned setting kern.evdev.rcpt_mask=12, which I had already done a while back.

The second thing I did was remove all of my X.org input device configuration. X.org is auto-detecting all of my hardware using either x11-drivers/xf86-input-libinput or x11-drivers/xf86-input-evdev (I tried both, just to see what would change and they both detected the mouse and keyboard just fine). With no additional X config and the evdev input driver, this is what /var/log/Xorg.0.log looks like: https://termbin.com/bq2v

The log says that X detected a 3-button PS/2 mouse but middle-clicking still does nothing. When I run xev, there is no output for the middle button. Just the left (Button 1) and right (Button 3). No Button 2.

I also tried using x11-drivers/xf86-input-synaptics, setting hw.psm.synaptics_support=1 and kern.evdev.rcpt_mask=12 in /boot/loader.conf (I checked they were set after a reboot), and configuring moused to use mouse level 2, and could not get X.org to detect a Synaptics touchpad. This is fine, I don't believe this model Dell is compatible.

I read quite a few forum posts and there were two that seemed like they could be related. This post seemed to be the closest to my issue, but moved through the same steps that I tried above and was unresolved.

I'm a bit at a loss at the moment. I understand that it's probably got nothing to do with the system upgrade and it may have been a changed package, but I have no intention of remaining on an out-of-date X.org server or input driver.

Does anyone else see anything that I've missed or overlooked? Thank you for your time.
 
Simple fix for a stupid problem. I don't know why package/system upgrades would have an impact on this but it must have been something different in evdev device detection for Xorg. I had to set kern.evdev.rcpt_mask=3 instead of 6 or 12. This makes perfect logical sense because a mask of 3 implies sysmouse/kdbmux, sysmouse being the application-level moused forwarder as I understand it. This one change let me use the totally default, auto-detected X config along with moused.
 
Back
Top