Closed robson-66 closed 1 year ago
Can you get a log or a photo of the error messages if a log is not possible?
Which Scheduler did you used? The latest PRJC (pds/bmq) seems to fail at booting.
I have no way to get to journalctl because nothing works (keyboard too) and thus I can't switch to tty.
A builds linux-tkg-cfs.
How about building a complete kernel? Does it work then ?
How about building a complete kernel? Does it work then ?
No, I haven't tried.
Does anyone know what the project c error is? I haven't gotten it myself but if it's real, it should be filed against the prjc repo.
Does anyone know what the project c error is? I haven't gotten it myself but if it's real, it should be filed against the prjc repo.
Users reported that the upstream patchset was not booting. The used patchset was the upstream patchset + minimal changes from linux-lqx. This one was used: https://github.com/CachyOS/kernel-patches/commit/b28fad1a68b008dadc23a65d5edc38de8b13d765
We have just reverted to our old 6.1 patchset, which is a minimal modified from upstream 6.0: https://github.com/CachyOS/kernel-patches/commit/23b7e03df84b8b9150ee7018cd83cc05546e08f8
The last patchset is booting and working correctly for 6.1
Is there a record of the user reports, or a kernel log for the unbootable kernels? I really think that if it's the case that Project C patched kernels aren't booting for some, that it should be filed against https://gitlab.com/alfredchen/linux-prjc, because otherwise I don't think the Project C maintainer will realize there's a problem. I'd file the issue myself, but I haven't seen the error.
This is just a recommendation in the spirit of improving the upstream Project C code such that it's usable for everyone :slightly_smiling_face:
How about building a complete kernel? Does it work then ?
After installing linux61-tkg-cfs https://github.com/Frogging-Family/linux-tkg/releases/tag/v6.1 it doesn't start either
After building linux-cachyos-bmq
with modprobed-db
it booted normally. So the problem is with the linux-tkg crew, something wrong with the configuration or the patches.
Self-built with modprobed-db worked fine with CFS on my end. I don't see why the CI builds would be especially frogged, that's weird. The official project C patchset is broken somehow, at least with Arch config. CachyOS faced the same issue, and decided to use the 6.0 patchset as a fallback until this is resolved. We'll do the same until the breakage can be figured out.
I cannot boot linux 61 cfs llvm thinlto (full lto, no lto and gcc build too).
BUG: unable to handle page faultfor address:
supervisor read access in kernel mode....
....
note: rcu_tasks_kthe{13} exited with preempt_count 1
If it's important, I'll send pictures. The same config on 6.0 works as it should
same here, page fault, linux61-tkg-bore
These changes did nothing, linux-tkg
still won't start.
Still the same, linux-tkg 6.1
does not start.
works4me Tested on AMD Zen2, AMD Zen3, Intel Coffeelake and Intel Broadwell, CFS and PDS (both built with GCC) are booting and running fine with our current patches.
@robson-66 @Pheidologeton If you guys are on Arch, could you please try building with _debug=1 makepkg -si
? This will build a plain CFS kernel with none of our patches applied. That could help narrowing it down since I cannot reproduce the issue on my end. Also, are you using anything fancy in your config (llvm/lto doesn't count since it breaks randomly anyway)?
@robson-66 @Pheidologeton If you guys are on Arch, could you please try building with
_debug=1 makepkg -si
? Well, I builtlinux-tkg 6.1
and it booted normally. But what should I show you to diagnose the problem?
@robson-66 @Pheidologeton If you guys are on Arch, could you please try building with
_debug=1 makepkg -si
? Well, I builtlinux-tkg 6.1
and it booted normally. But what should I show you to diagnose the problem?
Ok so at least we know it's one of the patches and not some plain source handling issue. Could you please share your config file/selection?
# linux-TkG config file
# Linux distribution you are using, options are "Arch", "Void", "Ubuntu", "Debian", "Fedora", "Suse", "Gentoo", "Generic".
# It is automatically set to "Arch" when using PKGBUILD.
# If left empty, the script will prompt
_distro="Arch"
# Kernel Version - Options are "5.4", and from "5.7" to "5.19"
# you can also set a specific kernel version, e.g. "6.0-rc4" or "5.10.51",
# -> note however that a "z" too small on a "x.y.z" version may make patches fail
# as they got adapted for newer "z" values.
_version="6.1"
#### MISC OPTIONS ####
# External config file to use - If the given file exists in path, it will override default config (customization.cfg) - Default is ~/.config/frogminer/linux-tkg.cfg
_EXT_CONFIG_PATH=~/.config/frogminer/linux-tkg.cfg
# [Arch specific] Set to anything else than "true" to limit cleanup operations and keep source and files generated during compilation.
# Default is "true".
_NUKR="true"
# Git mirror to use to get the kernel sources, possible values are "kernel.org", "googlesource.com", "github.com" and "torvalds"
_git_mirror="kernel.org"
# Custom compiler root dirs - Leave empty to use system compilers
# Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0"
CUSTOM_GCC_PATH=""
# Custom LLVM compiler root dirs - Leave empty to use system llvm compiler
# Example: CUSTOM_LLVM_PATH="/home/frog/PKGBUILDS/mostlyportable-llvm/llvm-mostlyportable-11.0.0"
CUSTOM_LLVM_PATH=""
# Set to true to bypass makepkg.conf and use all available threads for compilation. False will respect your makepkg.conf options.
_force_all_threads="true"
# Set to true to prevent ccache from being used and set CONFIG_GCC_PLUGINS=y (which needs to be disabled for ccache to work properly)
_noccache="false"
# Set to true to use modprobed db to clean config from unneeded modules. Speeds up compilation considerably. Requires root - https://wiki.archlinux.org/index.php/Modprobed-db
# Using this option can trigger user prompts if the config doesn't go smoothly.
# !!!! Make sure to have a well populated db !!!! - Leave empty to be asked about it at build time
_modprobeddb="true"
# modprobed-db database file location
_modprobeddb_db_path=~/.config/modprobed.db
# Set to "1" to call make menuconfig, "2" to call make nconfig, "3" to call make xconfig, before building the kernel. Set to false to disable and skip the prompt.
_menunconfig="false"
# Set to true to generate a kernel config fragment from your changes in menuconfig/nconfig. Set to false to disable and skip the prompt.
_diffconfig="true"
# Set to the file name where the generated config fragment should be written to. Only used if _diffconfig is active.
_diffconfig_name="false"
# [install.sh specific] Use tmpfs as a work directory, recommended when RAM >= 32GB to reduce HDD/SSD usage. For more information, see https://wiki.archlinux.org/title/Tmpfs
_use_tmpfs="false"
# [install.sh specific] tmpfs folder path, only used when _use_tmpfs="true".
# Creates a linux-tkg work folder within that pathmake sure to have nothing important in "$_tmpfs_path/linux-tkg"
_tmpfs_path="/tmp"
#### KERNEL OPTIONS ####
# Name of the default config file to use for the kernel
# Default (empty) : "config.x86_64" from the linux-tkg-config/5.y folder.
# "running-kernel" : Picks the .config file from the currently running kernel.
# It is recommended to be running an official kernel before running this script, to pick off a correct .config file
# "config_hardened.x86_64" : config file for a hardened kernel, available for kernel version "5.13", "5.10" and "5.4" .
# To get a complete hardened setup, you have to use "cfs" as _cpusched.
# User provided value : custom user provided file, the given path should be relative to the PKGBUILD file. This enables for example to use a user stripped down .config file.
# If the .config file isn't up to date with the chosen kernel version, any extra CONFIG_XXXX is set to its default value.
# Note: the script copies the resulting .config file as "kernelconfig.new" next to the PKGBUILD as a convenience for an eventual re-use. It gets overwritten at each run.
# One can use "kernelconfig.new" here to always use the latest edited .config file. modprobed-db needs to be used only once for its changes to be picked up.
_configfile=""
# Determine whether to call "olddefconfig" (default) or "oldconfig" for manual config updating interaction.
_config_updating="olddefconfig"
# Disable some non-module debugging - See PKGBUILD for the list
_debugdisable="false"
# Strip the vmlinux file after build is done. Set to anything other than "true" if you require debug headers. Default is "true"
_STRIP="true"
# LEAVE AN EMPTY VALUE TO BE PROMPTED ABOUT FOLLOWING OPTIONS AT BUILD TIME
# CPU scheduler - Options are "upds" (TkG's Undead PDS), "pds", "bmq", "muqss", "cacule" or "cfs" (kernel's default)
_cpusched="bmq"
# Compiler to use - Options are "gcc" or "llvm".
# For advanced users.
_compiler="gcc"
# Force the use of the LLVM Integrated Assembler whether using LLVM, LTO or not.
# Set to "1" to enable.
_llvm_ias=""
# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
# ! This is currently experimental and might result in an unbootable kernel - Not recommended !
# "no: do not enable LTO"
# "full: uses 1 thread for Linking, slow and uses more memory, theoretically with the highest performance gains."
# "thin: uses multiple threads, faster and uses less memory, may have a lower runtime performance than Full."
_lto_mode="no"
# Apply PREEMPT_RT patchset to the kernel.
# ! Only CFS CPU scheduler is compatible with this patchset !
# Set to "1" to enable.
_preempt_rt=""
# Forcibly apply the PREEMPT_RT patchset to the kernel, even when upstream does not officially support the kernel subversion.
# ! This will still not apply when the patch itself or linux-tkg (see _version) do not support the kernel major version - Not recommended !
# Set to "1" to enable.
_preempt_rt_force=""
# CPU sched_yield_type - Choose what sort of yield sched_yield will perform
# For PDS and MuQSS: 0: No yield. (Recommended option for gaming on PDS and MuQSS)
# 1: Yield only to better priority/deadline tasks. (Default - can be unstable with PDS on some platforms)
# 2: Expire timeslice and recalculate deadline. (Usually the slowest option for PDS and MuQSS, not recommended)
# For BMQ: 0: No yield.
# 1: Deboost and requeue task. (Default)
# 2: Set rq skip task.
_sched_yield_type="0"
# Round Robin interval is the longest duration two tasks with the same nice level will be delayed for. When CPU time is requested by a task, it receives a time slice equal
# to the rr_interval in addition to a virtual deadline. When using yield_type 2, a low value can help offset the disadvantages of rescheduling a process that has yielded.
# MuQSS default: 6ms"
# PDS default: 4ms"
# BMQ default: 2ms"
# Set to "1" for 2ms, "2" for 4ms, "3" for 6ms, "4" for 8ms, or "default" to keep the chosen scheduler defaults.
_rr_interval="1"
# Set to "true" to disable FUNCTION_TRACER/GRAPH_TRACER, lowering overhead but limiting debugging and analyzing of kernel functions - Kernel default is "false"
_ftracedisable="false"
# Set to "true" to disable NUMA, lowering overhead, but breaking CUDA/NvEnc on Nvidia equipped systems - Kernel default is "false"
_numadisable="false"
# Set to "true" to enable misc additions - May contain temporary fixes pending upstream or changes that can break on non-Arch - Kernel default is "true"
_misc_adds="true"
# Set to "0" for periodic ticks, "1" to use CattaRappa mode (enabling full tickless) and "2" for tickless idle only.
# Full tickless can give higher performances in case you use isolation of CPUs for tasks
# and it works only when using the nohz_full kernel parameter, otherwise behaves like idle.
# Just tickless idle perform better for most platforms.
_tickless="2"
# Set to "true" to use ACS override patch - https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29 - Kernel default is "false"
_acs_override="true"
# Set to "true" to add Bcache filesystem support. You'll have to install bcachefs-tools-git from AUR for utilities - https://bcachefs.org/ - If in doubt, set to "false"
# This can be buggy and isn't recommended on a production machine, also enabling this option will not allow you to enable MGLRU.
_bcachefs="false"
# Set to "true" to add multi-generational LRU framework support on kernel 5.18+ - Improves memory pressure handling - https://lore.kernel.org/lkml/20220706220022.968789-1-yuzhao@google.com/
# Older kernel versions might have a patch available in the community-patches repo
# ! This option will be disabled when bcachefs is enabled for now !
_mglru="true"
# Set to "true" to enable support for fsync, an experimental replacement for esync found in Valve Proton 4.11+ - https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305
# Can be enabled alongside _futex_waitv on 5.13+ to use it as a fallback for older Proton builds
_fsync="false"
# Set to "true" to enable support for futex2, an experimental interface that can be used by proton-tkg and proton 5.13 experimental through Fsync - Can be enabled alongside fsync to use it as a fallback
# https://gitlab.collabora.com/tonyk/linux/-/tree/futex2-dev
_futex2="false"
# Set to "true" to enable backported patches to add support for the futex_waitv() syscall, a new interface for fsync. It will appear in mainline at Linux 5.16 release and requires a wine/proton with builtin support for it. It's expected to be available in Valve Proton 6.3 stable soon - https://github.com/ValveSoftware/wine/pull/128
# !! Disables futex2 interfaces support !!
# https://github.com/andrealmeid/futex_waitv_patches
_futex_waitv="false"
# Set to "true" to enable support for winesync, an experimental replacement for esync - requires patched wine - https://repo.or.cz/linux/zf.git/shortlog/refs/heads/winesync4
# ! Can't be used on multiple kernels installed side-by-side, which will require https://aur.archlinux.org/packages/winesync-dkms/ instead of this option !
_winesync="false"
# Set to "true" to enable Binder and Ashmem, the kernel modules required to use the android emulator Anbox. ! This doesn't apply to 5.4.y !
_anbox="false"
# A selection of patches from Zen/Liquorix kernel and additional tweaks for a better gaming experience (ZENIFY) - Default is "true"
_zenify="false"
# compiler optimization level - 1. Optimize for performance (-O2); 2. Optimize harder (-O3); 3. Optimize for size (-Os) - Kernel default is "1"
_compileroptlevel="1"
# CPU compiler optimizations - Defaults to prompt at kernel config if left empty
# AMD CPUs : "k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver" "steamroller" "excavator" "zen" "zen2" "zen3" (zen3 opt support depends on GCC11)
# Intel CPUs : "mpsc"(P4 & older Netburst based Xeon) "atom" "core2" "nehalem" "westmere" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake" "cooperlake" "tigerlake" "sapphirerapids" "rocketlake" "alderlake"
# Other options :
# - "native_amd" (use compiler autodetection - Selecting your arch manually in the list above is recommended instead of this option)
# - "native_intel" (use compiler autodetection and will prompt for P6_NOPS - Selecting your arch manually in the list above is recommended instead of this option)
# - "generic" (kernel's default - to share the package between machines with different CPU µarch as long as they are x86-64)
#
# https://en.wikipedia.org/wiki/X86-64#Microarchitecture_Levels)
# - "generic_v2" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v2
# - "generic_v3" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v3
# - "generic_v4" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v4
_processor_opt="haswell"
# MuQSS only - Make IRQ threading compulsory (FORCE_IRQ_THREADING) - Default is "false"
_irq_threading="false"
# CacULE only - Enable Response Driven Balancer, an experimental load balancer for CacULE
_cacule_rdb="false"
# CacULE only - Load balance time period - Default is 19
# https://github.com/hamadmarri/cacule-cpu-scheduler/blob/master/patches/CacULE/RDB/rdb.patch#L56
_cacule_rdb_interval="19"
# TT only - Enable High HZ patch (available for 5.15 only) - Default is "false"
_tt_high_hz="false"
# MuQSS and PDS only - SMT (Hyperthreading) aware nice priority and policy support (SMT_NICE) - Kernel default is "true" - You can disable this on non-SMT/HT CPUs for lower overhead
_smt_nice="false"
# Trust the CPU manufacturer to initialize Linux's CRNG (RANDOM_TRUST_CPU) - Kernel default is "false"
_random_trust_cpu="false"
# MuQSS only - CPU scheduler runqueue sharing - No sharing (RQ_NONE), SMT (hyperthread) siblings (RQ_SMT), Multicore siblings (RQ_MC), Symmetric Multi-Processing (RQ_SMP), NUMA (RQ_ALL)
# Valid values are "none", "smt", "mc", "mc-llc"(for zen), "smp", "all" - Kernel default is "smt"
_runqueue_sharing="smt"
# Timer frequency - "100" "250" "300" "500" "750" "1000" ("2000" is available for cacule cpusched only) - More options available in kernel config prompt when left empty depending on selected cpusched with the default option pointed with a ">" (2000 for cacule, 100 for muqss and 1000 for other cpu schedulers)
_timer_freq="1000"
# Default CPU governor - "performance", "ondemand", "schedutil" or leave empty for default (schedutil)
_default_cpu_gov="ondemand"
# Use an aggressive ondemand governor instead of default ondemand to improve performance on low loads/high core count CPUs while keeping some power efficiency from frequency scaling.
# It still requires you to either set ondemand as default governor or to select it in some way at runtime.
_aggressive_ondemand="true"
# [Advanced] Default TCP IPv4 algorithm to use. Options are: "yeah", "bbr", "cubic", "reno", "vegas" and "westwood". Leave empty if unsure.
# This config option will not be prompted
# Can be changed at runtime with the command line `# echo "$name" > /proc/sys/net/ipv4/tcp_congestion_control` where $name is one of the options above.
# Default (empty) and fallback : cubic
_tcp_cong_alg="cubic"
# You can pass a default set of kernel command line options here - example: "intel_pstate=passive nowatchdog amdgpu.ppfeaturemask=0xfffd7fff mitigations=off"
_custom_commandline="intel_pstate=passive split_lock_detect=off"
# Selection of Clearlinux patches
_clear_patches="true"
#### SPESHUL OPTION ####
# If you want to bypass the stock naming scheme and enforce something else (example : "linux") - Useful for some bootloaders requiring manual entry editing on each release.
# !!! It will also change pkgname - If you don't explicitely need this, don't use it !!!
_custom_pkgbase="linux-tkg-bmq-robson"
# [non-Arch specific] Kernel localversion. Putting it to "Mario" will make for example the kernel version be 5.7.0-tkg-Mario (given by uname -r)
# If left empty, it will use "-tkg-${_cpusched}${_compiler}" where "${_cpusched}" will be replaced by the user chosen scheduler, ${_compiler} will be replaced by "-llvm" if clang is used (nothing for GCC).
_kernel_localversion=""
# Set to "true" to add back missing symbol for AES-NI/AVX support on ZFS - This is a legacy option that can be ignored on 5.10+ kernels - https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions.patch
_zfsfix="false"
# Set to your maximum number of CPUs (physical + logical cores) - Lower means less overhead - You can set it to "$(nproc)" to use the current host's CPU(s) core count, or leave empty to get a prompt
# If you set this to a lower value than you have cores, some cores will be disabled
# Default Arch kernel value is 320
_NR_CPUS_value="128"
#### USER PATCHES ####
# community patches - add patches (separated by a space) of your choice by name from the community-patches dir
# example: _community_patches="clear_nack_in_tend_isr.myrevert ffb_regression_fix.mypatch 0008-drm-amd-powerplay-force-the-trim-of-the-mclk-dpm-levels-if-OD-is-enabled.mypatch"
_community_patches=""
# You can use your own patches by putting them in a subfolder called linux<version>-tkg-userpatches (e.g. linux510-tkg-userpatches) next to the PKGBUILD and giving them the .mypatch extension.
# You can also revert patches by putting them in that same folder and giving them the .myrevert extension.
# Also, userpatches variable below must be set to true for the above to work.
_user_patches="true"
# Apply all user patches without confirmation - !!! NOT RECOMMENDED !!!
_user_patches_no_confirm="false"
#### CONFIG FRAGMENTS ####
# You can use your own kernel config fragments by putting them in the same folder as the PKGBUILD and giving them the .myfrag extension.
# Also, the config fragments variable below must be set to true for the above to work.
_config_fragments="true"
# Apply all config fragments without confirmation - !!! NOT RECOMMENDED !!!
_config_fragments_no_confirm="false"
# linux-TkG config file
# Linux distribution you are using, options are "Arch", "Void", "Ubuntu", "Debian", "Fedora", "Suse", "Gentoo", "Generic".
# It is automatically set to "Arch" when using PKGBUILD.
# If left empty, the script will prompt
_distro=""
# Kernel Version - Options are "5.4", and from "5.7" to "5.19"
# you can also set a specific kernel version, e.g. "6.0-rc4" or "5.10.51",
# -> note however that a "z" too small on a "x.y.z" version may make patches fail
# as they got adapted for newer "z" values.
_version=""
#### MISC OPTIONS ####
# External config file to use - If the given file exists in path, it will override default config (customization.cfg) - Default is ~/.config/frogminer/linux-tkg.cfg
_EXT_CONFIG_PATH=~/.config/frogminer/linux-tkg.cfg
# [Arch specific] Set to anything else than "true" to limit cleanup operations and keep source and files generated during compilation.
# Default is "true".
_NUKR="true"
# Git mirror to use to get the kernel sources, possible values are "kernel.org", "googlesource.com", "github.com" and "torvalds"
_git_mirror="kernel.org"
# Custom compiler root dirs - Leave empty to use system compilers
# Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0"
CUSTOM_GCC_PATH=""
# Custom LLVM compiler root dirs - Leave empty to use system llvm compiler
# Example: CUSTOM_LLVM_PATH="/home/frog/PKGBUILDS/mostlyportable-llvm/llvm-mostlyportable-11.0.0"
CUSTOM_LLVM_PATH=""
# Set to true to bypass makepkg.conf and use all available threads for compilation. False will respect your makepkg.conf options.
_force_all_threads="true"
# Set to true to prevent ccache from being used and set CONFIG_GCC_PLUGINS=y (which needs to be disabled for ccache to work properly)
_noccache="true"
# Set to true to use modprobed db to clean config from unneeded modules. Speeds up compilation considerably. Requires root - https://wiki.archlinux.org/index.php/Modprobed-db
# Using this option can trigger user prompts if the config doesn't go smoothly.
# !!!! Make sure to have a well populated db !!!! - Leave empty to be asked about it at build time
_modprobeddb="false"
# modprobed-db database file location
_modprobeddb_db_path=~/.config/modprobed.db
# Set to "1" to call make menuconfig, "2" to call make nconfig, "3" to call make xconfig, before building the kernel. Set to false to disable and skip the prompt.
_menunconfig=""
# Set to true to generate a kernel config fragment from your changes in menuconfig/nconfig. Set to false to disable and skip the prompt.
_diffconfig=""
# Set to the file name where the generated config fragment should be written to. Only used if _diffconfig is active.
_diffconfig_name=""
# [install.sh specific] Use tmpfs as a work directory, recommended when RAM >= 32GB to reduce HDD/SSD usage. For more information, see https://wiki.archlinux.org/title/Tmpfs
_use_tmpfs="false"
# [install.sh specific] tmpfs folder path, only used when _use_tmpfs="true".
# Creates a linux-tkg work folder within that pathmake sure to have nothing important in "$_tmpfs_path/linux-tkg"
_tmpfs_path="/tmp"
# [install.sh: Generic and Gentoo specific] Dracut options when generating initramfs
_dracut_options="--lz4"
#### KERNEL OPTIONS ####
# Name of the default config file to use for the kernel
# Default (empty) : "config.x86_64" from the linux-tkg-config/5.y folder.
# "running-kernel" : Picks the .config file from the currently running kernel.
# It is recommended to be running an official kernel before running this script, to pick off a correct .config file
# "config_hardened.x86_64" : config file for a hardened kernel, available for kernel version "5.13", "5.10" and "5.4" .
# To get a complete hardened setup, you have to use "cfs" as _cpusched.
# User provided value : custom user provided file, the given path should be relative to the PKGBUILD file. This enables for example to use a user stripped down .config file.
# If the .config file isn't up to date with the chosen kernel version, any extra CONFIG_XXXX is set to its default value.
# Note: the script copies the resulting .config file as "kernelconfig.new" next to the PKGBUILD as a convenience for an eventual re-use. It gets overwritten at each run.
# One can use "kernelconfig.new" here to always use the latest edited .config file. modprobed-db needs to be used only once for its changes to be picked up.
_configfile="running-kernel"
# Determine whether to call "olddefconfig" (default) or "oldconfig" for manual config updating interaction.
_config_updating="oldconfig"
# Disable some non-module debugging - See PKGBUILD for the list
_debugdisable="false"
# Strip the vmlinux file after build is done. Set to anything other than "true" if you require debug headers. Default is "true"
_STRIP="true"
# LEAVE AN EMPTY VALUE TO BE PROMPTED ABOUT FOLLOWING OPTIONS AT BUILD TIME
# CPU scheduler - Options are "upds" (TkG's Undead PDS), "pds", "bmq", "muqss", "cacule" or "cfs" (kernel's default)
_cpusched="cfs"
# Compiler to use - Options are "gcc" or "llvm".
# For advanced users.
_compiler="llvm"
# Force the use of the LLVM Integrated Assembler whether using LLVM, LTO or not.
# Set to "1" to enable.
_llvm_ias="1"
# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
# ! This is currently experimental and might result in an unbootable kernel - Not recommended !
# "no: do not enable LTO"
# "full: uses 1 thread for Linking, slow and uses more memory, theoretically with the highest performance gains."
# "thin: uses multiple threads, faster and uses less memory, may have a lower runtime performance than Full."
_lto_mode="thin"
# Apply PREEMPT_RT patchset to the kernel.
# ! Only CFS CPU scheduler is compatible with this patchset !
# Set to "1" to enable.
_preempt_rt=""
# Forcibly apply the PREEMPT_RT patchset to the kernel, even when upstream does not officially support the kernel subversion.
# ! This will still not apply when the patch itself or linux-tkg (see _version) do not support the kernel major version - Not recommended !
# Set to "1" to enable.
_preempt_rt_force=""
# CPU sched_yield_type - Choose what sort of yield sched_yield will perform
# For PDS and MuQSS: 0: No yield. (Recommended option for gaming on PDS and MuQSS)
# 1: Yield only to better priority/deadline tasks. (Default - can be unstable with PDS on some platforms)
# 2: Expire timeslice and recalculate deadline. (Usually the slowest option for PDS and MuQSS, not recommended)
# For BMQ: 0: No yield.
# 1: Deboost and requeue task. (Default)
# 2: Set rq skip task.
_sched_yield_type=""
# Round Robin interval is the longest duration two tasks with the same nice level will be delayed for. When CPU time is requested by a task, it receives a time slice equal
# to the rr_interval in addition to a virtual deadline. When using yield_type 2, a low value can help offset the disadvantages of rescheduling a process that has yielded.
# MuQSS default: 6ms"
# PDS default: 4ms"
# BMQ default: 2ms"
# Set to "1" for 2ms, "2" for 4ms, "3" for 6ms, "4" for 8ms, or "default" to keep the chosen scheduler defaults.
_rr_interval=""
# Set to "true" to disable FUNCTION_TRACER/GRAPH_TRACER, lowering overhead but limiting debugging and analyzing of kernel functions - Kernel default is "false"
_ftracedisable="false"
# Set to "true" to disable NUMA, lowering overhead, but breaking CUDA/NvEnc on Nvidia equipped systems - Kernel default is "false"
_numadisable="false"
# Set to "true" to enable misc additions - May contain temporary fixes pending upstream or changes that can break on non-Arch - Kernel default is "true"
_misc_adds="true"
# Set to "0" for periodic ticks, "1" to use CattaRappa mode (enabling full tickless) and "2" for tickless idle only.
# Full tickless can give higher performances in case you use isolation of CPUs for tasks
# and it works only when using the nohz_full kernel parameter, otherwise behaves like idle.
# Just tickless idle perform better for most platforms.
_tickless="0"
# Set to "true" to use ACS override patch - https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Bypassing_the_IOMMU_groups_.28ACS_override_patch.29 - Kernel default is "false"
_acs_override="false"
# Set to "true" to add Bcache filesystem support. You'll have to install bcachefs-tools-git from AUR for utilities - https://bcachefs.org/ - If in doubt, set to "false"
# This can be buggy and isn't recommended on a production machine, also enabling this option will not allow you to enable MGLRU.
_bcachefs="false"
# Set to "true" to add multi-generational LRU framework support on kernel 5.18+ - Improves memory pressure handling - https://lore.kernel.org/lkml/20220706220022.968789-1-yuzhao@google.com/
# Older kernel versions might have a patch available in the community-patches repo
# ! This option will be disabled when bcachefs is enabled for now !
_mglru="true"
# Set to "true" to enable support for fsync, an experimental replacement for esync found in Valve Proton 4.11+ - https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305
# Can be enabled alongside _futex_waitv on 5.13+ to use it as a fallback for older Proton builds
_fsync="true"
# Set to "true" to enable support for futex2, an experimental interface that can be used by proton-tkg and proton 5.13 experimental through Fsync - Can be enabled alongside fsync to use it as a fallback
# https://gitlab.collabora.com/tonyk/linux/-/tree/futex2-dev
_futex2="true"
# Set to "true" to enable backported patches to add support for the futex_waitv() syscall, a new interface for fsync. It will appear in mainline at Linux 5.16 release and requires a wine/proton with builtin support for it. It's expected to be available in Valve Proton 6.3 stable soon - https://github.com/ValveSoftware/wine/pull/128
# !! Disables futex2 interfaces support !!
# https://github.com/andrealmeid/futex_waitv_patches
_futex_waitv="false"
# Set to "true" to enable support for winesync, an experimental replacement for esync - requires patched wine - https://repo.or.cz/linux/zf.git/shortlog/refs/heads/winesync4
# ! Can't be used on multiple kernels installed side-by-side, which will require https://aur.archlinux.org/packages/winesync-dkms/ instead of this option !
_winesync="false"
# Set to "true" to enable Binder and Ashmem, the kernel modules required to use the android emulator Anbox. ! This doesn't apply to 5.4.y !
_anbox="false"
# A selection of patches from Zen/Liquorix kernel and additional tweaks for a better gaming experience (ZENIFY) - Default is "true"
_zenify="false"
# compiler optimization level - 1. Optimize for performance (-O2); 2. Optimize harder (-O3); 3. Optimize for size (-Os) - Kernel default is "1"
_compileroptlevel="1"
# CPU compiler optimizations - Defaults to prompt at kernel config if left empty
# AMD CPUs : "k8" "k8sse3" "k10" "barcelona" "bobcat" "jaguar" "bulldozer" "piledriver" "steamroller" "excavator" "zen" "zen2" "zen3" "zen4" (zen3 opt support depends on GCC11) (zen4 opt support depends on GCC13)
# Intel CPUs : "mpsc"(P4 & older Netburst based Xeon) "atom" "core2" "nehalem" "westmere" "silvermont" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylakex" "cannonlake" "icelake" "goldmont" "goldmontplus" "cascadelake" "cooperlake" "tigerlake" "sapphirerapids" "rocketlake" "alderlake" "raptorlake" "meteorlake" (raptorlake and meteorlake opt support require GCC13)
# Other options :
# - "native_amd" (use compiler autodetection - Selecting your arch manually in the list above is recommended instead of this option)
# - "native_intel" (use compiler autodetection and will prompt for P6_NOPS - Selecting your arch manually in the list above is recommended instead of this option)
# - "generic" (kernel's default - to share the package between machines with different CPU µarch as long as they are x86-64)
#
# https://en.wikipedia.org/wiki/X86-64#Microarchitecture_Levels)
# - "generic_v2" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v2
# - "generic_v3" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v3
# - "generic_v4" (depends on GCC11 - to share the package between machines with different CPU µarch supporting at least x86-64-v4
_processor_opt="ivybridge"
# MuQSS only - Make IRQ threading compulsory (FORCE_IRQ_THREADING) - Default is "false"
_irq_threading="false"
# CacULE only - Enable Response Driven Balancer, an experimental load balancer for CacULE
_cacule_rdb="false"
# CacULE only - Load balance time period - Default is 19
# https://github.com/hamadmarri/cacule-cpu-scheduler/blob/master/patches/CacULE/RDB/rdb.patch#L56
_cacule_rdb_interval="19"
# TT only - Enable High HZ patch (available for 5.15 only) - Default is "false"
_tt_high_hz="false"
# MuQSS and PDS only - SMT (Hyperthreading) aware nice priority and policy support (SMT_NICE) - Kernel default is "true" - You can disable this on non-SMT/HT CPUs for lower overhead
_smt_nice=""
# Trust the CPU manufacturer to initialize Linux's CRNG (RANDOM_TRUST_CPU) - Kernel default is "false"
_random_trust_cpu="false"
# MuQSS only - CPU scheduler runqueue sharing - No sharing (RQ_NONE), SMT (hyperthread) siblings (RQ_SMT), Multicore siblings (RQ_MC), Symmetric Multi-Processing (RQ_SMP), NUMA (RQ_ALL)
# Valid values are "none", "smt", "mc", "mc-llc"(for zen), "smp", "all" - Kernel default is "smt"
_runqueue_sharing=""
# Timer frequency - "100" "250" "300" "500" "750" "1000" ("2000" is available for cacule cpusched only) - More options available in kernel config prompt when left empty depending on selected cpusched with the default option pointed with a ">" (2000 for cacule, 100 for muqss and 1000 for other cpu schedulers)
_timer_freq="100"
# Default CPU governor - "performance", "ondemand", "schedutil" or leave empty for default (schedutil)
_default_cpu_gov="performance"
# Use an aggressive ondemand governor instead of default ondemand to improve performance on low loads/high core count CPUs while keeping some power efficiency from frequency scaling.
# It still requires you to either set ondemand as default governor or to select it in some way at runtime.
_aggressive_ondemand="true"
# [Advanced] Default TCP IPv4 algorithm to use. Options are: "yeah", "bbr", "cubic", "reno", "vegas" and "westwood". Leave empty if unsure.
# This config option will not be prompted
# Can be changed at runtime with the command line `# echo "$name" > /proc/sys/net/ipv4/tcp_congestion_control` where $name is one of the options above.
# Default (empty) and fallback : cubic
_tcp_cong_alg=""
# You can pass a default set of kernel command line options here - example: "intel_pstate=passive nowatchdog amdgpu.ppfeaturemask=0xfffd7fff mitigations=off"
_custom_commandline=""
# Selection of Clearlinux patches
_clear_patches="true"
#### SPESHUL OPTION ####
# If you want to bypass the stock naming scheme and enforce something else (example : "linux") - Useful for some bootloaders requiring manual entry editing on each release.
# !!! It will also change pkgname - If you don't explicitely need this, don't use it !!!
_custom_pkgbase=""
# [non-Arch specific] Kernel localversion. Putting it to "Mario" will make for example the kernel version be 5.7.0-tkg-Mario (given by uname -r)
# If left empty, it will use "-tkg-${_cpusched}${_compiler}" where "${_cpusched}" will be replaced by the user chosen scheduler, ${_compiler} will be replaced by "-llvm" if clang is used (nothing for GCC).
_kernel_localversion=""
# Set to "true" to add back missing symbol for AES-NI/AVX support on ZFS - This is a legacy option that can be ignored on 5.10+ kernels - https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions.patch
_zfsfix="false"
# Set to your maximum number of CPUs (physical + logical cores) - Lower means less overhead - You can set it to "$(nproc)" to use the current host's CPU(s) core count, or leave empty to get a prompt
# If you set this to a lower value than you have cores, some cores will be disabled
# Default Arch kernel value is 320
_NR_CPUS_value="128"
#### USER PATCHES ####
# community patches - add patches (separated by a space) of your choice by name from the community-patches dir
# example: _community_patches="clear_nack_in_tend_isr.myrevert ffb_regression_fix.mypatch 0008-drm-amd-powerplay-force-the-trim-of-the-mclk-dpm-levels-if-OD-is-enabled.mypatch"
_community_patches=""
# You can use your own patches by putting them in a subfolder called linux<version>-tkg-userpatches (e.g. linux510-tkg-userpatches) next to the PKGBUILD and giving them the .mypatch extension.
# You can also revert patches by putting them in that same folder and giving them the .myrevert extension.
# Also, userpatches variable below must be set to true for the above to work.
_user_patches="true"
# Apply all user patches without confirmation - !!! NOT RECOMMENDED !!!
_user_patches_no_confirm="false"
#### CONFIG FRAGMENTS ####
# You can use your own kernel config fragments by putting them in the same folder as the PKGBUILD and giving them the .myfrag extension.
# Also, the config fragments variable below must be set to true for the above to work.
_config_fragments="true"
# Apply all config fragments without confirmation - !!! NOT RECOMMENDED !!!
_config_fragments_no_confirm="false"
Without patches, the kernel boots properly. This is most likely the problem:
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 95f90699d2b17b..2b10fe29d2c8d9 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -46,6 +46,7 @@ struct evdev_client {
struct fasync_struct *fasync;
struct evdev *evdev;
struct list_head node;
+ struct rcu_head rcu;
enum input_clock_type clk_type;
bool revoked;
unsigned long *evmasks[EV_CNT];
@@ -377,13 +378,22 @@ static void evdev_attach_client(struct evdev *evdev,
spin_unlock(&evdev->client_lock);
}
+static void evdev_reclaim_client(struct rcu_head *rp)
+{
+ struct evdev_client *client = container_of(rp, struct evdev_client, rcu);
+ unsigned int i;
+ for (i = 0; i < EV_CNT; ++i)
+ bitmap_free(client->evmasks[i]);
+ kvfree(client);
+}
+
static void evdev_detach_client(struct evdev *evdev,
struct evdev_client *client)
{
spin_lock(&evdev->client_lock);
list_del_rcu(&client->node);
spin_unlock(&evdev->client_lock);
- synchronize_rcu();
+ call_rcu(&client->rcu, evdev_reclaim_client);
}
static int evdev_open_device(struct evdev *evdev)
@@ -436,7 +446,6 @@ static int evdev_release(struct inode *inode, struct file *file)
{
struct evdev_client *client = file->private_data;
struct evdev *evdev = client->evdev;
- unsigned int i;
mutex_lock(&evdev->mutex);
@@ -448,11 +457,6 @@ static int evdev_release(struct inode *inode, struct file *file)
evdev_detach_client(evdev, client);
- for (i = 0; i < EV_CNT; ++i)
- bitmap_free(client->evmasks[i]);
-
- kvfree(client);
-
evdev_close_device(evdev);
return 0;
@@ -495,7 +499,6 @@ static int evdev_open(struct inode *inode, struct file *file)
err_free_client:
evdev_detach_client(evdev, client);
- kvfree(client);
return error;
}
And which patch is it?
@Pheidologeton I dont think so. This patch is used from lqx/zen and it is working fine.
I suspect these: https://github.com/Frogging-Family/linux-tkg/blob/master/linux-tkg-patches/6.1/0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch https://github.com/Frogging-Family/linux-tkg/blob/master/linux-tkg-patches/6.1/0002-mm-Support-soft-dirty-flag-read-with-reset.patch
But I dont have tested it so far. I could be also wrong
And which patch is it?
https://github.com/Frogging-Family/linux-tkg/commit/d0d6f0294428bb8625a74c49132439f35ef5f3b1
It got added with this commit. And the issues where already before existent.
@Pheidologeton I dont think so. This patch is used from lqx/zen and it is working fine.
I suspect these: https://github.com/Frogging-Family/linux-tkg/blob/master/linux-tkg-patches/6.1/0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch https://github.com/Frogging-Family/linux-tkg/blob/master/linux-tkg-patches/6.1/0002-mm-Support-soft-dirty-flag-read-with-reset.patch
But I dont have tested it so far. I could be also wrong
Unfortunately, this is not the clue, after removing these 2 patches, linux-tkg still does not start.
Without patches, the kernel boots properly. This is most likely the problem:
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 95f90699d2b17b..2b10fe29d2c8d9 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -46,6 +46,7 @@ struct evdev_client { struct fasync_struct *fasync; struct evdev *evdev; struct list_head node; + struct rcu_head rcu; enum input_clock_type clk_type; bool revoked; unsigned long *evmasks[EV_CNT]; @@ -377,13 +378,22 @@ static void evdev_attach_client(struct evdev *evdev, spin_unlock(&evdev->client_lock); } +static void evdev_reclaim_client(struct rcu_head *rp) +{ + struct evdev_client *client = container_of(rp, struct evdev_client, rcu); + unsigned int i; + for (i = 0; i < EV_CNT; ++i) + bitmap_free(client->evmasks[i]); + kvfree(client); +} + static void evdev_detach_client(struct evdev *evdev, struct evdev_client *client) { spin_lock(&evdev->client_lock); list_del_rcu(&client->node); spin_unlock(&evdev->client_lock); - synchronize_rcu(); + call_rcu(&client->rcu, evdev_reclaim_client); } static int evdev_open_device(struct evdev *evdev) @@ -436,7 +446,6 @@ static int evdev_release(struct inode *inode, struct file *file) { struct evdev_client *client = file->private_data; struct evdev *evdev = client->evdev; - unsigned int i; mutex_lock(&evdev->mutex); @@ -448,11 +457,6 @@ static int evdev_release(struct inode *inode, struct file *file) evdev_detach_client(evdev, client); - for (i = 0; i < EV_CNT; ++i) - bitmap_free(client->evmasks[i]); - - kvfree(client); - evdev_close_device(evdev); return 0; @@ -495,7 +499,6 @@ static int evdev_open(struct inode *inode, struct file *file) err_free_client: evdev_detach_client(evdev, client); - kvfree(client); return error; }
That's not it either.
My bore build of 6.1 -boots on at least 2 different Ryzen PCs. Built Dec 14th: linux61-tkg-bore-6.1.0-272-x86_64.pkg linux-tkg.cfg.txt
I only used three patches to build linux-tkg-bmq
0009-prjc_v6.1-r0.patch
0009-glitched-ondemand-bmq.patch
0009-glitched-bmq.patch
and linux didn't boot either. Well, I'm left with building a command
_debug=1 makepkg -si
bore works fine here, both pds and bmq doesn't but it is a known issue afaik
These changes https://github.com/Frogging-Family/linux-tkg/commit/1fc60cc38840857b09ec123754c801d9ded6b45c didn't help, linux 6.1 still won't boot.
Same here
Considering that linux-clear from aur (6.1.1) works well, the problem is 100% one or more patches. The configuration is the same... I have an dual ivybridge cpu (xeon e5-2697v2), if that can help solve the problem. As on other hardware kernel runs without problems.
Considering that linux-clear from aur (6.1.1) works well, the problem is 100% one or more patches. The configuration is the same... I have an dual ivybridge cpu (xeon e5-2697v2), if that can help solve the problem. As on other hardware kernel runs without problems.
So, if compiling with _debug=1 makepkg -si
it is booting?
Please don't use when testing the current changes with the PDS/BMQ scheduler, just test cfs. prjc seems a bit problematic currently with 6.1.
Please try a CFS build without the clearlinux patches (you can disable them at the customization.cfg).
Do you get any logs when booting or does it hang instantly at the intrafms generation?
I use cfs. _debug=1 works fine. i have error in logs before and after welcome to arch linux
I use cfs. _debug=1 works fine. i have error in logs before and after welcome to arch linux
How about if disabling clearlinux patches and using cfs? Do you get there any error log. Please make a photo with your phone or get the log from the journalctl.
I built linux-tkg-cfs with makepkg -sirc
command and disabled the linuxclear patch, and after reboot it doesn't load intrafms at all it just crashes right away.
@robson-66 @Pheidologeton Are you guys using Intel CPUs? I stumbled upon https://bugzilla.kernel.org/show_bug.cgi?id=216823 and since we are quite a few with AMD platforms not facing any issue, it might be it. I have pushed https://github.com/Frogging-Family/linux-tkg/commit/5c3621fc6a409da96cfed7a104e5996f8171a72b which would "fix" the issue (more like workaround it, since the upstream issue still exists) if that's what you're facing.
@robson-66 @Pheidologeton Are you guys using Intel CPUs? I stumbled upon https://bugzilla.kernel.org/show_bug.cgi?id=216823 and since we are quite a few with AMD platforms not facing any issue, it might be it. I have pushed 5c3621f which would "fix" the issue (more like workaround it, since the upstream issue still exists) if that's what you're facing.
Bingo, that's it, I built linux-tkg-pds
with all the patches and it booted without a problem. Thank you very much for finding the problem.
Nice catch!
So much time spent on trying to track this :frog: I'm glad and relieved we solved it
I've been building linux-tkg with the
modprobed-db
tool for almost 2 years now, and it's the first time I've had a kernel not start after building. I even updated stock linux 6.1 from repo testing to makemodprobed-db
detect new modules, one module has been added to the list but it doesn't do anything after building linux-tkg 6.1 doesn't start at all just hangs with error message board.