ClearMod release announcement

I finished my project imagined in the research thread. Thank you, Alexandre for the XanMod kernels.

Thank you @Businux, @Indy, and the CL team. You were there along the way. Clear Linux is fun and now more interesting.

4 Likes

Another nice project… congratz @marioroy :wink:

2 Likes

Congratulations! @marioroy the superhero!! I will try and let you know ASAP.

1 Like

1 Like

Thanks, @Indy. The first release was named as such. The naming did not look right next to my other repo “nvidia-driver-on-clear-linux”. I re-released with the new name, but missed updating the README file. Fixed.

1 Like



Stable Diffusion is working well. No fix for the poor talent in graphics creation, though. :rofl:

2 Likes

I shorten the repo name to clearmod, per suggestion.

git clone https://github.com/marioroy/clearmod

Re-compiling the kernel is unnecessary. Simply move SOURCES and RPMS over. For example, if you built the RT variant. Remove the old repo afterwards.

mv xanmod-on-clear-linux/rpmbuild.rt/SOURCES clearmod/rpmbuild.rt/
mv xanmod-on-clear-linux/rpmbuild.rt/RPMS clearmod/rpmbuild.rt/
rm -fr xanmod-on-clear-linux
1 Like

ClearMod… sounds good! :wink:

1 Like

1 day and 4 hours uptime. Solid performance.


Clearmod sounds great!

1 Like

There are two contributing factors. The main one is the autogroup tweak. Folks running the Clear native or lts kernel can apply the same power tweak, given below. The other reason is running a preempt-enabled kernel for the desktop. Clear’s kernels are tuned for the server environment (preempt not enabled).

echo "/proc/sys/kernel/sched_autogroup_enabled 1" |\
sudo tee -a /etc/clr-power-tweaks.conf
2 Likes

Thanks for the explanation @marioroy . Installed the edge-preempt as well so now I have a choice at boot.

By the way, xanmod homepage says;

Clear Linux patchset [partial].

I wonder whether you should update them about clearmod development!! :thinking:

I shared the link to Alexandre, author of XanMod, in my issue request.

The spec files have comments pertaining to Clear patches omitted due to inclusion in the XanMod kernel. I crossed all the T’s. :slight_smile: Every Clear patch is accounted for.

I do not know which I like better edge-preempt or rt-preempt.

@Businux came up with the name ClearMod :smiling_face_with_three_hearts:

2 Likes

@Businux has a knack for coming up with cool names.

Xanmod-Alexandre, I see.

@marioroy , I think what you did is huge for the CL community. This should be news on Phoronix. I want to see how KDE Plasma plays along with these kernels. I am yet to try the desktop in Wayland too. I will let you know how it goes. I have some free time next week and would like to do the benchmarks you did. It is not 100% clear from your instructions on how to run them though.

PS
If you are someone like me reading this thread coming from Windows and new to Linux, you will find the following chat with chat GPT interesting.

Q. what is a preempt enabled linux kernel?

A. A preemptible Linux kernel is a kernel configuration where nearly all of the code running in kernel mode is preemptible, or interruptible, by higher-priority tasks. This is in contrast to a non-preemptible kernel, where certain critical sections of code are allowed to execute to completion without being preempted.

In a preemptible kernel, any task can be interrupted by the scheduler, allowing a higher-priority task to execute. This helps in reducing latency and making the system more responsive, which can be particularly important in real-time computing and interactive applications.

The Linux kernel provides several preemption models:

No Forced Preemption: This is the traditional Linux kernel preemption model, where kernel code is not preemptible except when explicitly permitted (e.g., through explicit yield points or when blocked waiting for I/O).

Voluntary Kernel Preemption: This model adds more preemption points in the kernel code, allowing it to be more easily preempted by higher-priority tasks, but it still primarily relies on the kernel code to voluntarily yield the processor.

Preemptible Kernel: In this configuration, nearly all of the kernel code becomes preemptible, except for critical sections protected by spin locks or other synchronization mechanisms.

To enable kernel preemption, you would typically configure and compile the Linux kernel with the relevant options. This might be specified as CONFIG_PREEMPT_VOLUNTARY or CONFIG_PREEMPT in the .config file used for kernel compilation.

The preemptible kernel can be very useful in systems requiring low-latency responses, but it could also increase the system overhead due to the increased context switching. Therefore, the appropriateness of using a preemptible kernel depends on the specific use-case and requirements.

