Frame – Linux X server in Assembly
41–50 of 115 posts
Re: Frame – Linux X server in Assembly
#42Interesting. I've never quite found that Linux is more optimized on battery-powered machines for energy savings, even though supposedly there is a lot of room to tweak and optimize settings -- from selecting a low resource window manager/DE to turning off various services to switching up power management utilities. But this does seem like an approach that might produce that kind of fruit?
Also disable hardware SMT as a kernel option in grub config. Then the cores can clock down way more often and L1 data cache size doubles.
XFCE and X11 tripled my laptop battery life vs. whatever Wayland+GNOME Ubuntu (2024?) brought by itself.
Powertop and tlp also help.
Happy camping.
EDIT: the lower heat dissipation also halved boot time. That one surpised me the most.
EDIT2: Disable "atime" with ext4 option "noatime". Saves a lot of power, heat, trimming, and re-writes on your SSD/NVMe.
For "faster shutdowns" manually run systemctl start fstrim.service. Not exactly sure why fstrim.timer seems unreliable.
Re: Frame – Linux X server in Assembly
#43Re: Frame – Linux X server in Assembly
#44Earlier quoted context omitted.
Claude has surprisingly good knowledge of X11 protocol. The other day, colleague showed me a (pretty basic) terminal emulator written in one-shot by Opus. Kicker is - that was compiled to a 30 KB static binary. That's right. No libX11, no libXfont, not even libc.
No libc? It used inline assembly routines?
Re: Frame – Linux X server in Assembly
#45It's funny to see someone using a LLM as a compiler, making it convert higher-level operations into assembly, instead of just using a compiler.
Re: Frame – Linux X server in Assembly
#46I would like to see a similar project that fixes Wayland. Like, can someone vibe-code window positioning, add SSD to GNOME (damage was already done, but still), and add the ability to send events so you can automate and drive the app offscreen for testing.
So you can't really "fix it", short of patching e. g. Gnome's compositor, with patches that will never be accepted upstream.
Re: Frame – Linux X server in Assembly
#47It's funny to see someone using a LLM as a compiler, making it convert higher-level operations into assembly, instead of just using a compiler.
There is evidence that LLMs are capable of making assembly that runs a great deal more efficiently than the compiler can manage on its own.
I've had all my side projects being written in x64 for the last 6 months and it is shockingly effective.
Re: Frame – Linux X server in Assembly
#48When first looking at the source code, I wondered why one would waste so much time to write 25k lines in raw assembly language, but then I saw that it was generated with Claude, for whom it does not matter much how expanded is the written text. If someone had written this program manually, the strategy would have been very different. With a good macro-assembler (and nasm is good enough) one should define a great numb…
On a long enough time frame with enough tokens invested there’s probably not a difference, but being written in assembly by an LLM doesn’t imply optimal to me. I’d almost prefer having an LLM rely on higher level abstractions offered by a programming language rather than rolling everything itself. After reviewing a lot of LLM code, even at Fable and Sol levels, I just don’t trust that LLMs are writing optimal code. Assembly makes it harder to even review.
I do it find it very fun and entertaining. This is a component and I’m grateful that it was shared.
Re: Frame – Linux X server in Assembly
#49Earlier quoted context omitted.
It's the GuC and HuC firmware. https://wiki.gentoo.org/wiki/Intel#GuC.2FHuC_firmware
Thanks! Aha this is for gen 9ish onwards, my GPU is gen 3.
The machine I'm typing on is the 2nd newest in the fleet -- it's a work box -- and it's an i7-8550U, an 8th gen "Kaby Lake" chip.
Re: Frame – Linux X server in Assembly
#50It's funny to see someone using a LLM as a compiler, making it convert higher-level operations into assembly, instead of just using a compiler.
There is evidence that LLMs are capable of making assembly that runs a great deal more efficiently than the compiler can manage on its own.