Q:

Enabling Trackpoing scroll under Wayland for my IBM SpaceSaver II (RT3200)

I have an old IBM SpaceSaver II that I've been using for a while now. After updating to Ubuntu 20.04 I decided to give Wayland another go. The only thing that keeps me from using it full time is the middle mouse click scroll not working.
Under X it wouldn't work out of the box either, but you could enable it by setting the scroll method via xinput:
xinput --set-prop "USBPS2 Mouse" "libinput Scroll Method Enabled" 0, 0, 1
But I haven't found a way to set this under Wayland.
In this thread they change properties for a built-in trackpoint using /etc/udev/hwdb.d, but I'm not sure how to use it correctly and where to find the properties for a given device. I tried using:
evdev:name:USBPS2 Mouse
  MOUSE_SCROLL_METHOD=button

evdev:name:USBPS2 Mouse
  SCROLL_METHOD_ENABLED=button

evdev:name:USBPS2 Mouse
  SCROLL_METHOD_ENABLED=0,0,1

but it has no effect. Can you tell me if I'm on the right track here? How do I find out the properties for devices? Is there a way to validate the selector?
The keyboard is connected via a PS/2 to USB adapter, so it appears as USBPS2 when listing libinput devices:
Device:           USBPS2
Kernel:           /dev/input/event18
Group:            5
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           USBPS2 Mouse
Kernel:           /dev/input/event19
Group:            5
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   flat *adaptive
Rotation:         n/a

Device:           USBPS2 Consumer Control
Kernel:           /dev/input/event20
Group:            5
Seat:             seat0, default
Capabilities:     keyboard pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           USBPS2 System Control
Kernel:           /dev/input/event21
Group:            5
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

As you can see the USBPS2 Mouse has the scroll method button available, but not enabled (at least I think so since there is no asterisk before it). For the integrated Trackpoint it works out of the box.

A:

Figured it out while playing around with udev rules:
Turns out the issue is that ID_INPUT_POINTINGSTICK is not set, so I guess libinput does not fully recognize the device. Can be solved with a simple udev rule:
ACTION=="add|change", ENV{ID_VENDOR_ID}=="0d3d", ATTRS{name}=="*USBPS2 Mouse*", ENV{ID_INPUT_POINTINGSTICK}="1"

This works for both Wayland and Xorg, no need to set it with xinput --set-prop anymore.

