V2.9.2 to V2.10.1 changes cause DIY PathPilot controller to lag

So first off , i bought the DVD for V1 then the USB for V2 but i don’t own a tormach machine yet.
Someday i hope so…
For now its my harbor freight home brew cnc running pp and a Mesa 5i25 Card over a G540 driver.
I am not expecting any support but still wanted to post my findings.

I usually run PP from Terminal … so i get a terminal window running and see what’s going on.
But on v2.10.1 its very laggy , each click on the screen there is a 10 sec lag… now looking at the terminal window i get this message every 10 sec on the dot.

| debug | waited 10 seconds for camera mgr dbus singleton to initialize. [camera_mgr_client.py:45]

I looked around the files and configs to see if i could comment out the camera stuff but did not find anything… so before i break something i did revert to V2.9.2 to see if the problem went away and it did.

I will use this thread to document what i find around this

Cheers
Nick

Edit : fixed a few typos

Given the error, and the notable addition of the camera control in PP 2.10, I’d probably try disabling the camera in PP and see if your lag goes away.

Hello @Nicholas_Franks

This is a common issue with using the 2.10 camera feature. On our website we list the minimum PC requirements for running PathPilot on a Linux build. However, the camera function uses an additional 2 to 4Gb of RAM then what is listed in the min specs. I recommend 8Gb RAM in total if you want PathPilot with the camera function to run smoothly. There is a warning about this in both our operator’s manual and on the webpage for our cameras, but seeing as this is a home-built machine, I can see how you wouldn’t have been made aware about the extra PC requirements.

Alternatively, you can try disabling the camera as @Ian_Vivero recommended.

Also, we do offer tech support for PathPilot, alongside our other non-CNC products. Our company’s number #1 goal is to be fair to people and to help our customers make things. Our tooling, software, and QC equipment is still covered under our support policy. We are confident that, even if you don’t have a Tormach CNC (yet), you will fall in love with our products enough to consider upgrading to our machines some day :slightly_smiling_face:

2 Likes

Thank you Robert and Ivan

I have been using PP for a while so i thought i knew it well… guess not LOL
Not sure how to disable the Camera feature in PP and i dont have a camera.

I did un check the Automatic E-stop recording and the Include the pathpilot screen options in the camera tab. But it did not change anything .

I have nothing in the camera status… all off indicator and blank page in the display.

I will keep looking digging around and let you know if i find something

cheers

Try installing a webcam driver and/or plugging in a webcam so the controller can see it and set the driver up. Since the error is telling you that the camera client is failing to initialize (timing out) it may be looking for an installed device that isn’t there. At that level, turning off the feature in PP may not be enough because the OS is still trying to find it. Once that’s done, if it has any impact, unplug the camera again and see if the problem comes back.

I agree with @Ian_Vivero, your machine thinks there either is, or “should” be a camera

Thanks again @Ian_Vivero and @Robert_Reynolds ,

Here is a little update :
1- opened up a terminal and ran lsusb to see what linux was seeing as a USB device here is what i got :

operator@tormachpcnc:~$ lsusb
Bus 001 Device 012: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen
Bus 001 Device 011: ID 0424:2517 Standard Microsystems Corp. Hub
Bus 001 Device 010: ID 045e:0730 Microsoft Corp. Digital Media Keyboard 3000
Bus 001 Device 009: ID 0458:003a KYE Systems Corp. (Mouse Systems) NetScroll+ Mini Traveler / Genius NetScroll 120
Bus 001 Device 008: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 002: ID 0ace:1215 ZyDAS ZD1211B 802.11g
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Tomorrow i will unplugged everything and see what happens and i need to find my usb camera ( i know i have one somewhere. ) and will try it like you guys suggested.
but i dont see anything that PP could think its a camera but who knows with those cheap usb hub.

2- But for now the workaround i found is i went to the camera_mgr_client.py file in the python folder and deleted the following lines :
ram_mb = memory.get_total_ram_mb()
if ram_mb >= CAMERA_MINIMUM_MEMORY_MB:
if _cameramgrd_process is None:
_cameramgrd_process = subprocess.Popen([“camera_mgrd.sh”])

    if _cameramgr_singleton is None:
        bus = dbus.SessionBus()

        # wait up to 10 seconds for init
        stopwatch = timer.Stopwatch()
        while _cameramgr_singleton is None and stopwatch.get_elapsed_seconds() < 10:
            try:
                _cameramgr_singleton = dbus.Interface(bus.get_object("com.tormach.pathpilot", "/CameraManager"), "com.tormach.pathpilot")
            except:
                time.sleep(0.1)

        logging.debug("Waited {:f} seconds for camera mgr dbus singleton to initialize.".format(stopwatch.get_elapsed_seconds()))

Line 29 to 45 … saved the file and started up PP and the problem went away
My PP is now quick and responsive again so i can imagine that the While Statement looping every 10 sec was causing me trouble…

More to come … i will keep you posted.

Thanks
Nick

1 Like

Problem solved so that’s a good thing for sure. My curiousity would probably have me digging into the _cameramgr_singleton to see why that keeps returning none. The issue is that with the next update, your changes are probably going to be lost so you’ll have to redo them if you haven’t solved the root cause of that function not returning a valid object.

Yes indeed i will be looking into a more permanent solution , or the root cause of the issue.

I will update this thread with my findings
Cheers
Nick

Quick Update here , Not much too say ,
Unplugged all usb devices → Still lagy
Plugged in USB Camera → Camera not detected , still lagy (well Linux did not detect this camera so I assume PP cant see ether)
don’t have a other camera to test for now… so i will stick with my solution until i get more time to test and find a other usb camera

Nick