Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm relatively new to Linux and working on getting a real-time kernel up and running for robot applications. I'm on Ubuntu 14.04, using kernel 3.14.3 and the 3.14.3-rt5 real-time patch. Also using x86-64.

There's a known error where the whole system crashes under some load when lazy preempt is enabled. This has happened to me a few times now. My question is:

How do I disable lazy preempt?

I read to add NO_PREEMPT_LAZY to the end of /sys/kernel/debug/sched_features, but when I try to do that (using ~$ sudo vim /sys/kernel/debug/sched_features), upon trying to save and exit (:wq) I get the following error:

"/sys/kernel/debug/sched_features" E667: Fsync failed
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!
Press ENTER or type command to continue

If someone could help me get past the vim Fsync failed or disable lazy preempt in another way, I would greatly appreciate it.

share|improve this question

It looks like you got most of your answer somewhere else. So editing files in /sys/, specifically debugfs, this doesn't work because it's a pseudo-filesystem. The best way is to echo >> to files and do it as root since you are talking to the kernel directly. I can't tell if the code that implements the sched_features accepts that value. The scheduler is quite complex.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.