Hello,
i have a priveleged CT with octoprint inside. The printer is connected by USB.
If the printer is connected and I have started the LXC everything is workig fine.
If I switch off the printer and switch it on later again, the connection to the printer is not possibe anymore until I have restarted the complete LXC.
What I did:
Creating an udev rule for a symlink to the /dev/tty of the printer:
which works:
/etc/pve/nodes/pve/lxc/110.conf:
if I do a ls -la /dev/ttyUSB0 in the LXC I got:
If it works:
After power on/off the printer
Restarting octoprint with
does not help, only complete reboot of LXC.
Seems as if the /dev/tty is blocked.
The log file of the node while switching on the printer looks like this:
is
the error message for my problem ?
Any idea what I can do ? I am not an Linux expert, more a user.
Thank you in advanced
Peter
i have a priveleged CT with octoprint inside. The printer is connected by USB.
If the printer is connected and I have started the LXC everything is workig fine.
If I switch off the printer and switch it on later again, the connection to the printer is not possibe anymore until I have restarted the complete LXC.
What I did:
Creating an udev rule for a symlink to the /dev/tty of the printer:
SUBSYSTEM=="tty", ATTRS{idVendor}=="2c99", ATTRS{idProduct}=="0002" SYMLINK+="ttyPrusa", KERNEL=="ttyUSB[0-9]*", MODE="0666"
which works:
Code:
ls -la /dev/tty*
lrwxrwxrwx 1 root root 7 Oct 16 18:47 /dev/ttyPrusa -> ttyACM0
crw-rw-rw- 1 root dialout 166, 0 Oct 16 18:47 /dev/ttyACM0
/etc/pve/nodes/pve/lxc/110.conf:
Code:
arch: amd64
cores: 1
hostname: octoprint
memory: 1024
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:36:9A:6F,ip=dhcp,type=veth
ostype: debian
rootfs: pve2:vm-110-disk-0,size=8G
swap: 512
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 81:* rwm
lxc.cgroup2.devices.allow: c 166:* rwm
lxc.mount.entry: /dev/ttyPrusa dev/ttyUSB0 none bind,optional,create=file
lxc.mount.entry: /dev/video20 dev/video0 none bind,optional,create=file
lxc.mount.entry: /dev/video21 dev/video1 none bind,optional,create=file
if I do a ls -la /dev/ttyUSB0 in the LXC I got:
If it works:
crw-rw-rw- 1 root dialout 166, 0 Oct 16 18:34 /dev/ttyUSB0
After power on/off the printer
c--------- 0 root root 166, 0 Oct 16 19:02 /dev/ttyUSB0
Restarting octoprint with
systemctl restart prusa.service
does not help, only complete reboot of LXC.
Seems as if the /dev/tty is blocked.
The log file of the node while switching on the printer looks like this:
Code:
Oct 16 20:23:37 pve kernel: usb 1-1.4.2: USB disconnect, device number 18
Oct 16 20:23:48 pve audit[1146000]: AVC apparmor="DENIED" operation="mount" class="mount" info="failed perms check" error=-13 profile="lxc-110_</var/lib/lxc>" name="/run/systemd/unit-root/" pid=1146000 comm="(install)" srcname="/" flags="rw, rbind"
Oct 16 20:23:48 pve kernel: audit: type=1400 audit(1729153428.495:171): apparmor="DENIED" operation="mount" class="mount" info="failed perms check" error=-13 profile="lxc-110_</var/lib/lxc>" name="/run/systemd/unit-root/" pid=1146000 comm="(install)" srcname="/" flags="rw, rbind"
Oct 16 20:23:49 pve kernel: usb 1-1.4.2: new full-speed USB device number 19 using xhci_hcd
Oct 16 20:23:49 pve kernel: usb 1-1.4.2: New USB device found, idVendor=2c99, idProduct=001a, bcdDevice= 1.00
Oct 16 20:23:49 pve kernel: usb 1-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 16 20:23:49 pve kernel: usb 1-1.4.2: Product: Original Prusa MK4S
Oct 16 20:23:49 pve kernel: usb 1-1.4.2: Manufacturer: Prusa Research (prusa3d.com)
Oct 16 20:23:49 pve kernel: usb 1-1.4.2: SerialNumber: 10589-3742441634918764
Oct 16 20:23:49 pve kernel: cdc_acm 1-1.4.2:1.0: ttyACM0: USB ACM device
is
AVC apparmor="DENIED" operation="mount" class="mount"
the error message for my problem ?
Any idea what I can do ? I am not an Linux expert, more a user.
Thank you in advanced
Peter
Last edited: