A few people in #86 and on Discord, including myself experienced an issue where the webcam disappears after a while, and doesn't come back until a power cycle - after which it disappears shortly after anyways.
Doing some digging, seems like the camera gets disconnected/reconnected, and this causes it to stop showing up. Could be down to a power supply issue I suppose, as the connections are not loose in any way.
I was able to work around the issue on my machine by adding an udev rule, here are the exact steps I took:
ssh into the printer as root ssh root@<printer-ip> password is makerbase
nano /etc/udev/rules.d/99-webcam-reconnect.rules and add this:
#!/bin/bash
# Restart the webcamd service
sudo systemctl restart webcamd
echo "Restarted webcamd: $(date)" >> /root/restart-webcamd.log
chmod +x /root/restart-webcamd.sh
This should run restart-webcamd.sh whenever the webcam is (re)connected.
Double check the idVendor/idProduct in case yours is different (likely not), you can verify with dmesg -w and search for HD Camera, mine says something like this:
[ 188.383834] usb 2-1.4: Found UVC 1.00 device HD Camera (1bcf:0b09)
[ 188.404976] input: HD Camera: HD Camera as /devices/platform/ff5c0000.usb/usb2/2-1/2-1.4/2-1.4:1.0/input/input1
[ 188.405785] usbcore: registered new interface driver uvcvideo
You see the vendor/product id in the parenthesis (1bcf:0b09).
With this in place, my webcam no longer disappears, and I can confirm the script runs by inspecting the /root/restart-webcamd.log I added:
Restarted webcamd: Tue Nov 12 12:07:52 CET 2024
Restarted webcamd: Tue Nov 12 16:51:58 CET 2024
Restarted webcamd: Tue Nov 12 16:54:34 CET 2024
Restarted webcamd: Tue Nov 12 17:09:11 CET 2024
Restarted webcamd: Tue Nov 12 17:36:51 CET 2024
Hope this helps someone in a similar boat (benchy?!).
A few people in #86 and on Discord, including myself experienced an issue where the webcam disappears after a while, and doesn't come back until a power cycle - after which it disappears shortly after anyways.
Doing some digging, seems like the camera gets disconnected/reconnected, and this causes it to stop showing up. Could be down to a power supply issue I suppose, as the connections are not loose in any way.
I was able to work around the issue on my machine by adding an udev rule, here are the exact steps I took:
ssh root@<printer-ip>
password ismakerbase
nano /etc/udev/rules.d/99-webcam-reconnect.rules
and add this:nano /root/restart-webcamd.sh
and add this:chmod +x /root/restart-webcamd.sh
This should run
restart-webcamd.sh
whenever the webcam is (re)connected.Double check the idVendor/idProduct in case yours is different (likely not), you can verify with
dmesg -w
and search forHD Camera
, mine says something like this:You see the vendor/product id in the parenthesis
(1bcf:0b09)
.With this in place, my webcam no longer disappears, and I can confirm the script runs by inspecting the
/root/restart-webcamd.log
I added:Hope this helps someone in a similar boat (benchy?!).