Nrml | Hello everyone. I'm having a permission issue in a directory inside /sys which I think is being caused by eudev (vv~. | 09:27 |
---|---|---|
Nrml | er, eudev v.3.2.9 | 09:31 |
Nrml | this is the issue: | 09:31 |
Nrml | ls -l /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ | 09:31 |
Nrml | [...] | 09:31 |
bb|hcb | Nrml: Can you try if the same problem is present in 3.2.11? | 09:32 |
Nrml | drw------- 6 root root 0 Nov 11 04:37 usb1 | 09:33 |
Nrml | drwxr-xr-x 6 root root 0 Nov 11 04:37 usb2 | 09:33 |
Nrml | usb1 being 0600 prevents Xorg server from detecting mouse and keyboard | 09:33 |
Arsen | wouldn't that file be a symlink? | 09:33 |
Nrml | usb2, on the other hand, has the correct permissions | 09:34 |
Nrml | Arsen: no, these are directories (symlinks are elsewhere) | 09:34 |
Nrml | so, here's my question: why is usb1 permissions wrong, while usb2 is correct? | 09:35 |
Nrml | bb|hcb: I can try | 09:35 |
Nrml | bb|hcb: lemme see if I have eudev 3.2.11 in backports or wherever (3.2.9 is the newest for my distro right now) | 09:36 |
Nrml | bb|hcb: nope, no eudev >3.2.9 in backports or anywhere else I can see :-( | 09:52 |
Nrml | But back to my question: how can I find out why usb2 is being set up correctly (with 0755) while usb1 is wrong? | 09:53 |
Nrml | is there some kind of debug mode or extended logging or something I can set in eudev so it tells me why it did (or failed to do) that? | 09:54 |
* Nrml sighs | 10:12 | |
Nrml | jus | 10:12 |
Nrml | *just looked at https://github.com/eudev-project/eudev, and you folks are all there (Arsen, bb|hcb, etc) | 10:14 |
Nrml | so if you can't or won't help me, I guess I'm just fscked... :-/ | 10:15 |
Arsen | people are busy | 10:17 |
Arsen | sorry, I haven't had a chance to offer help | 10:18 |
Arsen | ``udevadm info'' should offer help when ran on that device | 10:18 |
Nrml | Arsen: thanks, will have a look into that | 10:21 |
Nrml | Arsen: I ran `udevadm info` on both /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1 and usb2, and diffed the output: https://paste.debian.net/1260338/ | 10:27 |
Nrml | I can't see anything even remotely related to permissions or mode or 0600 vs 0755 | 10:27 |
Arsen | it wouldn't be permissions, it'd be info on how the two devices differfrom the eye of udev | 10:29 |
Nrml | OK | 10:29 |
Arsen | canyou try udevadm test -a add /sys/... | 10:30 |
Arsen | on the 0600 device | 10:30 |
Nrml | Arsen: will do, 1 min please | 10:30 |
Nrml | (and thanks for the help BTW, and sorry if I sounded grumpy or discorteus at first) | 10:31 |
Nrml | Arsen: here it is: https://paste.debian.net/1260342/ | 10:32 |
Nrml | (full output, both stderr and stdin) | 10:33 |
Arsen | hmm, are you sure this file is the problem at all? | 10:37 |
Arsen | this is a hub device, I don't think Xorg should be touching it anyway | 10:37 |
Arsen | though admittedly I don't know how Xorg decides what to touch | 10:37 |
Arsen | worst case scenario, you might be best off adding a /etc/udev/rules.d/99-makehubs755.rules file that triggers on the variables ``test'' printed to set the permissions the way you want them | 10:38 |
Nrml | Arsen: Xorg does not touch it directly, as it's a directory. What it does is to traverse it down, to access the devices (keyboard and mouse) which are under it (ie, inside it) | 10:39 |
Nrml | Arsen: what I would really like to do is to find out *why* eudev is setting usb1 permissions differently than usb2 | 10:40 |
Arsen | the line ``test'' is referencing doesn't contain the code to set it's perms like that upstream it'd seem | 10:42 |
Arsen | try running test on both and seeing the difference | 10:42 |
Arsen | it should be listing the matched rules | 10:42 |
Nrml | Arsen: here's the diff: https://paste.debian.net/1260346/ | 10:46 |
Arsen | if you reboot are permissions still wrong? | 10:46 |
Arsen | eudev appears to be setting them to the same in both cases (since there's no diff on the MODE lines) | 10:46 |
Nrml | Arsen: yep, reboot changes nothing | 10:49 |
Arsen | can you start udevd with --debug and check logs? | 10:50 |
Nrml | Arsen: I saw no MODE lines referring to /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb{1,2}, just to /dev/bus/usb/001/001 and /dev/bus/usb/002/001 | 10:51 |
Nrml | (in the `udevadm test` output) | 10:51 |
Arsen | are those files not links? or do they not contain a node that is a link to those two /dev/ nodes? | 10:51 |
Arsen | oh wait | 10:52 |
Arsen | hmm | 10:52 |
Nrml | Arsen: they are not files nor links, they are plain diretories | 10:52 |
Arsen | yeah, I'm not sure what'd be setting the permission on those sysfs nodes | 10:52 |
Nrml | Hummmrmr | 10:52 |
sam_ | can you try with latest eudev please or file a bug with your distribution? | 10:54 |
Nrml | Arsen: the default permissions on everything in /sys are set by the kernel, right? Is it possible/probable that it's the *kernel* that's setting them differently, and eudev is simply not touching them? | 10:56 |
Arsen | as sysfs is a pseudofs the kernel is indeed doing the permissions | 10:57 |
Nrml | OK | 10:57 |
Arsen | not sure if eudev sets them anywhere explicitly to be honest... sorry | 10:57 |
Nrml | Hummmrmrm | 10:57 |
Nrml | re: "start udevd with --debug", do I just kill the current udevd, then restart it with --debug? | 10:58 |
Arsen | I'd do it on a fresh boot | 10:58 |
Arsen | to have it be as clean as possible | 10:58 |
Nrml | Arsen: by fresh boot, you mean modifying initrd? | 10:59 |
bb|hcb | Nrml: BTW. What system is that? My hubs are like /sys/devices/pci0000:00/0000:00:14.0/usb1, while yours contain platform/scb | 11:01 |
Arsen | unsure, no clue how your system boots ;) | 11:01 |
bb|hcb | And yes, for kernel created stuff it may differ across different drivers | 11:02 |
Nrml | bb|hcb: This is a Raspberry Pi 4B 8GB running Devuan Chimaera | 11:03 |
bb|hcb | About permissions, I do not think that eudev will touch anything outside /dev; based on the *.rules it will create /dev/something with the specified perms; that is why I recomended to try latest version, because there are changes to the rules there | 11:04 |
Nrml | Arsen: it does run eudev from initrd, AFAICT | 11:04 |
bb|hcb | Oh, good, I have couple of those handy | 11:04 |
Nrml | bb|hcb: they are *fantastic* machines | 11:04 |
Nrml | I think I do have a kernel problem, then | 11:05 |
Nrml | (ie, the kernel is setting the permissions differently for usb1 and usb2) | 11:05 |
bb|hcb | On mine the kernel is 5.10.74-v8 #1 SMP PREEMPT Tue Oct 19 04:33:14 CEST 2021 aarch64 GNU/Linux; and both usb1/2 are drwxr-xr-x | 11:08 |
Nrml | bb|hcb: what distro? | 11:09 |
bb|hcb | and eudev is 3.2.9-10~chimaera1 | 11:09 |
bb|hcb | BTW. For Devuan there is a build in experimental but that would work on testing/ceres and not in chimaera | 11:10 |
Nrml | OK, so yours is running Chimaera too | 11:10 |
Nrml | Here eudev is the same 3.2.9-10~chimaera1 as yours, but my kernel is 5.15.65 #1 SMP PREEMPT Tue Sep 6 05:41:26 EDT 2022 aarch64 GNU/Linux | 11:11 |
Nrml | OK, trying with another kernel | 11:13 |
Nrml | So, tried with another kernel (5.19.7 #1 SMP PREEMPT Tue Sep 6 05:43:43 EDT 2022 aarch64 GNU/Linux) and the permissions to /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1 changed to 770, unfortunately no cigar yet as I need 755 | 11:31 |
Nrml | But it proves it's the kernel doing the setting, and that eudev is not touching it | 11:31 |
Nrml | Right? | 11:31 |
bb|hcb | Yes, looks like... | 11:53 |
Nrml | bb|hcb: thanks for the confirmation. | 12:44 |
Nrml | I just escalated the issue to the kernel guy. Let's see what he says. | 12:46 |
Nrml | Meanwhile, I added a script to my /etc/boot.d that just does a `chmod 755 /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb*`, I think it's better than kludging a rule into udev to do the same | 12:48 |
Nrml | Thanks everyone and specially bb|hcb and Arsen for the assistance | 12:48 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!