Raspberry Pi Kernels (2.0)

All I know is I have been testing for 2 hours now and all is good so far if I do not open chromium and try to navigate sites.

ADDED:

Everything just locked up on me again and no chromium.

After another kernel dump I was able to get the logs before it froze. It is pretty much the same thing saying issue with page swapping. I believe I just assumed it was a 16k issue with chromium but I did not have it loaded this time; just firefox and after 20 minutes this time.

ADDITIONAL:

@Sam_Fisher It is looking like the culprit is the zswap-arm.service. I have disabled it here and run chromium flatpak and firefox while at the same time compiled a kernel with distcc and -j19 with vim3pro and rockpro64 as slaves. I am unable to make it freeze so far.

I have 8G ram but some here may have smaller ram and may have to create a swap space on disk if they run out of ram.

I uploaded v6.15.rc2-2 (today’s latest) to unstable when the mirrors sync. Install the kernel then disable zswap-arm.service before rebooting and see what it does.

sudo systemctl disable zswap-arm

Kernels v6.14.3-1 pushed to unstable when the mirrors sync.

1 Like

If i am not mistaken, Manjaro ARM by default comes with zswap enabled. I think it was 500mb in my case (probly depends on the actual ram size by percent). I always increase it to match my actual ram size which is 4GB. In the case of RPI, a larger swap space is essential in my opinion.

It sets by default 1 1/2 times the devices total memory.

https://gitlab.manjaro.org/manjaro-arm/packages/community/zswap-arm/-/blob/master/zswap-arm-ctrl?ref_type=heads

Yeah 500mb was probably RPIOS default. Sorry.

1 Like

I don’t want to be an UUOC pedant but this code seems unsophisticated… it works and the author is not part of this story anymore.
Anyway, that was not my point, I wonder about the last comment from 6.14.3 kernel branch: configs: Enable UNICODE support (for filesystems) => kernel unicode support missing - ext4 casefold feature not avaailabe ¡ Issue #6808 ¡ raspberrypi/linux ¡ GitHub
Do we have such situation?

I do not know. I have never had a reason to mess with samba fileservers. There is not a windows machine in my house so not interested in it.

But it got enabled as I use their default configs as a base.

I would say, it will be enabled on the next kernel because today it is not set:

CONFIG_UNICODE is not set

I guess I built thee new kernel before the change.

ADDED 2024-04-28:

v6.12.25 kernels and raspberrypi-bootloader-20250426-1 packages pushed to unstable when the mirrors sync.

v6.14.4 kernel packages pushed to unstable when the mirrors sync.

1 Like

Thanks for that! Now, the CONFIG_UNICODE is set:

CONFIG_UNICODE=m

I don’t think it’s related to that topic but I find it a bit more responsible.

1 Like

I’m trying to use the ntsync module for wine

 tree /lib/modules/6.14.4-1-MANJARO-RPI4/ | grep ntsync
│   │   │   │   ├── ntsync.h

modprobe ntsync
modprobe: FATAL: Module ntsync not found in directory /lib/modules/6.14.4-1-MANJARO-RPI4

I have it set to be in all future kernels. In the mean time download and install linux-rpi4-mainline-6.14.4-2 kernel packages from here to test:

https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-rpi4-mainline/-/jobs/15728

Thanks.

lsof /dev/ntsync
COMMAND    PID      USER FD   TYPE DEVICE SIZE/OFF NODE NAME
start.exe 2175 bloodmoon  7r   CHR 10,124      0t0  839 /dev/ntsync
wineserve 2182 bloodmoon  9r   CHR 10,124      0t0  839 /dev/ntsync
services. 2186 bloodmoon 14r   CHR 10,124      0t0  839 /dev/ntsync
winedevic 2189 bloodmoon  8r   CHR 10,124      0t0  839 /dev/ntsync
plugplay. 2199 bloodmoon  8r   CHR 10,124      0t0  839 /dev/ntsync
svchost.e 2205 bloodmoon  8r   CHR 10,124      0t0  839 /dev/ntsync
winedevic 2212 bloodmoon  8r   CHR 10,124      0t0  839 /dev/ntsync
explorer. 2229 bloodmoon  8r   CHR 10,124      0t0  839 /dev/ntsync
rpcss.exe 2269 bloodmoon  8r   CHR 10,124      0t0  839 /dev/ntsync
conhost.e 2280 bloodmoon 11r   CHR 10,124      0t0  839 /dev/ntsync
winecfg.e 2282 bloodmoon  8r   CHR 10,124      0t0  839 /dev/ntsync

https://www.phoronix.com/news/Linux-6.14-NTSYNC-Driver-Ready
i don’t know much about modules, so what’s the procedure for making sudo modprobe ntsync persistent ?
Would this have any effect on common desktop use ?

