{"id":35453093,"url":"https://github.com/whitehara/kernel-patch-fedora","last_synced_at":"2026-05-24T05:03:42.722Z","repository":{"id":53776433,"uuid":"451030943","full_name":"whitehara/kernel-patch-fedora","owner":"whitehara","description":"Custom kernel patches for Fedora","archived":false,"fork":false,"pushed_at":"2026-03-05T08:39:32.000Z","size":11178,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-05T13:09:34.746Z","etag":null,"topics":["fedora","kernel","linux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whitehara.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-01-23T07:12:13.000Z","updated_at":"2026-03-05T08:39:28.000Z","dependencies_parsed_at":"2023-02-16T20:31:02.762Z","dependency_job_id":"9eb57d8a-67c1-44b5-84fc-cf1bdae58935","html_url":"https://github.com/whitehara/kernel-patch-fedora","commit_stats":null,"previous_names":[],"tags_count":178,"template":false,"template_full_name":null,"purl":"pkg:github/whitehara/kernel-patch-fedora","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitehara%2Fkernel-patch-fedora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitehara%2Fkernel-patch-fedora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitehara%2Fkernel-patch-fedora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitehara%2Fkernel-patch-fedora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whitehara","download_url":"https://codeload.github.com/whitehara/kernel-patch-fedora/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whitehara%2Fkernel-patch-fedora/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30242406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fedora","kernel","linux"],"created_at":"2026-01-03T04:17:45.374Z","updated_at":"2026-05-24T05:03:42.703Z","avatar_url":"https://github.com/whitehara.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux kernel patches (compilable with the Fedora kernel)\n\n## Overview\nYou can create custom RPMs with these patches for Fedora Linux. Most of these patches are **optimized for gaming on Linux**. \nYou can install pre-patched RPMs directly from [Copr](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg/) using `dnf`, or download SRPMs from the Fedora repository and apply the patches to the kernel source yourself (e.g., from [Koji](https://koji.fedoraproject.org/koji/packageinfo?packageID=8)).\n\nThese patches are sourced and modified from:\n- https://github.com/graysky2/kernel_compiler_patch\n- https://github.com/Frogging-Family/community-patches\n- https://github.com/Frogging-Family/linux-tkg\n- https://github.com/bigshans/cjktty-patches\n- https://github.com/CachyOS/kernel-patches\n- https://lvra.gitlab.io/docs/hardware/\n\n*(Note: All Project C patches (`0009-prjc_vx.x-rx.patch`) are under the GNU GENERAL PUBLIC LICENSE Version 3.)*\n\n## Latest Build Status\n| Copr Project Name | Copr Build Status |\n|---|---|\n| [kernel-tkg](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg/package/kernel/status_image/last_build.png) |\n| [kernel-tkg-preempt](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-preempt/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-preempt/package/kernel/status_image/last_build.png) |\n| [kernel-tkg-zen2](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-zen2/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-zen2/package/kernel/status_image/last_build.png) |\n| [kernel-tkg-zen2-preempt](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-zen2-preempt/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-zen2-preempt/package/kernel/status_image/last_build.png) |\n| [kernel-cachyos-preempt](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-preempt/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-preempt/package/kernel/status_image/last_build.png) |\n| [kernel-cachyos-zen2-preempt](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-zen2-preempt/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-zen2-preempt/package/kernel/status_image/last_build.png) |\n| [kernel-cachyos-zen3-preempt](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-zen3-preempt/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-zen3-preempt/package/kernel/status_image/last_build.png) |\n| [kernel-tkg-icelake-preempt](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-icelake-preempt/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-icelake-preempt/package/kernel/status_image/last_build.png) |\n| [kernel-tkg-alderlake-preempt](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-alderlake-preempt/) | ![Status](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-alderlake-preempt/package/kernel/status_image/last_build.png) |\n\n## How to install patched kernel RPM\n\n### Quick Start\nYou can quickly install the patched kernel via Copr. See the [Copr Project](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg/) for more details.\n\n```bash\nsudo dnf copr enable whitehara/kernel-tkg\nsudo dnf install kernel-6.4.14-200_tkg.fc38\n```\n\n### Other Custom Kernels\nIf you want to try other customized versions, check the table below and enable the desired Copr repository instead. *(Files in the `kernel-local` folder are used in these custom kernel projects.)*\n\n#### Based on TKg Patches\n| Project Name | Preemptive | Architecture Optimization | Copr Repository |\n|---|:---:|:---:|---|\n| **kernel-tkg** | - | - | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg) |\n| **kernel-tkg-preempt** | ✅ | - | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-preempt) |\n| **kernel-tkg-zen2** | - | AMD Zen2+ | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-zen2) |\n| **kernel-tkg-zen2-preempt** | ✅ | AMD Zen2+ | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-zen2-preempt) |\n| **kernel-tkg-icelake-preempt** | ✅ | Intel Ice Lake+ | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-icelake-preempt) |\n| **kernel-tkg-alderlake-preempt** | ✅ | Intel Alder Lake+ | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-tkg-alderlake-preempt) |\n\n#### Based on CachyOS Patches\n| Project Name | Preemptive | Architecture Optimization | Copr Repository |\n|---|:---:|:---:|---|\n| **kernel-cachyos-preempt** | ✅ | - | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-preempt) |\n| **kernel-cachyos-zen2-preempt** | ✅ | AMD Zen2+ | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-zen2-preempt) |\n| **kernel-cachyos-zen3-preempt** | ✅ | AMD Zen3+ | [Link](https://copr.fedorainfracloud.org/coprs/whitehara/kernel-cachyos-zen3-preempt) |\n\n## Tested version (Latest versions only)\n\u003e **BEWARE:** \"tested\" means just **\"compilable\"**, it does not mean \"It completely works for your environment\". Please use it at your own risk.\n\n- 7.0 patches\n  -  [kernel-7.0.10-200.fc44](https://koji.fedoraproject.org/koji/buildinfo?buildID=3001196)\n  -  [kernel-7.0.10-100.fc43](https://koji.fedoraproject.org/koji/buildinfo?buildID=3001197)\n- 6.19 patches\n  -  [kernel-6.19.14-108.fc42](https://koji.fedoraproject.org/koji/buildinfo?buildID=3000628)\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eShow older tested versions (Click to expand)\u003c/b\u003e\u003c/summary\u003e\n\n- 6.18 patches\n  -  [kernel-6.18.16-200.fc43](https://koji.fedoraproject.org/koji/buildinfo?buildID=2949513)\n  -  [kernel-6.18.16-100.fc42](https://koji.fedoraproject.org/koji/buildinfo?buildID=2951827)\n- 6.17 patches\n  -  [kernel-6.17.13-300.fc43](https://koji.fedoraproject.org/koji/buildinfo?buildID=2881992)\n  -  [kernel-6.17.13-200.fc42](https://koji.fedoraproject.org/koji/buildinfo?buildID=2881993)\n  -  [kernel-6.17.10-100.fc41](https://koji.fedoraproject.org/koji/buildinfo?buildID=2871983)\n- 6.16 patches\n  -  [kernel-6.16.12-200.fc42](https://koji.fedoraproject.org/koji/buildinfo?buildID=2842343)\n  -  [kernel-6.16.12-100.fc41](https://koji.fedoraproject.org/koji/buildinfo?buildID=2842346)\n- 6.15 patches\n  -  [kernel-6.15.11-200.fc42](https://koji.fedoraproject.org/koji/buildinfo?buildID=2804148)\n  -  [kernel-6.15.11-100.fc41](https://koji.fedoraproject.org/koji/buildinfo?buildID=2804149)\n- 6.14 patches\n  -  [kernel-6.14.11-300.fc42](https://koji.fedoraproject.org/koji/buildinfo?buildID=2730240)\n  -  [kernel-6.14.11-200.fc41](https://koji.fedoraproject.org/koji/buildinfo?buildID=2730239)\n  -  [kernel-6.14.6-100.fc40](https://koji.fedoraproject.org/koji/buildinfo?buildID=2711919)\n- 6.13 patches\n  -  [kernel-6.13.12-200.fc41](https://koji.fedoraproject.org/koji/buildinfo?buildID=2702627)\n  -  [kernel-6.13.12-100.fc40](https://koji.fedoraproject.org/koji/buildinfo?buildID=2702628)\n- 6.12 patches\n  -  [kernel-6.12.15-200.fc41](https://koji.fedoraproject.org/koji/buildinfo?buildID=2661636)\n  -  [kernel-6.12.15-100.fc40](https://koji.fedoraproject.org/koji/buildinfo?buildID=2661635)\n- 6.11 patches\n  -  [kernel-6.11.11-300.fc41](https://koji.fedoraproject.org/koji/buildinfo?buildID=2597312)\n  -  [kernel-6.11.11-200.fc40](https://koji.fedoraproject.org/koji/buildinfo?buildID=2597311)\n  -  [kernel-6.11.9-100.fc39](https://koji.fedoraproject.org/koji/buildinfo?buildID=2585691)\n- 6.10 patches\n  -  [kernel-6.10.14-200.fc40](https://koji.fedoraproject.org/koji/buildinfo?buildID=2566685)\n  -  [kernel-6.10.14-100.fc39](https://koji.fedoraproject.org/koji/buildinfo?buildID=2566684)\n- 6.9 patches\n  -  [kernel-6.9.12-200.fc40](https://koji.fedoraproject.org/koji/buildinfo?buildID=2517792)\n  -  [kernel-6.9.12-100.fc39](https://koji.fedoraproject.org/koji/buildinfo?buildID=2517794)\n- 6.8 patches\n  -  [kernel-6.8.12-300.fc40](https://koji.fedoraproject.org/koji/buildinfo?buildID=2458998) *Since 6.8.10, WINSYNC is replaced to NTSYNC.*\n  -  [kernel-6.8.12-200.fc39](https://koji.fedoraproject.org/koji/buildinfo?buildID=2458999) *Since 6.8.10, WINSYNC is replaced to NTSYNC.*\n  -  [kernel-6.8.10-100.fc38](https://koji.fedoraproject.org/koji/buildinfo?buildID=2453005) *Since 6.8.10, WINSYNC is replaced to NTSYNC.*\n- 6.7 patches\n  -  [kernel-6.7.12-200.fc39](https://koji.fedoraproject.org/koji/buildinfo?buildID=2431044) *Since this version, bcachefs is merged into the kernel mainline. BBRv2 is removed.*\n  -  [kernel-6.7.12-100.fc38](https://koji.fedoraproject.org/koji/buildinfo?buildID=2431066) *Since this version, bcachefs is merged into the kernel mainline. BBRv2 is removed.*\n- 6.6 patches\n  -  [kernel-6.6.14-200.fc39](https://koji.fedoraproject.org/koji/buildinfo?buildID=2386947) *Since this version, The default CPU scheduler is changed to EEVDF.*\n  -  [kernel-6.6.14-100.fc38](https://koji.fedoraproject.org/koji/buildinfo?buildID=2386940) *Since this version, The default CPU scheduler is changed to EEVDF.*\n- 6.5 patches\n  -  [kernel-6.5.12-300.fc39](https://koji.fedoraproject.org/koji/buildinfo?buildID=2322803)\n  -  [kernel-6.5.12-200.fc38](https://koji.fedoraproject.org/koji/buildinfo?buildID=2322801)\n  -  [kernel-6.5.13-100.fc37](https://koji.fedoraproject.org/koji/buildinfo?buildID=2325633)\n- 6.4 patches\n  -  [kernel-6.4.16-200.fc38](https://koji.fedoraproject.org/koji/buildinfo?buildID=2289005)\n  -  [kernel-6.4.16-100.fc37](https://koji.fedoraproject.org/koji/buildinfo?buildID=2289004)\n- 6.3 patches\n  -  [kernel-6.3.13-200.fc38](https://koji.fedoraproject.org/koji/buildinfo?buildID=2231054) *Since this version, CONFIG_MLX5_CORE is not enabled for preventing a BUG.*\n  -  [kernel-6.3.13-100.fc37](https://koji.fedoraproject.org/koji/buildinfo?buildID=2231053) *Since this version, CONFIG_MLX5_CORE is not enabled for preventing a BUG.*\n- 6.2 patches\n  -  [kernel-6.2.15-300.fc38](https://koji.fedoraproject.org/koji/buildinfo?buildID=2199143)\n  -  [kernel-6.2.15-200.fc37](https://koji.fedoraproject.org/koji/buildinfo?buildID=2199132)\n  -  [kernel-6.2.15-100.fc36](https://koji.fedoraproject.org/koji/buildinfo?buildID=2199134)\n- 6.1 patches\n  -  [kernel-6.1.18-200.fc37](https://koji.fedoraproject.org/koji/buildinfo?buildID=2168432)\n- 6.0 patches\n  -  [kernel-6.0.18-300.fc37](https://koji.fedoraproject.org/koji/buildinfo?buildID=2107932)\n- 5.19 patches\n  -  [kernel-5.19.14-200.fc36](https://koji.fedoraproject.org/koji/buildinfo?buildID=2071616)\n- 5.18 patches\n  -  [kernel-5.18.18-200.fc36](https://koji.fedoraproject.org/koji/buildinfo?buildID=2047494)\n- 5.17 patches\n  -  [kernel-5.17.12-300.fc36](https://koji.fedoraproject.org/koji/buildinfo?buildID=1972299)\n- 5.16 patches\n  -  [kernel-5.16.20-200.fc35](https://koji.fedoraproject.org/koji/buildinfo?buildID=1948783)\n- 5.15 patches\n  -  [kernel-5.15.18-200.fc35](https://koji.fedoraproject.org/koji/buildinfo?buildID=1909970)\n\n\u003c/details\u003e\n\n## How to build your custom kernel\n\nThere are two ways to build custom kernels manually. One is using the included script in the `build-script` directory, and the other is manually executing the build commands.\n\n### Method 1: Build with the provided script\nIn the `build-script` directory, you will find `kernel-mock.sh`. This script is used for building my projects and you can use or modify it as you like.\n\n#### 1. Preparation\nInstall `mock`, `copr-cli`, and `koji`:\n```bash\nsudo dnf install mock copr-cli koji\n```\n\n- **`support-vers`:** Modify this file to include the original Fedora project kernel versions you want to build. \n- **`support-features`:** Modify this file to configure Project ID for Copr, custom tags, and features like `bmq`, `pds`, or CPU architectures.\n\n\u003e **Note:** Each feature is built with all versions. E.g., if you have 3 features and 2 versions, the results will be 3 projects and each project will have 2 versions. If you add a CPU-arch, you also need to add corresponding `kernel-local.\u003cCPU-arch\u003e` files.\n\n#### 2. Run the script\nRun it locally:\n```bash\n./kernel-mock.sh\n```\nThis builds RPMs on your local machine's `mock` environment, then copies results from the `mock` environment to the `../results` directory.\n\n**Advanced Options:**\n- **Debug Mode (Shell):** \n  ```bash\n  ./kernel-mock.sh -d\n  ```\n  This will extract your package and stop when patches are applied, then open the mock's shell. You can check the patches and run `rpmbuild` manually. In this mode, only the first line of `support-vers` and `support-features` is used. **Your results are not moved to the `results` dir.**\n\n- **Copr Mode (Build on Copr):**\n  ```bash\n  ./kernel-mock.sh -c\n  ```\n  You must set up your Copr account and create projects before you run this.\n\n### Method 2: Build manually without the script\n\n#### 1. Setup RPM build tree\n*(Skip if you already have one)*\n```bash\nsudo dnf install rpmdevtools\nrpmdev-setuptree\n```\nYou can verify the directory path like this (we will refer to `_topdir` as `rpm` in this guide):\n```bash\nrpmbuild --showrc | grep _topdir\n```\n\n#### 2. Download the source\n```bash\ndnf download --source kernel\n```\nOr for the latest development kernel via Koji:\n```bash\nkoji download-build -a src kernel-*\n```\n\n#### 3. Extract the source\n```bash\nrpm -Uvh kernel-*.fc*.srpm\n```\n\n#### 4. Clone the repository\n```bash\nmkdir kernel-patch-fedora\ncd kernel-patch-fedora\ngit clone https://github.com/whitehara/kernel-patch-fedora.git .\n```\n\n#### 5. Apply files to SOURCES directory\n```bash\ncp kernel-patch-fedora/5.16/* ~/rpmbuild/SOURCES/\n```\n*(Replace `5.16` with your target version and `~/rpmbuild` with your actual build tree).*\n\n#### 6. Modify the kernel config\nThe `config-path.sh` script adds minimal config into `.config` files. If you want to customize your kernel further, add a `kernel-local` file to the `SOURCES` directory.\n```bash\ncd ~/rpmbuild/SOURCES\n./config-patch.sh\n```\n\n#### 7. Update kernel.spec\nAdd custom tags to the kernel spec file (e.g., `kernel-version_custom_kernel_tag.fc35.x86_64.rpm`):\n```bash\ncd ~/rpmbuild/SOURCES\n./spec-mod.sh _custom_kernel_tag\n```\nOther options:\n```bash\n./spec-mod.sh \u003cCUSTOM_TAG\u003e [CPU arch] [eevdf|pds|bmq] [preempt]\n```\n- `\u003cCUSTOM_TAG\u003e`: Suffix for the package.\n- `CPU arch`: CPU architecture to build for. Default is `X86_GENERIC`.\n- `eevdf|pds|bmq`: Select scheduler for Project-C patch. Default is `eevdf`.\n- `preempt`: Use preemptive mode. Default is non-preemptive.\n\nSee [support-features](build-script/support-features) for available options.\n\n#### 8. Check if patches are applicable\n```bash\nrpmbuild -bp kernel.spec\n```\n\u003e The `-bp` option applies patches but does not compile.\n\n#### 9. Compile the RPM\n```bash\nrpmbuild -bb kernel.spec\n```\n\u003e The `-bb` option compiles binary only. Use `-ba` for source + binary, or `-bs` for source SRPM only.\n\n**Tip:** You can also use options like `--without debug --without debuginfo` to save compilation time. Since kernel *6.0*, you might also need `--without configchecks` to prevent config-check errors:\n```bash\nrpmbuild -bb kernel.spec --without debug --without debuginfo --without configchecks\n```\n\n#### 10. Install the compiled kernel\n```bash\ncd ~/rpmbuild/RPMS/x86_64/\nsudo dnf install kernel-*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhitehara%2Fkernel-patch-fedora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhitehara%2Fkernel-patch-fedora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhitehara%2Fkernel-patch-fedora/lists"}