English Portuguese (Portugal)
xref:kernel/build-custom-kernel.adoc#_installing_the_kernel[Install the kernel].
xref:kernel/build-custom-kernel.adoc#_building_the_kernel[Build the kernel]. Sometimes commits cannot be built. If this happens, skip the commit with `git bisect skip`.
When reporting an issue with the kernel you should always attach the kernel logs, usually collected with the `dmesg` command. For some types of issues, you may need to collect more logs.
The SysRq magic keys may still work. You may need to add `sysrq_always_enabled=1` to the kernel boot command line. See https://fedoraproject.org/wiki/QA/Sysrq[the wiki article on SysRq on usage details].
the light on the keyboard to change state can be used as an indication of whether or not the kernel has hung completely, or if there is something else going on.
The kernel, like any software, has bugs. It's a large, complex project and it can be difficult to troubleshoot problems. This document covers some basic troubleshooting techniques to help narrow down the root cause of an issue.
Start a new `git-bisect` with `git bisect start`.
Sound issues
Sometimes the kernel fails to boot. Depending on where the problem is in the boot process, there may or may not be any output. Some good first steps are:
Setting `nmi_watchdog=1` on the kernel command line will cause a panic when an NMI watchdog timeout occurs.
Repeat the previous five steps until you've found the commit that introduced the problem.
Remove `quiet` (enable more log messages) and `rhgb` (disable graphical boot) from the boot flags. If the text output is too fast to read, add `boot_delay=1000` (the number of milliseconds to delay in between printk during boot). You can use a camera to take pictures of the output.
Reboot into the new kernel and test to see if it works.
Prepare a `.config` file. Assuming you've got both the good and bad kernel installed, the config for both will be in `/boot/`.footnote:[When bisecting between major versions (e.g. `v4.16` and `v4.15`) new configuration options will be added and removed as you bisect. It's _usually_ safe to select the default.]
Next, xref:kernel/build-custom-kernel.adoc#_getting_the_sources[get the source code].
Mark the newest version that works as "good" with `git bisect good <tag>`. For example: `git bisect good v4.16.8`.
Mark the first version that does not work as "bad" with `git bisect bad <tag>`. For example: `git bisect bad v4.17`.
Logs to collect
Install the xref:kernel/build-custom-kernel.adoc#_get_the_dependencies[dependencies] required to build the kernel.
Input issues (touchpad etc.)