Top
Best
New

Posted by guybedo 6 hours ago

Frame – Linux X server in Assembly(isene.org)
112 points | 66 commentspage 2
fhn 3 hours ago|
Was browsing some of the other rust projects(https://isene.org/fe2o3/#tools) and https://github.com/isene/torii says "Mozilla removed Firefox's "Open network login page" banner". I'm on windows and still see the banner so don't know if this is true. Is the really true on Linux?
spikk 3 hours ago||
I wonder if very cheap code generation will make software monocultures less relevant here. Because lots of incompatible devices is awful to work with, security stuff may also hurt
pjmlp 3 hours ago||
Up voting as it kind of makes the point I believe in, regarding how this AI powered tooling eventually will land on.

COBOL and 4 GL dreams coming into reality.

shevy-java 3 hours ago||
> The underlying graphics engine, the thing that puts pixels on the screen. X11 is 4 million lines of code, a beast very few can claim they understand.

Working on it:

https://github.com/X11Libre/xserver

And they also deleted old code too. A lot of the old code could probably be removed, but is it really that relevant whether you have 4 millions line of code or 2 million lines of code? C is in my opinion too overbose. Rust is even worse. Which language would yield fewer lines of code without speed penalty? C is king largely because of the speed gains. We don't see people use python for an xserver.

casey2 2 hours ago||
>I wrote

AI wrote*

mintflow 5 hours ago||
this is impressive, even with claude i think the guy have enough deep understanding of the OS and the varioius topic make it works

recently i also rewrite most of the app's underlying core function to rust, just like the guy do for the phone

perhaps i should also do more stuffs given codex reset too quickly

elendilm 3 hours ago||
<I am not sure this laptop has a fan anymore. Except me.>

I wish mine had no fan too except me.

kosolam 2 hours ago||
״I am not sure this laptop has a fan anymore. Except me״ huh nice one
system7rocks 5 hours ago||
Interesting.

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?

dapperdrake 3 hours ago||
Kernel option nohz_full in grub config.

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.

cogman10 4 hours ago|||
The really unfortunate thing about linux is the defaults tend to be not battery friendly.

For example, I recently got another 1 hour out of my old laptop's battery because I didn't realize for the intel video card driver I needed to add some modprobe flags to get it to load up a firmware binary blob. Doing that enabled hardware video decoding, faster performance, and lower power usage.

There's a bunch of setting like this that you need to make sure are turned on to get the best battery performance. Some OSes are better about toggling them than others and mine (gentoo) let's you discover later that you forgot to turn them on :).

tcmart14 3 hours ago|||
This is where looking at the gaming centric distros and doing what they do makes sense. I haven't seen all kernel settings for all distros, but my understanding is many choose the defaults and most of the defaults are more optimized for server usage. Which makes sense. Debian's biggest deployment environment is a fleet of servers. For the standard Debian Install, of course. However, my laptop is not a server, so the defaults don't make sense. This is where we maybe need distros that their whole niche is to be laptop friendly. Or, get the bigger distros, to offer a flavor with a different set of defaults for laptop environments.
inigyou 3 hours ago||||
I have a laptop where you need to load a certain driver to turn off the discrete GPU, which triples the idle battery life.
cogman10 3 hours ago||
Yeah, I have this problem. IIRC the last time I looked into it, it requires a specific version of the nVidia driver which isn't the latest version (very unfortunately). I just bit the bullet and went with the 5W of constant consumption rather than figure out how to get that old driver working with my setup.
fhn 3 hours ago||||
That's really sad to hear. I think it's just so much to configure for any human to take on. I'm going to run my system config through an LLM and have it optimize it for me see if that works.
exe34 3 hours ago|||
Hey could you tell me about this flag please? I have an intel gpu and might need it too!
cogman10 3 hours ago||
It's the GuC and HuC firmware.

https://wiki.gentoo.org/wiki/Intel#GuC.2FHuC_firmware

exe34 3 hours ago||
Thanks! Aha this is for gen 9ish onwards, my GPU is gen 3.
lproven 2 hours ago||
Exactly -- not sure I have many machines new enough for this to apply to.

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.

c0balt 4 hours ago||
You might want to take a look at TLP[0]. It, among other things, backs the power mode/profile panels in Gnome/KDE.

Many distros already try to push good defaults, but you can do a whole lot when optimizing for a mobile experience. You can also do some fun stuff with it, like running a script[1] when going from ac->bat power to, e.g., turn of a service, lower refresh rate or reduce brightness.

[0]: https://linrunner.de/tlp/index.html [1]: https://linrunner.de/tlp/usage/run-on.html#run-on-ac-run-on-...

out-of-ideas 3 hours ago|
can it run Doom?
More comments...