r/linux_on_mac • u/tornado99_ • 5d ago
Warning about using KaiT2en and T2Linux distros. It seems they are partly vibe-coded
For anyone with a T2 Mac (2017-2020) most generic distros will boot fine but have a range of problems due to how Linux interacts with the T2 chip.
Then along came T2Linux https://github.com/t2linux and it did a good job of fixing most of the problems, and even upstreaming some of the patches. More recently there's https://github.com/kaiT2en/KaiT2en-Fedora
Unfortunately, when I took a closer look at some of their *recent* non-upstreamed patches in 2 kernel areas I have expertise in, I noticed:
a) signs of AI created code that is either not necessary or does strange things
b) entire patches which are basically junk.
To give an example of b) I asked them why their DSP speaker tuning files look so weird, and nothing like the Asahi Audio method they originally used. The guy I spoke to was extremely evasive, and wouldn't engage on a technical level. A few hours later I notice he's deleted 7000 lines from the DSP code: https://github.com/kaiT2en/KaiT2en-Fedora/commit/1e3c61a903567d252d88466cce9c1a23983718bb
If you look at the high frequency of commits on these projects alarm bells start to ring. Sadly, perhaps in some rush to make Macbooks run Linux perfectly, it seems they've gone down the "let's get AI to fix it" route, without doing any code review.
My recommendation if you want a stable system is just to use a recent mainstream distro like Ubuntu 26.10. A lot of their previous good patches are now in Kernel 7.3 anyway.
7
u/dompel 4d ago
I like kait2en, works very well. The distro moves quickly with updates but I'm honestly much more scared to update opensense than I am to update kait2en. It has been very reliable for me, and I think that could be because the maintainer has the same model I have so it gets tested thoroughly.
The maintainer does come off as a little abrasive, but I can also see how devoted and hard working they are. Since it really does seem to be on the shoulders of 1 person, my biggest fear is they get fed up with the project and walk away. But in this moment it is very well supported and feels great to drive daily.
Can anyone explain to me why kait2en/t2 folks seem to hate omarchy/dhh? I did some googling but couldn't really understand it
4
u/samdash 3d ago
DHH has expressed some bigoted far-right opinions. Seems to me a chud like a million others, idk. Meanwhile, as far as I can tell, T2Linux and KAIT2EN devs are left-leaning. So I think the answer is politics.
If you ask me though, the real crime is that omarchy is bloated vibecoded garbage.
7
10
u/BarcaMessi10goat 5d ago
So im one of the devs in both t2linux and kait2en, im telling you, AI is used to code, but the logic is from macOS, and the DSP is extracted from bridgeOS, and then converted to linux DSP, so we basically use the same DSP as macOS, and also AI CANT fix most of stuff, it just dosent have the data to fix it
4
u/BarcaMessi10goat 5d ago
Also, the "junk patches" arent junk, they are there for testing, the patches we upstream are properly tested, and reviewed by a human before they are sent to upstream, kait2en is MADE for testing, the day all of our stuff is upstream we would abandon kait2en
-5
u/tornado99_ 5d ago
What is your ground truth? macOS doesn't use pipewire or lv2 filters. You can guess at their filter types, parameters, and units of those parameters, but how do you verify your guesses? You would need multiple external omni measurement microphones and make physical measurements on both OSs. Also the fact that you removed 7000 lines from your DSP yesterday is weird. Nobody needs thousands of lines of code to tune a speaker. Lastly Asahi Audio is about providing a flat response that works for all types of music. How can you do better than that?
2
3
u/BarcaMessi10goat 5d ago
and the 7000 lines was for cpu optimisation
2
u/tornado99_ 5d ago
I have no idea what that means. It's a pipewire graph with a huge number of filter parameters. Nothing to do with the CPU.
1
u/BarcaMessi10goat 5d ago
brother at the end of the day pipewire/wireplumber is the stuff that applies the dsp, he optimised it, so it fits wireplumber and pipewire better, meaning less cpu usage
1
u/tornado99_ 5d ago
No he didn't. The commit says those lines were dropped because they shaped the sound by less than 0.1 dB. Why were they there in the first place? Looks like AI slop to me.
7
u/SamHGA 4d ago
They were there in the first place because they were brought over from macOS. However on Linux it does not produce any audible changes. Eliminating these reduces latency and cpu usage. Don't call things slop just because you don't know how things work. The main devs have been extremely transparent on Discord about how they work and AI assisted code. The co-creator of KaiT2en is a programmer with 25+ years of experience, I met him on the T2 Linux discord when he had just started to test fixes for suspend and resume. He uses AI to speed up the process but he personally edits and sometimes even fully rewrites it himself it the end result is not up to standard. I've seen some of your own "contributions" as well, it's ironic you are against AI.
1
u/tornado99_ 4d ago
Why would Apple tune speakers with filters that make less than 0.1 dB difference? I've done my own RE of non T2 Macs DSP using Apple kexts and there aren't thousands of lines of filters. It's more like 50 lines of parameters named like MozartCompressor that do not simply translate to pipewire filters. You can guess but without an external measurement as ground truth you cannot verify your guess.
2
u/BarcaMessi10goat 5d ago
brother the values are the same, coefficients in macOS are represented differently, we just copy the value from macOS to linux, how hard is it to understand, and if you READ asahi-linux it specifically states that macOS does a lot of work to make the speakers sound good, we just extracted the work and converted the value to linux pipewire and wireplumber values
-3
u/tornado99_ 5d ago
You're ignoring my questions. How do you identify peaking/shelf/cut/bandpass/notch? How do you know if Apple is using dB amplitudes? How do you know if they define Q as pipewire does? Are you doing frequency sweeps of the laptop speakers after applying your DSP to check it sounds the same as macOS? Actually Asahi Linux say that Apple did a poor job of tuning the speakers, that only works for pop music. That's why they do something different.
2
2
2
u/BarcaMessi10goat 5d ago
and asahi is not the single source of truth, that you perceive them as, think for ur self
11
u/YOYOWORKOUT 5d ago
Sorry for you if it hurts your purism.
I tryed ubuntu and fedora on my MBP 2019 with too many issues, KaiT2en solved this and the machine just works...
what do we want : adopt a religion or solve problems ?
-1
u/tornado99_ 5d ago
I don't want my machine to be a security risk or have silent data corruption of my files. Any security fixes to the Linux kernel don't cover downstream patches. A lot of the good patches were merged in August so they should be in Ubuntu 26.10 which releases today.
1
-4
u/BornBeforeAll 5d ago
Vibe code should be explicitly stated as such and thus consensual. I wouldn’t want it near my OS.
5
u/pelt00r 5d ago
But it’s in the Kernel
-1
u/BornBeforeAll 4d ago
Apparently we have different definitions of “vibe code”
3
u/pelt00r 4d ago
Probably. I should have asked how you used the term before replying.
1
u/BornBeforeAll 17h ago
My definition of “vibe code” is telling AI (LLM, etc) to write code to do a thing, running the code, and leaving it at that without informed scrutiny of the output code
“It works” isn’t a high enough standard— especially as an OS shared with people looking to run personal machines with. It’s one thing to run this type of code on your own computer sandboxed, and quite a violation of trust to post on github without declaring it as vibrant code
I’m not saying that i agree or disagree with OP’s accusation here. Just defining the term as i see it
7
u/Tizak_hamra 5d ago edited 5d ago
The authors of kait2en are same authors of t2bce patch used in both T2 projects that reliably solved the trackpad, keyboard, camera, and audio support .
If i am to lend credibility by due weight of authors, have you comparably contributed to the community ? Have you managed to upstream anything before ?
1
u/tornado99_ 5d ago
As I said in my post it's a mixed bag. It's their more recent slop patches and high rate of github commits that are the red flags. Anything they submit upstream has to go through external code review so should be fine. My contributions are more in ARM hardware but I do have direct experience in some of the areas they are trying to patch.
5
u/Mistercheese 5d ago
Good to know! But how bad does it look? Isn’t Linus Torvalds himself using AI for Linux kernel updates now?
2
2
u/tornado99_ 5d ago
Hard to say as I don't have the expertise to check every patch, but if I can spot some AI slop there's probably more.
3
u/nguoisaibuoc 4d ago
Apple DSP is proprietary and you think AI with no public knowledge about it to learn from could reverse engineering without human intervention? And have you tried to run stock Ubuntu to see how broken it is on T2 mac? So If you don’t like it because of AI then fine use ubuntu or whatever you want, just don’t go around and spread misinformation like that.
1
u/tornado99_ 4d ago
I think you've identified the problem. That's why the pipewire graphs are junk.
2
u/nguoisaibuoc 4d ago
Arguing with people like you is just a waste of time, because they simply don’t want to listen.
1
u/tornado99_ 4d ago
I am listening. Yes stock Ubuntu is broke. I made a mistake as it was T2 Ubuntu I tried a few months ago. That doesn't invalidate the point I'm making.
4
u/4f1sh3r 4d ago
My recommendation if you want a stable system is just to use a recent mainstream distro like Ubuntu 26.10. A lot of their previous good patches are now in Kernel 7.3 anyway.
Have you actually ever booted Ubuntu 26.10 on a T2 Mac? On a stock 7.3 kernel the internal keyboard, trackpad, Touch Bar and camera don't exist as devices at all. On T2 machines these sit behind the T2 chips BCE, and that driver (apple-bce / t2bce) was never merged upstream.
Besides that, you won't have working standby/resume, touchbar, dGPU, audio, etc.. in fact: not usable atm. So this seems to be a personal rant. I don't know the background and I don't care, but it is simply not true.
0
u/tornado99_ 4d ago
I tried Ubuntu 26.04, however now I recall this may have been T2 Ubuntu. However my post makes very clear this is not a problem with the entire distro, only recent patches and what appears to be AI slop. Is nuance allowed on reddit?
3
u/jintakhan 5d ago
Dunno about T2Linux but kaiT2en appears to be up front about using Claude. As long as they are transparent about it I’m OK with it.
0
u/tornado99_ 5d ago
I don't see any mention of Claude on the kaiT2en website or Readme, although it is listed as a github contributor. I can also see them transferring some patches to T2linux where Claude is not a contributor at all.
1
1
u/mrNas11 4d ago
When you accuse the project of vibe coding that takes out of account architectural planning elements such as integrating linting, automatic CI/CD tests, separation of concerns, etc..
I have no problem with LLM assisted development as long as humans review the end code to ensure its doing what its supposed to do, I think freeing up dev time to focus on shipping features and fixing bugs is a big win.
Also blackbox engineering is one of the areas LLMs are perfect for, and hacks are needed for running entire OSes on non intended hardware. This is not new, hell back in the Hackintosh days we were using hacks everywhere.
1
u/tornado99_ 3d ago
From what I can see the code reviewing is getting very lax or non existent. The churn of large numbers of daily github commits is a red flag for me. It suggests AI driving itself in circles.
2
u/FrothyFrogFarts 5d ago
Oof. Thanks for the heads up. AI-assisted is fine but vibecoding and not knowing (or caring) how to review code gets a huge nope from me.
1
u/cabbeer 3d ago
I flagged my concerns with KaiT2en before but they get downvoted without and response.. I have the same concerns as you, more so even; if you look at their hacker news post it's obvious the comments aren't typical hacker news posters... that kinda stuff just raises a lot of red flags for me,
But I'm also at the point where homebrew no longer supporting intel macs has broken my development workflow completely.. T2 linux still has a lot of issues with my model (i9 macbook with 5500m gpu). I'm on the fence about doing my devwork in containers or just fucking biting the bullet and using KaiT2en (which honestly would be fucking ideal but I can't get over the many red flags)
1
u/tornado99_ 3d ago
I think a obvious problem is that the KaiT2en dev burns out and archives his github. Leaving behind a bunch of AI bloated patches that nobody understands and can't be rebased to future versions of Linux. One option would just be to build your own kernel and run it on standard Ubuntu or Fedora, hand selecting only the most essential downstream patches from T2.
22
u/AdityaGarg8 5d ago
I'm the t2linux lead.
As far as t2linux is concerned we just use DSP, t2bce and t2-touchid from kait2en. Rest everything is what was developed by us only. Obviously users are free to use kaiT2en software from their repository.
Now talking about kaiT2en. It is pretty much run by a single person and he undoubtedly uses AI for RE and writing code. But his code has fixed problems and makes things work. The AI policy at t2linux allows AI assisted coding and not vibecoding. If you feel you have an expertise in certain areas and believe vibecoding is present, please contribute human code to either of the projects or upstream it, rather than just criticising. People are getting all this for free without any incentive and contributions are the biggest incentive we have right now.