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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
18 Feb 2025 07:53 #321899 by denhen89
(Debian 12,   2 Parallel port cards / 2 BOBs,   isolcpus=5,     bios settings are correct - as they worked perfectly on wheezy)
Hello,
i have already wrote a thread a couple of month ago about my problems since debian 12.

I upgraded from 2.8 (wheezy) to 2.9x on Debian 12, just because i could not anymore connect to OneDrive, not even through website and upgrading browser did not help. (i am using 2 BOBs and 2 LPT cards for this CNC XYYZ Router machine)
Current Base thread: cant get it below 28.000 intervall and jitter is below 8000

I thought that i managed to get it to work properly, but with slower Axis speeds due to higher latency. A couple days ago i had to cut suspension mounting plates for my car project and found out that the Y-axis (2 motors on Y) is loosing steps. Yesterday i have tried hundreds of different BIOS settings for about 7h (mainly cpu/ram settings), but i always loaded the same G code, not trying other codes (so maybe the code is making problems?), but after stopping the code midway or when the program ends, i see that the Y Axis has lost steps when going to Y0, X0.

Now i am looking for a solution that does not require a lot of time, because to be honest, i have enough of fixing linux problems.
1 Solution (best for me): Fix the Latency problems and continue to use the same pc.
- my last hope might be the IRQ Script, but i remember i have tryed to make it work but couldnt and also i am not sure if that script is only for people who use e.g. a Mesa Ethernet card.

2. Buying a different PCone that works with good latency on Debian 12 without latency problems
- if you have Debian 12 or any other newer Debian (where OneDrive works) with good latency then PLEASE let me know your exact Hardware!!!

3. Buying a Mesa 7i76e:  will that solve the latency problems on Debian 12?
- i am ready to go that route if that will solve the problems, but i dont see the sense of doing it if people have also problems with Mesa cards on Debian 12.

4. Going back to Wheezy: 
100% solves the latency problems, but this means i need to use again a USB stick for gcode files, because OneDrive does not work on wheezy. (not through browser and not through installed/setup OneDrive because its not supported anymore)

In about 1-2 hours i go to my workshop and the first thing i try is to start a different G-Code and then check if the Y-Axis looses steps. If it does, then the next thing i will try is the IRQ Script, but as i wrote earlier, i am not sure if thats just for people with Mesa cards.
If the script will be "active" but not fix the problem, then i will shut down the pc, do other things and hope that someone here has a solution. 

If i would knew that a Mesa 7i76e would fix the problems, then i believe i would have already ordered it on yesterday, but i dont see the sense of doing so if i still need to fix some IRQ problems, especially when it costs almost 300 €.

Thanks in advance for your help.

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

More
18 Feb 2025 09:15 #321903 by unknown
Using any Mesa hardware means you don't need a base thread, you only need a servo thread. The latency/jitter figures are far more relaxed with Mesa hardware.
Just some examples of what kind of hardware is ok with Mesa.

If you are happy with the 2 Port system and don't want to rewire everything, a 7i92T with the right firmware is just a matter of unplugging the cables from the breakout board from the LPT ports and plugging the cables into the 7i92T. 7i92T is some what cheaper and can be later upgraded with a 7i76 card.

J3355B-ITX (replaced by the H2 Plus due to space constraints)
Dual-Core Processor J3355 (up to 2.5 GHz)

Odroid H2 Plus (my current choice)
Intel Quad-core processor J4115 (14nm) with 4MiB Cache, up to 2.5Ghz(Single Thread) or 2.3Ghz(Multi Thread)

Lenovo M72E (found this one on the side of the road on a council cleanup)
With i5 3470
Quad core

All work fine with Mesa Etherent cards.

RPi5 works fine with Mesa Ethernet cards and SPI cards. 7c80, 7c81

The above Lenovo and J3355B work fine with Mesa cards that work with EPP interface. 7i90

Honestly I haven't heard of any issues with Debian Bookworm and Mesa cards, where the issue can raise it's head is with some realtek cards, but this is far easier to fix that any latency issues.

