On Ubuntu 20.04 I modified /usr/lib/udev/rules.d/60-evdev.rules as follows, because I don't want udev to touch my raw keyboard device:

# do not edit this file, it will be overwritten on update

ACTION=="remove", GOTO="evdev_end"
KERNEL!="event*", GOTO="evdev_end"

ATTRS{name}=="AT Raw Set 2 keyboard", GOTO="evdev_end"



This works, but I'm concerned about the "do not edit this file" line. I want a cleaner way to do the same thing. I tried to move this line to a file named /etc/udev/rules.d/01-atkbdraw.rules, but this results in the following error: GOTO="evdev_end" has no matching label, ignoring.

I also tried to use the := operator like this:

ATTRS{name}=="AT Raw Set 2 keyboard", RUN:="/bin/true"

But this doesn't work, I think it only affects the "RUN" keys and doesn't stop further processing entirely.

I saw that there was a option called last_rule which seems to be exactly what I need, but it got removed in version 147.

Is there a way I can do what I want without editing /usr/lib/udev/rules.d/60-evdev.rules?

2 Answers 2


Copy /usr/lib/udev/rules.d/60-evdev.rules to /etc/udev/rules.d/60-evdev.rules. Just keep same filename, it will be overridden. Check man udev for folders priority.

That note is in /usr/lib/udev/rules.d/60-evdev.rules, because files in that folder are part of installed packages and they might get overwritten by updates.

  • 1
    I appreciate that answer. Thanks!
    – mastier
    Sep 20, 2023 at 11:30

GOTO="evdev_end" is wrong !! no matches the file name.

Must be GOTO="atkbdraw_end" for your file 01-atkbdraw.rules

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .