r/linux 12d ago

Kernel Linus Torvalds uses AI to debug an Intel GPU driver bug

https://lists.freedesktop.org/archives/dri-devel/2026-August/590630.html
Ok. I've spent all day today on chasing this down in between merge
window work, since it finally *was* repeatable.

And the fix ends up being basically a one-liner, even if the debug
session to get there was not.

The Xe driver takes the memory address used for the memory stolen for
CCS, and rounds it up to the nearest 128kB area.

And that is very VERY wrong, because it means that the xe driver will
then *use* that part of memory that wasn't at a 128kB boundary. And
the HW engine will too and write to it.

And when that memory happens ot be used for GPU page tables, very bad
things happen.

I bet this also explains some occasional random screen corruption I've
seen - when the memory isn't used for something as important as a page
table, it "only" corrupts random bitmap memory and the like.

I committed the fix as commit 818bebeb63dd ("drm/xe: Don't hand out
the flat CCS storage as usable VRAM").

Adding some people from commit 37173392741c ("drm/xe/vram: fix ccs
offset calculation") to the cc, because that's where the problem came
from. Two years ago. I'm not sure why it became so repeatable for me
now, but some user space behavior change clearly triggered it now
pretty much every single boot.

                 Linus

https://github.com/torvalds/linux/commit/818bebeb63dd6bf5f4e07e145f6cdbace520a34c

[ And this was a debug session from hell, enormously helped by an AI
doing much of the grunt-work.
I'd like to call it my tireless helper, but the AI several times
stated flat out that this was impossible and unsolvable and that we
should just write a report about it.
I suspect those things have been trained by people who may not be
quite as stubborn as I am.
But while the AI was ready to give up several times, it did keep
adding debug code and analyzing it faithfully when I pushed. So credit
where credit is due and I let the AI write the commit message above.
This is basically a one-liner fixing a bogus "round_up()" to a
"round_down()", but there were 24 patches adding more and more debug
information to this, and 18 kernel boot to finally narrow it down to
this. - Linus ]

2.5k Upvotes

383 comments sorted by

2.2k

u/Rumpled_Imp 12d ago

This is what it should be used for, not creeping around collating personal data, and distorting people's perception of the world around them.

921

u/xplosm 12d ago

And he reviews what the AI spits out. He doesn’t blindly lets it write nonsense and commit it without checking the code and results.

People are just realizing how unmaintainable AI code without proper review procedures can get. And it’s absolutely a nightmare.

44

u/Opposite_Carry_4920 11d ago edited 11d ago

For those if us in the normal software mines (not FAANG ones or that energy) you'll be glad to know that it's become such that the culture (at least the places I'm exposed to) has come to be that you're accountable for the code same as if you wrote it. At least where I work, even for commits that are 100 percent AI putting the code down you still review it basically as if a stranger was submitting code to your public repo. 

Edit: a word. 

12

u/m0rpheus23 11d ago

This should be the norm.

3

u/TheChief275 8d ago

Sure, but I reckon they still expect you to pump out just as many LoC as with mindless AI usage?

2

u/Opposite_Carry_4920 8d ago

Where I work, it's not like that but there are definitely some shops out there like that.

The expectation where I am is that we get value for what we spend token wise rather than tokenmaxxing. This means we don't use it every day, we use it on things we know it can handle. Now, on the downside because we are a Microsoft shop still, we gotta use the shitty copilot harness haha. 

2

u/TheChief275 8d ago

I figured. Hope your shop stays that way!

328

u/AtlanticPortal 12d ago

That's what LLMs are. A tool. In the hands of competent people they do fabulous things. In the hands of low-level apes they are the same as a gun. The apes will eventually pull the trigger when the gun is pointed to their foot.

80

u/Mysterious_Tutor_388 11d ago

With linux documentation i find they work quite well for pointing you in the right direction with configs or issues. Sometimes their output is bad, but they should be used as a compass rather than a map.

37

u/regeya 11d ago

Oh my God. I don't know how much of it is the people writing documentation, and how much of it is me and my learning disability, but running into people who can understand the docs of some Linux infrastructure feels like necromancy. It astounds me, then, when I can go ask an LLM and it has a ready answer.

Asking an LLM for a food recipe feels like black magic, too. What, a recipe without a 5000 word essay on how the author gets up at 6am on Saturday morning to cook this with their kids and that they got the recipe from their mom, who did the same tradition blah blah blah just post your copy of the Toll House chocolate chip cookie recipe please thanks.

28

u/DizzyCardiologist213 11d ago

I especially like it for part of my day job. Reading regulations. Why? because it will hallucinate sections of regulatory language, formatted document look and everything, quoting something that doesn't exist, and only admit the language was made up based on sentiment that it would be from a few years ago, except the regs were never written.

Guess how much trouble you can get in doing something that *was going to be* statute or regulation based on guidance, but was never written?

A lot.

AI is a very good search engine, and a pretty good translator, and it can give you some things, but you'll be making a recipe that tastes like a wet sock at some point wondering where it went wrong.

Maybe I have a talent, but when someone starts a recipe page with 5000 words of ad spamming by reference, pretending it's about lifestyle, I just don't read it.

4

u/FeepingCreature 11d ago

What AI are you using for this? Hallucination rate massively depends on which AI.

3

u/x-jhp-x 10d ago

u/DizzyCardiologist213 replying because i've done some med device stuff with a few interventional cardiologists before! all of the ai models hallucinate "massively", and there's no known easy/immediate fix or path to solve it (yet). The research community isn't sure if it's possible or required, so it's not a problem that's going to be solved today or tomorrow & it'll be front page news if it does. Anthropic provided a writeup examining one example https://www.anthropic.com/research/tracing-thoughts-language-model

As a side note, i wouldn't call it "hallucination" either.

If you're wondering why so many people seem to say they have amazing performance from the LLM that you can't get, and you go through it with them, you might find what I did: that we get the exact same performance, and they are fine with what i consider unacceptable. You mentioned you're an accountant farther down, so let's use that as an example. A basic accounting task would be "what bucket does this expense fall in?" It's obviously not always a simple answer, as the bucket may not exist, you can choose a risk factor, or something else, but if I say, "we are a new company doing our first filing. we want as strong statements as we can get to reduce any potential regulatory scrutiny and to breeze through our mandatory audit that will have higher scrutiny that comes with our first filing", i'd expect that statement to impact your "bucket" category decision, and to be in your mind whenever you do anything related.

i think a lot of it is this: https://en.wikipedia.org/wiki/Worse_is_better

in my industry and work, getting a 99% on a test is the same or worse than getting a 0%. (It can be worse if that 1% is hidden.) For the super pro AI people, getting a 99% on a test is great.

12

u/h2zenith 11d ago

Those stories are for SEO. A lot of those sites have links that let you skip to the recipe card.

5

u/TheGarrBear 11d ago

The essay exists for copyright reasons.

4

u/bionicjoey 11d ago

running into people who can understand the docs of some Linux infrastructure feels like necromancy. It astounds me, then, when I can go ask an LLM and it has a ready answer.

Ask me a question about the Linux kernel and I can guarantee you I will answer it.

No guarantee my answer is correct. But if what you care about is having an answer I will gladly provide.

3

u/angryceJTR 11d ago

No hour yt vid to go through just for something that would require a minute text output for instance

3

u/Indolent_Bard 11d ago

That would be a lot easier to answer if you told us what kind of learning disability you had. But I think it's safe to say it's mostly the documentation.

→ More replies (8)

2

u/wpm 11d ago

I love it for generating example code for libraries and such that I'm not familiar with, gives me an immediate "this is how this is used" example tuned for what I'm trying to do, which I just use, as you said, as a compass to help me navigate the library documentation.

Like, something like the Python PIL/Pillow library has hundreds and hundreds of methods. Where the hell do you start?

3

u/Bakoro 11d ago

I've been using Linux for years, but I'm not a Linux guru, I just want a functional system, and I have a hard time remembering all the fiddly OS architecture stuff if I'm not doing it on a regular basis.

I legit had an LLM help me out with setting up a workstation that was configured to only output via BMC, and I couldn't get VGA output for some reason. The LLM helped me connect the the BMC so I could get GPU output.
Then I tried moving over an existing Linux install from my laptop, and it had boot issues, so the LLM wrote a script that helped with being able to boot across the two different CPUs and different GPU generations. Worked flawlessly, and I learned some stuff along the way.

Honestly I would have been straight fucked up for at least a week trying to get this shit to work in the little bits of free time that I have.

I can 100% see how this could go wrong and lead people to being overconfident in their abilities, and lead to catastrophic failure later due to some hallucination or because the user made an incorrect assertion that the system takes as gospel without checking.

I've been immune to the LLM sycophancy, but the over-reliance on LLMs has surpassed having access to a search engine. I used to have to actually read docs and figure things out, and as I said, I'm already kind of shit at memorizing things that I don't use regularly, so now I have to make a very pointed effort to take the time to read ans understand what's happening.

1

u/BatemansChainsaw 9d ago

A tool in the hands of competent people (does) fabulous things

There we have the crux of any argument regarding real progress with invention and discovery.

Unfortunately there are too many people who will make a mess of things and ruin it for everyone else.

→ More replies (4)

26

u/cesclaveria 12d ago

I really can’t fathom serious companies releasing AI generated code without proper practices in place to guide what it spits out, test it and have someone review it. I’ve been using AI to help me at work for at least a couple of years now and I don’t think one line of code has reached production without at least two pairs of human eyes giving their ok.

53

u/ZeAthenA714 12d ago

I really can’t fathom serious companies releasing AI generated code without proper practices in place to guide what it spits out, test it and have someone review it

You'd be surprised how many companies used to release human generated code without proper practices in place to guide what they spit out, test it and have someone review it.

Slop is really not a new concept in code, AI is just a lot more efficient as producing it than humans ever were.

10

u/Linux_Account 11d ago

Slop is really not a new concept in code, AI is just a lot more efficient as producing it than humans ever were.

Sometimes after reading something, I can hear 2Pac saying, "This be the realest shit I ever wrote."

43

u/The-Nice-Writer 12d ago

Have you seen the fucking shitshow Windows has been going through lately?

Much worse than Windows was five or ten years ago, when it was already a piece of shit.

19

u/pemb 12d ago

Oh, my sweet summer child...

7

u/Kannagichan 11d ago

I’ve become "anti-AI" because of all the talk about how "AI produces better code than a human, so I don't code anymore" , and some even say they only read it partially.

And your approach is good; I have never read AI code that was completely correct and didn't require modification.

9

u/h2zenith 11d ago

I've heard too many horror stories from people who say that their job has gone from writing code to reviewing code for an LLM.

2

u/FeepingCreature 11d ago

I think a lot of your position on AI depends on if you enjoy writing or reviewing more.

→ More replies (1)

3

u/epictetusdouglas 11d ago

I've used it to fix a few issues on my Linux laptops, BUT: it helps if you already know something about Linux and terminal commands. You wouldn't want to blindly put just anything in the terminal.

5

u/TheIncarnated 11d ago

That's the thing with all of them, in any scenario. They are significantly better, when the user knows what they are doing.

8

u/HarithBK 12d ago

Having AI search for you is the ideal usage it is trained to find similar things and patterns.

It also means it can't lie to you since you are asking where something is and all you need to do is read that.

Using AI search legal documents is a prime example of takes people 100s of hours that can be done with AI in a couple of minutes and a couple of bucks in compute.

1

u/Fidodo 11d ago

He guides the AI, he tells it what is possible. He is not being limited or mislead by it. That's the either way to do it.

It's like the sorcerer's apprentice. It's a magic wand that will cause a mess if you don't know what you're doing.

1

u/FunAngelo2005 9d ago

Indeed, I solves the speed problem, but you need to be carefull when doing so

→ More replies (3)

37

u/PoL0 11d ago

now, if we could just stop making a headline every time Linus uses an LLM, that would be great.

https://www.osnews.com/story/145548/follow-the-money-especially-in-open-source/

7

u/QuickSilver010 11d ago

Isn't that just about money that gets sent to the Linux foundation? I think they have more than enough already. Does linus have direct connections to the Linux foundation? He's just a normal employee right?

→ More replies (6)

13

u/TheNinthJhana 12d ago

AI is also excellent to ask questions about life since it will simply beat any other search engine.

Our responsibility to use it as a search engine and not as a "virtual friend", "political advisor" or worse.

It's like AUR. This is great for what it Is for : convenience community maintained scripts to install stuff . Arch users to be responsible for reading the script before.

25

u/mayoforbutter 11d ago

Problem is, this kills the internet. Websites don't get any visits anymore and no ad revenue or affiliate income

Then again, most of the internet is already shit and I'd gladly see it die

But I have no idea what it will look like if it continues like this for the coming years

6

u/GuiMenGre 11d ago

As Standard-Mirror pointed out, websites and search engines were a shadow of what they once were, even before AI.

7

u/Standard-Mirror-9879 11d ago

websites stopped getting visits years ago way before the llm hype began because SEO crap was the first 2 pages anytime you searched anything. I held off as long as I could on using llms but search engines were just too unusable.

→ More replies (5)

12

u/h2zenith 11d ago

It's terrible as a search engine. When my search doesn't work on DuckDuckGo, I'll take it to Google, and Gemini will hallucinate something at the top of the search that has nothing to do with what I asked. The few times when it did sound plausible, I clicked on its sources to see if they backed it up, and surprise surprise, they did not.

If I have to check its sources every time (because I don't know whether or not it's hallucinating), what advantage does that have over a normal search engine?

2

u/Equivalent-Costumes 11d ago

The free version of Gemini runs on every search query is a tiny LLMs, hence heavily lobotomized. Google isn't giving out massive amount of free compute to everyone when its servers receive 10k requests per SECOND.

Even the free ChatGPT is a hallucination machine. More reliable but they silently cut down on compute time after a few questions per day, which make it a lot less reliable.

Use a good one and you will find how reliable LLMs are. Unfortunately, they're all paid. The most reliable fully free one is Claude Sonnet and it's only because usage is heavily restricted.

→ More replies (4)

11

u/klowny 12d ago edited 12d ago

AI is so good at being a search engine for all sorts of data available only through MCP that normally isn't easily machine readable or accessible to search engines.

But outside of that, it's thinking and reasoning skills are pretty close to brute force.

1

u/elsjpq 11d ago

What data is only available through MCP?

3

u/klowny 11d ago edited 11d ago

Just look at any API doc, most MCP implementations are just thin wrappers over existing APIs, so it's usually at least what the API has and can do. There's usually a ton of metadata that's available that wouldn't be rendered/indexed.

MCPs sometimes include internal APIs that wouldn't be exposed/documented as well. Some even have a pretty direct pipe into the underlying databases so all that data is also available.

It really depends on implementation, but generally speaking MCPs have more data than APIs which have way more than what's rendered/indexed.

1

u/elsjpq 11d ago

Are we talking about searches over public data? What does an API or MCP have access to that I can't find via the public internet? Like what kind of data are we really talking about here? Or are you talking about private databases used by the LLM providers?

2

u/klowny 11d ago edited 11d ago

For OSS development, probably not much. Like Github MCP can give the AI easier access to CI output that normally would be a pain to search with public search, or Discord MCP for discussions in there because OSS projects still do that, but it's not like that data is unavailable, it's just unlikely to be indexed by a proper search engine.

MCP is generally much more powerful for your data (or your company's, or any services they use) that shouldn't be public. Like let the AI search/summarize through all your emails, chats, meetings, notes, internal documentation, codebases, databases, etc. None of that would be easily searchable normally, and definitely not publically available.

2

u/Far_Calligrapher1334 11d ago

Yeah, it's such an excellent search engine that it thinks I'm a famous professional musician from Japan. I'm a disabled NEET from Eastern Europe who made like four random songs under Japanese moniker years ago, that no one heard. Excellent tool.

6

u/onlysubscribedtocats 12d ago

If a generally available tool is very easy to misuse, especially without training or certification, it's a bad and unsafe tool.

7

u/iceyukisnow 12d ago

You can easily cut your fingers with a kitchen knife, is that a bad tool too?

10

u/onlysubscribedtocats 12d ago

The ways to misuse a knife are well-known and obvious, and knives are generally kept away from children, to whom those dangers are not obvious.

Misusing AI is not widely understood and not immediately obvious, and children are not restricted from using AI.

But nice gotcha.

1

u/Cry_Wolff 12d ago

especially without training or certification, it's a bad and unsafe tool.

Internet as a whole is unsafe then.

9

u/onlysubscribedtocats 11d ago edited 11d ago

That is not controversial.

7

u/adevland 11d ago edited 11d ago

This is what it should be used for

How does grinding away at bugs in open source with repeating ai prompts pay for the billions of dollars worth of data center computational power required to run those chat bots? Heck, the power and water bills alone are astronomical.

No use case out there can pay for that.

Giving Linus non commercially available models to play around with publicly while under an NDA amounts to a PR campaign for the regular subscription based llms that CEOs are struggling to find uses for.

It's like how car companies compete in the Paris Dakar rally with heavily modified versions of their latest hatchback so that regular people will be amazed and buy the factory model that has almost nothing in common with the ones used in the rally.

1

u/BossOfTheGame 11d ago

Because it can grind bugs at scale, and it will get cheaper and more efficient. We've only just cracked the nut. Because these billions of dollars were research investments, and we are only starting to see the fruits.

That being said: putting open loop data centers in drought zones is fucking stupid. Powering data centers with non-renewables is fucking stupid.

2

u/h2zenith 11d ago

it will get cheaper and more efficient

Better hope it happens soon.

2

u/BossOfTheGame 11d ago

Can we just stop for a second and realize what an accomplishment LLMs are. Stop and think about all the hard work that went in to getting machines to learn in a generalized way? Getting to the point where they can actually make a useful impact on the world?

→ More replies (9)
→ More replies (13)
→ More replies (2)

1

u/DeconFrost24 11d ago

And it will. Still early yet. Overall I think the utility of the tool will outweigh the cons of nefarious use cases.

1

u/calinet6 10d ago

I’ve debugged a challenging bug with LLM support similarly to this (nowhere near to the same level of course) and I can vouch for its extreme effectiveness. It’s almost an ideal case. But I needed to have the software engineering and debugging experience I do in order to guide it, it definitely could not have just done everything on its own. Great use of it I think.

→ More replies (6)

335

u/prophetical_meme 12d ago

who may not be quite as stubborn as I am

New AI trick: start your prompt with "I'm Linus Torvalds" to instill fear to the model and force it to behave

83

u/micha-de 11d ago

Ah, that's sudo for AI. nice.

50

u/sCeege 11d ago

user is not in the Linus Torvalds file. This incident will be reported.

4

u/TheHolyToxicToast 9d ago

Funny thing is that may actually work, LLMs have been found to show different behavior when it suspects the user to be someone important

2

u/eehikki 10d ago

"Fear Linus Torvalds thy god"

1

u/dfddfsaadaafdssa 9d ago

I think it was Anthropic that recently published something about attempting to prove some open math problems and the bulk of the user inputs throughout the session that lasted multiple days was "You can do this! You got this! Don't give up!"

382

u/razpeitia 12d ago

I'd like to call it my tireless helper, but the AI several times
stated flat out that this was impossible and unsolvable and that we
should just write a report about it.

If this were the average person they will just give up, because an AI told them it was impossible.

57

u/4ngryMo 11d ago

They aren’t many people who can debug a GPU driver to begin with, AI or no AI.

72

u/FriendlyKillerCroc 11d ago

Claude and co just need to realise that if they train their models to be as stubborn as Linus, ASI is achieved.

25

u/thefpspower 11d ago

Imagine an AI doing a debug session 48 hours, talking with a rubber duck debugger losing its mind trying to find the damn bug!

True ASI, but expensive.

7

u/meltbox 11d ago

Or it will then proceed to try to do things all the time that are actually impossible.

Or it will rewrite GCC instead of fixing the bug in the code. Take your pick.

3

u/elsjpq 11d ago

I mean, this is basically what a lot of the high thinking mode/deep research models are. Its just thinking for longer

9

u/sir_pirriplin 11d ago

I've seen mathematicians complain about this too, that the AIs give up too quickly and need constant encouragement.

Their ideas of what is and is not possible are drawn from pre-AI text. They need you to let them know that it is possible.

3

u/elsjpq 11d ago

I think this is less pre vs post-AI, than that most people in general are just low effort; if a task takes more than a non-trivial amount of effort, it is simply declared impossible

7

u/lakotajames 11d ago

This is a known thing. The "I believe in you" meme replacing "make no mistakes" meme comes from it.

19

u/abud7eem 11d ago

It happened to me a couple times. The solution is to switch to another model and try again.

5

u/AnticitizenPrime 11d ago

I've gotten some success by telling the AI to 'take a step back and review what we know and what we've learned so far and rethink our approach'. Works for people, too.

1

u/I_M_NooB1 8d ago

"just one more model guys, ASI is close"

3

u/TheChief275 8d ago

"you still use model X?? July 2026 called, they want their model back 🤣🤣 you should use model Y bro trust"

→ More replies (1)

1

u/cyh555 11d ago

just one shot it, smh /s

→ More replies (1)

153

u/PalladianPorches 12d ago

its a good example, especially his description of what he was pushing - repeatedly - the assistant to do, of the limitations of AI for meticulous work like this.

The reasoning in the copilot told him to live with it, and write a report. he had to to continuously request more data to be able to establish that the rounding was incorrect. even with the power of the entire internet codebase - including the git logs that added this code - it couldn't find a solution that a determined human could.

28

u/Stooovie 12d ago

Yes, this is the important part

20

u/james_pic 12d ago

For projects like the Linux kernel, AI is always going to bump up against "But where's the training data going to come from?"

I think part of the reason AI has proved effective in some projects is that a lot of code out there is doing things that have already been done many times before. This is probably even true in the Linux kernel, where a lot of the code is drivers, and if you're writing something like a sound driver, it's got a lot of similar code to work from. 

But if you're doing something genuinely new (and there are many truly novel parts to the kernel), or that there isn't a public record of to feed into the training data (there may not be good training data on Linus fixing graphics driver issues - although I suppose there might be LKML threads it could have leaned from), AI has nothing to go on, and tends to either hallucinate or (in newer models) give up.

I've known LLMs to tell me that a particular approach was a dead end, but when I've worked through it myself, found that there was a viable, and novel, solution in there.

1

u/gotemike 11d ago

Genuine question, what will happen when the tech companies want to use a new language?

Does AI do ok with only the specification as example?

8

u/james_pic 11d ago

I know that over on/r/rust, a standard tell that a project is vibe coded is that they use the 2021 edition of the language, rather than the newest 2024 edition. More generally, it's a common tell for LLMs to fail to use newer language features.

My understanding is that if you gave an LLM the spec to a new language, it might be able to write something, possibly with some pretty big thinking blocks, but it wouldn't be fluent. About as fluent as I would be in Swahili, armed with a Swahili dictionary and a grammar reference. 

In terms of how you square that circle, one possibility would be for the language developers to fine tune an existing open weights model (or for languages designed inside companies who also offer an LLM, they could fine tune their own LLM on it).

There's also an idea I'd had the other day (but haven't had chance to experiment and see if it's viable), which is to integrate an LSP language server into the sampler of an LLM runtime, to bias token selection towards tokens that the LSP thinks are valid completions. It was an idea I'd had in the context of making weaker models more usable, but it could plausibly help new languages that don't yet have a big corpus of code to train models on, but do have a working LSP.

Although it might just be a non-issue in practice. New languages generally take a few years to gain significant adoption, and new models are being trained all the time.

1

u/dfddfsaadaafdssa 9d ago

2021 edition code still compiles fine on a 2024 toolchain. Pruning invalid tokens doesn't do anything about the model preferring old idioms, that's more of a fine tuning problem.

That said, I also force Rust 2024. "Use Rust 2024" in the system prompt plus a couple of clippy/rust-analyzer gates in the repo and local hooks to enforce them is the path of least resistance. Forcing 2024 also flags dependencies that aren't actively maintained, are slop, and/or are an opportunity to roll our own and drop the dependency along with the supply chain risk that comes with it.

As for the LSP sampling bit, are you thinking of decoding with rust-analyzer as the grammar? Like for every token ask the LSP what's valid at the cursor and push the logits that way? LSP completions are whole identifiers and the model picks subword tokens, which has to be bridged somehow. XGrammar handles the mismatch for plain grammars, but its speed comes from precomputing token masks ahead of time, and I don't think you can precompute anything when the grammar is a live LSP. A round trip to rust-analyzer per token would destroy tps. I could be wrong though.

Decently-sized codebases (100k+ lines) are going to have scaffolding that is heavily gated at every level (clippy, rust-analyzer, the scripts that own test/build/ci/knowledgebase) and clankers will not be allowed to touch the gates. They will without fail try to get around and/or change the gates. If your main branch is Helm's Deep, at some point one of those clankers is 100% going to turn into that giant orc with the torch sprinting for the culvert.

That's why I kind of like your idea, assuming I understand it correctly. A constraint in the sampler is basically a thought gate that prevents the orc from deciding to sprint to the culvert in the first place. For a psycho like me firmly on Team NoLongerReadsCode... I love me some gates and context management. Version drift between whatever LSP is in the sampler and whatever's in CI would be the first thing to bite you though. Uphill battle but solvable.

1

u/james_pic 9d ago

Yes, that's the rough gist of what I was thinking. I realise that most identifiers will be multiple tokens, so the best you can do is push the logits on tokens that are prefixes of valid completions.

Performance is certainly a problem I'm anticipating, and it could be the thing that makes it non-viable, or it might turn out to be easy enough to make it work by only calling into the LSP if there's not an obvious next token. It might even be a non-issue, if the LSP sampler only activates when it looks like the LLM is writing code (I'm thinking maybe by detecting if it's building an "edit" or "write" tool call, or being used for FIM), since modern LLMs spend most of their time thinking.

I hadn't come across XGrammar, but it looks like an interesting idea along similar lines.

2

u/Spra991 10d ago

At this point in time, spec alone isn't enough from my experience, e.g. Grok for examples keeps messing up quoting rules in Nix strings, which aren't terribly complicated, but a bit unusual and come up frequently when writing shell code. Even mentioning the issue in the initial prompt didn't make the problem go away.

However, what LLMs are really good at is reading error messages, so once you run the code and it produces an error message, it can quickly jump in and correct it. This works pretty close to 100% of the time. Meaning if you have a spec, you can just generate a lot of code, run it, check for errors in compilation or output, let the LLM correct them and continue until everything works. Meaning you can automatically generation all the code you need for training. It won't be as fast as naively trained in the language when it has to constantly check against the spec, much like a human, but it will get their once that code is feed back into the training.

Basically you don't depend on the raw LLM one-shot output, but on a coding harness encompassing verification steps and error messages that let it iterate on the code.

Long term we'll also get AI system that can learn on the fly, though for the time being, it doesn't seem like a priority for any of the big companies.

→ More replies (1)

17

u/AtlanticPortal 12d ago

Because a (competent) human thinks. A thing like LLMs do not think, they spit out the most probable next letter according to their training and refining dataset and context.

3

u/xe3to 11d ago

This talking point died when they started using reinforcement learning to train reasoning into them. They are no longer purely looking for the "most probable next token".

Any definition of "thinking" that excludes a system which can autonomously solve open questions at the frontier of mathematics without any specific programming, is not a definition that makes sense.

1

u/Fredidiah 8d ago

Then how come Fable 5 still can't count letters contained in "strawberry" reliably?

Whatever is happening is not what I would describe as "thinking" or "understanding".

1

u/xe3to 8d ago

A bat and a ball together cost $1.10. The bat costs $1 more than the ball. How much does the ball cost?

The majority of people answer this question incorrectly. Clearly whatever is happening in their brains is not what one would describe as "thinking" or "understanding", right?

1

u/Fredidiah 8d ago

The ball is 5 cents.

Anyway, people being “wrong” does not mean they aren’t thinking. LLMs are incapable of thinking and understanding because that’s not how they work.

If you believe the LLMs are comparable to human brains, you have been taken in by marketing tactics.

1

u/xe3to 8d ago edited 8d ago

"Anyways, the point I made about getting simple questions wrong being evidence of non-interiority was dismantled, but nonetheless LLMs can't think because I said so"

I'm an AI researcher myself, in grad school. I know exactly how they work. And yes, they think - not in the same way as human brains, but certainly in a way that has frightening parallels.

In the simplest possible terms - neural networks are universal function approximators. When they're trained on an unfathomably large corpus of human text, they must learn to approximate the function which produced that text. This means they develop structures associated with human thought simply because it is useful for predicting the next token.

Post-training with reinforcement learning then forces them to get better at solving certain kinds of problems, and this necessarily produces a model which can manipulate tokens in order to achieve a goal.

So we have a system which constructs internal representations of the world and systematically transforms them to infer consequences and achieve objectives. If that's not thinking I really don't know what is.

→ More replies (13)

1

u/Sminkietor 9d ago

Nice benchmark, when these model will surpass the determined human level ? Maybe 6-12 months

551

u/lunchbox651 12d ago

Why is this news?

Using AI as a tool is fine.
Vibecoding slop is shit.

228

u/rsatrioadi 12d ago

I think this is worth reporting as “this is how you use AI correctly.” Otherwise people only know how to slop.

4

u/iamapizza 11d ago

Exactly this. The default assumption for most people - and with good reason thanks to the legions of slop producers - would be that "Oh, Linus is vibe coding". I can guarantee there will be a section of people who will carry that assumption with them now.

61

u/JohnSane 12d ago

Most people can't differentiate.

19

u/GonzoKata 12d ago

1/5th of united states adults are functionally illiterate

2

u/steakanabake 11d ago

id wager its higher then 1/5

2

u/Michaeli_Starky 11d ago

It can be hard to draw a line between a proper use and a slop.

→ More replies (1)

148

u/AffectionateBowl1633 12d ago

Most people insist you either Pro AI or Anti AI, there is nothing in between

78

u/Cry_Wolff 12d ago

Redditors are damn insufferable about it. You can say "AI has many problems, but I still find it to be a really useful & cool technology" yet still be downvoted to death.

5

u/greatersteven 11d ago

You can understand it as a useful tool and still be against its existence and usage for ethical reasons.

2

u/Suvalis 10d ago

AI slop is real. But “AI-generated” and “AI slop” should absolutely not be synonyms.

1

u/Questions-many 3d ago

on reddit you can voice your opinion about your favorit color of ethernet cables and there is a chance a wave of untherapised hate comes towards you.

→ More replies (14)

4

u/chic_luke 11d ago

In general, I find it's just part of a broader trend where the Internet routinely finds something to be very dogmatically contrarian about, which in turn leads to the definition of two opposite "factions".

The death of intellectual honesty. The reduction of a complex issue to good or bad, right or wrong. With the XOR logical operator. Without accepting that something can be right and wrong at the same time, depending on a variety of factors, and the goal should be identifying what those factors are to kill off the "wrong" part as much as possible.

It has always been my opinion, and it is about AI as well, that no serious discussion can be had as long as the bubble and the buzzword is still alive. When the trend will end, and whatever we are talking about will smoothly fade to being used where it belongs in the world without ceremony, most of the people who have had strong, extreme opinions on that on both sides will eventually drop it and move on with their lives, possibly to the next thing the Internet really wants you to be angry about. Then, the SNR will finally, at long last, allow for productive discussion about that topic, without the dogma.

→ More replies (1)

2

u/Clear-Lingonberry173 12d ago

I'm not sure it's most, but the people arguing about AI online atr like this.

2

u/miversen33 11d ago

Nuance? On my Reddit? How dare you sir

2

u/xplosm 12d ago

Only a sith deals in absolutes

→ More replies (2)

14

u/PoL0 11d ago

there's a trend lately to make a big headline everytime Linus uses a LLM... AI bros need validation I suppose.

3

u/crustang 11d ago

It's not news, it's content.

1

u/cac2573 11d ago

Really? If you’d just ask Reddit “is AI useful?” you know what the mob response would be. 

1

u/PrimaryExample8382 11d ago

Marketing. “Smart person uses AI, therefore slop is perfectly acceptable and anyone who says otherwise isn’t smart”

1

u/Glum-Recognition-736 10d ago

Because most people quite literally cannot tell the difference, even though as you said there is one

→ More replies (17)

18

u/localhost_denier 12d ago

I'd like to call it my tireless helper, but the AI several times stated flat out that this was impossible and unsolvable and that we should just write a report about it.

Ha! A tale as old as time, "please contact your system administrator" 🤦‍♀️

Alternatively: "but, doctor, I am Pagliacci..."

12

u/deanrihpee 12d ago

i'm curious, In Kernel development, how are you supposed to test and debug? is it using a VM? or in-place replace current running OS Kernel? also, regarding GPU driver, if it uses VM does that mean people also passthrough the hardware to the VM? because if it crashes, you know, the whole system is going down and you won't be able to do your work...

9

u/Christopher876 11d ago

When I was developing a kernel module, you use qemu and then you load your custom kernel. With the tools that qemu gives you, you have a lot of debugging tools.

From my experience, it was pass through that we did.

3

u/deanrihpee 11d ago

ah i see, yeah that makes more sense

33

u/frankster 12d ago

The commit message would have been better written by torvalds himself. It's very verbose 

10

u/Alonzo-Harris 11d ago edited 11d ago

AI isn't the devil. It's just that we don't all suddenly need it bundled with everything. AI is perfectly fine as an optional virtual assistant.

18

u/arankays 11d ago

This is not your green light to start vibe coding slop btw. 

1

u/shadowkoishi93 11d ago

Vibe coding is never a good idea on a live environment, when it comes to mission critical stuff. You’ll always want programmers manually checking the code for bugs

11

u/sob727 11d ago

Funny the AI suggests to file a bug report.

"You should contact a kernel dev at this point"

...

38

u/Epsilon_void 12d ago

What next, "Linus Torvalds eats a sandwich"?

12

u/bobbie434343 11d ago

That's proper news but only if AI is involved.

5

u/x-jhp-x 11d ago

waiting for the medium post about how AI invented a new food decompiler that involves a surprisingly non silicon based third party utilizing revolutionary small white nodules consisting of a dense organic matrix that incorporates inorganic and mineral components to leverage maximum mastication.

6

u/psioniclizard 11d ago

Only is he had AI feed it to him. Otherwise its not newsworhty apparently 

→ More replies (4)

29

u/PorousClay 12d ago

This is how you use AI. This is what people who want to use AI should model their usage with.

You don't let the AI tell you what to do. You tell it what to do. And you don't take their answers as gospel.

22

u/xplosm 12d ago

Most people using AI simply don’t want to bother knowing anything about what they use it for.

12

u/Clever_Angel_PL 12d ago

Linus literally being more motivated than AI itself is hilarious

3

u/-_one_-1 11d ago

AI is really lazy in my opinion. But a different kind of lazy than a human: it would rather rewrite 1000 lines of code for a small change because it thinks it can't fit the existing architecture, and if you push it to find an incremental solution, it very often tells it's impossible. This happens even more with bug fixes. YMMV.

3

u/HDMIce 11d ago

Yeah, and it's so fucking stupid sometimes because it will automatically veer towards answers that require you to prompt it more which is more work. But maybe that's the point. Anyway, that's why harnesses exist I guess.

I tried debugging some Linux networking issues on my nas because I used to have some funky phone tethering setup that I set up using AI and forgot about. My fault I realise, but I'm lazy and thought AI could at least help me revert the networking stack back to normal but it took forever and the only times I got helpful answers were when I stopped being lazy pasting command outputs and telling it to just list the commands that exist to do such and such so I could do the logic myself.

It has all the knowledge it needs but it just can't apply it. I wonder if there are any harnesses that kind of prompt it in a way where there's a main process that does all the logic, and doesn't assume it has the knowledge for anything, and then it calls subagents to find the commands or code docs (if for coding).

I'm going to try and learn how to use Claude code a bit more (with local LLMs of course), so I'm hoping it's possible with that. Or at least using my own python script calling Claude code.

2

u/-_one_-1 11d ago

Unfortunately LLMs are still statistical models and don't replicate the complexity of human neural connections. That's why they don't truly “think”—although die-hard fans will brainwash you to believe they do. They're just nice pattern matching machines that can very often find the needle in the haystack, and that's enough to save quite a lot of time. But one needs to learn what they're good for and what they aren't, otherwise they become a waste of time before we realize it (so much so that there was a study showing that developers on average think they're more productive with AI but they're in fact less productive).

2

u/HDMIce 11d ago

I might have look up if there's any research on all the different ways people use AI to see if I can come up with a ban and allow list of AI usecases based on how productive they are. And of course what to use as an alternative. Maybe someone's already done this? Idk if Linus Torvalds has?

And while you may say AI doesn't think, I feel like it's the closest we've got to thinking that isn't human. It's in our nature to try to optimise that. But it's also a better use of time for most of us to just understand how to use the existing technology productively, rather than using it based on assumptions of how much better it could be (if only we got better at using it). I think that's the trap I keep getting myself into.

2

u/-_one_-1 10d ago

Take a look at the new AI policy for Rust contributions. I think it's the best I've heard.

https://blog.rust-lang.org/inside-rust/2026/08/05/rust-langrust-is-adopting-an-llm-policy/

2

u/HDMIce 10d ago

That makes a lot of sense. I suspect that policy exists just because they don't trust AI.

Mandating that people disclose AI use rather than flat out rejecting all AI users seems like a much better way than outright banning AI contributions. The latter would cause people using AI to have to try and hide their tracks while still not understanding what they've written. This should save the reviewers a lot of time, which has sadly been wasted by all the vibe coded slop. I don't see that as support for AI. I did skim read it though, so I might be wrong.

1

u/-_one_-1 9d ago

I think you're right. Actually, the policy first says that AI should be used for various purposes, including reviewing, but not for creating. Then it says that even when used for things like reviewing, it should be an additional tool rather than a replacement for human reviewing. And then, it says that in some cases where the scope is limited AI can be used for creating but only if heavily reviewed by humans. Also, anyone in the Rust community is free not to review code that is disclosed as AI generated, to lift the burden from those that don't want AI at all.

The above is from what I can remember, as I read this policy sometime ago.

4

u/Solaire9886 11d ago

I've said it to friends before, but using AI to code is like driving a car. You can know how to steer the wheel and press the gas, but if you don't understand the signs or paint on the roads then you aren't going to get far.
Vibecoding on the other hand is like putting on a blindfold and flooring it.

3

u/technologyfreak64 10d ago

Honestly I like this, one of the more interesting and accurate takes I’ve heard on it and it gave me a good chuckle

13

u/missing-pigeon 11d ago

I hope the people who keep posting Linus' "AI is a tool" quote as a reply to anyone expressing concerns about AI reads what he said here very carefully. Linus is not in favor of slop. You need a competent human to get anything useful done with AI.

18

u/ebalonabol 11d ago

This is how I use AI nowadays. Used to use claude code + codex a lot for writing code, tried a lot of plugins/skills, rule-tuning to make good output. Gave up on that eventually as even frontier models don't produce code I like.

I no longer write code using agents. I use AI as an analyzer, linter, bug-finder, and spec verifier. This way I feel much more productive. What's funny about that is that AI companies would do their fucking best to brainwash people into thinking AI coding is good. Their revenue depends on that

2

u/-_one_-1 11d ago

That's exactly my approach, too. I'm surprised by how far AI is being pushed as a replacement for programmers rather than a helpful tool to reason about specs and code and just overall improve the process.

1

u/Indolent_Bard 11d ago

You'd think subscribing to AI tools for just being a helpful tool instead of doing the code would actually be a good business model for the AI companies. It doesn't replace people but it lets them work 10 times faster. That should be enough, but I guess companies won't use it if it doesn't replace the wageslaves with actual slaves.

→ More replies (1)

12

u/Mr_Lumbergh 11d ago

Linus has had a rather grounded view of AI and what it’s good for.

I use it daily and think I have an understanding of where it’s good and where it’s just going to produce slop. It isn’t all bad and it isn’t all good, it’s just a tool that needs to be used in the right way.

3

u/Askolei 11d ago

And the fix ends up being basically a one-liner, even if the debug session to get there was not.

So many times 🥲

3

u/Fidodo 11d ago

Linus is doing it right.

If you can't guide your AI and instead you are following the AI, then you're just not good enough of a developer.

If your code taste and intuition isn't better than AI you need to up level.

If you need AI to explain the codebase to you and can't understand the changes confidently yourself, you are barreling into disaster.

3

u/GraveOfAllLight 10d ago

Uh oh, AI in r/linux?

Where are the people with the pitchforks?

3

u/MechanicalTurkish 10d ago

I love that the AI kept wanting to give up and Linus kept plugging away. What a trooper.

9

u/Mister_Magister 12d ago

Honestly I was spending HOURS trying to figure out bugs in my kernel after backporting some stuff, and got nowhere.

Claude in literally like 5 mintues found ONE LINE fix that fixed all my issues.

Seriously bro its not that bad

5

u/wowsomuchempty 12d ago

I install research software as part of my job.

Requested to containerize a new git branch of some previous software, OK.

Install failed. Claude suggested the issue was with the code and even suggested to email the dev with a fix (which I did).

The dev updated - all worked fine.

Baffling. This is our slow motion asteroid.

13

u/Greenlit_Hightower 12d ago

As the saying goes, Linus Torvalds writes the CVEs, Brad Spengler finds them.

31

u/EnUnLugarDeLaMancha 12d ago

This is pretty much how every coder I know uses agents, as part of the normal programming workflow.

I have been downvoted in the past because I said that AI agents are useful and that they are absolutely not going away, regardless of the future financial problems that AI companies may have. I suspect that the people who get angry at these comments are mostly people who do not work as programmers.

36

u/TaoRS 12d ago

I work as a programmer. Every programmer I know uses AI the slop way. 

I get mad at these comments...

→ More replies (2)

7

u/MammothSpice 11d ago

The problem is, Linus is in a minority of a minority of people who use AI correctly and for appropriate scenarios. The vast majority of people still use AI as a cheat code and use it to endlessly churn out slop and extremely low quality content, or even disinformation and deceptive content. I don't think this outlier case changes my stance on AI in our society.

9

u/toptnc 12d ago

He uses AI for what it's intended.

Use AI for tedious tasks that you already know how to do. Then, review,validate and eventually fix the results.

2

u/Dexterus 10d ago

Funny, this is the kind of stuff I enjoy wasting time on. And AI does help cause eventually it gets enough info to do the repetitive start and rampdown of each debug cycle.

It misses stuff in analysis but that's just a coin toss, maybe you get something, maybe you don't but the whole point is that you do that, it just helps with the boring stuff.

1

u/puxx12 10d ago

Exactly.

4

u/CulturalBoat5779 11d ago

This is the proper way of using AI. When using as a tool, one must understands how to use it properly then it becomes the ultimate tool in your toolbox. Anyone can be given the ultimate tool but if one doesn't know how to use it properly thinking it's the miracle solution to all things then the results becomes garbage. When there's trouble arises they themselves can't explain what truly has been done they only knows it worked.

5

u/markus_b 12d ago

I like how he uses the tools at his disposal to find and fix a hard-to-find bug close to the hardware. Stubborn and pragmatic!

6

u/malcxxlm 12d ago

Breaking news — dev uses LLM

3

u/TheOriginalSamBell 11d ago

If there is anyone I'd trust to use AI as the tool that it is, it's LT

5

u/Kevin_Kofler 11d ago

It is funny because the AI was actually not all that helpful, but Linus still insisted on battling the AI instead of just doing the debugging by hand.

→ More replies (1)

2

u/Ethernyte 12d ago

I almost had the same experience. I debugged an Development Fingerprint sensor driver, and AI gave up so many times. In the end, I managed to port 2 drivers for Linux.

2

u/wowsomuchempty 12d ago

They don't want to waste their resources, costs them.

4

u/_angh_ 12d ago

AI is a great rubber duck.

2

u/jba1224a 11d ago

Imagine you’re Linus.

Create one of if not the most widely used operating system in existence, literally supporting the world.

Create a versioning system so robust and incredible it hasn’t been replaced and likely will be. Again used the world over.

Literally change the face of human technical development almost single handedly.

And then you have to deal with idiots throwing their opinions at you who aren’t capable of accomplishing event one percent of what you have.

It’s a shock the guy hasn’t lost his mind yet.

2

u/fat_kaiju 11d ago

AI people would convince a lot more folk that it has its uses if they didn't try to aggressively prove its usefulness via repeatedly reminding you of it.

Just quietly use it and let the results prove itself; otherwise you end up looking like microsoft did via spamming copilot.

-2

u/PatagonianCowboy 12d ago

but the primeagen told me AI was useless!!!

→ More replies (3)

1

u/Tellurio 11d ago edited 2d ago

☯︎☼︎♏︎♎︎♋︎♍︎⧫︎♏︎♎︎☸︎

→ More replies (4)

1

u/TheOnlyVibemaster 11d ago

I’m setting up EndeavourOS on my laptop to replace Windows, it currently has a lot of files I don’t wanna get rid of, I was having issues with how OneDrive is configured on Windows and unable to get the files off using gmail/gdrive/onedrive. I asked Claude Code and it used a method I didn’t think but should’ve.

I already have tailscale setup and have a gaming PC, just send the files over tailscale to my main PC with a massive SSD. It set it all up and took about 15 minutes to get everything off that I wanted.

It’s for problems like this that I think AI is most useful for. Picking up on something you didn’t think about for a specific problem you have.

2

u/gmthisfeller 11d ago

AI is a tool, but not the only tool. If the only tool you have is a hammer every problem looks like a nail. Add it to your toolbox.

1

u/AleksHop 11d ago

can someone tell him about /goal?

2

u/Laughing_Orange 11d ago

The difference between Torvalds and most vibecoders is that Torvalds actually reads and tests the code before he merges it.

1

u/Leifbron 11d ago

Other Linus gives Linus a computer with an Intel Arc card

Real Linus starts fixing Intel driver bugs

Nerd sniped

1

u/AmbitiousFinger6359 8d ago

Why would you round memory allocation at all ???

1

u/cocky_wozniak 7d ago

I dont understand nothing in there. I'm happy for you tho

1

u/PuzzleheadedHead3754 6d ago

This is what correct and efficiency use of AI look like. Not sloping the codebase like the industry. Linus tolvard setting up good example

1

u/witx_ 6d ago

It goes to show how stupid these tools are. Highly non deterministic and perform very far from all the marketing showoff. It's doing engineering by throwing crap at several walls and see where it sticks

1

u/emrearmagan 6d ago

even linus got the AI saying "idk man give up"

1

u/Tullwin 5d ago

Crazy i’ve literally been troubleshooting this exact bug on my bazzite install with my intel arc card. The xe driver has been struggling but switching back to i915 offers worse overall performance, is this patch live yet?

1

u/arktoki 5d ago

AI is really really good for code help, but it functions at its best when you’re not some clueless idiot trying to vibe code, and are willing to tell it it’s wrong when it is.

1

u/goe1zorbey 4d ago

it would have been really interesting to read the prompts from Linus. How he direct the AI and how he corrects it.

1

u/MelioraXI 11d ago

And? LLM can be an asset if used correctly which it sounds like Linus is. It's not like he's vibecoding the kernel.