You are not logged in.

#1 2026-10-17 18:21:35

Alseïdon
Member
Registered: 2026-10-17
Posts: 4

[SOLVED] USB mouse wheel sends horizontal scroll, not vertical

Hi,

I'm on up to date Arch, with sway v1.12, on a Lenovo laptop. When I plug my Logitech G502X mouse, the scroll wheel (both in normal and free scroll) only sends events when scrolling down, and it sends an horizontal scroll; output in a `wev` window is like this:

[13:      wl_pointer] axis_source: 0 (wheel)
[13:      wl_pointer] axis_stop: axis: 1 (horizontal), discrete: 1
[13:      wl_pointer] axis: time: 33545815; axis: 1 (horizontal), value: 15.000000
[13:      wl_pointer] frame

This also happens in a Linux Mint laptop I tested, but not on a Windows 11 one (so not a hardware issue). Tried to tinker with Solaar, didn't help. Here is how the mouse appears:

❯ swaymsg -t get_inputs | grep --after-context=16 'Logitech'
    "identifier": "1133:49305:Logitech_G502_X",
    "name": "Logitech G502 X",
    "type": "pointer",
    "scroll_factor": 1.0,
    "libinput": {
      "send_events": "enabled",
      "accel_speed": 0.0,
      "accel_profile": "adaptive",
      "natural_scroll": "disabled",
      "left_handed": "disabled",
      "middle_emulation": "disabled",
      "scroll_method": "none",
      "scroll_button": 274,
      "scroll_button_lock": "disabled"
    },
    "vendor": 1133,
    "product": 49305
  },
--
    "identifier": "1133:49305:Logitech_G502_X_Keyboard",
    "name": "Logitech G502 X Keyboard",
    "type": "pointer",
    "scroll_factor": 1.0,
    "libinput": {
      "send_events": "enabled",
      "natural_scroll": "disabled"
    },
    "vendor": 1133,
    "product": 49305
  },
  {
    "identifier": "1133:49305:Logitech_G502_X_Keyboard",
    "name": "Logitech G502 X Keyboard",
    "type": "keyboard",
    "repeat_delay": 600,
    "repeat_rate": 25,
    "xkb_layout_names": [
      "French",
      "Greek"
    ],
    "xkb_active_layout_index": 0,
    "xkb_active_layout_name": "French",
    "libinput": {
      "send_events": "enabled",
      "natural_scroll": "disabled"
    },
    "vendor": 1133,
    "product": 49305
  },

I don't have another USB mouse to test with, and the touchpad scroll is working as expected. Any idea as to what's happening and how to fix this?

Last edited by Alseïdon (2026-10-18 15:56:03)

Offline

#2 2026-10-17 19:28:51

gabrielsec
Member
From: Brazil | Rio De Janeiro
Registered: 2026-10-16
Posts: 18

Re: [SOLVED] USB mouse wheel sends horizontal scroll, not vertical

Since the same issue occurs on Linux Mint, I’d check whether the problem comes from the mouse events rather than Sway. Run:

sudo libinput debug-events

Scroll the wheel in both directions and check whether the events are reported as horizontal instead of vertical. This should help narrow down where the issue occurs. See the ArchWiki libinput guide.

Keep sending more information for a higher resolution.

Regards,
Gabriel


The more we help each other, the better the world becomes.

Share knowledge, be kind, and don't let toxicity define the community.

Offline

#3 2026-10-17 19:55:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,471

Re: [SOLVED] USB mouse wheel sends horizontal scroll, not vertical

https://bbs.archlinux.org/viewtopic.php … 9#p2176469

lsmod | grep logitech

is hid_logitech_hidpp loaded?

Online

#4 2026-10-17 20:06:10

Alseïdon
Member
Registered: 2026-10-17
Posts: 4

Re: [SOLVED] USB mouse wheel sends horizontal scroll, not vertical

Libinput also reports the event as horizontal, and doesn't detect the upwards scroll

-event16  POINTER_SCROLL_WHEEL         +0.000s	vert 0.00/0.0 horiz 15.00/120.0* (wheel)
 event16  POINTER_SCROLL_WHEEL      2  +0.356s	vert 0.00/0.0 horiz 15.00/120.0* (wheel)
 event16  POINTER_SCROLL_WHEEL      3  +0.589s	vert 0.00/0.0 horiz 15.00/120.0* (wheel)

And hid_logitech_hidpp isn't loaded, lsmod | grep logitech returns nothing.

Thank you for the quick answers!

Offline

#5 2026-10-17 20:14:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,471

Re: [SOLVED] USB mouse wheel sends horizontal scroll, not vertical

What does

sudo evtest

