Difference between revisions of "Talk:Udev"

From ArchWiki
Jump to: navigation, search
(SD cards don't cleanly umount: rm closed discussion)
m (udevadm invocation)
(10 intermediate revisions by 4 users not shown)
Line 6: Line 6:
 
== umask fails to apply to vfat/ntfs partitions ==
 
== umask fails to apply to vfat/ntfs partitions ==
 
Has anyone else found that umask settings do not apply as they should?  Setting umask to 002 or 0002 results in all files having the executable bit enabled. However, if I manually set the fmask/dmask values (ex: fmask=113,dmask=002) it works fine. --[[User:Thayer|thayer]] 16:40, 5 May 2010 (EDT)
 
Has anyone else found that umask settings do not apply as they should?  Setting umask to 002 or 0002 results in all files having the executable bit enabled. However, if I manually set the fmask/dmask values (ex: fmask=113,dmask=002) it works fine. --[[User:Thayer|thayer]] 16:40, 5 May 2010 (EDT)
 
== Possible to Auto Mount Optical Discs? ==
 
Is there a way to auto mount CD and DVDs with Udev? --[[User:Matthewbauer|Matthewbauer]] 23:12, 30 May 2010 (EDT)
 
 
: I think I hacked up a way and added to the page. --[[User:Matthewbauer|Matthewbauer]] 00:16, 31 May 2010 (EDT)
 
 
: With that rule udev will take a lot longer to "process events" during boot. (+-10s more than without it) --[[User:vieira|Vieira]] 02:20, 26 June 2010 (GMT)
 
 
== <s> How to match devices like /dev/sdb42 </s> ==
 
 
https://bbs.archlinux.org/viewtopic.php?pid=882211#p882211
 
 
I'm not and udev guru, but why sometimes it's
 
KERNEL!="sd[a-z][0-9]"
 
and in other examples
 
KERNEL!="sd[a-z]*"
 
?
 
 
Why not put
 
KERNEL!="sd[a-z][0-9]*"
 
everywhere?
 
 
[[User:Karol|Karol]] 10:11, 23 January 2011 (EST)
 
 
:Some devices do not have any partitions, so you also want to match /dev/sdb for example that contains the filesystem in such a case. KERNEL!="sd[a-z]*" is the only expression that works for these ones. [[User:Xduugu|Xduugu]] 09:24, 5 February 2011 (EST)
 
::I actually have such device - it's one of my mp3 players; the other one shows up as sdb1. I couldn't figure out how to make it work until I figured out it's not regexp (where '*' means 'zero or more', so "sd[a-z][0-9]*" would work even for 'sdb'), but a globbing pattern. [[User:Karol|Karol]] 09:49, 5 February 2011 (EST)
 
:::Hey, that is a very nice tip, thanks! We should incorporate this information in the article somehow, I tried to change the pattern like it were a regex, and was very puzzled it didn't work. -- [[User:Nic|Nic]] 11:22, 5 November 2011 (EDT)
 
:::: Related info does not exist anymore. Close. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 07:36, 15 September 2012 (UTC)
 
 
== remove the "automounting usb devices" udev rules ? ==
 
considering [https://bbs.archlinux.org/viewtopic.php?id=143023 this discussion], I think the whole section should be removed. We shouldn't suggest to people to use this, there are [[Udev#Automounting_UDisks_Wrappers|Udisks Wrappers]] for this. Any objections? [[User:65kid|65kid]] ([[User talk:65kid|talk]]) 11:06, 10 June 2012 (UTC)
 
: + 1 for me. Normal user should never touch these. However, you'd better leave a link or two about how to write udev rules manully. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 06:08, 12 June 2012 (UTC)
 
:: BTW: As of systemd 185-1, the deleted scripts were broken for NTFS partitions, yielding only "Transport endpoint is not connected". They still worked with classic initscripts, though. -- [[User:Misc|Misc]] ([[User talk:Misc|talk]]) 13:29, 20 June 2012 (UTC)
 
: I'll disagree. udisks{1,2} needs '''PolKit''', which I doubt is ever needed for normal setup and almost always is a PITA in configuration by itself. It '''is''' needed, though, for big and fat DE such as KDE, Gnome or even XFCE. But not for "home brew" environments. Neither who uses those big DE are going to write udev rules by themselves nor they are to install udisks and wrappers (as KDE, Gnome or XFCE brings their own automounting). As you removed the tips, you deprived those who wants their own setup of valuable information. The discussion you mention just reveals lack of the documentation and examples on UDev rules. ANd you propose just hide the KISS way and expose wrappers and bloatware of PolKit and UDisks. [[User:Lux|Lux]] ([[User talk:Lux|talk]]) 18:56, 27 July 2012 (UTC)
 
:: I'm with Lux.  I spent a while searching for these rules and was sad to see them gone.  Maybe a separate wiki page with a link from here? [[User:Jaredcasper|Jaredcasper]] ([[User talk:Jaredcasper|talk]]) 07:04, 30 July 2012 (UTC)
 
: udev rules were never meant to be used for stuff like this, it was an ugly and broken hack. For example the umount rules didn't make any sense because the device was already gone when the rule matched, so there was nothing to unmount. And polkit/udisks is neither bloatware nor hard to configure. It is a single process running in the background and doesn't need any configuration whatsoever as long as you have a proper ConsoleKit session set up (but I guess ConsoleKit is bloatware too...). If you seriously think that these ugly and hacky udev rules are "more KISS" than udisks, I personally can't take you seriously, sorry. [[User:65kid|65kid]] ([[User talk:65kid|talk]]) 09:41, 30 July 2012 (UTC)
 
 
:: I agree with Lux. Numerous users of Plug computers wouldn't install Udisks etc. And Udisks topic should be separated to a new article and only referenced by a link in this complex enough for a novice by itself Udev topic. Unmounting detached devices 'after the fact' in udev-automount rules does make sense to drop handles to now empty folders where they were mounted. If udev can't delete the folder, it remains shared by Samba and users with rw access to then mounted drive can write files to it, which then be replaced by content of the remounted drive. So its data loss threat to leave these folders accessible. [[User:Sambul13|Sambul13]] 09.40, 03 September 2012 (UTC)
 
  
 
== Extract the UDisks into new article ==
 
== Extract the UDisks into new article ==
Line 51: Line 13:
 
:: Agreed 100%. [[User:Sambul13|Sambul13]] 09.40, 03 September 2012 (UTC)
 
:: Agreed 100%. [[User:Sambul13|Sambul13]] 09.40, 03 September 2012 (UTC)
  
== <s> Integrating article content with systemd </s> ==
+
== About udev rules ==
 
+
udevadm info -a -n [device name]
Despite udev as a service was merged into systemd, which has broader functionality, a single wiki article for systemd with udev service features included would be very difficult to comprehend or follow in practice. Keep it simple, a separate wiki page per major systemd service. [[User:Sambul13|Sambul13]] 09.45, 03 September 2012 (UTC)
+
and
:I do agree, udev has such a wide spectrum of capabilities and configuration. It warrants its own article, the systemd article should refer here. --[[User:Stefanwilkens|stefanwilkens]] ([[User talk:Stefanwilkens|talk]]) 12:13, 8 September 2012 (UTC)
+
udevadm info -a -p $(udevadm info -q path -n [device name])
:: Merge request removed. Systemd link to this page added. Close. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 07:22, 15 September 2012 (UTC)
+
gives the same output but the latter is recommended by some [[User:Khampf|Khampf]] ([[User talk:Khampf|talk]]) 20:57, 5 February 2013 (UTC)

Revision as of 20:57, 5 February 2013

usbtiny extra udev rule?

In the udev rules for usbtiny, there are 2 rules listed. Howver, adding the second one to my udev rules resulted in me not an "rc=-1" communication error when I tried to use my usbtiny. When I commented out this rule:

"SBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0479", GROUP="users", MODE="0666"

everything worked fine. Not sure what the root of the issue is, but this rule makes the usbtiny programer unusable.

umask fails to apply to vfat/ntfs partitions

Has anyone else found that umask settings do not apply as they should? Setting umask to 002 or 0002 results in all files having the executable bit enabled. However, if I manually set the fmask/dmask values (ex: fmask=113,dmask=002) it works fine. --thayer 16:40, 5 May 2010 (EDT)

Extract the UDisks into new article

As UDev is more generic than just disk mounting subsystem, I propose to extract the UDisks part into its own page to keep things simple and clear. Lux (talk) 19:32, 27 July 2012 (UTC)

Agreed 100%. Sambul13 09.40, 03 September 2012 (UTC)

About udev rules

udevadm info -a -n [device name]

and

udevadm info -a -p $(udevadm info -q path -n [device name])

gives the same output but the latter is recommended by some Khampf (talk) 20:57, 5 February 2013 (UTC)