I finished my project imagined in the research thread. Thank you, Alexandre for the XanMod kernels.
Another nice project… congratz @marioroy
Congratulations! @marioroy the superhero!! I will try and let you know ASAP.
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.
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
ClearMod… sounds good!
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
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!!
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. Every Clear patch is accounted for.
I do not know which I like better
@Businux came up with the name ClearMod
@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.
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:
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.
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.
It’s all in the name
- Add scheduler tweaks to README. Resolves window movement stalling under compute load.
- Improve xm-install. Resolves dkms not building modules when installing an older release.
- 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.
- Change tick rate to 500 HZ, XanMod default.
- 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.
Thank you for your amazing work!
I did a fresh install with CL 40030 and compiled my kernels of choice;
It was a good stress test for my cooling setup
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.
CL 40030 has Gnome 45. Wow CL team, thank you.
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
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.
The XanMod default is