report?
(You don't have to scroll in the terminal)

lsmod | grep logitech returns nothing

lsmod | grep hid

Then unplug the mouse, run

dmesg -W

plug the mouse and post the output dmesg generates.

Online

#6 2026-10-17 20:31:32

Alseïdon
Member
Registered: 2026-10-17
Posts: 4

Re: [SOLVED] USB mouse wheel sends horizontal scroll, not vertical

sudo evtest (no output for up scroll):

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x46d product 0xc099 version 0x111
Input device name: "Logitech G502 X"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 272 (BTN_LEFT)
    Event code 273 (BTN_RIGHT)
    Event code 274 (BTN_MIDDLE)
    Event code 275 (BTN_SIDE)
    Event code 276 (BTN_EXTRA)
    Event code 277 (BTN_FORWARD)
    Event code 278 (BTN_BACK)
    Event code 279 (BTN_TASK)
    Event code 280 (?)
    Event code 281 (?)
    Event code 282 (?)
    Event code 283 (?)
    Event code 284 (?)
    Event code 285 (?)
    Event code 286 (?)
    Event code 287 (?)
  Event type 2 (EV_REL)
    Event code 0 (REL_X)
    Event code 1 (REL_Y)
    Event code 6 (REL_HWHEEL)
    Event code 8 (REL_WHEEL)
    Event code 11 (REL_WHEEL_HI_RES)
    Event code 12 (REL_HWHEEL_HI_RES)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1792268918.575792, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1
Event: time 1792268918.575792, type 2 (EV_REL), code 12 (REL_HWHEEL_HI_RES), value 120
Event: time 1792268918.575792, -------------- SYN_REPORT ------------
Event: time 1792268924.242394, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1
Event: time 1792268924.242394, type 2 (EV_REL), code 12 (REL_HWHEEL_HI_RES), value 120
Event: time 1792268924.242394, -------------- SYN_REPORT ------------
Event: time 1792268927.030144, type 2 (EV_REL), code 6 (REL_HWHEEL), value 1
Event: time 1792268927.030144, type 2 (EV_REL), code 12 (REL_HWHEEL_HI_RES), value 120
Event: time 1792268927.030144, -------------- SYN_REPORT ------------
❯ lsmod | grep hid
hid_multitouch         40960  0
i2c_hid_acpi           12288  0
i2c_hid                45056  1 i2c_hid_acpi
mac_hid                12288  0

Plugging the mouse with dmesg -W:

❯ sudo dmesg -W
[50233.361565] usb 3-2: new full-speed USB device number 8 using xhci_hcd
[50233.495649] usb 3-2: New USB device found, idVendor=046d, idProduct=c099, bcdDevice=60.00
[50233.513653] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[50233.513670] usb 3-2: Product: G502 X
[50233.513675] usb 3-2: Manufacturer: Logitech
[50233.513677] usb 3-2: SerialNumber: 207832654D47
[50233.532688] input: Logitech G502 X as /devices/pci0000:00/0000:00:08.3/0000:c6:00.0/usb3/3-2/3-2:1.0/0003:046D:C099.0008/input/input33
[50233.532974] hid-generic 0003:046D:C099.0008: input,hidraw1: USB HID v1.11 Mouse [Logitech G502 X] on usb-0000:c6:00.0-2/input0
[50233.540503] input: Logitech G502 X Keyboard as /devices/pci0000:00/0000:00:08.3/0000:c6:00.0/usb3/3-2/3-2:1.1/0003:046D:C099.0009/input/input34
[50233.592290] hid-generic 0003:046D:C099.0009: input,hiddev96,hidraw2: USB HID v1.11 Keyboard [Logitech G502 X] on usb-0000:c6:00.0-2/input1

Offline

#7 2026-10-17 21:31:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,471

Re: [SOLVED] USB mouse wheel sends horizontal scroll, not vertical

The mouse is covered by libratbag, does https://archlinux.org/packages/extra/any/piper/ help?

Online

#8 2026-10-18 15:55:12

Alseïdon
Member
Registered: 2026-10-17
Posts: 4

Re: [SOLVED] USB mouse wheel sends horizontal scroll, not vertical

seth wrote:

The mouse is covered by libratbag, does https://archlinux.org/packages/extra/any/piper/ help?

Well, I tried to tinker with it a bit. Changed profiles, tested assigning Wheel up/down to the left/right wheel clicks (wheel scrolls are not valid buttons, couldn't test them). The "wheel up/down" commands didn't work even when assigned elsewhere.

BUT. After a few reassignments, suddenly the wheel was working again. So... Thank you for the recommendation! Although I'm wondering what was causing the bug.

Offline

Board footer

Powered by FluxBB