That is an interesting module. Most of the time modules are loaded when devices are found automatically. The only option for the module was =m (no =y for builtin) But the doc says that it is not a device driver. I would have guessed that software that was looking for the module would find and load it dynamically as needed.

If not; to manually load at boot do this:

sudo echo "ntsync" | sudo tee -a /etc/modules-load.d/ntsync.conf

It should not effect your system at all. It should not be used until what ever software code is looking for it.

@tartanpion I am not a game person at 75 years old but was wondering if you noticed any improvement with the new module.

I don’t often record fps with

GALLIUM_HUD=".c70fps" wine

I’d say you have to believe those who have fun doing tests. Anything is a good improvement for a raspberry anyway. The problem is that it doesn’t load the module automatically, and who’s going to know in the futur that you need to create a launcher? I think you need to look at what cachyos has set up for this.
And I’m not a big video game player. Hollow knight with the raspberry came to the end of my abilities. At the end of the 50th same fight I gave up.

These new kernel, bootloader and eeprom packages has been pushed to unstable when the mirrors sync.

linux-rpi4-6.12.28-1
linux-rpi4-headers-6.12.28-1
linux-rpi4-mainline-6.14.6-1
linux-rpi4-mainline-headers-6.14.6-1
linux-rpi5-6.12.28-1
linux-rpi5-headers-6.12.28-1
linux-rpi5-mainline-6.14.6-1
linux-rpi5-mainline-headers-6.14.6-1
raspberrypi-bootloader-20250514-1
rpi4-eeprom-20250513-1
rpi5-eeprom-20250513-1
1 Like

Whatever the reason (kernel update, scx-scheds 1.0.12-2, pkgbuild options changed, bpf updated). Scx can be updated (i have use arch package to test). I think this is very useful for a rpi, whatever you think of it.
For lavd, which seems to be a recommended generalist scx. You need to remove the option --no-core-compaction.

–performance Run the scheduler in performance mode to get maximum performance. This option cannot be used with other conflicting options (–autopilot, --autopower, --balanced, --powersave, --no-core-compaction)

sudo nano /etc/default/scx
# List of scx_schedulers: scx_bpfland scx_central scx_flash scx_lavd scx_layered scx_nest scx_qmap scx_rlfifo scx_rustland scx_rusty scx_simple scx_userl>
SCX_SCHEDULER=scx_lavd

# Set custom flags for each scheduler, below is an example of how to use
SCX_FLAGS='--performance'
sudo systemctl enable scx.service
sudo systemctl start scx.service
systemctl status scx.service
systemctl status scx.service
● scx.service - Start scx_scheduler
     Loaded: loaded (/usr/lib/systemd/system/scx.service; enabled; preset: disabled)
     Active: active (running) since Tue 2025-05-20 10:57:34 CEST; 16min ago
 Invocation: b2a9cd53bed341f4ac1099a1c9cb48bc
   Main PID: 720 (scx_lavd)
      Tasks: 4 (limit: 9027)
        CPU: 1.049s
     CGroup: /system.slice/scx.service
             └─720 scx_lavd --performance

May 20 10:57:34 bloodmoon-pc bash[720]:     monitor: None,
May 20 10:57:34 bloodmoon-pc bash[720]:     monitor_sched_samples: None,
May 20 10:57:34 bloodmoon-pc bash[720]:     verbose: 0,
May 20 10:57:34 bloodmoon-pc bash[720]:     version: false,
May 20 10:57:34 bloodmoon-pc bash[720]:     help_stats: false,
May 20 10:57:34 bloodmoon-pc bash[720]: }
May 20 10:57:34 bloodmoon-pc bash[720]: 08:57:34 [INFO] CPU pref order in performance mode: [0, 1, 2, 3]
May 20 10:57:34 bloodmoon-pc bash[720]: 08:57:34 [INFO] CPU pref order in powersave mode: [0, 1, 2, 3]
May 20 10:57:35 bloodmoon-pc bash[720]: 08:57:35 [INFO] scx_lavd scheduler is initialized (build ID: 1.0.12-g091a2ade-dirty aarch64-unknown-linux-gnu)
May 20 10:57:35 bloodmoon-pc bash[720]: 08:57:35 [INFO] scx_lavd scheduler starts running.
scx_lavd -h

we’ll have to see about the bug https://github.com/sched-ext/scx/issues/1511
I tried too fast and there’s still a problem.

 scx_lavd --performance
