<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/fixing-desktop-stutter-during-nix-builds-with-sched-ext-gvbgj0dko" -->

---
title: Fixing desktop stutter during Nix builds with sched_ext
description: A deep dive into fixing desktop stutter during large Nix package builds, covering which classic Linux desktop tuning sysctls (like sched_latency_ns,...
canonical: https://daily.dev/posts/fixing-desktop-stutter-during-nix-builds-with-sched-ext-gvbgj0dko
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Fixing desktop stutter during Nix builds with sched_ext | daily.dev
og:description: A deep dive into fixing desktop stutter during large Nix package builds, covering which classic Linux desktop tuning sysctls (like sched_latency_ns,...
og:url: https://daily.dev/posts/fixing-desktop-stutter-during-nix-builds-with-sched-ext-gvbgj0dko
og:image: https://api.daily.dev/og/posts/GVbgj0dKo.png
og:image:alt: Fixing desktop stutter during Nix builds with sched_ext
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Fixing desktop stutter during Nix builds with sched_ext

**[/dev/io](https://daily.dev/sources/iodev)** · 5 min read · 1 upvotes · 0 comments

## Summary

A deep dive into fixing desktop stutter during large Nix package builds, covering which classic Linux desktop tuning sysctls (like sched_latency_ns, elevator=noop) are now dead on modern kernels, and what actually works: scx_bpfland from the sched_ext BPF scheduler project, bounding NIX_BUILD_CORES fan-out, capping ZFS ARC size, and using systemd MemoryHigh/nice settings to protect the session. Includes measurements on a Ryzen 7 7840U laptop showing pressure stall information staying flat under heavy build load with these fixes applied.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.iodev.org/blog/desktop-stutter-nix-builds-sched-ext>

## Questions this post answers

### Why doesn't sched_latency_ns or sched_min_granularity_ns do anything on a modern Linux kernel anymore?

Those sysctls moved from /proc/sys/kernel to /sys/kernel/debug/sched in Linux 5.13, and the EEVDF scheduler introduced in 6.6 deleted most of them outright. systemd-sysctl only logs a warning when a key no longer exists and continues, so configs that still set these values fail silently; check with journalctl -u systemd-sysctl -b to see the warnings.

_daily.dev keeps developers current on kernel scheduler changes like EEVDF before old tuning advice wastes their time._

### How do I stop a Nix build from oversubscribing all my CPU cores during a mass rebuild?

Setting cores = 0 in Nix configuration sets NIX_BUILD_CORES to the full thread count for every parallel derivation, so a mass rebuild can fan out to as many as 64 jobs times 64 threads each, producing run queues in the hundreds. The fix is to cap max-jobs and cores together so the worst case never exceeds the machine's total thread count.

_Anyone tuning Nix build parallelism for desktop responsiveness can track fixes like this on daily.dev._

### Why does system76-scheduler fail to boost my compositor's priority on niri or other non-GNOME/KDE desktops?

system76-scheduler's foreground-boosting feature depends on the desktop environment reporting focus changes over D-Bus, which GNOME provides via an extension and KDE via a KWin script. Compositors without that integration, such as niri, get no signal, so the daemon falls back to static process classification, which can incorrectly place the compositor itself in the background bucket at a low nice value.

_daily.dev helps developers debugging desktop scheduler quirks on non-mainstream compositors stay informed._

## Similar posts on daily.dev

- [Linux gaming's stuttering problem isn't Proton and a new kernel patch could reveal what it actually is](https://daily.dev/posts/linux-gaming-s-stuttering-problem-isn-t-proton-and-a-new-kernel-patch-could-reveal-what-it-actually--reghq0gnb) · XDA Developers · 0 upvotes · 0 comments
- [Slackware-Based Zenwalk Linux Aims For "True Low Latency Desktop Experience"](https://daily.dev/posts/slackware-based-zenwalk-linux-aims-for-true-low-latency-desktop-experience--gkb2bexqe) · Phoronix · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#nixos](https://daily.dev/tags/nixos)

[View this post on daily.dev](https://daily.dev/posts/fixing-desktop-stutter-during-nix-builds-with-sched-ext-gvbgj0dko)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Fixing desktop stutter during Nix builds with sched_ext","url":"https://daily.dev/posts/fixing-desktop-stutter-during-nix-builds-with-sched-ext-gvbgj0dko","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/fixing-desktop-stutter-during-nix-builds-with-sched-ext-gvbgj0dko"},"datePublished":"2026-09-01T17:18:00.021Z","dateModified":"2026-09-01T17:51:11.042Z","description":"A deep dive into fixing desktop stutter during large Nix package builds, covering which classic Linux desktop tuning sysctls (like sched_latency_ns,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1b68f7a34759910b48637602ebae7651?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1b68f7a34759910b48637602ebae7651?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"/dev/io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"/dev/io","logo":"https://media.daily.dev/image/upload/s--xOsuFPZX--/f_auto,q_auto/v1777801594/logos/iodev","url":"https://daily.dev/sources/iodev"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/fixing-desktop-stutter-during-nix-builds-with-sched-ext-gvbgj0dko","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,nixos","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"/dev/io","item":"https://daily.dev/sources/iodev"},{"@type":"ListItem","position":3,"name":"Fixing desktop stutter during Nix builds with sched_ext"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/fixing-desktop-stutter-during-nix-builds-with-sched-ext-gvbgj0dko#faq","mainEntity":[{"@type":"Question","name":"Why doesn't sched_latency_ns or sched_min_granularity_ns do anything on a modern Linux kernel anymore?","acceptedAnswer":{"@type":"Answer","text":"Those sysctls moved from /proc/sys/kernel to /sys/kernel/debug/sched in Linux 5.13, and the EEVDF scheduler introduced in 6.6 deleted most of them outright. systemd-sysctl only logs a warning when a key no longer exists and continues, so configs that still set these values fail silently; check with journalctl -u systemd-sysctl -b to see the warnings. daily.dev keeps developers current on kernel scheduler changes like EEVDF before old tuning advice wastes their time."}},{"@type":"Question","name":"How do I stop a Nix build from oversubscribing all my CPU cores during a mass rebuild?","acceptedAnswer":{"@type":"Answer","text":"Setting cores = 0 in Nix configuration sets NIX_BUILD_CORES to the full thread count for every parallel derivation, so a mass rebuild can fan out to as many as 64 jobs times 64 threads each, producing run queues in the hundreds. The fix is to cap max-jobs and cores together so the worst case never exceeds the machine's total thread count. Anyone tuning Nix build parallelism for desktop responsiveness can track fixes like this on daily.dev."}},{"@type":"Question","name":"Why does system76-scheduler fail to boost my compositor's priority on niri or other non-GNOME/KDE desktops?","acceptedAnswer":{"@type":"Answer","text":"system76-scheduler's foreground-boosting feature depends on the desktop environment reporting focus changes over D-Bus, which GNOME provides via an extension and KDE via a KWin script. Compositors without that integration, such as niri, get no signal, so the daemon falls back to static process classification, which can incorrectly place the compositor itself in the background bucket at a low nice value. daily.dev helps developers debugging desktop scheduler quirks on non-mainstream compositors stay informed."}}]}
```

