From ArchWiki
Jump to: navigation, search

Custom udev rules and rebooting

In a couple of places /usr/lib/udev/rules.d/ is used as location for custom udev rules. Isn't the /etc/udev/rules.d/ a better place for them? If so I propose to change /usr/lib/udev/rules.d/ to /etc/udev/rules.d/.

Also, there's no need for rebooting the system, as suggested in MTP#gvfs-mtp troubleshooting. What is that? A Windows? ;} I think this should be removed or changed to some other means like “relogging”.

--thebodzio 22:34, 29 December 2014 (UTC)

Yes to both, Udev#About udev rules and Udev#Loading new rules. -- Kynikos (talk) 01:39, 31 December 2014 (UTC)
May be it must be removed "This article or section is a candidate for merging with udev."? I have added more related info to gvfs-mtp but not related to udev, I think that it is good if will stay here as it is. (Andy Crowd - 蔡依林 18:28, 17 August 2016 (UTC)).
I am not sure about two probably similar udev rules MTP#Media_players and MTP#gvfs-mtp, may be to have only one is enough and merge both?(Andy Crowd - 蔡依林 22:58, 19 August 2016 (UTC))
I will try to merge them after few days, I hope it is OK. (Andy Crowd - 蔡依林 21:24, 20 August 2016 (UTC))
This is what I mean about merging Media players and gvfs-mtp sections and udev rules:
ATTR{idVendor}=="04b7", ATTR{idProduct}=="88a9", SYMLINK+="libmtp",  MODE="660", ENV{ID_MTP_DEVICE}="1"


SUBSYSTEM=="usb", ATTR{idVendor}=="04b7", ATTR{idProduct}=="88a9", MODE="0666", OWNER="[username]"


SUBSYSTEM=="usb", ATTR{idVendor}=="04b7", ATTR{idProduct}=="88a9", MODE="0660", GROUP="uucp", ENV{ID_MTP_DEVICE}="1", SYMLINK+="libmtp"
(Andy Crowd - 蔡依林 19:42, 21 August 2016 (UTC)).
In Archlinux I have no problem with detecting my phone without Udev rules but in Debian I have tested both udev rules and only the last that I combined worked perfect, I could both see and mount MTP in Thunar.
(Andy Crowd - 蔡依林 11:12, 22 August 2016 (UTC))
About restarting computer: after changing Udev rules and reload them is not working, I think that it is also necessary restart gvfsd and related to it processes or just reboot computer that helped me much better. Did some else tested it?
(Andy Crowd - 蔡依林 18:46, 22 August 2016 (UTC)).