pop-os / system76-scheduler

Auto-configure CFS and process priorities for improved desktop responsiveness
Mozilla Public License 2.0
545 stars 33 forks source link

Error: kernel does not support tweaking the scheduler #79

Closed krmbzds closed 1 year ago

krmbzds commented 1 year ago

When I try to change the profile or start the daemon I get the following error:

$ system76-scheduler daemon
 INFO system76_scheduler: starting daemon service
Error: kernel does not support tweaking the scheduler

I did not try to install a custom kernel or anything like that. This is a fresh install getting regular updates through apt upgrade.

/etc/os-release ``` NAME="Pop!_OS" VERSION="22.04 LTS" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 22.04 LTS" VERSION_ID="22.04" HOME_URL="https://pop.system76.com" SUPPORT_URL="https://support.system76.com" BUG_REPORT_URL="https://github.com/pop-os/pop/issues" PRIVACY_POLICY_URL="https://system76.com/privacy" VERSION_CODENAME=jammy UBUNTU_CODENAME=jammy LOGO=distributor-logo-pop-os ```
/proc/version ``` Linux version 6.2.6-76060206-generic (jenkins@warp.pop-os.org) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #202303130630~1679424972~22.04~4a8cde1 SMP PREEMPT_DYNAMIC Tue M ```

I've read in https://github.com/pop-os/system76-scheduler/issues/18 that I need access to /sys/kernel/debug/sched/ but I am not sure how I can enable access. I looks like the files are there and they have values in them.

sudo ls -l /sys/kernel/debug/sched/ ``` total 0 -r--r--r-- 1 root root 0 Mar 26 11:09 debug drwxr-xr-x 18 root root 0 Mar 26 11:09 domains -rw-r--r-- 1 root root 0 Mar 26 11:09 features -rw-r--r-- 1 root root 0 Mar 26 11:09 idle_min_granularity_ns -rw-r--r-- 1 root root 0 Mar 26 11:09 latency_ns -rw-r--r-- 1 root root 0 Mar 26 11:09 latency_warn_ms -rw-r--r-- 1 root root 0 Mar 26 11:09 latency_warn_once -rw-r--r-- 1 root root 0 Mar 26 11:09 migration_cost_ns -rw-r--r-- 1 root root 0 Mar 26 11:09 min_granularity_ns -rw-r--r-- 1 root root 0 Mar 26 11:09 nr_migrate drwxr-xr-x 2 root root 0 Mar 26 11:09 numa_balancing -rw-r--r-- 1 root root 0 Mar 26 11:09 preempt -rw-r--r-- 1 root root 0 Mar 26 11:09 tunable_scaling -rw-r--r-- 1 root root 0 Mar 26 11:09 verbose -rw-r--r-- 1 root root 0 Mar 26 11:09 wakeup_granularity_ns ```
krmbzds commented 1 year ago

I'm also getting this error when I try to change profiles.

RUST_BACKTRACE=1 system76-scheduler cpu responsive ``` thread 'main' panicked at 'Mismatch between definition and access of `PROFILE`. Could not downcast to TypeId { t: 8378048562631854315 }, need to downcast to TypeId { t: 4014619811965266330 } ', /build/system76-scheduler-VbwXNB/system76-scheduler-1.2.2~1667862706~22.04~0fe4d8d/vendor/clap/src/parser/error.rs:30:9 stack backtrace: note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. ```
RUST_BACKTRACE=full system76-scheduler cpu responsive ``` thread 'main' panicked at 'Mismatch between definition and access of `PROFILE`. Could not downcast to TypeId { t: 8378048562631854315 }, need to downcast to TypeId { t: 4014619811965266330 } ', /build/system76-scheduler-VbwXNB/system76-scheduler-1.2.2~1667862706~22.04~0fe4d8d/vendor/clap/src/parser/error.rs:30:9 stack backtrace: 0: 0x55de676e6ad0 - 1: 0x55de6770c45e - 2: 0x55de676e12a5 - 3: 0x55de676e84a3 - 4: 0x55de676e818f - 5: 0x55de676e8b4a - 6: 0x55de676e8a47 - 7: 0x55de676e6f7c - 8: 0x55de676e8762 - 9: 0x55de67301343 - 10: 0x55de673663d1 - 11: 0x55de67396760 - 12: 0x55de673ae209 - 13: 0x55de673d0974 - 14: 0x55de674493db - 15: 0x55de673d0646 - 16: 0x55de67424c7a - 17: 0x55de674447b3 - 18: 0x55de67410f01 - 19: 0x55de676dc22f - 20: 0x55de67424dd8 - 21: 0x7f324b029d90 - 22: 0x7f324b029e40 - __libc_start_main 23: 0x55de67301625 - 24: 0x0 - ```
developomp commented 1 year ago

@mmstick This issue doesn't seem to be resolved yet. Why was it closed?

mmstick commented 1 year ago

There isn't a resolvable issue. A kernel either does or doesn't support it, and there's nothing this software can do about a kernel that's disabled the debug interface.

developomp commented 1 year ago

Fair enough. Thanks for the clarification 👍

krmbzds commented 1 year ago

Is it normal for a fresh install of Pop!_OS 22.04 after official upgrades to have it's kernel debug interface disabled?

What can I do to enable it?