{"id":26345574,"url":"https://github.com/fralapo/disable-bd-prochot-on-linux","last_synced_at":"2026-05-19T14:34:11.783Z","repository":{"id":207839336,"uuid":"594710922","full_name":"fralapo/Disable-BD-PROCHOT-on-LINUX","owner":"fralapo","description":"If your Intel laptop is stuck near 800 MHz because BD PROCHOT is misfiring, this installs a fix that re-clears the MSR bit at boot and after every resume. Works on regular distros and on immutable ones (Bazzite, Silverblue, Kinoite).","archived":false,"fork":false,"pushed_at":"2026-05-12T10:12:24.000Z","size":66,"stargazers_count":49,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-12T12:12:10.140Z","etag":null,"topics":["bd-prochot","cpu","intel","laptop","linux","msr","power-management","script","systemd","throttling"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fralapo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-29T12:09:49.000Z","updated_at":"2026-05-12T11:16:36.000Z","dependencies_parsed_at":"2023-11-17T23:07:29.001Z","dependency_job_id":"72f31a3e-8388-4d69-9263-cfedd232caf5","html_url":"https://github.com/fralapo/Disable-BD-PROCHOT-on-LINUX","commit_stats":null,"previous_names":["jacky2001/disable-bd-prochot-on-linux","fralapo/disable-bd-prochot-on-linux"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fralapo/Disable-BD-PROCHOT-on-LINUX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fralapo%2FDisable-BD-PROCHOT-on-LINUX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fralapo%2FDisable-BD-PROCHOT-on-LINUX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fralapo%2FDisable-BD-PROCHOT-on-LINUX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fralapo%2FDisable-BD-PROCHOT-on-LINUX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fralapo","download_url":"https://codeload.github.com/fralapo/Disable-BD-PROCHOT-on-LINUX/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fralapo%2FDisable-BD-PROCHOT-on-LINUX/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33220177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bd-prochot","cpu","intel","laptop","linux","msr","power-management","script","systemd","throttling"],"created_at":"2025-03-16T06:19:05.510Z","updated_at":"2026-05-19T14:34:11.769Z","avatar_url":"https://github.com/fralapo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca id=\"readme-top\"\u003e\u003c/a\u003e\n\n# Disable BD PROCHOT on Linux\n\nStop BD PROCHOT from pinning your Intel CPU at ~800 MHz — at boot and after every resume from suspend.\n\n[![License: MIT](https://img.shields.io/github/license/fralapo/Disable-BD-PROCHOT-on-LINUX?style=flat-square)](./LICENSE)\n[![Issues](https://img.shields.io/github/issues/fralapo/Disable-BD-PROCHOT-on-LINUX?style=flat-square)](https://github.com/fralapo/Disable-BD-PROCHOT-on-LINUX/issues)\n[![Stars](https://img.shields.io/github/stars/fralapo/Disable-BD-PROCHOT-on-LINUX?style=flat-square)](https://github.com/fralapo/Disable-BD-PROCHOT-on-LINUX/stargazers)\n\nBD PROCHOT (Bi-Directional PROCHOT) is an Intel feature that lets external chips (VRMs, chipset, thermal sensors) signal the CPU to throttle hard, even when the CPU itself is cool. On some laptops a dying battery or a misreporting sensor can pin the cores at 800 MHz indefinitely. This installer clears bit 0 of `MSR 0x1FC` so the CPU ignores those external signals, and it keeps clearing it after every sleep state.\n\n## Table of Contents\n\n- [Who this is for](#who-this-is-for)\n- [What's new](#whats-new-april-2026)\n- [Prerequisites](#prerequisites)\n- [Install](#install)\n- [Verify it worked](#verify-it-worked)\n- [How it works](#how-it-works)\n- [Troubleshooting](#troubleshooting)\n- [Uninstall](#uninstall)\n- [Cautions](#cautions)\n- [License](#license)\n\n## Who this is for\n\nIntel laptops (Sandy Bridge and newer) stuck at a low frequency because of a broken sensor or an overzealous EC, on:\n\n- Arch Linux\n- Ubuntu, Debian and derivatives\n- Fedora, CentOS, RHEL\n- Bazzite, Silverblue, Kinoite and other rpm-ostree immutable distros\n\nAMD CPUs don't expose `MSR 0x1FC` the same way, so this project is Intel-only.\n\n## What's new (April 2026)\n\n- **Works on immutable distros.** All unit files now live under `/etc/systemd/system/` (writable everywhere) instead of `/usr/lib/systemd/system-sleep/` (read-only on Bazzite / Silverblue / Kinoite). Fixes [#1](https://github.com/fralapo/Disable-BD-PROCHOT-on-LINUX/issues/1).\n- **Every sleep state is covered.** Resume runs after `suspend`, `hibernate`, `hybrid-sleep`, and `suspend-then-hibernate`.\n- **Correct MSR bit clearing.** The worker reads `MSR 0x1FC`, clears bit 0 with a bitmask, and writes the result back. No hardcoded hex that could be wrong on some CPUs.\n- **`msr` module is persisted** via `/etc/modules-load.d/msr.conf`, so the service has everything it needs at early boot.\n- **Kernel lockdown detection.** The installer checks `/sys/kernel/security/lockdown` up front and offers an interactive `mokutil --disable-validation` path when Secure Boot is blocking MSR writes. The worker logs the exact failure to the journal so kernel lockdown stops being a silent failure. Addresses [#4](https://github.com/fralapo/Disable-BD-PROCHOT-on-LINUX/issues/4).\n\n## Prerequisites\n\n`msr-tools`. The installer can fetch it for you; pick the right option when prompted.\n\n## Install\n\n```bash\ncurl -LO https://raw.githubusercontent.com/fralapo/Disable-BD-PROCHOT-on-LINUX/main/Disable_BD_PROCHOT\nsudo bash Disable_BD_PROCHOT\n```\n\nThe installer asks which package manager to use, then writes:\n\n| Path | Purpose |\n|---|---|\n| `/usr/local/bin/disable_bd_prochot.sh` | worker that clears bit 0 of `MSR 0x1FC` |\n| `/etc/systemd/system/disable_bd_prochot.service` | runs the worker at boot |\n| `/etc/systemd/system/disable_bd_prochot-resume.service` | runs the worker on every resume |\n| `/etc/modules-load.d/msr.conf` | loads the `msr` kernel module at boot |\n\nOn Bazzite and other rpm-ostree systems, `msr-tools` is layered into the next deployment; a reboot is required before the services can run. The installer warns you when this is the case.\n\n\u003cdetails\u003e\n\u003csummary\u003eManual install (without running the installer)\u003c/summary\u003e\n\n1. Install `msr-tools` with your package manager.\n2. Persist the `msr` module: `echo msr | sudo tee /etc/modules-load.d/msr.conf`.\n3. Create `/usr/local/bin/disable_bd_prochot.sh` (chmod 0755):\n\n    ```bash\n    #!/bin/bash\n    modprobe msr 2\u003e/dev/null || true\n    shopt -s nullglob\n    cpus=(/dev/cpu/[0-9]*)\n    [ ${#cpus[@]} -eq 0 ] \u0026\u0026 { logger -t disable_bd_prochot \"no /dev/cpu/*/msr\"; exit 1; }\n    fail=0\n    for cpu in \"${cpus[@]}\"; do\n        cpu_id=\"${cpu##*/cpu/}\"; cpu_id=\"${cpu_id%%/*}\"\n        cur=$(rdmsr -p \"$cpu_id\" 0x1FC 2\u003e/dev/null) || { logger -t disable_bd_prochot \"rdmsr failed on cpu $cpu_id\"; fail=1; continue; }\n        new=$(( 16#$cur \u0026 ~1 ))\n        wrmsr -p \"$cpu_id\" 0x1FC \"$(printf '0x%x' \"$new\")\" 2\u003e/dev/null || { logger -t disable_bd_prochot \"wrmsr failed on cpu $cpu_id (kernel lockdown?)\"; fail=1; }\n    done\n    exit $fail\n    ```\n\n4. Create `/etc/systemd/system/disable_bd_prochot.service`:\n\n    ```ini\n    [Unit]\n    Description=Disable BD PROCHOT at boot\n    After=multi-user.target\n    ConditionPathExists=/usr/local/bin/disable_bd_prochot.sh\n\n    [Service]\n    Type=oneshot\n    ExecStart=/usr/local/bin/disable_bd_prochot.sh\n    RemainAfterExit=yes\n\n    [Install]\n    WantedBy=multi-user.target\n    ```\n\n5. Create `/etc/systemd/system/disable_bd_prochot-resume.service`:\n\n    ```ini\n    [Unit]\n    Description=Disable BD PROCHOT on resume from suspend/hibernate\n    After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target\n    ConditionPathExists=/usr/local/bin/disable_bd_prochot.sh\n\n    [Service]\n    Type=oneshot\n    ExecStart=/usr/local/bin/disable_bd_prochot.sh\n\n    [Install]\n    WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target\n    ```\n\n6. Enable both:\n\n    ```bash\n    sudo systemctl daemon-reload\n    sudo systemctl enable --now disable_bd_prochot.service\n    sudo systemctl enable disable_bd_prochot-resume.service\n    ```\n\n\u003c/details\u003e\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n## Verify it worked\n\n```bash\nsudo rdmsr -a 0x1FC\n```\n\nLook at the last hex digit of every line:\n\n- even (`0 2 4 6 8 a c e`) → BD PROCHOT is disabled\n- odd (`1 3 5 7 9 b d f`) → still active\n\nQuick example:\n\n```text\n2c005c   # last digit 'c', even → disabled\n2c005d   # last digit 'd', odd  → active\n```\n\nCheck the cores aren't pinned low:\n\n```bash\nwatch -n 1 'grep MHz /proc/cpuinfo'\n```\n\nYou should see frequencies moving freely up to the turbo ceiling, not stuck near 800 MHz.\n\n## How it works\n\nTwo systemd oneshots share one worker script.\n\nAt boot, `disable_bd_prochot.service` runs after `multi-user.target`. After every sleep state, `disable_bd_prochot-resume.service` runs the same worker. The resume unit is wired to `suspend.target`, `hibernate.target`, `hybrid-sleep.target`, and `suspend-then-hibernate.target` with both `After=` and `WantedBy=`. That combination is what the [Arch wiki Power management page](https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate) documents as the reliable pattern for \"run on resume\".\n\nThe worker itself:\n\n```bash\nfor cpu in /dev/cpu/[0-9]*; do\n    cpu_id=\"${cpu##*/cpu/}\"\n    cpu_id=\"${cpu_id%%/*}\"\n    current=$(rdmsr -p \"$cpu_id\" 0x1FC)\n    new=$(( 16#$current \u0026 ~1 ))          # clear bit 0\n    wrmsr -p \"$cpu_id\" 0x1FC \"$(printf '0x%x' \"$new\")\"\ndone\n```\n\n`MSR 0x1FC` is `MSR_POWER_CTL` on Intel. Bit 0 is the BD PROCHOT enable bit: `1` means the CPU reacts to external PROCHOT assertions, `0` means it ignores them. The worker reads the current value, clears bit 0 with a bitmask, and writes the result back, so it stays correct regardless of what the other bits happen to be on your CPU.\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n## Troubleshooting\n\n### CPU still stuck at ~800 MHz after resume\n\nCheck both services are enabled:\n\n```bash\nsystemctl is-enabled disable_bd_prochot.service\nsystemctl is-enabled disable_bd_prochot-resume.service\n```\n\nThe resume unit shows `inactive (dead)` between resumes. That is expected for a oneshot. What matters is `is-enabled` returning `enabled`.\n\nCheck the last run:\n\n```bash\njournalctl -u disable_bd_prochot-resume.service -b -1\n```\n\n### `rdmsr: unknown command`\n\n`msr-tools` is not installed. Re-run the installer or install it manually for your distro.\n\n### `modprobe: FATAL: Module msr not found`\n\nSome stripped kernels omit the MSR module. Confirm with `grep CONFIG_X86_MSR /boot/config-$(uname -r)` — you want `=y` or `=m`. If it is missing, you need a different kernel.\n\n### `wrmsr: pwrite: Operation not permitted`\n\nKernel lockdown is blocking the MSR write. On distro kernels with Secure Boot enabled (Ubuntu, Linux Mint, Debian, Fedora) the lockdown LSM auto-engages in `integrity` mode and refuses `wrmsr` even as root.\n\nDiagnose:\n\n```bash\ncat /sys/kernel/security/lockdown\n# [none] integrity confidentiality       → not blocked\n# none [integrity] confidentiality       → blocked, wrmsr will fail\n```\n\nPick one fix:\n\n**A — Disable Secure Boot (cleanest, recommended).**\nReboot, enter UEFI firmware, set Secure Boot to *Disabled*, save and reboot. Re-run the installer. `lockdown` will be `[none]`. The installer's pre-check detects this automatically.\n\n**B — `mokutil --disable-validation` (no firmware access required).**\nThe installer offers this interactively when it detects active lockdown. Manual equivalent:\n\n```bash\nsudo apt install mokutil          # or dnf / pacman\nsudo mokutil --disable-validation\n# pick an 8–16 char one-time password, reboot,\n# at the blue MOK Management screen choose:\n#   Change Secure Boot state → enter the same password → reboot\n```\n\nShim will then boot in *insecure mode*; the kernel sees Secure Boot as disabled and never engages lockdown. Reversible with `sudo mokutil --enable-validation`. Security impact is equivalent to disabling Secure Boot at the firmware level.\n\n**C — Remove `lockdown` from the LSM cmdline (keeps firmware Secure Boot on).**\nWorks on some Debian / Ubuntu builds, not all — newer distro kernels re-trigger lockdown from the Secure Boot path even when `lockdown` is missing from `lsm=`. Try it; if `/sys/kernel/security/lockdown` still shows `[integrity]` after reboot, fall back to A or B.\n\n```bash\ncat /sys/kernel/security/lsm\n# e.g. capability,lockdown,landlock,yama,...\n```\n\nEdit `/etc/default/grub`, append the LSM list **without** `lockdown` to `GRUB_CMDLINE_LINUX_DEFAULT`:\n\n```\nGRUB_CMDLINE_LINUX_DEFAULT=\"... lsm=capability,landlock,yama,...\"\n```\n\nThen:\n\n```bash\nsudo update-grub        # Debian/Ubuntu/Mint\n# or: sudo grub2-mkconfig -o /boot/grub2/grub.cfg   # Fedora\nsudo reboot\ncat /sys/kernel/security/lockdown   # should show [none]\n```\n\n\u003e `lockdown=none` on its own is **not** enough when Secure Boot is enabled: the kernel ignores it by design.\n\nAfter any of A/B/C, the installed services start working from the next boot or resume. Tail the journal to confirm:\n\n```bash\njournalctl -t disable_bd_prochot -b\n```\n\n### Legacy installation leftover\n\nOlder versions of the installer wrote a sleep hook to `/usr/lib/systemd/system-sleep/disable_bd_prochot`. The current installer cleans that up automatically. If anything odd persists, run `Uninstall_BD_PROCHOT` and reinstall.\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n\n## Uninstall\n\n```bash\ncurl -LO https://raw.githubusercontent.com/fralapo/Disable-BD-PROCHOT-on-LINUX/main/Uninstall_BD_PROCHOT\nsudo bash Uninstall_BD_PROCHOT\n```\n\nThis removes every file listed in the install table, plus the legacy sleep hook if it still exists. BD PROCHOT is re-enabled at the next reboot.\n\n## Cautions\n\nDisabling BD PROCHOT removes one layer of thermal defense. If the external signal was real (actual overheating rather than a bad sensor), you now have no hardware-level brake. Keep an eye on temperatures:\n\n```bash\nwatch -n 1 sensors\n```\n\nIf the fans can't keep up, reverse the change by running `Uninstall_BD_PROCHOT`. This project targets the specific case where the throttle trigger is a faulty external signal, not a CPU that is actually overheating.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n\n## Acknowledgments\n\n- [ThrottleStop](https://www.techpowerup.com/download/techpowerup-throttlestop/) for the Windows-side prior art.\n- Intel MSR documentation for `MSR_POWER_CTL` (MSR 0x1FC).\n- Contributors who reported the post-suspend issue on immutable distros in [#1](https://github.com/fralapo/Disable-BD-PROCHOT-on-LINUX/issues/1).\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffralapo%2Fdisable-bd-prochot-on-linux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffralapo%2Fdisable-bd-prochot-on-linux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffralapo%2Fdisable-bd-prochot-on-linux/lists"}