Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I Contributed to My First Linux Kernel Bug Fix

说明与用途

用户修复了导致挂起/恢复延迟和运行时 PM 警告的 i915 驱动程序错误,提升了系统性能并向 Linux 内核贡献了补丁。

问题

The Intel i915 display driver caused a 33‑second suspend/resume stall and repeated runtime‑pm warnings on an HP Victus laptop.

结果

The user successfully identified and fixed a kernel bug that caused long suspend/resume stalls and runtime‑pm warnings, improving system responsiveness and contributing a patch to the i915 driver.

工作流

  • 1. Filed detailed bug report on freedesktop GitLab with hardware specs and dmesg logs.
  • 2. Added kernel parameters (drm.debug=0xe) via GRUB and captured full kernel logs during a suspend/resume cycle.
  • 3. Ran Intel sleepgraph to identify the i915 driver as the culprit.
  • 4. Built a debug kernel (CONFIG_DRM_I915_DEBUG=y, etc.) to enable wakeref tracking.
  • 5. Analyzed ref_tracker output to locate orphaned wakeref from boot.
  • 6. Applied Arun Raghavendra Murthy’s patch that reuses existing wakeref instead of overwriting it.
  • 7. Rebuilt, installed the patched kernel, and tested across multiple suspend/resume cycles to confirm the fix.

证据

After building and installing the patched kernel, I tested across 3 suspend/resume cycles: Before: i915 raw-wakerefs=1 wakelocks=1 on cleanup WARNING: intel_runtime_pm.c:531 After: [DPRX] Link Training passed (no warnings)

来源

The i915 was the only device with an abnormal suspend time — 35ms vs 0.001ms for everything else.

来源

  • 记录日期: 2026-09-05T16:36:29.456Z