Samba is quite easy to setup, these is a plugin that MX Linux has that allows right clicking on a folder and sharing it via samba. No messing around with editing files. The only thing that is required is create a samba user that you then use to connect the share with on the windows Box.

To show the difference that not having a base script.You'll see quite a difference in the figures.
latency-histrogram --nobase
latency-histogram
The following user(s) said Thank You: denhen89, onceloved

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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
18 Feb 2025 14:56 #321922 by denhen89
Thank you very much for the informative reply.
Update:
I cannot get the latency below 40.000 (3 x glxgears, 3 x youtube video running), so if i set base_period 35000 in the ini file, then i get a unexpected delay on start up, but the machine works well now and does not loose steps.

I have again played arround with the Bios settings for at least 4-5 hours, but something came to mind: The VGA, which is a old Nvidia card. I tested with a other card, a old Geforce card, but about the same result. Unfortunately i dont have a Radeon card to test, but i just ordered a AMD Radeon HD 7450 1GB DDR3 card for about 10€. In 2 days i will be able to test it. If nothing changes to better, then i think i will buy the 7i92T. (thanks for the suggestions)

I will update in 2 days.
Thanks and best regards.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
18 Feb 2025 16:34 #321924 by tommylight
Did you install the RTAI kernel and the corresponding RTAI version of LinuxCNC as explained on the Downloads page?
Did you disable hyperthreading in the BIOS?
-
You can run the machine even if you get latency warnings, but do not do production parts, decorative stuff will mostly be OK, but that is very dependent on how bad the latency excursions are.
-
A friendly advice:
I can not justify breaking a perfectly working machine for OneDrive even with a gun pressed to my head, hell i can not justify using OneDrive even if they payed me, but that is me.
Given the huge amount of options for transferring files:
- from setting up your own servers (not easy and please for goods sake do not use Docker and such stuff for it)
- use whatever you use on your phone, like WhatsApp or Signal or Telegram, not Viber or WeChat or Tango or .....
- use a normal e-mail , should have put this first, make e-mails for each machine and leave them logged in
- If you already have google e-mail, use google for everything
-
Telegram can be made to control the machine remotely, total control, just have a look at telegram boot for 3D printers.
All that without opening ports and security risks and ...
The following user(s) said Thank You: denhen89, royka

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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
18 Feb 2025 19:09 #321931 by denhen89
Thanks for your reply Tommylight.
On tomorrow or in 2 days i will tell you the exact version, but i remember it was Kernel 6.3. rt something..
Hypethreading option is not available in Bios. 
This PC was working perfectly fine with Wheezy and Linuxcnc 2.8.x . I also remember that i reinstalled wheezy and tested the machine after first latency problems on Debian12 and there were not problems. So, problems started 100% since Debian12.

I can not justify breaking a perfectly working machine for OneDrive even with a gun pressed to my head

100% right, but i was forced to do so, because my SSD card broke. I remember that Linux didnt started anymore, from one day to another. 

Short history:
At the beginning of my cnc experience i used a USB stick to tranfer files, but someday i got the ethernet working (it was maybe 2018 or so). Since then i used Email or if i had a lot of files then i used USB stick because i remember that the Browser was very slow, which was very annoying for multiple files.
I did it that way for couple of years (its a hobby machine, not using it every day)until i thought that it would be a lot more comfortable and quicker to have them on a server or share the files on the windows pc. I dont know if i used Samba to setup file sharing, but i believe so. This has worked mabye for 1-2 month. Suddenly it did not work anymore and i could not fix it. Then i thought about OneDrive, because i have used it already for other things. I managed to get it working and i had a OneDrive folder on the Desktop, so i somehow installed it on Linux. This worked super well, but also just for couple of month. From one day to another it stopped working. Browser did also not anymore work. It was not supported anymore or so. Of course i have tried to fix it by installing a different browser, but nothing worked and shortly after my SSD broke. No joke.
So, i think you can imagine how pissed off i was. The amount of time i have already spent with fixing linux problems is unimagineable , so i am already a bit allergic to it. 
It is like this:
1. You try installing a different browser for Linux, so you google it with the correct Linux version/kernel version.
3. You find a tutorial and first step says: Open Terminal and copy past this "xadsasddadqd" command.   
4. FAIL, because xxxx1 is missing.
4. You look for a tutorial to install xxxx1
5. For this you unfortunately need also "xxxx2"
6. .... and so on
This is how it was with the wheezy version. Problems after problems and i just wanted to use Linuxcnc, have one app like mousepad and ethernet browser or some kind of file sharing setup. But just for those things i had to make a lot of fixing work. 
I believe with Debian12 there are not this kind of problems anymore, but now my LATENCY is fuxxed up.. 
The funny thing is, i always loved to do some computer fixing stuff, solving problems, tweaking etc. but Linux managed to make me hate such things. 

