fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

I wonder how people normally deal with screen brightness on . I assume not *everyone* writes their own small utility in C for it, though that is an appropriately UNIX way of doing things.

Looking at github.com/NetBSD/src/commits/, I guess this audio driver hasn't really seen any development since it was added, so it's not really surprising if it doesn't support some things.

The Linux driver has jack detection code that reports to kernel.org/doc/html//v5.14/sou, reading from `ES8316_GPIO_FLAG`. Not sure exactly how it's handled on NetBSD, but the NetBSD HD Audio driver does look like it has jack detection code.

Automatic conversion of the NetBSD src CVS module, use with care. Please submit bugs/changes via https://gnats.netbsd.org - Blaming src/usr.bin/elf2ecoff/elf2ecoff.c at 2b5e6f7589a202f2a078fe1e869e...
GitHubBlaming src/usr.bin/elf2ecoff/elf2ecoff.c at 2b5e6f7589a202f2a078fe1e869e06fe80b1758e · NetBSD/srcAutomatic conversion of the NetBSD src CVS module, use with care. Please submit bugs/changes via https://gnats.netbsd.org - Blaming src/usr.bin/elf2ecoff/elf2ecoff.c at 2b5e6f7589a202f2a078fe1e869e...

@ids1024 using the brightness keys on your keyboard is the real unix way. Do not reinvent the wheel.

@extrowerk Typically you need to bind the brightness keys for them to do anything. Of course, a full-featuted desktop enviornment has something that does that by default (if it works on NetBSD).

@ids1024 i installed NetBSD onto a pinebook pro by booting from an SD card and then copying the data to the eMMC. i had the same problem you did -- no matter whether i chose eMMC or SD from tow-boot it seemed random which disk would get booted.

what i figured out was that the eMMC and the SD were using the same name for their disklables, and the netbsd bootloader seemed to be using that name when looking for the disk to boot. when i made sure to use a non-default disklabel name in the installer the non-determinism seemed to disappear.

thanks for this write-up. i didn't really investigate the screen brightness so it's useful to see your code. the big feature i'd like to have is some kind of suspend (but given how fast the system boots it's still usable as-is)

@d6 I thought that might be the disk label, though I couldn't figure out exactly how it decided which boot drive to default to.

I guess I forgot to check the UEFI system partition. `/boot/cmdline.txt` has `root=NAME=netbsd-root console=fb`. So yeah, I guess it boots whatever drive it enumerates first with that label.

@ids1024 right, exactly. i forgot that i had looked there but that was what gave me the idea to try changing it.