✨
@CyanNyan6
and I are officially together ✨
We're now a VTuber duo as
@TokyoHackerGrls
, spreading love, music, knowledge and positivity together.
Please help make our 3D wedding stream come true: 💫
Thank you from the bottom of our hearts!✨
#AsaCyan
But memory lookups are slow~
I raise you:
return 'A' + ((0123555555 >> (score / 10 * 3)) & 7)
No conditionals, no branches, no memory accesses, and only 32bit math!
You can't put more Type C/TB ports on the laptops, they already have as many as the SoCs can support...
The MagSafe port is "bonus", it's not replacing a potential Type C port.
I want to apologize to Apple for being amongst the many of us begging them to bring back MagSafe on the MacBook Pro.
We were wrong about that one. My bad. I never use it. You can get rid of it again and put USB-C there instead.
Whoooooops. 😂
I think people really don't appreciate just how incomplete Linux kernel API docs are, and how Rust solves the problem.
I wrote a pile of Rust abstractions for various subsystems. For practically every single one, I had to read the C source code to understand how to use its API.
🧊🧊🧊🧊🧊🧊🧊🧊
🧊🧊🧊🧊🧊🧊🧊🧊
🧊 C U B E 🧊
🧊🧊🧊🧊🧊🧊🧊🧊
🧊🧊🧊🧊🧊🧊🧊🧊
It works!!!!
It doesn't display on HDMI because something is wrong with kmsro but it works!!!! It renders!!! A spinning cube!!! From my Rust driver on Linux!!!!!!!!!
🦀✨✨✨✨✨✨✨✨✨✨🦀
✨🎊🎉IT WORKS!!!!🎉🎊✨
🦀🐧🍎🔻🧊🇼👩🔥🦊⚙️
GNOME runs!! Firefox works!! You can watch YouTube, play Neverball, run KDE apps, and more!! No crashes!!!🎉🎉
On a native Linux GPU driver for Apple M1!!🚀
Check out the mini stream where I show it off!!!
▶️
✨ KDE runs on the Apple M2!!!! ✨
With full GPU acceleration! 🚀🚀
Running Xonotic, glmark2, and eglgears at the same time!!
My 🦀 Linux kernel driver now supports the M2!! And it works out of the box with Alyssa's Mesa driver, no userspace changes needed~!!
Sooo apparently there's this myth that only Apple has "unified memory"...?
Every single modern integrated graphics system works the same way. They even share the MM code in Linux.
I just had a reply guy try to argue otherwise with me even when I told him I wrote the driver 😭
There's a lot of weird debate about whether Rust in the kernel is useful or not... in my experience, it's way more useful than I could've ever imagined!
I went from 1st render to a stable desktop that can run run games, browsers, etc. in about two days of work on my driver (!!!)
I regretfully completely understand Wedson's frustrations.
A subset of C kernel developers just seem determined to make the lives of the Rust maintainers as difficult as possible. They don't see Rust as having value and would rather it just goes away.
🚀🚀KDE runs on the M1 Ultra!!! 🚀🚀
Fully composited and accelerated Plasma desktop on the M1 Ultra!!! My kernel driver now supports the entire M1 family, and
@alyssarzg
also fixed the wobbly windows glitchiness in Mesa! ✨✨
Oh, and SuperTuxKart also works properly now!!! 🏎
I got credited by Apple for a security report!!! ✨✨
Now you know what I was doing that time I took one week off of streaming! 😊
I can't talk about the details yet, but look forward to a stream all about CVE-2022-32947 in the future! 💫
🎉🎉🎉 My Linux M1 GPU driver passes >99% of the dEQP-GLES2 compliance tests!!!!! 🎉🎉🎉
Most of this is thanks to
@alyssarzg
's prior work on macOS, but now I can replicate it on Linux! ^^
💫 M2 GPU driver dev stream! 💫
We have some wrapup to do! Let's get the M2 Pro checked and ready to go with the Rust driver! 🦀🚀
This shouldn't take long, so maybe we can do some more Rust upstreaming work too~!
🕐 July 19th at 13:00 JST / 4:00 UTC
▶️
🔺🐇🧊👩🔺🐇🧊👩
✨✨IT WORKS!!!! ✨✨
🔺🐇🧊👩🔺🐇🧊👩
I rendered myself on the M1 GPU using an open source driver, running as an eGPU over USB!!!!!!!!
Using
@AsahiLinux
's m1n1 by
@marcan42
& co. with
@alyssarzg
's mesa driver and my Python kernel driver, running
@Inochi2D
!! 🚀
Please keep in mind that this is a translation from Japanese. The English might be interpreted as "he was difficult to manage" but I don't think that's the intention. The Japanese used the word 困難, which is more like "infeasible".
We just released ✨✨fully conformant✨✨ OpenGL 4.6 support for Asahi Linux!!!! 🎉🎉🎉
Now you can run Blender, cutting-edge emulators, and lots of other stuff on Asahi!! A Valentine's Day gift for everyone~ 💖💖
💫 We got this far!!!! 💫
KDE gets to the desktop (XWayland problems), GNOME actually launches all the way (but isn't stable), and Weston works great and I can run 3D apps and
@Inochi2D
! 🎉
That's it for today, I'll get some dinner and take a look at the stability problem✨
🚀 8 hours of gaming on Linux on battery on a MacBook Air!!!! 🚀
So I unplugged the M2 MacBook Air while running Xonotic windowed at 1920x1080 in a GNOME desktop at 60FPS...
The estimated battery runtime is almost 8 hours!!!!! ✨✨✨
🧊🧊 kmscube on the M1 as an eGPU!!! 🧊🧊
Running on my Intel iMac, rendering remotely on the M1 GPU via USB!!! Mesa talking to Python talking to m1n1!!!
#LinaHacks
Today we got 24 Steam games to run on the M1 Mac Mini!!!! 🚀🚀🚀
Most of them are actually really smooth! Some of them have some glitches/slowdowns (like Source Engine games), but I'm sure we can figure it out later~! ✨✨
▶️
🚀 KDE Plasma works on the Apple M2 MAX!!! 🚀
After a 14h stream, it works!!! Running WebGL Aquarium, glmark2, and glxgears on the Apple G14C GPU!!
There are still some buffer sizing issues to work out but we're up and running! ✨✨
See you all next stream~!
✨ Collab Announcement!!! ✨
Did... did I just hack macOS??? Join me and
@CyanNyan6
to hear the story of that time I found a major security bug in macOS and got a bounty from Apple!!
🎦
🕚 September 17th at 11:00 JST / 2:00 UTC
▶️
HEY!!!!!!!!!!!
So I just tried to run Xorg and a KDE Plasma session with my driver!!!
The HDMI screen is still black and the GPU crashed, but it seemed to do a lot of stuff, so I dug out the framebuffer manually and...
IT'S ACTUALLY STARTING KDE!!!
🦀🐧🍎🔻🧊🇼👩🔥🦊⚙️
Neverball, Firefox + YouTube, and
@Inochi2D
, in a GNOME Wayland session!!!
All running at the same time, on an Apple M1 Mac Mini with my Rust Linux kernel driver and
@alyssarzg
's Mesa driver for the M1 GPU!!!
🦀🐧🍎🔻🧊🇼👩🔥🦊⚙️
▶️
✨✨✨✨IT WORKS!!! ✨✨✨✨
I got Inochi2D to run and I can render myself!!!!!
Running on an Apple M1 Mac Mini with Asahi Linux and a native GPU driver written in Rust!🦀
The FPS is low due to all the debug spam, but kmscube runs at 1000+ FPS so it should run smooth soon! 💫
I love how all the odd and error-prone C kernel coding patterns just become beautiful Rust code. ♥
Look, no `of_node_put()` anywhere!
No weird iterator macros!
No `goto err_put_foo`!
Error handling is one character!
🦀
Wait wait wait wait did I just hit 25k followers?????????????
I swear I was at like 22k two days ago!!!! What happened??????
Thank you everyone!!!!!!! ❤️❤️❤️❤️❤️
OH MY GOD it's a page size thing!!!!!
Netlink messages can be up to one page in size... and Chromium hardcodes a 4K buffer!!!
So on my 16K M1 system, the interface info gets truncated in the middle of my Ethernet interface... and that's why Chromium never sees it!!!
Rust works. I'm pretty sure I'm the only person ever to single handedly write a complex GPU kernel driver that has never had a memory safety kernel panic bug (itself) in production, running on thousands of users' systems for 1.5 years now.
Because I wrote it in Rust.
I made a post on the Rust for Linux Zulip to share my experience writing a driver in Rust, and I feel like I should share it here too! 🦀
I'm super happy with the result! I'm a Rust fan now! 😊
All the concurrency bugs just vanish with Rust! Memory gets freed when it needs to be freed! Once you learn to make Rust work with you, I feel like it guides you into writing correct code, even beyond the language's safety promises. It's seriously magic! ✨
Some stats about my M1/M2 GPU kernel driver so far:
- 15787 lines of Rust 🦀 (12166 driver, 3621 HW/FW definitions)
- 115 `unsafe` keywords
- 537 commits in the dev branch
- Available to all Asahi Linux users in the edge kernel package
- Zero oops/panic reports so far! ✨✨
✨✨KDE works!!!!!✨✨
Kwin is still a bit unstable and glitchy, but it runs with compositing and everything!! 🚀
Next up, implementing the device tree stuff so the driver can work across different machine types! 💫
The list of working Steam games is getting longer~ ✨
All running on an M2 Pro Mac Mini with Asahi Linux, krun, and FEX-Emu! 🎮
Subnautica was cool to see working!!
But I get the feeling that some Linux kernel maintainers just don't care about future code quality, or about stability or security any more. They just want to keep their C code and wish us Rust folks would go away. And that's really sad... and isn't helping make Linux better.
Honestly, I'm kind of sad about Wedson leaving RfL. He developed a huge part of the foundation that made Rust for Linux possible.
I'll still work on DRM (except sched) and driver upstreaming when the core stuff is in place, but I don't know about other subsystems.
My Rust contributions for Linux 6.4 are finally merged upstream! 🦀🐧
The ones with other names are commits from the old rust branch that I helped clean up and upstream on behalf of other people ^^
The next big challenge is going to be the DRM subsystem abstractions! 🧊
@t3dotgg
It's the HDMI, that's an internal Display port to HDMI converter hooked up to the fourth port. It has nothing to do with SD or MagSafe. SD is connected via PCI Express and MagSafe doesn't need any SoC support at all.
Seriously, there is a huuuuuuge difference between C and Rust here. The Rust hype is real! Fearless concurrency is real! And having to have a few unsafe {} blocks does not in any way negate Rust's advantages!
My story with Luna
This is a story of what I've had to live through for the past 7 months. I know it's long, but please read it. At this point
@CyanNyan6
and I just want the abuse to stop and to be left alone.
It's my birthday!!! ✨✨🎂✨✨
Sorry for not having a birthday stream, I'm still overseas dealing with some personal stuff... but I should be able to stream again soon! ^^
A modern Mac laptop uses something like 0.3W of power idle with the screen off running macOS ^^ (and SSDs don't really wear out faster when idle)
It depends on what kind of computer you have! Some computers use more than 100x that amount of power when idle.
As a former IT tech I am begging you guys to turn off your computers each night. Your hard drive WILL wear out faster, updates won’t go through like they should, and it’s also just a waste of electricity 😭😭😭
Did you know that OpenGL on Asahi Linux supports some special features of Apple's tile-based GPUs better than Apple's own OpenGL driver? ✨
On macOS if you want zero-cost custom blending you have to use Metal, but Mesa supports GL_ARM_shader_framebuffer_fetch to do it in OpenGL!
We fixed M1 Pro/Max/Ultra today!! Now everything should be ready to release OpenGL 3.3 support for all chips! ✨✨
Aaaaaaand... today was my first stream working from my M2 Max as my main workstation! Finally!! My streams are 100% running on Asahi Linux! 🚀🚀
Simply reading the function signature and associated doc comment (if any) or explicit docs (if you're lucky and they exist) almost never fully tells you how to safely use the API. Do you need to hold a lock? Does a ref counted arg transfer the ref or does it take its own ref?
My new M2 Max laptop arrived!!!!!!!! Thank you
@marcan
@treehouse
.systems!!!!
Trying to bring it up in the middle of the syncobj work would be a mess, so let's wrap that up this week and get it up and running next week~ ✨✨
I don't get why we're having a "real name" discourse over the xz-utils backdoor... the person who took over used a real-looking name!
Maybe we should worry about how this person had very little online footprint when they took over the project, not what name they used... ^^;;
Every modern streaming platform normalizes your masters to something like -14 LUFS (YouTube standard, Spotify is similar etc).
If you are mixing louder you are just throwing away dynamic range and your mix will sound weaker and lose punch. Please don't do this!
Even when I pointed out that other C drivers also triggered the same bugs because the API is just bad and unintuitive and there are many secret hidden lifetime requirements, he wouldn't budge.
One C driver works, so Rust drivers must work the same way.
To this day, bugs in the DRM scheduler have been the only causes of kernel panics triggered via my Apple GPU driver in production.
The design of that component is just bad. But because I come from the Rust world, the maintainer didn't want to listen to my suggestions.
🚀How about some Xonotic on the Apple M1? 🚀
Running natively on Linux with
@alyssarzg
's latest Mesa branch and my Rust kernel driver!! ✨✨
Oh yeah, and OBS also works nya~! 💫
GLES2 dEQP tests passing at 99.89% and GLES3 at 90.75%, including 4xMSAA support!!! 😊
When I wrote the DRM scheduler abstractions, I ran into many memory safety issues caused by bad design of the underlying C code. The lifetime requirements were undocumented and boiled down to "design your driver like amdgpu to make it work, or else".
✨✨ The M2 MAX is alive!!!! ✨✨
First frames rendered on the M2 Max with the Python test driver framework!! It took a bit more effort than expected but we got there!!! 🧊
Next Wednesday, let's get this all merged into the Linux Rust driver so we can run apps and games! 🚀🚀
When I tried to upstream the DRM abstractions last year, that all was blocked on basic support for the concept of a "Device" in Rust. Even just a stub wrapper for struct device would be enough.
That simple concept only recently finally got merged, over one year later.
My driver is not like amdgpu, it fundamentally can't work the same way. When I tried to upstream minor fixes to the C code to make the behavior more robust and the lifetime requirements sensible, the maintainer blocked it and said I should just do "what other drivers do".
My interpretation is that something happened that made continuing the contract/relationship difficult/impossible, but there is no implication that it was anyone's fault.
✨ We got a bunch of Steam games to run on Asahi Linux!!! ✨
Most of them run at a solid 60FPS and all of them are playable on my M2 Pro~ 🚀
All running on a krun microVM with FEX and full TSO support 💪
Watch the stream:
▶️
There is absolutely no way I wouldn't have run into race conditions, UAFs, memory leaks, and all kinds of badness if I'd been writing this in C.
In Rust? Just some logic bugs and some core memory management issues. Once those were fixed, the rest of the driver just worked!!
If it takes a whole year to get a concept as simple as a trivial "device" wrapper upstreamed (not any device model functionality, literally just an object wrapping a struct device so we can pass it around) then how is Rust for Linux ever going to take off?
OMG every single reply/quote is reading this backwards...
This actually fixes an abuse bug that has existed for years???? It's not bypassing your blocks, it's stopping that thing where people would block *you* and reply to you so everyone else sees it but not you...
✨Rendering on the M1 Ultra works!!!✨
It's pretty interesting! There are a bunch of new buffers that need to be allocated and it does kind of look like they might be doing something to balance work across both dies! 🚀
This is in the Python demo so far, so next time, Rust! 🦀
Making the Rust bindings safe would have required duplicating much of the functionality of the C code just to track things to uphold the lifetime requirements. It made no sense. It would have been easier to just rewrite the whole thing in Rust (I might end up doing that).
The curse got me too...
Sorry everyone, I'm going to have to cancel today's stream. I'm not feeling too terrible but my throat is a mess, so I probably shouldn't spend hours talking...
Apparently some news publication put out an article about my work saying I'm "obviously" Alyssa...
I wonder what they're going to do when we show up next week at XDC, talking at the same time? 🤔
When a callback is called are any locks held or do you need to acquire your own? What about free callbacks, are they special? What's the intended locking order? Are there special cases where some operations might take locks in some cases but not others?
I tried running glmark2 at 4K resolution on the Mac Studio, with the latest Mesa with the explicit sync patches... Final score: 4136 🚀
That makes it almost as fast as the highest score on OpenBenchmarking, a Radeon RX 6600 XT (4405)!
And we're not done optimizing yet... ^^
The TLB issue is fixed!!!! 🎉🎉🎉
It turns out... there was no issue in the driver!! It was the hypervisor breaking it!!! 😱
I didn't think that was it because macOS worked, but I guess the macOS allocation patterns are so conservative they work without TLB invalidations... 🤦♀️
All the GPU initdata logic is ported over to Rust!! 🦀
We've got floats in the device tree compiler and in the kernel, and the numbers look good!!! 🚀
Let's wrap this up on Friday!! All that's left is to change a few flags and add the new memory buffers for the M1 Ultra!!! ✨✨
I finally fixed OBS window/screen capture!!! ✨✨
It turned out not to be our driver again... it was both a KWin bug and another core Mesa bug!
And you know what that means now... ^^
After things work single-threaded in a driver as complex as this, having all the locking and threading just magically working as intended with no weird races or things stepping on top of each other is, as far as I'm concerned, completely unheard of for a driver this complex.
... and this, by the way, is what a good compiler should optimize the switch version to! At least I've definitely seen compilers do it for Boolean output ((bitmask >> index) & 1). ✨
It's alive!!! Here's the work-in-progress Apple M1 GPU kernel driver!! It's enough to bring up the firmware and share data with it!! 💫💫
Next up, GPU object management in Rust!
I have to say every Linux graphics developer I've interacted with directly so far (including major driver/subsystem maintainers) has been friendly or even super nice and accommodating! ❤️
I know ancient iGPUs had that thing for setting the GPU memory size in the BIOS, but that's aaaaaancient and completely obsolete. If you still have that, just set it to the minimum value. The rest of memory will be unified.
Apple dedicates a tiny bit of RAM secretly too!