# Armbian kernel & Klipper host mcu: "Got error -1 in sched\_setschedule"

**URL:** <https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193>\
**Category:** Configs\
**Created:** [October 27, 2021, 10:05pm UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193 "2021-10-27T22:05:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piezo](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/piezo/32/1110_2.png) [@Piezo](https://klipper.discourse.group/u/Piezo)\
**Post date:** [October 27, 2021, 10:05pm UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/1 "2021-10-27T22:05:28Z")

</div>

When using a Linux kernel built by the Armbian team, the Klipper host mcu will refuse to start in realtime mode (`-r` flag) with the error:  
`Got error -1 in sched_setscheduler: (1)Operation not permitted`

This is because the kernel is compiled with `CONFIG_RT_GROUP_SCHED=y`. Systemd’s devs flat out [refused](https://github.com/systemd/systemd/issues/329) to implement the cgroup management for this, so it’s not possible to allocate the `rt_runtime_us` from the unit file.

The solution is to disable the limit with `sudo sysctl -w kernel.sched_rt_runtime_us=-1`  
`echo "kernel.sched_rt_runtime_us = -1" | sudo tee /etc/sysctl.d/10-disable-rt-group-limit.conf` to make it permanent.

Most kernels out there have it disabled (`CONFIG_RT_GROUP_SCHED=n`). Notably, Raspberry Pi OS and Ubuntu don’t need this fix.

It bothered me for quite some time until an Armbian forum user gave me the solution. I put this here to help future users who know how to use the search function.

---

<div class="post-metadata">

**Author:** ![No\_Understanding](https://avatars.discourse-cdn.com/v4/letter/n/77aa72/32.png) [@No\_Understanding](https://klipper.discourse.group/u/No_Understanding)\
**Post date:** [October 30, 2021, 9:19am UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/2 "2021-10-30T09:19:43Z")

</div>

Good to know, I’m always using no stock hardware, armbian has these little quirks.

---

<div class="post-metadata">

**Author:** ![jjarosz](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@jjarosz](https://klipper.discourse.group/u/jjarosz)\
**Post date:** [November 6, 2021, 11:02am UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/3 "2021-11-06T11:02:56Z")

</div>

What build of Armbian are you using?

Bullseye, Buster, Focal, etc?

I’m curious if it makes a difference if you use the Debian or Ubuntu release or if this is across the board for Armbian?

---

<div class="post-metadata">

**Author:** ![No\_Understanding](https://avatars.discourse-cdn.com/v4/letter/n/77aa72/32.png) [@No\_Understanding](https://klipper.discourse.group/u/No_Understanding)\
**Post date:** [November 8, 2021, 6:13pm UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/4 "2021-11-08T18:13:22Z")

</div>

Currently on buster, but have used focal & bullseye all seem to have quirks, buster has been stable for 3-4months even with on going updates in klipper / kiauh.

---

<div class="post-metadata">

**Author:** ![Jaccob](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/jaccob/32/1612_2.png) [@Jaccob](https://klipper.discourse.group/u/Jaccob)\
**Post date:** [July 15, 2023, 2:08pm UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/5 "2023-07-15T14:08:31Z")

</div>

I just fixed my pi with the command. I have spent a lot of time searching the whole internet to figure out what happened and what to do. And it turned out the solution had been posted in the klipper forum…  
Anyways, thanks a lot!!

(BTW, I am using the orange pi zero3 with the stock image bullseye debian)

---

<div class="post-metadata">

**Author:** ![Yumil216](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@Yumil216](https://klipper.discourse.group/u/Yumil216)\
**Post date:** [December 14, 2023, 4:57am UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/6 "2023-12-14T04:57:14Z")

</div>

My device is also orangepi zero3. I also tried these two lines of command, but there was no response after the second command was entered. I also tried using the root and klipper user commands, again.  
Can you tell me how you succeeded？

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [December 14, 2023, 6:10am UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/7 "2023-12-14T06:10:34Z")

</div>

> [@Klipper-mcu Service Fails to Start](https://klipper.discourse.group/t/klipper-mcu-service-fails-to-start/12219):
>
> Background The [klipper-mcu](https://www.klipper3d.org/RPi_microcontroller.html) process fails to start on certain Linux distributions, even when the relevant documentation is carefully followed. This issue primarily affects Armbian Linux distributions or those based on Armbian. Diagnosing the issue The easiest way to recognize this problem is in the klippy.log where an error message like mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper\_host\_mcu' will appear. Further issuing the command: systemctl status klip…

---

<div class="post-metadata">

**Author:** ![Piezo](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/piezo/32/1110_2.png) [@Piezo](https://klipper.discourse.group/u/Piezo)\
**Post date:** [December 14, 2023, 1:15pm UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/8 "2023-12-14T13:15:27Z")

</div>

> [@Yumil216](#):
>
> My device is also orangepi zero3. I also tried these two lines of command, but there was no response after the second command was entered.

The second command should only respond with `kernel.sched_rt_runtime_us = -1`. It uses the root account to write this line in the file `/etc/sysctl.d/10-disable-rt-group-limit.conf`. It will be read during the following boots, having the same effect as the first command. It’s run early at boot, before the klipper-mcu starts.

If the host mcu still fails, please check if you have a different error with `systemctl status klipper-mcu` (compare the outputs with the ones in Sineos guide). There are other potential issues, especially if the config of the host mcu involves GPIOs.

---

<div class="post-metadata">

**Author:** ![ivantem86](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@ivantem86](https://klipper.discourse.group/u/ivantem86)\
**Post date:** [October 26, 2024, 12:39am UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/9 "2024-10-26T00:39:23Z")

</div>

@Piezo I thank you for the solution, you saved my life here in y2024.  
I register an account for this post in order to express my appreciation.

---

<div class="post-metadata">

**Author:** ![drackp2m](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/drackp2m/32/20834_2.png) [@drackp2m](https://klipper.discourse.group/u/drackp2m)\
**Post date:** [October 22, 2025, 2:48pm UTC](https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193/10 "2025-10-22T14:48:15Z")

</div>

Here is someone else who wants to offer a thank you @Piezo. You don’t know how long I’ve been trying to solve this problem. Testing and testing distributions and there was no way.

Thank you very much.
