hyprwm / Hyprland

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

Duplicate devices names #8301

Closed mikiadev closed 3 weeks ago

mikiadev commented 1 month ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 4520b30d498daca8079365bdb909a8dea38e8d55 (version: bump to 0.44.1). Date: Wed Oct 9 12:54:39 2024 Tag: v0.44.1, commits: 5309 built against aquamarine 0.4.3 flags: (if any) System Information: System name: Linux Node name: yoga Release: 6.11.4-0-clear Version: #1 SMP Tue, 22 Oct 2024 14:08:07 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a1] (rev 04) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" plugins: unknown: not runtime ```

Description

On dual screen Lenovo Yoga Book 9i (13IRU8) hyprctl devices reports both stylus-"Tablets" with name "ingenic-gadget-serial-and-keyboard-stylus".

Either stylus touch can be made to work by switching output (without output it outputs to active screen, not where is touched), ie.

      name = ingenic-gadget-serial-and-keyboard
      transform = 3
      output = eDP-1 # or eDP-2
      enabled = true
}

However both cannot be set individually due to duplicate name and afaik there is no way to reference device by at hex code? Proposed solution is during discovery add -2 or something if duplicate. Or add way to reference by at.

hyprctl devices
---
Tablets:
        Tablet at 55cf7959ec60:
                ingenic-gadget-serial-and-keyboard-stylus
                        size: 259.9818181818182x173.53398058252426mm
        Tablet at 55cf7959ee50:
                ingenic-gadget-serial-and-keyboard-stylus
                        size: 259.9818181818182x173.53398058252426mm

evtest
---
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      Power Button
/dev/input/event1:      Lid Switch
/dev/input/event10:     Intel HID events
/dev/input/event11:     Intel HID 5 button array
/dev/input/event12:     Ideapad extra buttons
/dev/input/event13:     sof-hda-dsp Headset Jack
/dev/input/event14:     sof-hda-dsp HDMI/DP,pcm=3
/dev/input/event15:     sof-hda-dsp HDMI/DP,pcm=4
/dev/input/event16:     sof-hda-dsp HDMI/DP,pcm=5
/dev/input/event17:     Logitech MX Master 3S
/dev/input/event18:     Yoga Book 9 Bluetooth KB Keyboard
/dev/input/event19:     Yoga Book 9 Bluetooth KB
/dev/input/event2:      Sleep Button
/dev/input/event3:      AT Translated Set 2 keyboard
/dev/input/event4:      Video Bus
/dev/input/event5:      INGENIC Gadget Serial and keyboard Keyboard
/dev/input/event6:      INGENIC Gadget Serial and keyboard
/dev/input/event7:      INGENIC Gadget Serial and keyboard Stylus                                     <- eDP-1 device
/dev/input/event8:      INGENIC Gadget Serial and keyboard Stylus                                     <- eDP-2 device
/dev/input/event9:      INGENIC Gadget Serial and keyboard Touchpad

How to reproduce

-

Crash reports, logs, images, videos

No response

vaxerski commented 1 month ago

lol this should NOT be happening

vaxerski commented 3 weeks ago

check now. Should be fixed

mikiadev commented 3 weeks ago
Hyprland 0.44.0 built from branch main at commit 4c7a2faf85a2d74508cc8a95df42ebe52b47383b  (input: cleanup device naming logic).
Date: Sat Nov 9 02:53:05 2024
Tag: v0.44.0-128-g4c7a2faf, commits: 5427
built against aquamarine 0.4.3

hyprctl devices still shows:

Tablets:
        Tablet at 558878d16750:
                ingenic-gadget-serial-and-keyboard-stylus
                        size: 259.9818181818182x173.53398058252426mm
        Tablet at 558878250060:
                ingenic-gadget-serial-and-keyboard-stylus
                        size: 259.9818181818182x173.53398058252426mm
vaxerski commented 3 weeks ago

oh right I just noticed the typo

vaxerski commented 3 weeks ago

check now

mikiadev commented 3 weeks ago

Perfect, thank you. Now it works exactly like it should, both screens.