(LPT) Debian 12 Latency spikes/unexpected real time delay. Looking for solution.

More
1 year 8 months ago - 1 year 8 months ago #322085 by denhen89
Not working, one problem after another. I can imagine that you might think i am a complete idiot.
Machine freezes still, but now, after the 4. fresh install and installing debian-12.9.0-amd64-netinst and installing the debs, of course with some missing things messages while installing them, after boot the machine does not even want to move past the motherboard screen. (press del to... press tab to... screen)
Its the 3 full day i am trying to solve the latency problem, but instead i am only getting more problems.
If i would knew i can get samba to work without spending a couple of days "trying" to get it to work, then i would give up with debian 12 and linuxcnc 2.9.x. Unfortunately i know that when i install again wheezy, i will encounter 1000 things that dont work, starting with the clock, then the internet browser that is not anymore supported and of course samba that also needs some special attention by a Linux specialist, that i am not unfortunately.EDIT: after doing 1-2 changes in bios i can enter linux and also do the latency test, but the latency is about 31000 and also freezes sometimes.
Last edit: 1 year 8 months ago by denhen89.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago - 1 year 8 months ago #322092 by denhen89
Update: After doing 1-2 changes in the bios, i can again enter linux and also do the latency test, sometimes.. I open it and it shows 0 everywhere (intervall, jitter , last interval).
When i close it and open it again, it shows again 0 everywhere, but after a couple of seconds it shows latency as it should. Now i opened glxgears and youtube but the jitter did not change a lot from 23.000 to 24.769.
I will soon connect the machine and test it. If it works without unexpectec realtime delay message on pop up, then its a good sign and maybe i then just need to make some adjustments in bios or grub config.

EDIT: just thought its looking good, but machine just freezes out of nowhere and i just wanted to start linuxcnc and check if its working, but I also get a error message that i knew how to solve with a terminal command, but due to fresh install that command is not anymore in my terminal history, but i get:
Permission denied.
/custom.hal5: waitpid failed hy_vfd vfd
....

So, beside freezing pc problems, i got a new problem to fix. Amazing.

EDIT: i have found the command and now linuxcnc is starting without unexpected realtime delay, axis moving, but it sound a bit strange, but smooth but with small stops between smooth movement. I will try to adjust bios cpu settings.

 
Last edit: 1 year 8 months ago by denhen89.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #322097 by denhen89
So, i could open Linuxcnc ones after i got a error message on start up, but after reboot i get the error message all the time, so i am not able to start linuxcnc.
I wanted to attach the report file, but cant upload that file type, so i just paste it here. sorry that but i want out of the workshop now, i have enoug and mz hands a freezing.

Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-5.4.290-rtai-amd64/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.4
Machine configuration directory is '/home/cncrouter/Downloads/XYYZ'
Machine configuration file is 'XYYZ.ini'
INIFILE=/home/cncrouter/Downloads/XYYZ/XYYZ.ini
VERSION=1.1

check_config:
  INCONSISTENT coordinates specifications:
               trivkins coordinates=XYYZ
               [TRAJ]COORDINATES=XYZ

PARAMETER_FILE=linuxcnc.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Y Z
KINEMATICS=trivkins coordinates=XYYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
emc/iotask/ioControl.cc 786: can't load tool table.
Starting HAL User Interface program: halui
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./XYYZ.hal
Found file(REL): ./custom.hal
Starting TASK program: milltask
Starting DISPLAY program: axis
USRMOT: ERROR: command timeout
emcMotionInit: emcTrajInit failed
USRMOT: ERROR: command timeout
emcMotionInit: emcTrajInit failed
RTAPI: ERROR: Unexpected realtime delay on task 1
This Message will only display once per session.
Run the Latency Test and resolve before continuing.

waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
waiting for s.joints<0>, s.kinematics_type<0>
Shutting down and cleaning up LinuxCNC...
task: 259 cycles, min=0.000012, max=0.010209, avg=0.009507, 0 latency excursions (> 10x expected cycle time of 0.010000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
note: MAXV     max: 80.000 units/sec 4800.000 units/min
note: LJOG     max: 80.000 units/sec 4800.000 units/min
note: LJOG default: 80.000 units/sec 4800.000 units/min
Waiting for component 'inihal' to become ready.....................
A configuration error is preventing LinuxCNC from starting.
More information may be available when running from a terminal.
1820
1889
Stopping realtime threads
Unloading hal components

Kernel message information:
[   94.539313] I-pipe: head domain RTAI registered.
[   94.539441] RTAI[hal]: mounted. ISOL_CPUS_MASK: 20.
[   94.539447] SYSINFO - # CPUs: 6, TIMER NAME: 'lapic', TIMER IRQ: 4355, TIMER FREQ: 6270499, CLOCK NAME: 'tsc', CLOCK FREQ: 1404706000, CPU FREQ: 1404706000, LINUX TIMER IRQ: 4355.
[   94.549853] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[   94.549901] kstacks pool size = 524288 bytes
[   94.549903] RTAI[sched]: hard timer type/freq = lapic/6270499(Hz)
[   94.549904] linear timed lists.
[   94.549908] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1404706000 hz.
[   94.549912] RTAI[sched]: timer setup = 159 ns, resched latency = 0 ns.
[   94.554302] USERMODE CHECK: OK.
[   94.554306] USERMODE CHECK PROVIDED (ns): KernelLatency 1772, UserLatency 2726.
[   94.554308] FINAL CALIBRATION SUMMARY (ns): KernelLatency 1772, UserLatency 2726.
[   94.572540] RTAI[math]: loaded integrated musl libm version 1.2.3.
[   94.668559]
               identityKinematicsSetup: coordinates:XYYZ
[   94.668564]    Joint 0 ==> Axis X
[   94.668566]    Joint 1 ==> Axis Y
[   94.668567]    Joint 2 ==> Axis Y
[   94.668568]    Joint 3 ==> Axis Z
[   94.668570] identityKinematicsSetup: Recommend: kinstype=both

[   94.681692] config string '0xc800 0xdc00 out'
[   98.568211] RTAPI: ERROR: Unexpected realtime delay on task 1
               This Message will only display once per session.
               Run the Latency Test and resolve before continuing.
[  103.953414] RTAI[math]: unloaded.
[  104.031797] SCHED releases registered named ALIEN PEDV$D
[  104.034092] RTAI[malloc]: unloaded.
[  104.139720] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[  104.161297] I-pipe: head domain RTAI unregistered.
[  104.161529] RTAI[hal]: unmounted.



Info report created by linuxcnc_info:
The file:    /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
     pastebin.com
in order to provide information about the linuxcnc
system and configuration.

                Date: Thu Feb 20 06:49:14 PM CET 2025
            UTC Date: Thu Feb 20 05:49:14 PM UTC 2025
        this program: /usr/bin/linuxcnc_info
              uptime: 18:49:14 up 2 min, 1 user, load average: 2.21, 0.88, 0.33
     lsb_release -sa: Debian Debian GNU/Linux 12 (bookworm) 12 bookworm
            linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/cncrouter/Downloads/XYYZ
                USER: cncrouter
             LOGNAME: cncrouter
                HOME: /home/cncrouter
              EDITOR:
              VISUAL:
            LANGUAGE: en_US:en
                TERM: dumb
           COLORTERM:
             DISPLAY: :0
             DESKTOP: lightdm-xsession
        display size: 1680x1050 pixels (444x277 millimeters)
                PATH: /usr/bin:/home/cncrouter/Downloads/XYYZ/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: debianhost
      kernel-name -s: Linux
      kernel-vers -v: #1 SMP Sun Feb 16 14:27:43 CST 2025
          machine -m: x86_64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.290-rtai-amd64 root=UUID=329e52b2-83ca-4098-8506-02f3ac2d7461 ro quiet isolcpus=5
          model name: AMD Phenom(tm) II X6 1055T Processor
               cores: 6
             cpu MHz: 1403.309
             parport: 0000-0000 : parport0 0000-0000 : parport0 0000-0000 : parport1 0000-0000 : parport1
              serial: 0000-0000 : serial 0000-0000 : serial 0000-0000 : serial

Versions:
/usr/bin/linuxcnc_info: line 154: gcc: command not found
                 gcc:
              python: Python 3.11.2
                 git: not_in_PATH
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: not_in_PATH

linuxcnc_var all:

     LINUXCNCVERSION: 2.9.4
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /usr/lib/linuxcnc/realtime
                 RTS: /usr/realtime-5.4.290-rtai-amd64/bin/rtai-config
          HALLIB_DIR: /usr/share/linuxcnc/hallib
              PYTHON: /usr/bin/python3.11

dpkg -l '*linuxcnc*':
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name            Version      Architecture Description
+++-===============-============-============-=============================================
ii  linuxcnc        1:2.9.4      amd64        motion controller for CNC machines and robots
un  linuxcnc-doc    <none>       <none>       (no description available)
un  linuxcnc-doc-en <none>       <none>       (no description available)
un  linuxcnc-sim    <none>       <none>       (no description available)
un  linuxcnc-uspace <none>       <none>       (no description available)


 

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #322099 by denhen89
With a specific bios setting Linuxcnc does open and axis moving smooth, but at start up i get "unexpected realtime delay on task 1.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #322108 by rodw
I would recommend your 7i76e option you mentioned in your first post.

Wheezy is far too old to expect stuff to still work. its well past end of life
Whilst the linuxcnc guys have done an amazing job keeping RTAI working for all these years its also past end of life.
Without the Linuxcnc devs, RTAI would not exist today.
Preempt_RT has won the real time wars.
If the default Linuxcnc ISO works reliably for you, it will work with a 7i76e

But like any modern OS, things are more complicated today and there are a number of optimisations I cover here
docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing
 
The following user(s) said Thank You: denhen89

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #322114 by tommylight

EDIT: i have found the command and now linuxcnc is starting without unexpected realtime delay, axis moving, but it sound a bit strange, but smooth but with small stops between smooth movement. I will try to adjust bios cpu settings.


 
Is that while jogging with keyboard?
Try jogging using the mouse, as it might be a keyboard thingy.
The following user(s) said Thank You: denhen89

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum