Linus Torvalds had previously publicly expressed his acceptance of using artificial intelligence in Linux development. Recently, he demonstrated this view by resorting to an AI tool to solve a bug found in a graphics driver intended for the kernel.
The specific problem was related to an Intel Xe driver, designed for the Battlemage G21 graphics chip, which can be found in video cards such as the Intel Arc B580. The flaw consisted of the driver signaling as available a small section of video memory (VRAM) that was actually designated for the GPU's compression memory.
Because the operating system directed this area to the graphics server structures while the compression hardware wrote data into it in the background for its own functions, the information processed by the system was corrupted and overwritten, resulting in failures during the graphical interface initialization.
The necessary correction was surprisingly simple: it only required replacing the instruction «round_up()» with «round_down()» in a single line of code. Although the final solution was easy, the process to reach it was extremely difficult, leading Torvalds to classify the work as «infernal».
Instead of giving up, Torvalds used an AI tool as an assistant in debugging the code. He described the debugging session as coming «straight from hell», but enormously aided by AI, which performed much of the heavy lifting. Initially, the AI repeatedly claimed that the problem was unsolvable and that only a report about it should be written.
Torvalds noted that he suspected such systems might have been trained by people less obstinate than him. However, even when the AI tried to give up several times, it continued to add debugging code and analyze it faithfully when he insisted. Therefore, he credited the AI and allowed it to write the commit message.
He clarified that he used the AI tool to draft the debugging codes and examine subsequent logs. Interestingly, the AI tended to «give up» on the task, considering the problem unsolvable, forcing Torvalds to persist. This led to his joke about the AI being trained by someone less stubborn than him. In the end, the insistence was successful, resulting in 24 debugging patches and 18 kernel boots, allowing him to find and correct the cause of the problem in a time that would have been much longer without the help of AI.
This incident reinforces Torvalds' stance of not being against the use of AI in Linux, as long as it can be effectively useful. It is relevant to note that Linus Torvalds is the primary maintainer of Linux, and in his role, he generally acts by reviewing code submitted by other developers to decide what should or should not enter the kernel.
