{"slug": "linux-creator-linus-torvalds-just-used-ai-to-fix-a-kernel-bug", "title": "Linux Creator Linus Torvalds Just Used AI to Fix a Kernel Bug", "summary": "Linus Torvalds used AI to help fix a one-line bug in the Intel Xe graphics driver for Battlemage G21 cards, which caused the GDM display manager to restart endlessly. The debugging process required 24 debug patches and 18 kernel boots, with the AI assisting by adding debug instrumentation, running analysis, and writing the final commit message. The fix will be included in Linux 7.3 and backported to stable kernel branches.", "body_md": "Linus Torvalds just [used AI to help fix a Linux kernel bug](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=818bebeb63dd6bf5f4e07e145f6cdbace520a34c&ref=itsfoss.com).\n\nLet me tell you that this is a rare event. Not because Torvalds is using AI. Last Christmas holidays, [Torvalds used AI for the first time](https://itsfoss.com/news/linus-torvalds-vibe-coding/) for a personal, hobby project. He was averted to AI at first but [made his peace with it](https://itsfoss.com/news/linus-torvalds-on-ai/), even for AI-assisted code contributions in the kernel project.\n\nThe event we are talking about is rare because Torvalds doesn't code on Linux kernel anymore. He is in the maintainer mode. He just reviews code and merges pull requests from various contributors to the kernel code.\n\nSo this is a rare occasion in recent time when he made a kernel patch himself. And he did that with the assistance of AI.\n\n## Fixing a one-liner bug with AI\n\nDon't scoff at \"one-line\" code change. Speak to any software developer and they will telly you that often the bugs are easy, few line code changes. It's the process of finding the root cause that takes time, effort, and skills.\n\nThe bug Torvalds dealt with was in the Intel Xe graphics driver for Battlemage G21 cards. It caused GDM, the [display manager](https://itsfoss.com/display-manager/), to restart endlessly.\n\nTracking it down with AI required 24 debug patches (did he just use \"printfs?) and 18 kernel boots. Ultimately, the culprit turned out to be a single line where `round_up()`\n\nshould have been `round_down()`\n\n.\n\nAnd this was a debug session from hell, enormously helped by an AI doing much of the grunt-work.\n\nThe AI \"did the grunt work\" for Torvalds by adding debug instrumentation, running analysis, and even writing the final commit message. I can feel the commit message part, it's a boring but necessary task.\n\nBut this debugging session was not all smooth sailing. Torvalds didn't just add \"don't make mistakes\" to his prompts. On the contrary, the AI told Linus multiple times that the problem was \"impossible and unsolvable.\" Torvalds refused.\n\nI suspect those things have been trained by people who may not be quite as stubborn as I am.\n\n## AI is a tool, use it effectively\n\nThis is what many people in the software industry understand. AI is just a tool and it is essentially useful when there is a capable human driving the process.\n\nLook at the example here with Torvalds. A vibe coder with no knowledge of what's going on with the code, would have left it to AI to make decisions, and AI would have called the bug unfixable and walked away.\n\nBut Linus Torvalds has experience. He could understand what the AI was doing right or wrong. He persisted and fixed the bug.\n\nThe patch will be in Linux 7.3 and has been marked to be backported to stable kernel branches.\n\nThe creator of Linux needed 18 boots to find a one-line fix. The AI helped him get there. Although, I think he would have gotten there all by himself as well, even if it would have taken a bit longer.\n\nThere is no information available on what model or tool he used. In his personal project, where he used AI for the first time, he had used Gemini from Google. I guess he is not into local AI for now. I hope he finds enough interest and gives us a new gift after Linux kernel and Git. Wishful thinking, I know.\n\nSource: [Phoronix](https://www.phoronix.com/news/Linus-Torvalds-Debug-AI?ref=itsfoss.com).\n\nEnjoyed this update? Support independent Linux news coverage\n\nIt's FOSS has been helping people use Linux for the past 14 years. Help us stay independent from big tech. Become a Plus member, enjoy ad-free reading and get 5 eBooks.", "url": "https://wpnews.pro/news/linux-creator-linus-torvalds-just-used-ai-to-fix-a-kernel-bug", "canonical_source": "https://feed.itsfoss.com/link/24361/17426094/torvalds-used-ai-fix-kernel-bug", "published_at": "2026-08-22 07:20:08+00:00", "updated_at": "2026-08-22 08:43:05.941264+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "developer-tools"], "entities": ["Linus Torvalds", "Linux kernel", "Intel Xe graphics driver", "Battlemage G21", "GDM", "Linux 7.3", "Phoronix", "It's FOSS"], "alternates": {"html": "https://wpnews.pro/news/linux-creator-linus-torvalds-just-used-ai-to-fix-a-kernel-bug", "markdown": "https://wpnews.pro/news/linux-creator-linus-torvalds-just-used-ai-to-fix-a-kernel-bug.md", "text": "https://wpnews.pro/news/linux-creator-linus-torvalds-just-used-ai-to-fix-a-kernel-bug.txt", "jsonld": "https://wpnews.pro/news/linux-creator-linus-torvalds-just-used-ai-to-fix-a-kernel-bug.jsonld"}}