hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.23k stars 759 forks source link

[Hyprland 0.41.1] Logitech G903 scroll speed too high in XWayland clients and Alacritty. #6681

Open CNR0706 opened 2 weeks ago

CNR0706 commented 2 weeks ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 9e781040d9067c2711ec2e9f5b47b76ef70762b3 (props: bump version to 0.41.1). Date: Thu Jun 13 09:54:06 2024 Tag: v0.41.1, commits: 4818 flags: (if any) System Information: System name: Linux Node name: Gentoo-Linux-GPC Release: 6.8.9-zen1-gentoo-dist Version: #6 ZEN SMP PREEMPT_DYNAMIC Thu Jun 13 20:07:16 CEST 2024 GPU information: 29:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c5) (prog-if 00 [VGA controller]) os-release: NAME=Gentoo ID=gentoo PRETTY_NAME="Gentoo Linux" ANSI_COLOR="1;32" HOME_URL="https://www.gentoo.org/" SUPPORT_URL="https://www.gentoo.org/support/" BUG_REPORT_URL="https://bugs.gentoo.org/" VERSION_ID="2.15" plugins: ```

Description

There is a bug with the Logitech G903 (and probably all devices supporting high-resolution scrolling) where the scroll speed in XWayland clients (and Alacritty) is ridiculously high. This is especially problematic in games where it can be very hard to select weapons for example.

Modification of the scroll_factor variable does not seem to affect the issue.

I suppose this could also be viewed as a regression as Hyprland did not have high-resolution scrolling support for Wayland clients before, thus this bug did not exist. I am unable to bisect right now though.

How to reproduce

  1. Connect device capable of high-resolution scrolling.
  2. Scroll in an XWayland application.
  3. Scroll in a Wayland application.
  4. Compare scroll speed.

Crash reports, logs, images, videos

No response

Oglo12 commented 2 weeks ago

I also have a Logitech mouse and I have this issue.

pink10000 commented 2 weeks ago

Also happening on Logitech M720

The0neFreeMan commented 2 weeks ago

Same here. Logitech G502. I confirmed it was an issue with the last several releases of Hyprland as I downgraded Hyprland to 0.40.0 and the issue immediately went away.

mrmbernardi commented 2 weeks ago

I've got it as well. Particularly annoying in video games

jordan-josephs commented 2 weeks ago

I have it as well on a G502X. I noticed it in minecraft as I zoom through the inventory bar while only moving my scroll wheel 1 notch.

acul009 commented 2 weeks ago

I'm having that Issue with a Logitech g502 as well.

While I really like it for things like websites, it's basically unusable for gaming. Would it be possible to make this configurable?

I'm happy to provide additional info if needed.

noah427 commented 1 week ago

I have the exact opposite of this somehow with my G502 hero. I can unlock the scroll wheel and spin it with a compressed air canister and then only scroll like 1%

Surpus commented 1 week ago

Same with the mx master 3. I tried changing scroll_factor and using imwheel, neither of which worked.

xor-bits commented 1 week ago

I ran a git bisect and this commit d0a224a4915b5a90555818ed3f9e49e1a61b7cdb seems to be the issue

CNR0706 commented 1 week ago

I ran a git bisect and this commit d0a224a4915b5a90555818ed3f9e49e1a61b7cdb seems to be the issue

Thank you for the bisect :)

Agent00Ming commented 1 week ago

If you read the pull request thread, you'd know that this was known. It was a decision between breaking scrolling after the first click or scrolling too fast. Pick your poison :trollface:. JK, a fix is on the way either in #6608 or soon after because of the new backend making it easier (wlroots does a funny and sway uses a workaround to circumvent this issue)

mrmbernardi commented 1 week ago

Is there a workaround in the meantime?

marzeq commented 1 week ago

Is there a workaround in the meantime?

You can disable the hid_logitech_hidpp kernel module (see this comment on a duplicate issue). After you create the file you need to rebuild your init ramdisk

If you don't want to mess with kernel modules, what worked for my G502 Lightspeed and might work for you as a workaround until this is fixed in hyprland is using it in wired mode instead of using the wireless adapter, as for some reason that doesn't use hi-res scrolling.

mrmbernardi commented 1 week ago

using it in wired mode instead of using the wireless adapter, as for some reason that doesn't use hi-res scrolling.

I didn't believe you at first but it works :)

noahfraiture commented 6 days ago

Is there a workaround in the meantime?

You can disable the hid_logitech_hidpp kernel module (see this comment on a duplicate issue). After you create the file you need to rebuild your init ramdisk (on arch it's sudo mkinitcpio -P)

If you don't want to mess with kernel modules, what worked for my G502 Lightspeed and might work for you as a workaround until this is fixed in hyprland is using it in wired mode instead of using the wireless adapter, as for some reason that doesn't use hi-res scrolling.

This actually broke my system, it made me start in emergency shell

marzeq commented 6 days ago

This actually broke my system, it made me start in emergency shell

sorry to hear that, i simply shared what worked for me 🤷🏻‍♂️. are you sure you didn't misconfigure your system in another way that caused this?

noahfraiture commented 6 days ago

This actually broke my system, it made me start in emergency shell

sorry to hear that, i simply shared what worked for me 🤷🏻‍♂️. are you sure you didn't misconfigure your system in another way that caused this?

Maybe but I touched nothing else and it's been 2 hour for now that I'm trying to get as that will boot. I reach the grub, and then ahci error -22 can't find device with UUID However I tried to rebuild the init frames and the problem persist

Edit : I didn't know much about initframe. I'm actually using dracut and thus trying to use mkinitcpio break the boot. It's entirely on me but I think it could be a good idea to specify in your post that people may be using something else and it would break everything Mb again

Agent00Ming commented 2 days ago

I wrote up a PR that works on main branch and aquamarine branch. Please have a look at #6881.