Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to get udev to change some settings on my mouse when I switch better computers with KVM. So once the mouse is redetected the buttons need resetting.
I have the following udev rules file in my /etc/udev/rules.d folder, named 90-emouse.rules:
You may have noted the use of colour in the above examples. This is to demonstrate that while it is legal to combine the attributes from the device in question and a single parent device, you cannot mix-and-match attributes from multiple parent devices - your rule will not work.
Is the udev rule being triggered before logging in (ie before session exists)?
I recall an old openSUSE thread I participated in many moons ago. It is possible to put the udevd daemon in debug mode. The steps required to stop the daemon depend on whether systemd is used or not, but once stopped, the daemon is then run with
Code:
udevd --debug
and then the output will help confirm if a particular rule is triggered for a given event.
Well, after a quick glance at the udevinfo output, I think your matching attributes are ok. You can verify that triggering is occurring (or not) by using udev in debug mode as I've previously described. The steps required are a little different if using systemd. For reference, I'm running Leap and when I stop udev.service, I get
Code:
# systemctl stop udev
Warning: Stopping udev.service, but it can still be activated by:
systemd-udevd-control.socket
systemd-udevd-kernel.socket
Anyway, the socket activation can be stopped in a similar fashion. When your device is then attached, the verbose output can be captured to examine which rules are triggered.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.