Skip to main content
Topic: udevadm hwdb --update ignores /etc/udev (Read 1984 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

udevadm hwdb --update ignores /etc/udev

I've created a modified hwdb file in /etc/udev/hwdb.d for my keyboards fn keys.
The problem is that when I run
Code: [Select]
udevadm hwdb --update
everything in /etc/udev is ignored and the resulting hwdb.bin file is stored in /usr/lib/udev/hwdb.bin instead.
The work around that I've been using is to just create a .hwdb file with my modifications in /usr/lib/udev/hwdb.d that loads after the 60-keyboard.hwdb file. This way, my alterations are applied.
However, it's not an entirely clean solution since the documentation tells me that anything stored in /etc/udev is supposed to take priority over the contents of /usr/lib/udev and that the hwdb.bin should be stored in /etc/udev as well.

How can I get udevadm hwdb to recognize my /etc/udev folder?
Thanks!

Re: udevadm hwdb --update ignores /etc/udev

Reply #1
I'm also having the same issue- new hwdb entries in /etc/udev/hwdb.d are not rebuilt by udevadm. Is this an issue with the upstream package eudev?

Re: udevadm hwdb --update ignores /etc/udev

Reply #2
https://wayland.freedesktop.org/libinput/doc/latest/device-configuration-via-udev.html#hwdb-modifying
https://wayland.freedesktop.org/libinput/doc/latest/touchpad-jitter.html
https://www.freedesktop.org/software/systemd/man/hwdb.html
So I was trying to set custom touchpad fuzz following those instructions.
Code: [Select]
$ sudo libinput measure fuzz --fuzz=8
Using AlpsPS/2 ALPS DualPoint TouchPad: /dev/input/event16
  Checking udev property... not set
  Checking axes... not set

Guessing a udev rule to overwrite the fuzz
Full modalias is: dmi:bvnDellInc.:bvrA15:bd12/05/2013:br4.6:svnDellInc.:pnPrecisionM4500:pvr0001:rvnDellInc.:rn0RRH3K:rvrA01:cvnDellInc.:ct9:cvr:


Suggested udev rule, option 1:
# DellInc. AlpsPS/2 ALPS DualPoint TouchPad
evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:*:svnDellInc.*:pvr0001*:
 EVDEV_ABS_00=:::8
 EVDEV_ABS_01=:::8
 EVDEV_ABS_35=:::8
 EVDEV_ABS_36=:::8


Suggested udev rule, option 2:
# DellInc. AlpsPS/2 ALPS DualPoint TouchPad
evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:*:svnDellInc.*:pnPrecisionM4500*:
 EVDEV_ABS_00=:::8
 EVDEV_ABS_01=:::8
 EVDEV_ABS_35=:::8
 EVDEV_ABS_36=:::8

Wich rule do you want to to test? 1 or 2? Ctrl+C to exit 2
Traceback (most recent call last):
  File "/usr/lib/libinput/libinput-measure-fuzz", line 515, in <module>
    main(sys.argv)
  File "/usr/lib/libinput/libinput-measure-fuzz", line 502, in main
    write_udev_rule(device, userfuzz)
  File "/usr/lib/libinput/libinput-measure-fuzz", line 443, in write_udev_rule
    fd = open(fname, "x")
FileNotFoundError: [Errno 2] No such file or directory: '/etc/udev/hwdb.d/99-touchpad-fuzz-override.hwdb'

That auto-created some possible rules. But putting a file 61-evdev-local.hwdb in /etc/udev/hwdb.d after creating that dir didn't get built as described in earlier posts. So I also put it in /usr/lib/udev/hwdb.d
Code: [Select]
$ ls -l
-r--r--r-- 1 root root 8307850 Aug 28 02:58 hwdb.bin
$ sudo /usr/bin/udevadm hwdb --update
$ ls -l
-r--r--r-- 1 root root 8308026 Aug 28 03:19 hwdb.bin
$ sudo libinput measure fuzz
Using AlpsPS/2 ALPS DualPoint TouchPad: /dev/input/event16
  Checking udev property... not set
  Checking axes... not set
And I could see the bin file was bigger, but it didn't do anything. So I modified the rule a bit:
Code: [Select]
/usr/lib/udev/hwdb.d$ cat 61-evdev-local.hwdb 
# DellInc. AlpsPS/2 ALPS DualPoint TouchPad
#evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:*:svnDellInc.*:pnPrecisionM4500*:
evdev:name:*AlpsPS/2 ALPS DualPoint TouchPad:dmi:*svnDellInc.:*pnPrecisionM4500*:
 EVDEV_ABS_00=:::8
 EVDEV_ABS_01=:::8
 EVDEV_ABS_35=:::8
 EVDEV_ABS_36=:::8
Still didn't work. Then I installed xudev instead of eudev, which rebuilt the bin as part of the hooks, rebooted:
Code: [Select]
$ sudo libinput measure fuzz
Using AlpsPS/2 ALPS DualPoint TouchPad: /dev/input/event16
  Checking udev property... x=8 y=8
  Checking axes... not set
And it works! (It also changed my wireless devices from the wlpXsY to wlan0 / wlan1 btw)
Having used xudev for only a few minutes I can't say too much about it but it seems concerning if eudev is not functioning with the hwdb entries, because there are stacks of hw specific tweaks in there to make stuff work correctly, which you may not be aware of at all if you aren't using the affected items.

Oh yes, I should add I am using an older kernel for other reasons though, in case that affects this, although I'm not sure it does:
Code: [Select]
$ uname -r
5.8.14-artix1-1
If it did then just ignore this  ;D

pps offtopic:
This improves the M4500 touchpad too, otherwise you can move the pointer with your finger a short distance above the touchpad as it was much too sensitive as standard, I haven't fully refined all these settings yet though, perhaps I will report them upstream in future, but it's something like this and much better than it was:
Code: [Select]
/etc/libinput/local-overrides.quirks
[Touchpad pressure override]
MatchUdevType=touchpad
MatchName=*AlpsPS/2 ALPS DualPoint TouchPad
MatchDMIModalias=dmi:*svnDellInc.:*pnPrecisionM4500*
AttrPressureRange=95:88

Re: udevadm hwdb --update ignores /etc/udev

Reply #3
Since yesterday. eudev is basicly the systemd extracted udev.
eudev the fork is no more in artix repos in favor of udev, until eventually a viable alternative is available.
hwdb entries should work now.

Re: udevadm hwdb --update ignores /etc/udev

Reply #4
I sort of wonder now if I should have just kept quiet about that  :D (Although the eudev deprecation had already happened a few days earlier anyway I see.)
And I don't know if ALL entries didn't work or just some actions like "fuzz" were non functional.
But as I recall  it was udev no longer being provided separately from systemd which prompted eudev, which initially at least aimed to pretty much duplicate the systemd udev but as a separate package. So if systemd is now providing a separate udev then perhaps that could be seen as a return to the pre-systemd state and a sign that systemd devs are more accepting of non-systemd inits than they once were.

 

Re: udevadm hwdb --update ignores /etc/udev

Reply #5
So if systemd is now providing a separate udev then perhaps that could be seen as a return to the pre-systemd state and a sign that systemd devs are more accepting of non-systemd inits than they once were.


Nono, that's not the case, the udev is simply extracted as standalone from systemd source. It works, but its not fully untied from systemd, ie the udev abbsorption into systemd is not as weaved in as eg logind, hence elogind fork. They absorbed udev, but didn't totally integrate it to a point that it won't work without systemd like logind.

If the systemd devs would listen, they'd support building udev from systemd source ootb, via meson or make they use, including udev tests standalone...