***FOR ALL BEGINNERS WHO ARE READING THIS:  Its not about LinuxCNC! LinuxCNC is working perfectly and always was working perfectly, also i have LinuxCNC on my Lathe with Mesa 7i76e and its working perfectly!   If i would start my Linuxcnc experience from Debian 12, i would now only need to get the Latency fixed, nothing else. The previous versions i had (wheezy) were for sure versions specific for Linuxcnc, with only those things installed that are needed to start LinuxCNC, thats why i had so many problems and bad experience.

Okay, enough for today. I wait for the Radeon VGA and try then if it works. If not, i think i just buy the Mesa card, because going back to wheezy is, i believe, no option for me. Maybe its possible to get file sharing to work on wheezy, but i dont want to even anymore tried it, because if i do, i will again sit 12 hours in the workshop trying to install Samba, and the 127 other things that are needed  while my hands are freezing. (someone i always have Linux problems in wintertime)

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

More
18 Feb 2025 23:27 #321951 by unknown
With Debian it should install dependencies for a package, if of course you are using a Debian package, if not you are on your own.
The way you are explaining it is what it was like in the1990's installing packages on Redhat & Slackware.
Now if anything "breaks" when trying to connect to anything Microsoft, that's because of Microsoft.
Now something interesting regarding samba. A std install of samba on Debian sets up a share for "home". This is not browsable but can be connected to by using the username on Linuxcnc. The caveat is that you need to create a samba user with the same name, password is easier if you use the same as the Linux password, easier to remember.
To be honest I don't use windows but using the method above I can connect from one Linux machine to a samba share on another with no issues.
There also is another way to create shares that doesn't involve edit the SMB.conf file, but that's for a later date, once I fully understand it I'll do a quick write up.
The following user(s) said Thank You: denhen89

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
19 Feb 2025 02:25 #321957 by rodw
The problem with Samba from Windows is that Microsoft put some security in place that by default disable Smaba (SMB) connecting with Linux.
The solution is to edit the SMB policy on your windows box and it works perfectly.
The following user(s) said Thank You: denhen89

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

More
19 Feb 2025 03:31 #321960 by unknown
I have no recent experience trying to connect to a windows box, so I really have to rely on the experience of others for that side of things.
The following user(s) said Thank You: denhen89

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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
19 Feb 2025 11:27 #321975 by denhen89
Thanks for that.
I believe that what Rodw wrote is the reason why i could not anymore open the shared folder, but its funny that in short time this stopped working, as well as the internet browser and also OneDrive setup on wheezy.

The solution is to edit the SMB policy on your windows box and it works perfectly.

I am not expecting that you write me a tutrorial how to get it work, but if you have a simple tutorial, please send me a link. If the new radeon vga will not solve the latency problem, but i will know that i can setup samba on wheezy, then i will do it. If not, i buy the mesa 7i92TF or 7i76e.

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

More
19 Feb 2025 16:58 #322003 by royka
Like Tommylight suggested, try the RTAI kernel, here you can find the newest versions with instruction: forum.linuxcnc.org/9-installing-linuxcnc...ng-rtai-debs-for-2-9
The following user(s) said Thank You: tommylight, denhen89

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

Time to create page: 0.091 seconds
Powered by Kunena Forum