Note to self: speakersafetyd ALSA mixer interlock design:
- Volume unlock is built on the mixer control exclusive lock feature (need to add an ALSA core callback to the kctl to implement this). - DVC volumes are initially capped at a safe volume known to be safe for the speakers for all possible audio signals (set kernel-side). - There is a special global watchdog/unlock control (takes an integer timestamp) - speakersafetyd must first lock the watchdog control and write the current timestamp (CLOCK_MONOTONIC) to it. - It can then lock the volume controls. This fails if the watchdog control is not locked or not up to date. - When a volume control is locked by the same PID as the timestamp control and the timestamp is up to date, it removes its volume cap. - The timestamp must be refreshed at least once per second while the playback PCM stream is active (== the feedback PCM stream is receiving samples). It is allowed to remain unupdated while the PCM is inactive (volumes remain set, but time since last update is cumulative while PCM runs, PCM becoming active does not reset the timeout). - If at any point the watchdog expires or the unlock control lock is dropped (indicating the daemon died), all volumes are again reset and capped to a safe level. - If an individual volume control lock is dropped, that individual control goes back to safe mode (only).
Note to self: speakersafetyd ALSA mixer interlock design:
- Volume unlock is built on the mixer control exclusive lock feature (need to add an ALSA core callback to the kctl to implement this). - DVC volumes are initially capped at a safe volume known to be safe for the speakers for all possible audio signals (set kernel-side). - There is a special global watchdog/unlock control (takes an integer timestamp) - speakersafetyd must first lock the watchdog control and write the current timestamp (CLOCK_MONOTONIC) to it.
There's this particular brand of online abuse I see, where *seemingly* unrelated people all have one very specific, very unique, and very obvious tell that they all are either the same person or from the same small group of people.
Honestly, I have to wonder just how much abuse is actually concentrated in a few small groups of terminally online people who make it their pastime to create random sockpuppets and continuously attack the same person. The Fediverse has also made this pretty clear: I see many abusers of a given slant all end up on the same bad instances (or random one-off instances for the techie type who set up their own).
If you are or have been the target of this brand of abuse, with similar takes coming from a bunch of seemingly unrelated accounts, remember that. There's a good chance it's all the same 2 people, or the same small group chat of haters, whose heads you live in rent-free to the point they spend their time creating alts instead of doing something productive with their lives.
There's this particular brand of online abuse I see, where *seemingly* unrelated people all have one very specific, very unique, and very obvious tell that they all are either the same person or from the same small group of people.
Honestly, I have to wonder just how much abuse is actually concentrated in a few small groups of terminally online people who make it their pastime to create random sockpuppets and continuously attack the same person. The Fediverse has also made this pretty clear: I see...
@marcan Huh. Maybe ChatGPT could be useful after all. If we just had a sock-puppet-detecting bot that engaged them with an LLM, it could keep them too busy fighting shadows to hurt real people.
...I'm the eighth person to come up with this idea today, aren't I?
@marcan yeah. I've had a few of those. Different people write with different styles and reiterate the same ideas and for lack of a better term aura.
For example, I tend to be very very verbose. I also have a hint of professionalish grammar. I'm trying to get rid of both of these traits for social media, but it's hard since I've been doing it for so long
I think I never told this story here... how I fixed a server with a very precisely placed piece of tape.
So at Euskal Encounter we got shiny new servers a few years back, and they worked great except one of them developed a peculiar problem. It would not shut down.
When told to shut down, it would either hang, or boot back up, or power back up but then fail to boot. This was a problem, because we normally relied on servers shutting down and staying down during our shutdown procedure. Having to have someone babysitting the machine to yank the power is not great. Plus it meant that if we ever got into that state, we couldn't fix it remotely (and some events are run remotely). Once the problem happened, no amount of shutdown/power up/reboot commands to the BMC would fix it (eventually it would start logging power control errors).
So we pulled the server out after an event, and sent it for RMA. It came back saying the techs couldn't reproduce the problem. And indeed, we powered it up on the bench, and it seemed fine.
Stuck it back in the rack at the next event, and it stopped working again.
At this point I was thinking this must be some kind of electrical issue caused by mechanical stress, so we tore it apart and jiggled all the cables and made sure all the connections were tight.
No dice.
This whole thing took several years, since we could only really work on the machine during events (and I kind of live halfway across the world). It just kept on limping on with that bug since we couldn't find time to dive deep into the issue.
At one point I started thinking... What's the difference between the server being in the rack and not? That all the cables are plugged in, particularly USB and Ethernet cables.
Could it be Wake-on-LAN? So I checked the WoL settings, but it was indeed switched off on all the Ethernet interfaces. And besides, we had two identical servers and only one had the issue. I sniffed the network looking for stuff that might pass as a WoL magic packet, but came up empty.
Still, I couldn't find another explanation, so I did the logical test. Unplugged the Ethernet cables, and tested it. It worked fine. Plugged the cables in. The problem reappeared.
Oooookay.
In particular, it was the 4 cables connected to the add-on PCIe network card.
So I swapped the cards on both servers and guess which other server started having buggy shutdowns!
Just in case, I tried upgrading the firmware on the card, but that didn't help.
At this point I'm starting to think about RMAing the card, but that would take time and it'd be hard to explain what the problem is. Buying another card would be an extra expense, and cause us to have different configurations on both servers (which is less desirable).
And then I thought... I'm never going to use this feature, ever. These are servers with BMCs, we can turn them on over IPMI. So this Ethernet card is sending broken/random wake signals to the PCIe slot when it has an Ethernet link? Okay.
I asked for some tape and scissors, pulled the server out again, took the card out, carefully cut out a small sliver of tape, and placed it over the WAKE# pin on the PCIe edge connector. Put it all back together and tested it again.
Problem fixed.
I think I never told this story here... how I fixed a server with a very precisely placed piece of tape.
So at Euskal Encounter we got shiny new servers a few years back, and they worked great except one of them developed a peculiar problem. It would not shut down.
When told to shut down, it would either hang, or boot back up, or power back up but then fail to boot. This was a problem, because we normally relied on servers shutting down and staying down during our shutdown procedure. Having to have...
@marcan I had to mask out the SMBus pins on an older 4-port card so that I could use it in a more recent thin-client that I'm using as a firewall. Otherwise the machine gave a memory error during POST.
I just realized that one of the things that bugs me is people equating stereotypical Linux problems on Asahi with other platforms, because it's not the same, because we actually care.
Suspend not working, audio not working, display tearing issues, power management being bad... all those things are Linux on $random_platform support memes. And they're memes because they never get fixed, because nobody cares. Acer isn't fixing their ACPI to make suspend not break for you. Nobody is spending time getting your speakers on your OEM laptop sounding good. Intel sure aren't fixing their Linux drivers to not tear on my Ivy Bridge laptop. And good luck getting anyone to even think about debugging why your NVMe drive stays warm in suspend and kills battery life.
Yes, you're going to run into similar things in Asahi today, but the difference is we care. And we're going to fix them. And since we control all the drivers and the pre-Linux bootloaders and everything is open source and we know things can be made to work at least as well as macOS, we can fix them.
I just realized that one of the things that bugs me is people equating stereotypical Linux problems on Asahi with other platforms, because it's not the same, because we actually care.
Suspend not working, audio not working, display tearing issues, power management being bad... all those things are Linux on $random_platform support memes. And they're memes because they never get fixed, because nobody cares. Acer isn't fixing their ACPI to make suspend not break for you. Nobody is spending time getting...
@marcan I have never had any of these issues with Linux, although in saying that I acknowledge that I have exclusively used Linux on my framework laptop and my Valve Steam deck and whenever I use peripherals I make sure to use ones that are made for Mac or Chrome OS or are well known / advertised for their Linux support
If you have a problem with trans people at all, please unfollow and go live in a deserted island, because modern computing and electronics wouldn't exist without them.
@marcan I have a problem with the 'because" 🥴 It sounds like you shouldn't have a problem with trans people because of their contribution. Were I belive (and I guess you too) that you shouldn't have a problem with trans people. #TransRightsAreHumanRights
@marcan There's a long list of famous entries on this list. Of the top of my head: Lynn Conway (extremely influential work on VLSI) and Sophie Wilson (creator of the Arm ISA).
For those wondering why the hell we need all this safety system stuff for the speakers: because the speakers sound nice and loud and crisp, but only if you drive them well past the max "always safe" volume level. With current kernel settings, that level is at -14dBFS on the 14" M1 Pro MBP. That means that while your system will work without speakersafetyd (once this is all tested and enabled), the speakers will be much quieter.
This is especially true for the tweeters. You can hear that in the stream where I played I Won The Loudness War: during the dubstep parts of the song, the snares sound nice and crisp. At those points, the tweeters are probably putting out 2-4x the amount of power they could handle without melting - briefly. But then when the nasty clipped lead comes in, that overloads them a lot more and the safety daemon clamps down on the tweeter volume. After that part, you can hear them recover over a few seconds and the snares gradually come back.
Most music does not have ridiculous clipped leads like that song, but it very often does have loud snares and cymbals, and other high-frequency transients. Additionally, the tweeters are high-passed in hardware at 800 Hz, and most music does not have that much energy in the high end to begin with relative to the bass, but could. So if you want to set the overall max volume to a safe level, you have to assume the input is a 4000 Hz square wave or something ridiculous like that. And that's how you get that -14dBFS "dumb" level limit, which makes the speakers sound a lot quieter and worse, even though the vast majority of music played at 100% would never come close to needing that much reduction to be safe.
With a dynamic temperature/power limit model for the speakers, you can squeeze out a lot more of that headroom and still remain safe. And that gives you nice and punchy music without requiring harsh limiters or low volume caps to keep the speakers from melting.
And this is one reason why Mac speakers sound better and louder than most. Because most manufacturers don't bother to do this.
For those wondering why the hell we need all this safety system stuff for the speakers: because the speakers sound nice and loud and crisp, but only if you drive them well past the max "always safe" volume level. With current kernel settings, that level is at -14dBFS on the 14" M1 Pro MBP. That means that while your system will work without speakersafetyd (once this is all tested and enabled), the speakers will be much quieter.
This post brought to you by gdb and grep -a, because after typing all that out as a quote toot and deciding that nah, I wanted it standalone, I clicked the "x" next to the quote box (which implies removing the quote association) and that didn't just cancel the quote, it deleted all the text.
So I attached gdb to the Firefox content process hosting this tab, took a core dump, and grepped it for the lost text. I wasn't about to write all that again from scratch.
LRT: I think this really illustrates just how dumb present AI systems are. They aren't reasoning or "thinking"; what they're doing is just learning to imitate the behavior they're trained on. They can produce outputs that look novel, but in the end it all boils down to a combination of the inputs they were trained on.
Effectively, AIs like Stable Diffusion and ChatGPT know how to extrapolate and interpolate from their training data. Sure, it looks cool, and it feels intelligent because they're riffing off of a corpus of material produced by actually intelligent humans. But give them a problem they haven't seen before, or for which the obvious "extrapolated" solution is just hilariously and obviously wrong, and they'll show you just how dumb they are. They also have no concept of logic or facts, so there is no expectation of accuracy - an AI won't tell you it doesn't know how to do something, it'll just make up some BS.
Another way to put it is that AI models are just fancy generalized (very) lossily compressed versions of their training inputs. Think about that next time the copyright implications of AI come up again.
LRT: I think this really illustrates just how dumb present AI systems are. They aren't reasoning or "thinking"; what they're doing is just learning to imitate the behavior they're trained on. They can produce outputs that look novel, but in the end it all boils down to a combination of the inputs they were trained on.
> They aren't reasoning or "thinking"; what they're doing is just learning to imitate the behavior they're trained on. They can produce outputs that look novel, but in the end it all boils down to a combination of the inputs they were trained on
I am feeling extremely seen by this post. Sorry, I will just quietly retreat into my corner.
Hi (some) kernel folks: please stop trying to convince me (and the rest of the world) that email patches are better.
They aren't, and the rest of the world knows that already. We're tired, and countless people have been driven away from contributing thanks to this utterly broken process.
Before you manage to drive *me* and all my contributors away, I *will* start pushing alternate mechanisms for trees I am involved with. If you don't like it, tough luck. Complain to Linus, and make sure he knows if he kicks me out his shiny M2 MacBook no longer gets upstream support.
Hi (some) kernel folks: please stop trying to convince me (and the rest of the world) that email patches are better.
They aren't, and the rest of the world knows that already. We're tired, and countless people have been driven away from contributing thanks to this utterly broken process.
Before you manage to drive *me* and all my contributors away, I *will* start pushing alternate mechanisms for trees I am involved with. If you don't like it, tough luck. Complain to Linus, and make sure he knows...
@marcan 'Complain to Linus, and make sure he knows if he kicks me out his shiny M2 MacBook no longer gets upstream support.' is just toxic dude. I really wish you would stop with that kind of thing, my whole criticism of you before was that you use your social media presence to effectively attack kernel maintainers I thought maybe I was wrong. But you know, maybe I was right first time.
@marcan Seriously, Review Board is as old as the hills (and came out of a solid company email review culture during our early days at VMware! you can probably still interact with it using email!) and was a dramatic improvement over a pure email process.
Did you know Asahi Linux is introducing support for some brand new Apple Silicon features faster than macOS?
The M1 has a virtual GIC interrupt controller for enhanced virtualization performance. Linux supports it, macOS does not.The M2 introduced Nested Virtualization support. The patches for supporting that on Linux are in review; macOS still doesn't support it.The M2 introduced BTI, a hardware security mitigation. Fedora Asahi ships with it enabled, macOS does not. I'm also going to be working on adding that to Apple's WebKit/JavaScriptCore soon, because it's still missing (which breaks it on Fedora).
Did you know Asahi Linux is introducing support for some brand new Apple Silicon features faster than macOS?
The M1 has a virtual GIC interrupt controller for enhanced virtualization performance. Linux supports it, macOS does not.The M2 introduced Nested Virtualization support. The patches for supporting that on Linux are in review; macOS still doesn't support it.The M2 introduced BTI, a hardware security mitigation. Fedora Asahi ships with it enabled, macOS does not. I'm also going to be working...
Reminder that if you ever see "media engine" on a die map, that person has no idea what they're doing 😂 ("Media engine" is a marketing term and not an actual single hardware thing)
"We are not political, fuck politics, Nazis are welcome"
Is this really the kind of community you want to foster for DLang, @WalterBright? Because what you're doing is not how you get an apolitical community, it's how you get a cesspool of highly political bigots and Nazis.
Time and time again this whole "no politics, we only care about the code" attitude is just a screaming dog whistle for bigots, Nazis, and abusers. This guy just said it out loud.
If you think it isn't and you haven't figured it out yet, you are not fit to lead a community.
@marcan I think it's simpler if you look at politics as the art of getting people with possibly big differences to work together in a project or a society or country or the world. more people means more politics, but it's never zero when your past the tribal cohesion limit
"no politics" is just "my politics" since that's the only way to avoid talking about the implied politics. which means "people like me, and not people unlike me" which simply is fascism
I know how to wrap it up and get it upstream, but the only reason I have the energy left to do this is rmk already dealt with the bulk of the pain, and I happen to have more experience than him with the issue that was the final straw for his attempt.