Can the OPI5 be Configured to Run LCNC?
- royka
- Offline
- Platinum Member
-
Less
More
- Posts: 376
- Thank you received: 128
07 Mar 2025 21:56 #323469
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
FYI in contrast of what some in this topic said, it's possible to connect a controller via SPI with the spider driver. I did some tests with a TangNano9k with Riocore and it works great over SPI with the vendor kernel 6.1.75
Please Log in or Create an account to join the conversation.
- ccc774
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 2
11 Sep 2025 23:29 #334848
by ccc774
Replied by ccc774 on topic Can the OPI5 be Configured to Run LCNC?
Hello everyone,
I installed linuxcnc 2.10 on orange pi5 - with armbian + rt-kernel 6.1.75. The system was made a year ago, and I installed linuxcnc 2.10 now with old versions of dependencies, to keep the 3D acceleration functional.
The problem is that at startup I get the error:
python3: ../src/mesa/state_tracker/st_texture.c:73: st_texture_create: Assertion `height0 > 0' failed.
/usr/bin/linuxcnc: line 1005: 24283 Aborted $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS "${EXTRA_ARGS[@]}"
Does anyone have an idea if it's a bug in linuxcnc, or the error appears as a result of a conflict?
I installed linuxcnc 2.10 on orange pi5 - with armbian + rt-kernel 6.1.75. The system was made a year ago, and I installed linuxcnc 2.10 now with old versions of dependencies, to keep the 3D acceleration functional.
The problem is that at startup I get the error:
python3: ../src/mesa/state_tracker/st_texture.c:73: st_texture_create: Assertion `height0 > 0' failed.
/usr/bin/linuxcnc: line 1005: 24283 Aborted $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS "${EXTRA_ARGS[@]}"
Does anyone have an idea if it's a bug in linuxcnc, or the error appears as a result of a conflict?
Please Log in or Create an account to join the conversation.
- royka
- Offline
- Platinum Member
-
Less
More
- Posts: 376
- Thank you received: 128
12 Sep 2025 00:31 #334852
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
Yeah I've seen it before, I believe it's a bug with the version of Mesa you're using.
Compiling a new version of mesa with panfrost would likely solve it.
Otherwise I'd suggest to take a new Armbian image and install the 6.1.115 kernel from: drive.google.com/drive/folders/1sPtbXDfx...WCB8o-ur0CINmMNvcjTQ
With the overlay "opi5plus-fixedfreq-undervolt.dts" it has a very low latency. You only need to remove the "-plus" at comparability and after that install it with "sudo armbian-add-overlay opi5plus-fixedfreq-undervolt.dts"
Compiling a new version of mesa with panfrost would likely solve it.
Otherwise I'd suggest to take a new Armbian image and install the 6.1.115 kernel from: drive.google.com/drive/folders/1sPtbXDfx...WCB8o-ur0CINmMNvcjTQ
With the overlay "opi5plus-fixedfreq-undervolt.dts" it has a very low latency. You only need to remove the "-plus" at comparability and after that install it with "sudo armbian-add-overlay opi5plus-fixedfreq-undervolt.dts"
Please Log in or Create an account to join the conversation.
- ccc774
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 2
12 Sep 2025 17:30 - 14 Sep 2025 09:28 #334890
by ccc774
Replied by ccc774 on topic Can the OPI5 be Configured to Run LCNC?
thanks Royka for the kernel.
I rebuilt the system today with Armbian Trixie and rt-kernel 6.1.115. I couldn't get the 3D accelerator to work. I think something was not set when the kernel was created.
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 19.1.7, 128 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 25.0.7-2
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.5 (Compatibility Profile) Mesa 25.0.7-2
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 25.0.7-2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
Linuxcnc 2.10 won't start.
~$ linuxcnc
LINUXCNC - 2.10.0~pre0
Machine configuration file is 'gmoccapy.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./core_sim.hal
rtapi_task_start(): Operation not permitted
HAL_LIB: could not start task for thread base-thread: -1
MOTION: failed to create 100000 nsec base thread
MOTION: init_threads() failed
motmod: rtapi_app_main: Operation not permitted (-1)
./core_sim.hal:7: waitpid failed /usr/bin/rtapi_app motmod
./core_sim.hal:7: /usr/bin/rtapi_app exited without becoming ready
./core_sim.hal:7: insmod for motmod failed, returned -1
Shutting down and cleaning up LinuxCNC...
USRMOT: ERROR: command 30 timeout (seq: 1)
emcMotionInit: emcTrajInit failed
USRMOT: ERROR: command 3 timeout (seq: 2)
Note: Using POSIX realtime
LinuxCNC terminated with an error.
What do you think?
I rebuilt the system today with Armbian Trixie and rt-kernel 6.1.115. I couldn't get the 3D accelerator to work. I think something was not set when the kernel was created.
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 19.1.7, 128 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 25.0.7-2
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.5 (Compatibility Profile) Mesa 25.0.7-2
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 25.0.7-2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
Linuxcnc 2.10 won't start.
~$ linuxcnc
LINUXCNC - 2.10.0~pre0
Machine configuration file is 'gmoccapy.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./core_sim.hal
rtapi_task_start(): Operation not permitted
HAL_LIB: could not start task for thread base-thread: -1
MOTION: failed to create 100000 nsec base thread
MOTION: init_threads() failed
motmod: rtapi_app_main: Operation not permitted (-1)
./core_sim.hal:7: waitpid failed /usr/bin/rtapi_app motmod
./core_sim.hal:7: /usr/bin/rtapi_app exited without becoming ready
./core_sim.hal:7: insmod for motmod failed, returned -1
Shutting down and cleaning up LinuxCNC...
USRMOT: ERROR: command 30 timeout (seq: 1)
emcMotionInit: emcTrajInit failed
USRMOT: ERROR: command 3 timeout (seq: 2)
Note: Using POSIX realtime
LinuxCNC terminated with an error.
What do you think?
Last edit: 14 Sep 2025 09:28 by ccc774.
Please Log in or Create an account to join the conversation.
- royka
- Offline
- Platinum Member
-
Less
More
- Posts: 376
- Thank you received: 128
12 Sep 2025 23:15 - 13 Sep 2025 00:00 #334907
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
Yeah forgot about the permission errors. With calling this script from crontab it will solve that:
#!/usr/bin/bash
sleep 10 &&
echo "-1" > /proc/sys/kernel/sched_rt_runtime_us
echo 20 > /proc/irq/63/smp_affinity & echo 20 > /proc/irq/64/smp_affinity
The last ones to pin the Ethernet irqs, you should take yours which you can find with "cat /proc/interrupts"
Then save the file somewhere and chmod +x /location/filename
And enter "sudo crontab -e" and enter "@reboot /location/filename"
After that at least you should have LinuxCNC working again.
For the acceleration I'll have a look for that one of these days.
Now I see that the previous time your nvme didn't work until I reverted the got patch. Is it working now? Because I didn't do that on this kernel.
At least the Panfrost and the Panthor drivers are built in the kernel so it should be a system config or Mesa problem. Is the Mali firmware installed? "ls /usr/lib/firmware/mali*"
Which image are you using?
#!/usr/bin/bash
sleep 10 &&
echo "-1" > /proc/sys/kernel/sched_rt_runtime_us
echo 20 > /proc/irq/63/smp_affinity & echo 20 > /proc/irq/64/smp_affinity
The last ones to pin the Ethernet irqs, you should take yours which you can find with "cat /proc/interrupts"
Then save the file somewhere and chmod +x /location/filename
And enter "sudo crontab -e" and enter "@reboot /location/filename"
After that at least you should have LinuxCNC working again.
For the acceleration I'll have a look for that one of these days.
Now I see that the previous time your nvme didn't work until I reverted the got patch. Is it working now? Because I didn't do that on this kernel.
At least the Panfrost and the Panthor drivers are built in the kernel so it should be a system config or Mesa problem. Is the Mali firmware installed? "ls /usr/lib/firmware/mali*"
Which image are you using?
Last edit: 13 Sep 2025 00:00 by royka.
Please Log in or Create an account to join the conversation.
- ccc774
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 2
13 Sep 2025 13:21 #334921
by ccc774
Replied by ccc774 on topic Can the OPI5 be Configured to Run LCNC?
I got Linuxcnc to start, thanks for the guidance.
Regarding 3D acceleration, it's clearly something in the kernel that I can't get it to work.
I also made an overlay to block mali at startup and load Panfrost. It loaded but with an error.
~$ sudo modprobe panfrost
dmesg | tail -20 | grep -i "panfrost\|drm"
[ 60.606789] panfrost: unknown parameter 'enable_mmu' ignored
~$ XDG_RUNTIME_DIR=/tmp glxinfo -B | grep "OpenGL renderer"
OpenGL renderer string: llvmpipe (LLVM 19.1.7, 128 bits)
I made the system with: Armbian_25.8.1_Orangepi5_trixie_vendor_6.1.115_minimal.img. After that I installed Cinnamon. I have Mesa 25.0.7-2 installed.
Regarding 3D acceleration, it's clearly something in the kernel that I can't get it to work.
I also made an overlay to block mali at startup and load Panfrost. It loaded but with an error.
~$ sudo modprobe panfrost
dmesg | tail -20 | grep -i "panfrost\|drm"
[ 60.606789] panfrost: unknown parameter 'enable_mmu' ignored
~$ XDG_RUNTIME_DIR=/tmp glxinfo -B | grep "OpenGL renderer"
OpenGL renderer string: llvmpipe (LLVM 19.1.7, 128 bits)
I made the system with: Armbian_25.8.1_Orangepi5_trixie_vendor_6.1.115_minimal.img. After that I installed Cinnamon. I have Mesa 25.0.7-2 installed.
Please Log in or Create an account to join the conversation.
- royka
- Offline
- Platinum Member
-
Less
More
- Posts: 376
- Thank you received: 128
13 Sep 2025 20:46 #334945
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
If you installed a regular mesa then it isn't built with panfrost support. There's also no need to block mali, but maybe you should enable the panthor overlay instead, that's the follow up of panfrost for the mali g610.
The panthor driver and panfrost driver are in the kernel included so I doubt that it's a kernel issue.
It might have been easier to start with an image with 3d acceleration support. Mine also shows llvm (old bookworm image) but never felt the need for more since it's fast enough for my use. Now I'm compiling mesa though, so I'll let you know if that's all you need.
The panthor driver and panfrost driver are in the kernel included so I doubt that it's a kernel issue.
It might have been easier to start with an image with 3d acceleration support. Mine also shows llvm (old bookworm image) but never felt the need for more since it's fast enough for my use. Now I'm compiling mesa though, so I'll let you know if that's all you need.
Please Log in or Create an account to join the conversation.
- ccc774
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 2
14 Sep 2025 02:36 #334958
by ccc774
Replied by ccc774 on topic Can the OPI5 be Configured to Run LCNC?
I installed Trixie with Cinnamon and 3D acceleration. I applied rt-kernel over the original 6.1.115 kernel and it wouldn't boot. I commented out overlays=panthor-gpu in armbianEnv and it booted. So the system has the capability to use 3d acceleration but something in rt-kernel is stopping it.
Please Log in or Create an account to join the conversation.
- royka
- Offline
- Platinum Member
-
Less
More
- Posts: 376
- Thank you received: 128
16 Sep 2025 20:13 - 23 Sep 2025 23:45 #335086
by royka
Replied by royka on topic Can the OPI5 be Configured to Run LCNC?
Thanks for pointing out. I was using it with the vendor blobs, but when i tried Panthor I had the same. They changed a lot with the scheduling which made it not rt-friendly anymore.
It kept me busy for a while but I think it's working correctly now. glxinfo -B shows "Device: Mali-G610 (Panfrost) (0xffffffff)" and Chromium is with acceleration and 4k without frame dropping. I'll upload the patches there
Update: mpp can give huge spikes during seeking with YouTube,so it might be better to disable hardware video decoding. Or make a symlink with hw decoding for when you don't use your CNC and one with software decoding (still nod bad).
I'll see if it's fixable.install the libv4l-rkmpp package from the Google Drive.
Btw this forum is lately very difficult to reach.
drive.google.com/drive/folders/17WBVgRBA...4GUaGlhR?usp=sharing
It kept me busy for a while but I think it's working correctly now. glxinfo -B shows "Device: Mali-G610 (Panfrost) (0xffffffff)" and Chromium is with acceleration and 4k without frame dropping. I'll upload the patches there
Update: mpp can give huge spikes during seeking with YouTube,
I'll see if it's fixable.
Btw this forum is lately very difficult to reach.
drive.google.com/drive/folders/17WBVgRBA...4GUaGlhR?usp=sharing
Attachments:
Last edit: 23 Sep 2025 23:45 by royka. Reason: Error fixed
The following user(s) said Thank You: Ilysha
Please Log in or Create an account to join the conversation.
- ccc774
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 2
20 Sep 2025 14:31 #335210
by ccc774
Replied by ccc774 on topic Can the OPI5 be Configured to Run LCNC?
sorry I only replied now, I was sick. I installed and tested your packages today and they work better than last time. I appreciate your help which is always of the best quality and very prompt. Thank you Royka!
Please Log in or Create an account to join the conversation.
Time to create page: 0.155 seconds