#linuxcnc Logs

Jun 04 2021

#linuxcnc Calendar

01:04 AM philipp77: somebody help me, please
01:24 AM Deejay: moin
01:25 AM philipp77: Hi everyone
01:25 AM philipp77: I always get a permission/udev error on startup.
01:25 AM philipp77: The relevant device is
01:25 AM philipp77: I: Bus=0003 Vendor=045e Product=028e Version=0114
01:25 AM philipp77: N: Name="Microsoft X-Box 360 pad"
01:25 AM philipp77: P: Phys=usb-0000:00:1d.0-1.6/input0
01:25 AM philipp77: S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/input/input3
01:25 AM philipp77: U: Uniq=
01:25 AM philipp77: H: Handlers=event3 js0
01:25 AM philipp77: the line in /etc/udev/rules.d/50-permission-joystick.rules
01:25 AM philipp77: is
01:25 AM philipp77: ATTR{idProduct}=="028e", ATTR{idVendor}=="045e", MODE="666", GROUP="plugdev"
01:25 AM philipp77: (also tried MODE="660" or MODE="0660" )
01:25 AM philipp77: reread the config via
01:25 AM philipp77: sudo udevadm control --reload-rules && sudo udevadm trigger && ls -la /dev/input/js0
01:25 AM philipp77: replugged, rebooted, but the output of
01:25 AM philipp77: ls -la /dev/input/js0
01:25 AM philipp77: is ALWAYS
01:25 AM philipp77: crw-rw-r--+ 1 root input 13, 0 Jun  4 07:56 /dev/input/js0
01:27 AM philipp77: Tried both the xpad and the xboxdrv, both times the same output.
01:29 AM philipp77: And both times it worked with the jstest program
01:35 AM philipp77: And yes, there is a plugdev group in /etc/group and my user is in it.
02:46 AM rs[m]: philipp77: did you start jstest with "sudo"?
02:47 AM philipp77: works with and without sudo
02:47 AM rs[m]: is it possible jstest hat setuid bit set?
02:48 AM philipp77: i dont know
02:48 AM philipp77:  ls -la /usr/bin/jstest
02:48 AM philipp77: -rwxr-xr-x 1 root root 23048 Feb  3  2019 /usr/bin/jstest
02:49 AM rs[m]: no it has not. so permissions to whatever jstest is using to talk to the joystick are OK.
02:51 AM rs[m]: what is the actual error you get? startup of what? linuxcnc?
02:51 AM philipp77: yes
02:52 AM philipp77: No input devices could be opened. This usually indicates a misconfigured system. Please
02:53 AM philipp77: read the section "PERMISSIONS AND UDEV" in the hal_input manpage
02:53 AM philipp77: waitpid failed hal_input
02:53 AM philipp77: hal_input exited without becoming ready
02:55 AM philipp77: if I do a
02:55 AM philipp77: sudo udevadm test /dev/input/js0 then i get
02:56 AM philipp77: Failed to open device '/sys/dev/input/js0Failed': No such device
02:56 AM philipp77: Unload module index
02:56 AM philipp77: Unloaded link configuration context.
02:59 AM rs[m]: does "udevadm test" show reading your /etc/udev/rules.d/50-permission-joystick.rules file?
02:59 AM philipp77: yes
02:59 AM philipp77: Reading rules file: /etc/udev/rules.d/49-input-permissions.rules
02:59 AM philipp77: i have renamed the file
03:01 AM rs[m]: what about permissions of /dev/input/event3 file?
03:01 AM rs[m]: 08:12:31 philipp77 | H: Handlers=event3 js0
03:01 AM philipp77: ls -la /dev/input/event3
03:01 AM philipp77: crw-rw----+ 1 root input 13, 67 Jun  4 09:28 /dev/input/event3
03:03 AM rs[m]: the "+" suggests permission info is not complete, e.g. there are ACLs. I never encountered that on a /dev filesystem but... maybe look at getfacl /dev/input/js0 resp. event3
03:04 AM rs[m]: I'm out of ideas. next thing I would do would examining jstest (lsof -p <pid of jstest> or even strace)
03:05 AM rs[m]: and look what file that uses
03:05 AM rs[m]: s/file/device-file/
03:07 AM philipp77: Does this look ok
03:07 AM philipp77:  getfacl /dev/input/event3 && getfacl /dev/input/js0
03:07 AM philipp77: getfacl: Entferne führende '/' von absoluten Pfadnamen
03:07 AM philipp77: # file: dev/input/event3
03:07 AM philipp77: # owner: root
03:07 AM philipp77: # group: input
03:07 AM philipp77: user::rw-
03:07 AM philipp77: user:lightdm:rw-
03:07 AM philipp77: group::rw-
03:07 AM philipp77: mask::rw-
03:07 AM philipp77: other::---
03:07 AM philipp77: getfacl: Entferne führende '/' von absoluten Pfadnamen
03:07 AM philipp77: # file: dev/input/js0
03:07 AM philipp77: # owner: root
03:07 AM philipp77: # group: input
03:07 AM philipp77: user::rw-
03:07 AM philipp77: user:lightdm:rw-
03:07 AM philipp77: group::rw-
03:07 AM philipp77: mask::rw-
03:08 AM rs[m]: doesn't look suspicious
03:10 AM philipp77:  lsof -p 6747
03:10 AM philipp77: COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
03:10 AM philipp77: jstest  6747 phil  cwd    DIR    8,4     4096 261633 /home/phil
03:10 AM philipp77: jstest  6747 phil  rtd    DIR    8,2     4096      2 /
03:10 AM philipp77: jstest  6747 phil  txt    REG    8,2    23048   6358 /usr/bin/jstest
03:10 AM philipp77: jstest  6747 phil  mem    REG    8,2  1824496 400228 /usr/lib/x86_64-linux-gnu/libc-2.28.so
03:10 AM philipp77: jstest  6747 phil  mem    REG    8,2   165632 399784 /usr/lib/x86_64-linux-gnu/ld-2.28.so
03:11 AM philipp77: jstest  6747 phil    0u   CHR  136,1      0t0      4 /dev/pts/1
03:11 AM philipp77: jstest  6747 phil    1u   CHR  136,1      0t0      4 /dev/pts/1
03:11 AM philipp77: jstest  6747 phil    2u   CHR  136,1      0t0      4 /dev/pts/1
03:11 AM philipp77: jstest  6747 phil    3r   CHR   13,0      0t0 101543 /dev/input/js0
03:12 AM rs[m]: it seems jstest is able to read js0 without root permissione
03:23 AM rs[m]: philipp77: maybe this contains something useful https://github.com/libsdl-org/SDL/blob/e9af6dcd93e92013198ec7cc8445555632b86c37/README-linux.txt
03:34 AM philipp77: @rs[m] Thanks you a lot for helping, but I have to shower and go outside now. :/ will have a look at the github later
04:09 AM Tom_L: morning
04:10 AM philipp77: ok, i solved it. i added my user to the input group. I still don't know why my rule didn't edit the permissions of the joystick. now I am late, hehe
04:11 AM rs[m]: that may be ok on a control for CNC machines, but i would not do that on a "generic" workstation
05:51 AM pink_vampire: hi
12:13 PM perry_j1987: whats new
12:18 PM drdoc: Blue Ox Solutions
12:18 PM drdoc: Ebay Seller "chrisclub1"
12:18 PM drdoc: I ordered hardware Wednesday and it's out for delivery
12:20 PM roycroft: usps have been very fast lastely
12:20 PM roycroft: lately
12:21 PM roycroft: i had two parcels shipped earlier this week from back east that were due arrive saturday, and both were delivered yesterday
12:22 PM drdoc: This was FedEx
12:26 PM drdoc: I had planned to build the aluminum parts for my router - I 3D printed all the plate parts to see whether I like the design
12:27 PM drdoc: I do, except that the original doesn't have quite enough Z travel
12:28 PM drdoc: and the X-beam plates are a little wimpy
12:29 PM drdoc: https://www.ebay.com/itm/253147904704
12:30 PM drdoc: solves both problems and if my time's worth $5/hr, I can't fab them for that
12:40 PM -!- #linuxcnc mode set to +v by ChanServ
02:10 PM perry_j1987: keep picking up the coffee mug to take a drink but its empty
02:40 PM bjorkintosh: is anyone else running the firefox 89?
02:40 PM bjorkintosh: it's crashing way too often to be an improvement.
03:40 PM roycroft: i use firefox only when i have to
03:40 PM roycroft: that said, i'm running 89.0b13 developer edition on my imac, and it seems pretty stable
04:29 PM Vq: bjorkintosh: I'm running 88.0.1
04:31 PM Vq: I've been running the ESR version for years and have been pretty happy with old and stable.
04:58 PM roycroft: i use the developer version because firefox is too picky about extensions that it allows these days, and i need an extension that they don't like
09:18 PM roycroft: yah
09:18 PM roycroft: yay, rather
09:19 PM roycroft: first pizza of the year with all the herbs freshed picked from my garden