v.1.2.1 and 1.3.0 Printers stop working after 4 hours if Timelapse is enabled

Hi all,

i have a problem with webcams and timelapse blocking printing due to an error.

this only happens if timelapse recording is enabled and the problem I think is due to mjpeg_streamer

instead using ustreamer only to view the webcams and ffmpeg to record the timelapse this problem does not occur but with version 1.2.1 and 1.3.0 it is a problem to configure it correctly

v4l2-ctl --list-devices - https://pastebin.com/dAFKbZWY

syslog error - https://pastebin.com/bbqzquBH

server log - https://pastebin.com/U94R6YHk

mjpg_streamer status - https://pastebin.com/NyryqrA8

when it crashes the only way to get the printers or webcams to work again is to restart the raspberry and turn the printers off and on again.

Thanks.

Comments

  • Not sure why you say 4 hours. In your files you start print at:
    2022-02-24 21:42:28: start printjob elegoo-saturn_3h45m_0.2mm_240C_PETG_ENDER3V2 on printer Ender 3 V2 - Direct
    And at
    2022-02-24 21:57:53: error: Reading serial conection failed: End of file. Closing connection.

    that is just 15 minutes later. This is in first place a reaction due to linux closing port. checking syslog is bit tight but first line just catches the time - might contain more infos bevore:
    Feb 24 21:57:53 3dprinters kernel: [21791.770570] usb 1-1.4.4-port2: disabled by hub (EMI?), re-enabling...
    Feb 24 21:57:53 3dprinters kernel: [21791.770597] usb 1-1.4.4.2: USB disconnect, device number 6
    Feb 24 21:57:53 3dprinters kernel: [21791.772126] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
    Feb 24 21:57:53 3dprinters kernel: [21791.772232] ch341 1-1.4.4.2:1.0: device disconnected
    Feb 24 21:57:54 3dprinters kernel: [21792.169958] usb 1-1.4.4.2: new full-speed USB device number 9 using xhci_hcd
    Feb 24 21:58:09 3dprinters kernel: [21807.510706] usb 1-1.4.4.2: device descriptor read/64, error -110
    Feb 24 21:58:25 3dprinters kernel: [21822.951397] usb 1-1.4.4.2: device descriptor read/64, error -110

    disabled by hub sounds like there is some hardware reason the usb to printer got disconnected, stopping print.
    Due to hardware disabled usb port I guess you really need to restart all.



  • I am doing further checks; for the moment I changed the usb cables by cutting the power supply; I disabled the webcams for safety and started a 6 hour print.

    I'll update you as soon as I verify the problem better; however with version 1.2.0 this problem did not occur
  • hi, 

    currently i only connected two printers and two webcams, without the usb hub as i would have to reconnect all 8 printers and 8 webcams if i can get it to work

    I am attaching the complete syslog - https://pastebin.com/eBWAMKAS


  • Logs without message what happened when are not so useful. I see usb is still making trouble I guess
    [ 4544.975266] usb 1-1.2.4.3: Found UVC 1.00 device USB 2.0 Camera (0c45:636d)
    [ 4544.982274] input: USB 2.0 Camera: USB 2.0 Camera as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4.3/1-1.2.4.3:1.0/input/input13
    [ 4544.987716] usb 1-1.2.4.3: 3:1: cannot get freq at ep 0x84
    [ 4545.627699] usb 1-1.2.4.1: Failed to query (GET_CUR) UVC control 12 on unit 1: 0 (exp. 3).
    [ 4545.627926] usb 1-1.2.4.1: Failed to query (GET_CUR) UVC control 9 on unit 1: 0 (exp. 2).
    [ 8608.271343] usb 1-1.2.4.1: USB disconnect, device number 13
    [ 8608.272440] uvcvideo 1-1.2.4.1:1.1: Failed to resubmit video URB (-19).
    [ 8608.276674] uvcvideo 1-1.2.4.1:1.1: Failed to resubmit video URB (-19).
    [ 8608.280688] uvcvideo 1-1.2.4.1:1.1: Failed to resubmit video URB (-19).
    [ 8608.284653] uvcvideo 1-1.2.4.1:1.1: Failed to resubmit video URB (-19).
    [ 8608.288640] uvcvideo 1-1.2.4.1:1.1: Failed to resubmit video URB (-19).
    [ 8609.807535] usb 1-1.2.4.3: USB disconnect, device number 14
    [ 8609.808884] uvcvideo 1-1.2.4.3:1.1: Failed to resubmit video URB (-19).
    [ 8609.812932] uvcvideo 1-1.2.4.3:1.1: Failed to resubmit video URB (-19).
    [ 8609.816916] uvcvideo 1-1.2.4.3:1.1: Failed to resubmit video URB (-19).
    [ 8609.820921] uvcvideo 1-1.2.4.3:1.1: Failed to resubmit video URB (-19).
    [ 8609.824916] uvcvideo 1-1.2.4.3:1.1: Failed to resubmit video URB (-19).
    [ 8609.907870] xhci_hcd 0000:01:00.0: ERROR Transfer event for disabled endpoint slot 5 ep 2
    [ 8609.907894] xhci_hcd 0000:01:00.0: @000000041ad068d0 00000000 00000000 0f000000 05038000
    [17774.418554] ch341-uart ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
    [17774.418761] ch341-uart ttyUSB1: usb_serial_generic_read_bulk_callback - urb stopped: -32
    [17774.452527] usb 1-1.2: USB disconnect, device number 11
    [17774.452558] usb 1-1.2.4: USB disconnect, device number 12


    Some com problems from webcam and disconnects are video too.

    At the end I see some problem with printer connection and I guess they are device 11 and 12 getting disconnected.
    usb names all start usb 1-1.2.4 so they are on bus 1, root hub 1 and then on port 2 is another hub right that has all devices or next hub, right? What does
    lsusb -t
    show? Makes it easier to understand how the devices are connected to each other.

    BTW: Do you have undervoltage where problems might arise from or is this just electric problems related? With undervoltage that is known to have negative impacts on devices often. See bolt icon in server gui.
  • I have all the printers connected to multiple 2400W UPS; there should be no power problems always in theory

    Currently I had connected a D-Link USB HUB (DUB-H7) to all the printers on the USB 3.x port of the RPi; instead the webcams were connected to another USB HUB equal to the previous one but on the USB 2.x port of the RPi.

    For testing I am currently using only 2 printers and webcams

    No errors reported on the server GUI

    For another test I created another SD Card for new installation without updates to check if the problem may be due to some update done on RPi
  • In the new installation the server does not start and I don't understand why - https://pastebin.com/mHET1EWt


  • Old Image (not working) kernel is: 5.15.24-v7l+

    New Image (need test) kernel is: 5.10.92-v8+
  • antwal said:
    In the new installation the server does not start and I don't understand why - https://pastebin.com/mHET1EWt


    resolved, wrong permissions when i copied the backup

    webcams are ready - https://pastebin.com/6a3EKT13

    always errors on syslog - https://pastebin.com/FAnBnVcC

    in the Repetier Server log I saw some:

    2022-02-24 22:01:48: MainRequestHandler::handleRequest:Assertion violation: !_pStream in file "/home/parallels/cross/repetier-server/Repetier-Server/Poco/Net/src/HTTPServerResponseImpl.cpp", line 69

    2022-02-24 22:01:51: MainRequestHandler::handleRequest:Assertion violation: !_pStream in file "/home/parallels/cross/repetier-server/Repetier-Server/Poco/Net/src/HTTPServerResponseImpl.cpp", line 69


    where can I send the server.log.0 file? are 2.2Mb

  • edited February 2022
    lsusb -t 

    /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M

    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M

        |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

            |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=ch341, 12M

            |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=ch341, 12M

            |__ Port 3: Dev 6, If 0, Class=Video, Driver=uvcvideo, 480M

            |__ Port 3: Dev 6, If 1, Class=Video, Driver=uvcvideo, 480M

            |__ Port 3: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 480M

            |__ Port 3: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 480M

            |__ Port 4: Dev 5, If 2, Class=Audio, Driver=snd-usb-audio, 480M

            |__ Port 4: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M

            |__ Port 4: Dev 5, If 3, Class=Audio, Driver=snd-usb-audio, 480M

            |__ Port 4: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M


    v4l2-ctl --info 


    Driver Info:

    Driver name      : uvcvideo

    Card type        : USB 2.0 Camera: USB 2.0 Camera

    Bus info         : usb-0000:01:00.0-1.4

    Driver version   : 5.10.92

    Capabilities     : 0x84a00001

    Video Capture

    Metadata Capture

    Streaming

    Extended Pix Format

    Device Capabilities

    Device Caps      : 0x04200001

    Video Capture

    Streaming

    Extended Pix Format

    Media Driver Info:

    Driver name      : uvcvideo

    Model            : USB 2.0 Camera: USB 2.0 Camera

    Serial           : SN0001

    Bus info         : usb-0000:01:00.0-1.4

    Media version    : 5.10.92

    Hardware revision: 0x00000100 (256)

    Driver version   : 5.10.92

    Interface Info:

    ID               : 0x03000002

    Type             : V4L Video

    Entity Info:

    ID               : 0x00000001 (1)

    Name             : USB 2.0 Camera: USB 2.0 Camera

    Function         : V4L2 I/O

    Flags         : default

    Pad 0x01000007   : 0: Sink

      Link 0x02000010: from remote pad 0x100000a of entity 'Extension 3': Data, Enabled, Immutable

  • You can ignore " MainRequestHandler::handleRequest:Assertion violation: !_pStream in file" - this is a test if a http stream is defined that fails. Waiting for it to happen on my debugger to see where it comes from, but that is not causing problems in linux.

    With power problems I did not mean your 220V power. The problem is the 5V power for the pi that often fluctuates due to current changes and then can lead to errors. This is what undervoltage in bolt icon means and what linux provides as info on pi.

    What you call syslog does more look like dmesg output. Hard to read with time from boot. Easier is
    dmesg -T
    providing correct timestamps. I see no real errors apart from webcams not responding to GET_INFO which is most likely not implemented.

    Using USB 3 might not be as clever as you think. Often have heard about problems on usb 3 while printers worked fine on usb 2. Also there is no speed advantage. USB 3 goes down to usb 2 speed to work with printers. Don't think any of them has already usb 3.

    As a first test I would leave webcams on hub and move printers to the 2 usb 2 ports. That way only one would get disabled on errors caused on usb connection. Until now the hub was disconnected so any of the hub connected devices or the hub it self could be the cause. And splitting them would better show on which of the 3 pi ports the problem happens so you can better narrow down the hardware causing the issue.

    One test would also be testing without webcams. I have reports that some cheap mjpg might stop working after some time. Bought some cheap cam my self for testing with no problems so far. So maybe it is random quality problem with some or just some models. Anyhow target is to find out which hardware component is making trouble under the premise that they also make trouble on their own and not only in combination.

    Server logs are not of interest here. This is an electronic problem causing linux to stop/disconnect usb. Only reason you get problems in server is that due to disconnects the disconnected printer of course stop working.
  • raspberry is powered by the original power supply, but I also tried with XL4005 5A DC Step-Down Converter; but with both I do not reveal problems of feeding; even the server reveals no problems : https://gyazo.com/25974321062bd32248c9ae3359f2170c

    I will try to do some other tests, swapping the USB

    If I don't use the webcams everything works fine without any problems

    For safety I have disabled all kernel modules for audio management and webcam microphones, I am currently doing tests to see if they block
  • Yo never said if you see a power issue in bolt icon. Only if you see it, the power supply might be a problem I think.

    If the EMI report in syslog is really the reason is electro magnetic interference.

    >If I don't use the webcams everything works fine without any problems

    Sounds already good. So might come from webcam. Bette from a cheap webcam then a more expensive printer making the problems. Also if they are on different usb port and only the webcam port gets disabled the print would still run. Question is always how high in tree linux cuts it.
  • Go back version 1.2.0, working without problems, also with errors on syslog
  • Should not have influence. Exception is if you have in serve "USB Reconnect on timeout" enabled (default never). Then server would close usb and reenergice to force driver reinitialization if a driver crash was the source.
  • For the moment I have connected all the printers to the usb 2.0 hub I remove all the webcams on this installation and restored version 1.3.0 which works without problems

    Then later on another installation I will do other tests to see what happens using the webcams

    I currently have 40 printers but only 8 are managed by Repetier Server; the others are still on OctoPrint which I would like to remove within the year and move them all since I use Repetier Host and also Prusa Slicer which are perfectly compatible.

    I have other problems with 1.3.0 after the update that I report on another post. Also some features if it is possible to integrate them.
Sign In or Register to comment.