Adding udev.rules to /etc/udev cause 2 minute timeout after running dracut-rebuild

Hello, my Logitech G Pro X wireless receiver causes KDE to wake from sleep immediately so I’ve created a udev rule to disallow it from waking the computer at all.

/etc/udev/rule.d/logitech-unifying.rules

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c547", ATTR{power/wakeup}="disabled"

This works, the device can no longer wake the computer on reboot. However, if I then run dracut-rebuild in the future, I get a timeout on boot, which takes 2 minutes to get through, and the following errors.

Mar 27 07:57:30 patrick-PC (udev-worker)[770]: 1-3:1.0: /etc/udev/rules.d/logitech-unifying.rules:1 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/power/wakeup}, ignoring: No such file or directory
Mar 27 07:57:30 patrick-PC (udev-worker)[773]: 1-3:1.2: /etc/udev/rules.d/logitech-unifying.rules:1 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.2/power/wakeup}, ignoring: No such file or directory
Mar 27 07:57:30 patrick-PC (udev-worker)[786]: 1-3:1.1: /etc/udev/rules.d/logitech-unifying.rules:1 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/power/wakeup}, ignoring: No such file or directory

Mar 27 07:56:55 patrick-PC dracut-initqueue[567]: Timed out for waiting the udev queue being empty.

It seems like the dracut-rebuild is inappropriately trying to add this rule and it’s trying to run the command again? Sorry I’m new to dracut.

Anyone have any thoughts on how to fix this? Can I prevent dracut from incorporating the udev rule I created?

Thank you!

-patrick

I had experienced this exact problem with dracut, but mkinitcpio works fine with the rules script.

I did some tricks for dracut. Try that:
Your mouse has two different IDs: (a wireless USB port and a wired USB port)

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c547", RUN+="/bin/sh -c 'echo disabled > /sys$env{DEVPATH}/../power/wakeup'"
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="<??>", RUN+="/bin/sh -c 'echo disabled > /sys$env{DEVPATH}/../power/wakeup'"

If I remember correctly, it will not work when you re-plugin your mouse without reboot.

There’s another robust trick (my systemd service + my rule script) I’ve done, but it’s cumbersome.

Thank you so much for your reply! I don’t ever plug my mouse in, so I only ever have one entry for the receiver.

This problem seems to have resolved itself after I ran a grub-mkconfig. The write errors persist, but the timeout has stopped. I have absolutely no idea what solved this, but I’ll take it.

Thanks,

-patrick

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.