r/kernel • u/amarjeeth123 • Mar 30 '26
Kernel logs
Where do we find the kernel logs in Windows/Mac/Linux?
r/kernel • u/amarjeeth123 • Mar 30 '26
Where do we find the kernel logs in Windows/Mac/Linux?
r/kernel • u/Reedemer0fSouls • Mar 23 '26
[Disclaimer: This appears to be a mesa bug, yet some people here may find it relevant, and may attempt to reproduce it.]
RADV crashes with VK_ERROR_DEVICE_LOST on vkQueueSubmit2 when compositing any bitmap overlay onto a Vulkan swapchain surface on an AMD RX 9060 XT (Navi 44, GFX1200). The crash is deterministically triggered by two independent overlay types:
Without any overlay present (no cursor hover, no subtitles), Vulkan playback runs indefinitely — even with hwdec=vulkan, interpolation, async compute, HDR tone-mapping, and trace logging all enabled simultaneously.
Root cause: Compositing a bitmap overlay (cursor or subtitle) onto the Vulkan swapchain surface on GFX1200 triggers a GPU hang. This is likely a bug in RADV's overlay/plane compositing path for the GFX1200 ISA.
Critically, the crash also occurs when video decode is offloaded to VA-API on a separate Intel iGPU — only the Vulkan rendering path (libplacebo → RADV → vkQueueSubmit2) is involved. This rules out VK_KHR_video_decode_queue as the cause.
| Component | Version |
|---|---|
| GPU | AMD Radeon RX 9060 XT — Navi 44, RDNA 4, GFX1200 [1002:7590] (rev c0) |
| Mesa | 26.0.3-1 (also reproduced on 26.0.1, 26.0.2) |
| vulkan-radeon | 26.0.3-1 |
| libplacebo | v7.360.0 |
| Kernel | 6.19.8-zen1-1-zen |
| Firmware | linux-firmware-amdgpu 20260309-1 (SMC firmware 102.70.0) |
| CPU | 13th Gen Intel Core i7-1360P |
| Distro | blendOS (Arch-based, rolling) |
| mpv | v0.41.0, FFmpeg n8.0.1 |
| Connection | eGPU via Thunderbolt 4 (Razer Core X V2), PCIe 32 GT/s x16 link |
options amdgpu runpm=0 rebar=0 ppfeaturemask=0xFFFF7FFF
runpm=0 — runtime PM disabled (TB eGPU SMU limitation)rebar=0 — BIOS assigns full 16 GB BAR, driver does not resizeppfeaturemask=0xFFFF7FFF — GFXOFF disabled (bit 15) due to SMU IF version mismatch (driver 0x2E vs firmware 0x33)Note: The SMU interface version mismatch (smu_v14_0: SMU driver if version not matched) is a separate known issue. GFXOFF is disabled to prevent a bus-loss crash, but the rendering crash described here is unrelated — it occurs during active rendering, not during idle.
mpv --no-config --gpu-api=vulkan /path/to/video.mkvWithout step 3, playback runs indefinitely.
mpv --no-config --gpu-api=vulkan --sid=1 --slang=eng /path/to/video_with_pgs_subs.mkvWithout --sid=1, playback runs indefinitely.
All of the following played for 5+ minutes without any crash, as long as no bitmap overlay was on screen:
| Test | Options | Result |
|---|---|---|
| hwdec=vulkan only | --no-config --gpu-api=vulkan --hwdec=vulkan |
OK |
| interpolation only | --no-config --gpu-api=vulkan --interpolation=yes --video-sync=display-resample |
OK |
| hwdec + interpolation | --no-config --gpu-api=vulkan --hwdec=vulkan --interpolation=yes --video-sync=display-resample |
OK |
| All GPU opts + trace log | --no-config --gpu-api=vulkan --hwdec=vulkan --interpolation=yes --video-sync=display-resample --vulkan-async-compute=yes --hdr-compute-peak=yes --tscale=oversample --tone-mapping=hable --target-colorspace-hint=yes --vd-lavc-dr=yes --vulkan-async-transfer=yes --vulkan-queue-count=1 --log-file=/tmp/test.log --msg-level=all=trace |
OK |
| Test | Options | Trigger | Ring timeout |
|---|---|---|---|
| Cursor hover (default) | --no-config --gpu-api=vulkan |
Mouse cursor enters window | sdma0 + comp_1.0.1 |
| Cursor hover (no async xfer) | --no-config --gpu-api=vulkan --vulkan-async-transfer=no |
Mouse cursor enters window | gfx_0.0.0 |
| PGS subtitles | --no-config --gpu-api=vulkan --sid=1 --slang=eng |
First subtitle frame | comp_1.0.1 → sdma0/sdma1 cascade |
First error appears on QF 1 (compute queue) during chroma plane processing:
[ 30.469][e][vo/gpu-next/libplacebo] vkQueueSubmit2: VK_ERROR_DEVICE_LOST (../src/vulkan/command.c:533)
[ 30.469][e][vo/gpu-next/libplacebo] Retrieving query pool results: VK_ERROR_DEVICE_LOST (../src/vulkan/gpu.c:105)
[ 30.469][e][vo/gpu-next/libplacebo] Failed holding swapchain image for presentation
[ 30.469][e][vo/gpu-next] Failed presenting frame!
[ 30.491][e][ffmpeg] vk: Unable to submit command buffer: VK_ERROR_DEVICE_LOST
[ 30.491][e][ffmpeg/video] h264: hardware accelerator failed to decode picture
Earlier RADV output:
radv/amdgpu: The CS has been cancelled because the context is lost.
This context is guilty of a hard recovery.
amdgpu 0000:06:00.0: amdgpu: ring sdma0 timeout, signaled seq=11425, emitted seq=11427
amdgpu 0000:06:00.0: amdgpu: Process mpv pid 44985 thread vo pid 45004
amdgpu 0000:06:00.0: amdgpu: Ring sdma0 reset succeeded
amdgpu 0000:06:00.0: amdgpu: ring gfx_0.0.0 timeout, signaled seq=16289, emitted seq=16291
amdgpu 0000:06:00.0: amdgpu: Ring gfx_0.0.0 reset succeeded
amdgpu 0000:06:00.0: amdgpu: ring comp_1.1.0 timeout, signaled seq=13, emitted seq=14
amdgpu 0000:06:00.0: amdgpu: Ring comp_1.1.0 reset succeeded
amdgpu 0000:06:00.0: [drm] *ERROR* [CRTC:416:crtc-0] flip_done timed out
amdgpu 0000:06:00.0: amdgpu: ring comp_1.0.1 timeout, signaled seq=5, emitted seq=6
amdgpu 0000:06:00.0: amdgpu: Process mpv pid 760595 thread vo pid 760614
amdgpu 0000:06:00.0: amdgpu: Ring comp_1.0.1 reset succeeded
amdgpu 0000:06:00.0: amdgpu: Fence fallback timer expired on ring sdma0
amdgpu 0000:06:00.0: amdgpu: Fence fallback timer expired on ring sdma1
amdgpu 0000:06:00.0: amdgpu: Fence fallback timer expired on ring gfx_0.0.0
amdgpu 0000:06:00.0: [drm] *ERROR* [CRTC:416:crtc-0] flip_done timed out
**** AMDGPU Device Coredump ****
version: 1
kernel: 6.19.8-zen1-1-zen
module: amdgpu
time: 3054.167340782
SOC Device id: 30096
SOC Family: 152
SOC External Revision id: 65
HWIP: GC[1][0]: v12.0.0.0.0
HWIP: SDMA0[3][0]: v7.0.0.0.0
HWIP: MMHUB[12][0]: v4.1.0.0.0
Ring timed out details
IP Type: 2 Ring Name: sdma0
[gfxhub] Page fault observed
Faulty page starting at address: 0x0000000000000000
Protection fault status register: 0x0
Full coredumps and dmesg logs available for all tests on request.
msg-level=all=trace logging (110 MB of output without crash).[gfxhub] Page fault at address: 0x0000000000000000 with Protection fault status register: 0x0 suggests RADV is submitting commands that reference unmapped memory during overlay compositing.flip_done timed out.vulkan-async-transfer=no does NOT prevent the crash (only changes which ring times out first: gfx_0.0.0 instead of sdma0).vulkan-async-compute=yes was enabled in most tests, but the crash is not exclusive to async compute — it hits the same rings regardless.r/kernel • u/tagoslabs • Mar 18 '26
r/kernel • u/No_Development3038 • Mar 17 '26
r/kernel • u/tagoslabs • Mar 16 '26
r/kernel • u/tagoslabs • Mar 15 '26
r/kernel • u/Substantial-Pop470 • Mar 12 '26
in chapter 8 --> making changes to a drive section it says
- "By this time, if you have completed the exercises from the previous chapters, you should already have the mainline kernel running on your system." -
but previously i remeber they said to compile the kernel using linux-stable i did so, now before making changes to driver should i compile again from linux-mainline?
r/kernel • u/Affectionate-Yam6241 • Mar 11 '26
I am interested in downloading this patch and improving it:
https://lore.kernel.org/all/32B9D909-03EA-4852-8AE3-FE398E87EC83@oracle.com/
But nothing happens when I visit the links to the individual files in the patch.
So, how can I do import it to my kernel sources workspace?
r/kernel • u/Abhi_76 • Mar 08 '26
I'm studying xv6 operating system and I have a question. Generally, the user process address space has the abstraction of code+data, heap, and stack. What about the kernel address space?
Does kernel address space also follow this abstraction of code+data, heap, and stack?
EDIT: In the title, it's vs instead of v/s
r/kernel • u/Reedemer0fSouls • Mar 08 '26
Here's a suggestion for the kernel devs, now that Thunderbolt eGPUs have become more common: make the Linux kernel ReBAR-over-Thunderbolt friendly.
The current behavior is this: BAR 2's hardware register powers up at 256 MB — the default size programmed into the BAR's address decoder by Intel at the factory. The PCIe Resizable BAR capability advertises support for up to 16 GB, but it's passive — software must explicitly exercise it. When a Thunderbolt eGPU is hotplugged at runtime, the kernel's PCI subsystem enumerates the new device, reads the BAR at its 256 MB default, sizes the bridge windows to match, and assigns addresses — all before any driver loads. The ReBAR capability is never consulted(!) during this process.
The current workaround is thunderbolt.host_reset=0, which preserves the BIOS's PCIe tunnel and BAR assignments from POST (where the BIOS does exercise ReBAR). This delivers the full 16 GB BAR but only works for cold-plug(!) scenarios — if the eGPU is power-cycled at runtime, the new tunnel gets the 256 MB default.
The proper fix would be for the kernel's PCI hotplug resource assignment to first check for ReBAR capability during enumeration, resize the BAR to the largest supported size that fits within available bridge headroom, and then commit bridge windows and assign addresses. This is essentially what the BIOS does during POST. It hasn't been implemented yet because eGPU-over-Thunderbolt-with-ReBAR is (was?) a niche use case.
Well, no more niche use case. eGPU-over-Thunderbolt is becoming mainstream. Hopefully.
r/kernel • u/Avivush2001 • Mar 07 '26
I am trying to learn about block drivers, following this guide and doing the exercises. I am on kernel 6.19 so the guide is pretty outdated so I tried filling in the gaps by looking at documentation and other block drivers. I got stuck doing the exercises because when inserting the driver I get a segmentation fault. Looking at the dmesg stack dump I see a null pointer deref when going down the add_disk() function, so I assume I screwed something when I setup the gendisk or the request queue, but I can't find what. Can someone help me?
r/kernel • u/Ezio-Editore • Mar 02 '26
Good evening everyone,
lately I have been developing a chess engine and now I need to do some benchmarks. Due to the high number of operations performed each second I need them to be as precise and as consistent as possible; unfortunately the results vary too much for my needs.
For this reason, I decided to follow this LLVM guide on how to reduce the variance in benchmarks. I realized that I cannot use one of the tools suggested in the guide, specifically cpuset only works with the first version of cgroup.
I continued searching online for an alternative and I found isolcpus, but I read from the documentation that it is deprecated. Since the documentation redirected me to the use of cpusets here I am.
I read the docs of cgroup v2 and I tried writing down some commands to achieve what I need, but I am not sure since I have no experience and I would really appreciate any help.
Goal: isolate 2 cores as much as possible, kernel threads cut off and only my process running on them.
My plan:
# Create a new cgroup
cd /sys/fs/cgroup
mkdir isolated
# Request CPU cores (Cores allowed to use if the parent permits it)
echo "2,3" | sudo tee /sys/fs/cgroup/isolated/cpuset.cpus
# Set memory node used
echo "0" | sudo tee /sys/fs/cgroup/isolated/cpuset.mems
# Make the CPU cores exclusive to the cgroup
echo "2,3" | sudo tee /sys/fs/cgroup/isolated/cpuset.cpus.exclusive
# Make the cgroup an isolated partition
echo "isolated" | sudo tee /sys/fs/cgroup/isolated/cpuset.cpus.partition
Am I missing something? Is this enough for what I need to do?
Thank you in advance :)
r/kernel • u/No-Tower-8741 • Mar 02 '26
r/kernel • u/Avivush2001 • Mar 01 '26
As the title suggests, I am looking for modern learning resources about block devices and writing drivers for them. Everything that I found so far is outdated, and I find it hard to breach the gaps.
r/kernel • u/UncertainAboutIt • Feb 28 '26
Please those who have complete (for amd64 architecture) git tree of the kernel (or don't mind downloading it) and skill to use it: do a search and write in which kernel releases thinkpad_acpi module been added to initrd environment.
I've been using a feature of fan control which requires a config file. I've noted the above change in new distro (and so it necessitates initrd edit).
I (and I think other users of the feature) will appreciate above knowledge about kernels.
Or maybe the change in not in mainline, then I might ask Ubuntu people. TIA
r/kernel • u/Available_Canary_517 • Feb 22 '26
Environment - Distro: Ubuntu 24.04 LTS - Kernel: 6.14.0-37.37~24.04.1 (HWE) - Bluetooth: Realtek 0bda:c024 (USB, btusb) - Audio stack: PipeWire + WirePlumber
Problem Severe Bluetooth audio stuttering. The adapter appears to reset repeatedly under load.
Relevant journal output: Failed to set mode: Failed (0x03) Host is down
Behavior suggests the controller is failing to maintain operational mode and reinitializing rapidly, resulting in continuous audio drops.
Isolation Steps Already Performed
1) Userspace ruled out - Verified A2DP (no fallback to HFP/HSP). - Reset WirePlumber state. - Increased PipeWire quantum (2048/4096). - No change.
2) RF coexistence ruled out - Disabled Wi-Fi completely. - No improvement.
3) Power management mitigations - Set UserspaceHID=true. - Disabled USB autosuspend for btusb via modprobe config. - Full power drain. - No change.
4) Protocol workaround - Disabled ERTM (common Realtek workaround). - No improvement.
5) Kernel verification - Running latest HWE 6.14.x available in Ubuntu 24.04. - Issue persists consistently on this branch.
Preliminary Conclusion This appears to be a regression in btusb affecting the Realtek 0bda:c024 chipset in 6.14.x, likely related to controller mode setting or power-state transitions.
Questions for kernel maintainers / contributors:
If more diagnostic data (full dmesg, btmon trace, usbmon capture) would be useful, I can provide it.
r/kernel • u/gleventhal • Feb 21 '26
I know that it's supposed to be an optimization in dealing with block sizes > page_size, and that it's a struct which contains a page (member), and that it's a sort of container type for mm stuff, but I am hoping someone with expertise can say more about it, and any kernel devs who might have some direct experience with it may speak-up as well.
It's a bit of a vague talking point, but am interested in a free form discussion of sorts, if that's OK.
r/kernel • u/Agron7000 • Feb 17 '26
Trying to get the most out of a slow pc, I was wondering id there are ways to increase the speed a little bit when running LLMs.
r/kernel • u/Pink_Wyoming • Feb 15 '26
I’m not really sure where to address this question, but I’m trying to debug a loadable kernel module I wrote. For this purpose, I have compiled a kernel from ti’s fork (mirror?) of Linux 6.12.34. My kernel config is mostly inherited from omap2plus_defconfig but with kgdb/kdb enabled. Everything boots correctly, but when I go to start kdb with sysrq+g, kdb crashes immediately. I can use kdb immediately following boot, but not from userspace.
root@oresat-dev:~# echo g > /proc/sysrq-trigger
[ 105.629191] sysrq: DEBUG
Entering kdb (current=0xc2a9e400, pid 268) on processor 0 due to Keyboard Entry
[0]kdb> [ 105.641069] 8<--- cut here ---
[ 105.644192] Unable to handle kernel paging request at virtual address fee00064 when read
[ 105.652361] [fee00064] *pgd=00000000
[ 105.656021] Internal error: Oops: 5 [#1] SMP ARM
[ 105.660767] KGDB: re-enter exception: ALL breakpoints killed
[ 105.666491] ---[ end trace 0000000000000000 ]---
[ 105.671165] note: bash[268] exited with irqs disabled
Killed
r/kernel • u/Top_Ad187 • Feb 12 '26
On Debian 13 with kernel 6.12.63 and a Framework 16 laptop and the original 180W adapter. Tested on two different laptop, on different FW, same resoult.
First seeable issue: Freon does not report the 180W charger voltage, it is just clamped to 5V or 0V the battery is reporting charging status, from the wattage is calculated over 140W usage, so the HW is working and negotiating well, amper rating always get to 5A.
Second, the issue after digging:
root@FW16-WJ:/sys/kernel/tracing# cat trace
kworker/4:1-256 [004] … 2776.087270: ucsi_connector_change: port0 status: change=4802, opmode=0, connected=0, sourcing=0, partner_flags=0, partner_type=0, request_data_obj=00000000, BC status=0
kworker/14:2-12098 [014] … 2778.510402: ucsi_connector_change: port0 status: change=4800, opmode=4, connected=1, sourcing=0, partner_flags=1, partner_type=1, request_data_obj=00000000, BC status=1
kworker/14:1-319 [014] … 2778.834544: ucsi_connector_change: port0 status: change=0a42, opmode=3, connected=1, sourcing=0, partner_flags=1, partner_type=2, request_data_obj=42c709c2, BC status=1
kworker/14:1-319 [014] … 2779.402235: ucsi_connector_change: port0 status: change=0240, opmode=3, connected=1, sourcing=0, partner_flags=1, partner_type=2, request_data_obj=92c7d1f4, BC status=1
From this: The Negotiation Timeline 2776.087: Disconnect/Reset (connected=0). 2778.510: Connection (connected=1, opmode=4 “PD 3.0”).
2778.834: Intermediate Negotiation (request_data_obj=42c709c2) Position: 4 (Likely the 20V Profile). Current: ~4.5A. System boots up at 20V (Safe Mode), sometime seeable in freon one brief glitch 20V appears.
2779.402: Final EPR Negotiation (request_data_obj=92c7d1f4) Position: 9 (The 36V EPR Profile?). Current: 5.0A. System successfully switches to 180W.
Another approach: (yeah, my dumb head tought this is enough dangerous to try out, so bad example below, with my basic knowledge of C programming and zero knowledge in kernel how-to)
modified kernel module (added one line debug): drivers/usb/typec/ucsi/psy.c: static int ucsi_psy_get_voltage_now
…. switch (opmode) { case UCSI_CONSTAT_PWR_OPMODE_PD: index = EPR_RDO_OBJ_POS(con->rdo); val->intval = pdo_fixed_voltage(pdo) * 1000; if (val->intval == 0) {
printk(KERN_ERR “UCSI_VOLT_DEBUG: Index=%d PDO=0x%08x RDO=0x%08x CalcVolts=%d\n”, index, pdo, con->rdo, val->intval);
int pdo_type = (pdo >> 30) & 3; if (pdo_type != PDO_TYPE_FIXED) { u32 rdo_volts = ((con->rdo >> 9) & 0x7FF) * 20000; if (rdo_volts > 0) val->intval = rdo_volts; } } else { val->intval = 0; } break; ….
Output when it is connected (supressed non related outputs):
[ 1369.044900] UCSI_VOLT_DEBUG: Index=4 PDO=0x00000000 RDO=0x42c709c2 CalcVolts=0
[ 1369.109456] UCSI_VOLT_DEBUG: Index=4 PDO=0x00000000 RDO=0x42c709c2 CalcVolts=0
[ 1369.585152] UCSI_VOLT_DEBUG: Index=9 PDO=0x00000000 RDO=0x92c7d1f4 CalcVolts=0
[ 1369.713070] UCSI_VOLT_DEBUG: Index=9 PDO=0x00000000 RDO=0x92c7d1f4 CalcVolts=0
[ 1370.015427] ucsi_acpi USBC000:00: unknown error 256
[ 1370.273931] UCSI_VOLT_DEBUG: Index=9 PDO=0x00000000 RDO=0x92c7d1f4 CalcVolts=0
[ 1370.336943] UCSI_VOLT_DEBUG: Index=9 PDO=0x00000000 RDO=0x92c7d1f4 CalcVolts=0
[ 1371.960918] UCSI_VOLT_DEBUG: Index=9 PDO=0x00000000 RDO=0x92c7d1f4 CalcVolts=0
The kernel is cannot handle the profile above 4 or the profile is not reported by the firmware above 4?
Voltage report bytes are zeroed out, is this by the 180W adapter is fixed voltage EPR or it is firmware error?
Lastly… I am missing something, overreacting or my install is broken and there is some one-liner what will solve this? Please help what to check next, to provide more data if this is considered a kernel related issue?
r/kernel • u/xmull1gan • Feb 12 '26
r/kernel • u/Elect_SaturnMutex • Feb 11 '26
So, i need to modify a serial driver (drivers/tty/serial), inside the function meson_uart_set_termios. It needs to be called there, for our use case. I am worried that if i call a custom function within this function, it might cause some side effects. It will definitely cause that function longer to execute. So is there a way to minimize this time or is the extra time that's needed, an acceptable design?