Q. Which configuration is best for linux gaming?

A. When it comes to Linux gaming, system responsiveness and low latency are often key considerations. You’d want to configure the kernel and the operating system to minimize input lag, frame drop, and to improve the general performance of the game. Here are some general guidelines for kernel and system configuration geared towards gaming:

Kernel Configuration:
Preemptible Kernel (CONFIG_PREEMPT): A fully preemptible kernel offers low-latency, which is beneficial for time-sensitive applications like video games. This comes at the cost of slightly increased CPU overhead, but for modern, powerful CPUs, this is typically not an issue.

High-Resolution Timer Support (CONFIG_HIGH_RES_TIMERS): High-resolution timers can offer more precise timing, which can improve game performance.

CPU Frequency Scaling: Dynamic frequency scaling allows the CPU to adjust its frequency according to the current load. Performance governors (cpufreq_performance or cpupower) that keep the CPU at higher frequencies are often recommended for gaming.

I/O Scheduler: Some recommend using the “noop” or “deadline” schedulers for SSDs, and “CFQ” for HDDs. These schedulers can impact how quickly game assets are loaded, affecting both game start times and in-game asset streaming.

System Configuration:
Graphics Drivers: Make sure to install the latest proprietary or open-source graphics drivers optimized for performance.

Game Mode: Some Linux distributions support a “Game Mode” that optimizes CPU, I/O priority, and other settings specifically for gaming when activated.

Swappiness: Reducing the “swappiness” parameter can decrease the reliance on swap, which can be beneficial for gaming performance.

Real-time Priority: Some gamers opt to run their gaming applications with real-time priority to ensure that the CPU gives it the most attention.

Disable Unnecessary Services: Turning off unnecessary background services can free up system resources.

Overclocking: This is hardware-dependent and can give a boost in performance, but it comes with increased power usage and thermal output. Be cautious if you choose to go this route.

Updates: Keep your system and game files updated. Sometimes performance gains can be achieved through software updates alone.

SSD: If possible, installing games on an SSD can significantly reduce load times.

RAM: Ensure you have enough RAM to prevent swap file usage, which can slow down gaming performance.

Different games and setups will have different requirements, and you may need to experiment to find the best configuration for your system. Always remember that changing system-level configurations can have a global impact on your system, so proceed with caution.


1 Like

It’s all in the name :wink:

1 Like

Release 102.

  1. Add scheduler tweaks to README. Resolves window movement stalling under compute load.
  2. Improve xm-install. Resolves dkms not building modules when installing an older release.
  3. Run equally well on all x86-64 CPUs with min support of x86-64-v3. I tested x86-64-v3 with and without the 0162 patch. The options are not used in Clear LTS and RT.
  4. Change tick rate to 500 HZ, XanMod default.
  5. Disable tracers, XanMod default.

I forgot to mention in the change log the sched_autogroup_enabled tweak is optional.

The ClearMod project was a research idea to see if possible to run the XanMod Kernel on Clear Linux. The XanMod Kernels run fabulously.

All my GitHub repositories are archived. I want to do other things. The ClearMod project is fully QA’d. So too, the NVIDIA on Clear project.

1 Like

Thank you for your amazing work!

I did a fresh install with CL 40030 and compiled my kernels of choice;

  • org.clearlinux.xmedge-preempt.6.5.5-102
    org.clearlinux.xmrt-preempt.6.1.54-102
    org.clearlinux.xmrt-preempt_rt.6.1.54-102

It was a good stress test for my cooling setup :slight_smile:

It was interesting, rt-preempt build failed but completed on the second run without making any changes. Checking error logs to find a cause is out of my depth. :blush:

CL 40030 has Gnome 45. Wow CL team, thank you. :love_you_gesture:

I have wiped out Windows from my desktop computer for good.

One can limit the number of CPU cores consumed by rpmbuild. Adjust the integer value before pressing enter.

echo "%_smp_mflags -j8" >> ~/.rpmmacros
1 Like

Another tuning knob for low-latency is toning down Transparent Huge Pages (THP) from the default always in Clear Linux to madvice. I tried also never, but that increased build times. Refer to the Low latency tuning guide for details.

Add to /etc/clr-power-tweaks.conf

/sys/kernel/mm/transparent_hugepage/enabled madvise

The XanMod default is madvise.

2 Likes