For backwards compatibility reasons, the hwdb.bin created udevadm hwdb
does not actually apply matches in the way you'd expect. systemd-hwdb
creates the newer format and is preferred.
Related: #472
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
def reload_and_trigger_udev(device):
import time
- print('Running udevadm hwdb --update')
- subprocess.run(['udevadm', 'hwdb', '--update'], check=True)
+ print('Running systemd-hwdb update')
+ subprocess.run(['systemd-hwdb', 'update'], check=True)
syspath = device.path.replace('/dev/input/', '/sys/class/input/')
time.sleep(1)
print('Running udevadm trigger {}'.format(syspath))