- Posts: 887
- Thank you received: 323
Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
- unknown
- Offline
- Platinum Member
-
Less
More
1 year 8 months ago #322262
by unknown
Replied by unknown on topic Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
Actually it's my issue for not checking the boot logs, the scripts setup the zram.service. Whether Raspberry OS uses zram is not related to our images, as we use Debian.....as of course you know.
The zram.service is part of the image builder, I've modified the process so the service shouldn't be enabled and later on install systemd-zram-generator and create a config that will use 1GB on a 4GB system, this can be modified if required.
As you can see zram tools are installed, this is whether or not systemd-zram-tools are installed.
The issue is because Bookworm uses systemd the package systemd-zram-generator is required, this is the missing piece of the puzzle. During the build the a different script is used to zram0 which fails.
As you can see from below zram0 is used for swap.
Without the mods I've describe above there is no swap. Whether it's need or not, but on a typical debian x86_64 install usually a 1GB swap partition is created.
As you can see it really doesn't affect the total free memory when it's not in use.
And BTW it not caching memory nor mamory glands, but is creating a swap partition that is compressed in memory.
The simplest option is just to mark zram.service as masked and have no swap.
So at the moment I'm building an image with the mods.....and make sure I've done it right.
Rob
The zram.service is part of the image builder, I've modified the process so the service shouldn't be enabled and later on install systemd-zram-generator and create a config that will use 1GB on a 4GB system, this can be modified if required.
Code:
cnc@raspberrypi:~$ dpkg --list | grep "zram"
ii systemd-zram-generator 1.1.2-2+b2 arm64 Systemd unit generator for zram devices
ii zram-tools 0.3.3.1-1.1 all utilities for working with zram
As you can see zram tools are installed, this is whether or not systemd-zram-tools are installed.
The issue is because Bookworm uses systemd the package systemd-zram-generator is required, this is the missing piece of the puzzle. During the build the a different script is used to zram0 which fails.
As you can see from below zram0 is used for swap.
Code:
cnc@raspberrypi:~$ sudo swapon
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 1010M 0B 100
Without the mods I've describe above there is no swap. Whether it's need or not, but on a typical debian x86_64 install usually a 1GB swap partition is created.
As you can see it really doesn't affect the total free memory when it's not in use.
Code:
free -h
total used free shared buff/cache available
Mem: 3.9Gi 474Mi 2.5Gi 17Mi 1.1Gi 3.5Gi
Swap: 1.0Gi 0B 1.0Gi
The simplest option is just to mark zram.service as masked and have no swap.
So at the moment I'm building an image with the mods.....and make sure I've done it right.
Rob
- rodw
- Offline
- Platinum Member
-
Less
More
- Posts: 12170
- Thank you received: 4153
1 year 8 months ago #322292
by rodw
Replied by rodw on topic Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
zram is a kernel option which can be disabled by adding zram.enabled=0 to boot.txt
Do you guys want to try that?
The Debian tools are not really necessary. The kernel docs explain how to configure it manually.
www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html
Do you guys want to try that?
The Debian tools are not really necessary. The kernel docs explain how to configure it manually.
www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 887
- Thank you received: 323
1 year 8 months ago - 1 year 8 months ago #322317
by unknown
Replied by unknown on topic Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
No, it has nothing to do with the kernel module, disabling the kernel module won't stop the service running. The messages are coming from the service systemd is attempting to start.
One option is to mask the service and have no swap available.
The second option is as I've described and have a little swap if needed.
But it's not the kernel modules that are issue.
Not to be unkind but I didn't pull the solution out of my backside, I spent some time researching the issue, as to what was causing the issue, how to fix the issue and what was supposed to be happening.
The service is for setting up swap in compressed ram. Whilst there is a little overhead in compressing and decompressing the speed for accessing ram is far far quicker than accessing a drive of any sort. If no swapping occurs it will have no affect on latency.
And even before I offered up my solution I ran a few tests to make sure I had the method correct and there were no issues with latency or anything else.
And yes I should have been more vigilant when initially putting everything together.
PLEASE NOTE
all references to zram.service should be zramswap.service
One option is to mask the service and have no swap available.
The second option is as I've described and have a little swap if needed.
But it's not the kernel modules that are issue.
Not to be unkind but I didn't pull the solution out of my backside, I spent some time researching the issue, as to what was causing the issue, how to fix the issue and what was supposed to be happening.
The service is for setting up swap in compressed ram. Whilst there is a little overhead in compressing and decompressing the speed for accessing ram is far far quicker than accessing a drive of any sort. If no swapping occurs it will have no affect on latency.
And even before I offered up my solution I ran a few tests to make sure I had the method correct and there were no issues with latency or anything else.
And yes I should have been more vigilant when initially putting everything together.
PLEASE NOTE
all references to zram.service should be zramswap.service
Last edit: 1 year 8 months ago by unknown. Reason: zram.service zramswap.service clarification
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 887
- Thank you received: 323
1 year 7 months ago - 1 year 7 months ago #323321
by unknown
Replied by unknown on topic Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
Simple Mesa Setup
Thanks to PWC
You definitely do not want DHCP and you do
need to set a static address.
You might try this:
DO NOT set a gateway or nameservers
Thanks to PWC
You definitely do not want DHCP and you do
need to set a static address.
You might try this:
Code:
auto eth0
iface eth0 inet static
address 10.10.10.100
netmask 255.255.255.0
DO NOT set a gateway or nameservers
Last edit: 1 year 7 months ago by unknown.
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 887
- Thank you received: 323
1 year 7 months ago - 1 year 7 months ago #323701
by unknown
Replied by unknown on topic Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
Wifi setup is by running
Be sure to edit to choose option 5 "Edit wpa_supplicant" with your country code, ssid & password.
To setup network for a mesa fpga Ethernet card, choose option 6 "Edit interface" and modify eth0 to match post above if you have jumpered the board for "FIXED FROM EEPROM"
If you have jumpered for "FIXED 192.168.1.121" replace 10.10.10.100 with 192.168.1.100.
If your home wifi network is on the 192.168.1 network, use the 10.10.10 network for your Mesa card, refer to you card's manual for jumpers to change.
After config reboot
To check the network type in a terminal
Taken from 7i92 Manual
A final note, there is no network notification applet for the desktop, so you will not get any notifications when the network connects, disconnects or reconnects.
Code:
sudo menu-config
Be sure to edit to choose option 5 "Edit wpa_supplicant" with your country code, ssid & password.
To setup network for a mesa fpga Ethernet card, choose option 6 "Edit interface" and modify eth0 to match post above if you have jumpered the board for "FIXED FROM EEPROM"
If you have jumpered for "FIXED 192.168.1.121" replace 10.10.10.100 with 192.168.1.100.
If your home wifi network is on the 192.168.1 network, use the 10.10.10 network for your Mesa card, refer to you card's manual for jumpers to change.
After config reboot
To check the network type in a terminal
Code:
ip a
Taken from 7i92 Manual
Code:
IP ADDRESS SELECTION
The 7I92 has three options for selecting its IP address. These options are selected
by Jumpers W5 and W6.
W5 W6 IP ADDRESS
DOWN DOWN FIXED 192.168.1.121 (DEFAULT)
DOWN UP FIXED FROM EEPROM
UP DOWN BOOTP
UP UP INVALID
Note: that the initial EEPROM IP address is set to 10.10.10.10 at Mesa, but can be
changed to any address with the mesaflash utility.
A final note, there is no network notification applet for the desktop, so you will not get any notifications when the network connects, disconnects or reconnects.
Last edit: 1 year 7 months ago by unknown.
- U2fletch
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 1
1 year 7 months ago #323825
by U2fletch
Replied by U2fletch on topic Linuxcnc & the Raspberry Pi (4 & 5) Official Images Only!!!
I installed LinuxCNC onto a RPi 400 with a touchscreen and GMOCCAPY. It works very well, but something has changed on the system and it is now unstable. LinuxCNC, is locking up after periods of inactivity. Running a Mesa 7i96 board. Wonder if doing another clean install will fix it. Might have had a bad update along the way. Will let you know what I discover....
Time to create page: 0.469 seconds