09:42:48 [INFO] Performance mode is enabled.
09:42:48 [INFO] Opts {
    autopilot: false,
    autopower: false,
    performance: true,
    powersave: false,
    balanced: false,
    slice_max_us: 5000,
    slice_min_us: 300,
    cpu_pref_order: "",
    no_futex_boost: false,
    no_preemption: false,
    no_wake_sync: false,
    no_core_compaction: true,
    no_freq_scaling: false,
    stats: None,
    monitor: None,
    monitor_sched_samples: None,
    verbose: 0,
    version: false,
    help_stats: false,
}

thread 'main' panicked at rust/scx_utils/src/misc.rs:77:13:
setrlimit failed with error code: -1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I don’t remember if this is default ?

ulimit -a

real-time non-blocking time  (microseconds, -R) unlimited
core file size              (blocks, -c) unlimited
data seg size               (kbytes, -d) unlimited
scheduling priority                 (-e) 0
file size                   (blocks, -f) unlimited
pending signals                     (-i) 30090
max locked memory           (kbytes, -l) 8192
max memory size             (kbytes, -m) unlimited
open files                          (-n) 1024
pipe size                (512 bytes, -p) 8
POSIX message queues         (bytes, -q) 819200
real-time priority                  (-r) 0
stack size                  (kbytes, -s) 8192
cpu time                   (seconds, -t) unlimited
max user processes                  (-u) 30090
virtual memory              (kbytes, -v) unlimited
file locks                          (-x) unlimited


chatgpt response (and question of github status of ulimit -l)

The error you’re encountering:
setrlimit failed with error code: -1
comes from this line in your code:
panic!(“setrlimit failed with error code: {}”, res);
This indicates that the call to setrlimit failed when trying to set RLIMIT_MEMLOCK to RLIM_INFINITY. This is a common issue when the executing user lacks the necessary privileges to raise memory locking limits.
This means your current shell session (and thus any process you launch from it) is limited to locking only 8 MB of memory—far below the RLIM_INFINITY that your Rust code tries to set with setrlimit.
:pushpin: Why This Matters
Your function:
let new_rlimit = libc::rlimit {
rlim_cur: libc::RLIM_INFINITY,
rlim_max: libc::RLIM_INFINITY,
};
let res = libc::setrlimit(libc::RLIMIT_MEMLOCK, &new_rlimit);
fails because your user does not have permission to raise the limit beyond 8192 KB. The kernel blocks this action, and setrlimit returns an error, causing the panic.
Options to Fix the Issue 1. Temporarily Raise the Limit (if allowed)
In your shell:
ulimit -l unlimited

 sudo su
[root@bloodmoon-pc bloodmoon]# ulimit -l unlimited
[root@bloodmoon-pc bloodmoon]# ulimit -a | grep locked
max locked memory           (kbytes, -l) unlimited
[root@bloodmoon-pc bloodmoon]# scx_lavd --performance
10:34:51 [INFO] Performance mode is enabled.
10:34:51 [INFO] Opts {
    autopilot: false,
    autopower: false,
    performance: true,
    powersave: false,
    balanced: false,
    slice_max_us: 5000,
    slice_min_us: 300,
    cpu_pref_order: "",
    no_futex_boost: false,
    no_preemption: false,
    no_wake_sync: false,
    no_core_compaction: true,
    no_freq_scaling: false,
    stats: None,
    monitor: None,
    monitor_sched_samples: None,
    verbose: 0,
    version: false,
    help_stats: false,
}
10:34:51 [INFO] CPU pref order in performance mode: [0, 1, 2, 3]
10:34:51 [INFO] CPU pref order in powersave mode: [0, 1, 2, 3]
10:34:52 [INFO] scx_lavd scheduler is initialized (build ID: 1.0.12-g091a2ade-dirty aarch64-unknown-linux-gnu)
10:34:52 [INFO] scx_lavd scheduler starts running.

Don’t know if it’s secure to launch that with administrator rights but at least it proves that’s the problem.
As a workaround edit

 sudo nano /etc/security/limits.conf
# End of file
* soft memlock unlimited
* hard memlock unlimited
ulimit -l
unlimited

Waiting from an official answer of @Darksky
Wouldn’t the problem be limited to the shell session as it seems to be launched with systemd?

1 Like

Pushed to unstable when the mirrors sync:

linux-rpi4-6.12.29-1
linux-rpi4-headers-6.12.29-1
linux-rpi4-mainline-6.14.7-1
linux-rpi4-mainline-headers-6.14.7-1
linux-rpi5-6.12.29-1
linux-rpi5-headers-6.12.29-1
linux-rpi5-mainline-6.14.7-1
linux-rpi5-mainline-headers-6.14.7-1

Additional:

6.15.rc7-1 kernel packages pushed to unstable when the mirrors sync.

