Pinned toot

I prefer both my hardware and my software to be user-serviceable.

Pinned toot

I would like to remind everyone that if I follow someone or boost their post, that does not mean I think they are a good person. It means I find their posts interesting, and that is it.

ENOMEM? In my program? It's more likely than you think.

Apparently Lua is capable of emitting 35K of debug output even when I try to kill it immediately.

./script.lua | tee script.out &; killall lua

I'm having fun playing with sysfs on my new laptop. Keyboard backlight colors! Screen brightness! Turning on the airplane mode LED! A mysterious "phy0-led"! DMI data! Thermal stuff! Trying to disable the graphics card and getting EBUSY!

@alexbuzzbee Oh, this is intel_backlight? There's hysteresis going on there, too; I think it uses the numbers as vague suggestions rather than any actual scale, and only changes when there's a significant enough difference between current and future backlight.

@alexbuzzbee -.(o.o).-

Probably a bit of both. There's one driver for many chips, and the hardware's designed for the Windows® backlight scale (0–100, where 0 is about a tenth as bright as 100); the interactions between them (and, likely, the driver having been written for a completely different chip's undocumented behaviour that just-so-happens to mostly-work on the current generation) would be my guess.

Apparently 1/60000 brightness is perfectly visible? Great numbers there Intel.

And the fans even run at appropriate speeds without a user-space daemon controlling them.

Show thread

Hey guess what. I can close the lid on my new* laptop and it goes to sleep and then it wakes up when I open it. It doesn't even crash horribly afterwards.

* 10-month old but just now being actually used

Yeah thanks GRUB, call the USB removable disk hd0. That's not gonna cause any problems.

It has to be compiled because setuid is ignored on interpreter scripts, which is sensible.

Show thread

I just wrote, compiled, and installed in /usr/local/bin a setuid program to set my screen brightness.

Ever do that thing where you code for a long time without committing and then you have to untangle the changes and pick it apart into a couple dozen commits?

If I open /dev/tty (which I believe is the controlling terminal) instead of using standard out, it's a different error:

mmap: Permission denied

Which the man page says may happen if "A file descriptor refers to a non-regular file."

Show thread

What happens if you mmap a tty I'm too sleepy to get up and try it but not too sleepy to type this I'll try it in the morning and let you know.

Show more

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.