I have changed the zram compression from zst → lz4 in the kernel. I also changed the swapiness to 140 at boot. I also have a new pi5 16G. I have run this kernel for 3 hours and so far no issues with a kernel dump. So I have no clue if things were fixed in the new kernel or if it is because of some of my changes here.

[ray@jellyfin ~]$ cat /etc/sysctl.d/99-swappiness.conf 
vm.swappiness = 140
fastfetch --logo-type none

OS: Manjaro ARM Linux aarch64
Host: Raspberry Pi 5 Model B Rev 1.1
Kernel: Linux 6.15.0-rc7-1-MANJARO-RPI5
Uptime: 4 hours, 33 mins
Packages: 1774 (pacman)[arm-unstable], 11 (flatpak), 15 (snap)
Shell: bash 5.2.37
Display (E280i-A1): 1360x768 @ 60 Hz in 27" [External]
DE: Xfce4 4.20
WM: Xfwm4 (X11)
WM Theme: Default
Theme: Matchama-Dark [Qt], Matcha-dark-sea [GTK2/3/4]
Icons: Papirus-Adapta-Maia [Qt], Papirus-Dark-Maia [GTK2/3/4]
Font: Cantarell (10pt) [Qt], Sans (10pt) [GTK2/3/4]
Cursor: Adwaita
Terminal: xfce4-terminal 1.1.5
CPU: BCM2712 (4) @ 2.80 GHz
GPU: Broadcom bcm2712-vc6 [Integrated]
Memory: 5.55 GiB / 15.83 GiB (35%)
Swap: 0 B / 23.74 GiB (0%)
Disk (/): 255.18 GiB / 699.31 GiB (36%) - ext4
Local IP (wlan0): 192.168.0.136/24
Locale: en_US.UTF-8

ok I think I understood better, scx scheduler can be synchronized again with the arch package. Systemd Service works, as well as the tests in a terminal provided that you put yourself in sudo first. The problem is that if you forget to put yourself in sudo, it sets the ulimit error before setting the permission error, and it’s only if you force that for the user by modifying

sudo nano /etc/security/limits.conf
# End of file
* soft memlock unlimited
* hard memlock unlimited

that it give the permission error.

ulimit -a |grep locked
max locked memory           (kbytes, -l) 8192
sudo su
[root@bloodmoon-pc bloodmoon]# ulimit -a | grep locked
max locked memory           (kbytes, -l) 8192

user and su have the same base memory but with sudo that can unlock that ?

I followed this section here in this link and rebooted and it seems to work ok using sudo scx_lavd --performance and also works ok with scx.service enabled at boot.

https://unix.stackexchange.com/questions/366352/etc-security-limits-conf-not-applied

Create a new file /etc/systemd/system.conf.d/limits.conf with these contents:

[Manager]
DefaultLimitNOFILE=1048576:2097152
DefaultLimitNPROC=262144:524288

I believe I have always had to run the command in the terminal prefixed with sudo. With scx-scheds-1.0.12-2 it now seems to work like it did before it started having issues. Some system stuf has to be run with elevated system privileges.

Interesting to notice that no-core-compaction gets enabled with just sudo scx_lavd --performance used below:

[ray@jellyfin ~]$ sudo scx_lavd --performance
14:43:08 [INFO] Performance mode is enabled.
14:43:08 [INFO] Opts {
    autopilot: false,
    autopower: false,
    performance: true,
    powersave: false,
    balanced: false,
    slice_max_us: 5000,
    slice_min_us: 300,
    cpu_pref_order: "",
    no_futex_boost: false,
    no_preemption: false,
    no_wake_sync: false,
    no_core_compaction: true,
    no_freq_scaling: false,
    stats: None,
    monitor: None,
    monitor_sched_samples: None,
    verbose: 0,
    version: false,
    help_stats: false,
}
14:43:08 [INFO] CPU pref order in performance mode: [0, 1, 2, 3]
14:43:08 [INFO] CPU pref order in powersave mode: [0, 1, 2, 3]
14:43:09 [INFO] scx_lavd scheduler is initialized (build ID: 1.0.12-g091a2ade-dirty aarch64-unknown-linux-gnu)
14:43:09 [INFO] scx_lavd scheduler starts running.

Also notice in the link above I used that systemd does not recognize unlimited but uses infinity instead but I did not use it at all which the 8192 does not seem to be a factor.

ulimit -a (as root)

real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 62766
max locked memory (kbytes, -l) 8192
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 262144
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

uname -a as user

real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 62766
max locked memory (kbytes, -l) 8192
max memory size (kbytes, -m) unlimited
open files (-n) 1048576
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 262144
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

The user and system setting are set in 2 different places in systemd but the config I used above set both in one file for user and system.

scx-scheds-1.0.12-2 pushed to unstable when the mirrors sync.