[HN Gopher] Native Linux GPU Driver for Apple M1
___________________________________________________________________
Native Linux GPU Driver for Apple M1
Author : yewenjie
Score : 627 points
Date : 2022-09-29 11:53 UTC (11 hours ago)
(HTM) web link (twitter.com)
(TXT) w3m dump (twitter.com)
| dis-sys wrote:
| This whole linux on Apple M1/M2 thing is the best proof that
| Linux is always a very good fit fort next gen
| hardware/software/developers.
|
| new hardware, arm based apple silicon here, is now challenging
| the monopoly of x86. after such a long waiting, we finally have a
| mature alternative platform to choose from - and it is
| performance is pretty good.
|
| new language, rust here, is getting its way into the linux
| kernel. this new GPU driver is written in Rust!
|
| the work is based on the GPU hardware analysis of Alyssa
| Rosenzweig, who is a very talented young lady who started when
| she was in high school I think. the author of the driver, Asahi
| Lina, also seem to be very young.
|
| Just amazing!
| mwest217 wrote:
| throwaway08642 wrote:
| neonsunset wrote:
| Cyberdog wrote:
| And do what with it exactly? Nobody really cares except
| people who already thought marcan was weird in the first
| place. Most normies already think all vtubers are men with
| voice changers...
| neonsunset wrote:
| opticron wrote:
| Could you expand on that a bit? I haven't heard anything
| about that.
| delroth wrote:
| Both the people you're replying to are, unsurprisingly,
| Kiwi Farms apologists.
|
| https://news.ycombinator.com/item?id=32728315
| https://news.ycombinator.com/item?id=32727645
|
| marcan is a common target of harassment from KF users who
| insist that he's helping a late friend of his fake their
| death. He has regularly spoken against that community of
| abusers.
|
| FUD like you're seeing here is part of their modus
| operandi and it's fairly obvious when you know what to
| expect.
| neonsunset wrote:
| Cyberdog wrote:
| IMO the vtuber thing has nothing to do with him not being
| a good person. It's just weird.
|
| If you have the desire to do so, spread the word about
| the actually bad things he is doing (I'm sure we're
| thinking about the same things). People might actually
| care about that, some day.
| [deleted]
| gjsman-1000 wrote:
| extrememacaroni wrote:
| Attempting to doxx vtubers is in worst taste, just fyi.
| gjsman-1000 wrote:
| renewedrebecca wrote:
| Aissen wrote:
| When someone asks you to please not speculate on their
| personal life, it's the polite thing to not do it:
| https://twitter.com/LinaAsahi/status/1575450309907795968
| unknownaccount wrote:
| gjsman-1000 wrote:
| @Aissen A request posted less than 2 hours ago. Also, it
| only calls out asking personal questions of them, not
| speculation.
|
| Also, it is not unfair to ask questions considering people
| are donating money for this. Anyone who is donating money
| to both, to discover they _may_ be the same entity, should
| be rightly upset.
| rvz wrote:
| > Also, it is not unfair to ask questions considering
| people are donating money for this. Anyone who is
| donating money to both, to discover they may be the same
| entity, should be rightly upset.
|
| Exactly, that's the point of a AMA (Ask Me Anything). You
| can literally ask them anything and as I presume you or
| others have paid / donated money to them and need to know
| what they are paying for or towards and who is doing it,
| for transparency purposes. That isn't doxxing, that's
| transparency (Especially if you paid or donated for
| this.)
|
| Now, for 'transparency', name please?
| samatman wrote:
| dang wrote:
| We detached this subthread from
| https://news.ycombinator.com/item?id=33019853 and redacted a
| personal name.
|
| Please don't do this here.
| gjsman-1000 wrote:
| dang wrote:
| I don't know anything about any of this, but I know that
| your comments stand out as being driven by some sort of
| strange pre-existing agenda, which is no doubt partly why
| users flagged them and pushed back against them so
| vociferously. Would you please stop posting about this now?
| It's just adding offtopic drama.
| nynx wrote:
| Not cool man.
| gjsman-1000 wrote:
| sophacles wrote:
| If that's true, so what?
| kelnos wrote:
| And you have one piece of vague, circumstantial "evidence"
| supporting this. Maybe don't throw around accusations like
| this without something more solid?
| elteto wrote:
| And you were tasked with investigating this very important
| case of wire fraud, I see.
| lnyan wrote:
| Also check out Alyssa Rosenzweig's "Dissecting the Apple M1 GPU"
| series
|
| - https://rosenzweig.io/blog/asahi-gpu-part-1.html,
| https://rosenzweig.io/blog/asahi-gpu-part-2.html,
| https://rosenzweig.io/blog/asahi-gpu-part-3.html
|
| - https://rosenzweig.io/blog/asahi-gpu-part-4.html,
| https://rosenzweig.io/blog/asahi-gpu-part-5.html,
| https://rosenzweig.io/blog/asahi-gpu-part-6.html
| waynesonfire wrote:
| How is a gpu driver ported? Isn't it proprietary?
|
| From a past article, reversing a printer protocol was derided for
| its complexity and there is a wire to snoop.
| viraptor wrote:
| There's also a "wire" to snoop here. Marcan wrote m1n1 which
| allows you to run Mac virtualised and shows the hardware
| communication.
| outworlder wrote:
| The driver is not ported, it's reverse engineered.
|
| > reversing a printer protocol was derided for its complexity
| and there is a wire to snoop.
|
| Anything can be reverse engineered with enough time, effort,
| and domain knowledge. A printer may not be worth it.
| stirlo wrote:
| The main asahi dev is a reverse engineering legend who
| previously worked on both Nintendo Wii and PS3/4. I think the
| apple hardware is probably easier to reverse than those
| platforms.
| noveltyaccount wrote:
| Wow, this is impressive. 2022 may finally be the year of Linux on
| the desktop! ;)
| amelius wrote:
| But running on undocumented hardware, so without any
| guarantees.
| gpm wrote:
| You say that like Linux, or really any other consumer
| software, comes with guarantees on any other hardware.
| amelius wrote:
| Of course, guarantees in the non-legal sense of the word.
|
| If you work towards correctness by design this gives a
| certain assurance that you don't get if you do a lot of
| guesswork and hope for the best.
| [deleted]
| spyremeown wrote:
| It's so comical to see a literal VTuber developer doing
| absolutely awesome work on an extremely high technical level, and
| better yet, on HNs frontpage almost every week.
|
| God bless anime.
| phkahler wrote:
| I'd agree, but the voice chosen annoys the heck out of me.
| cjbgkagh wrote:
| I thought it was Japanese to begin with. I had to listen
| carefully to parse the English. It seems to be a stylistic
| choice and I'm sure you get used to it after a while.
| Cyberdog wrote:
| Asahi Lina is very clearly being performed by Asahi Linux lead
| developer Hector Martin. Why on Earth he didn't just use a male
| vtuber model so that the obnoxious voice changer thing wouldn't
| be necessary, who knows. Maybe he's dipping his toe into coming
| out as trans or something.
| tech234a wrote:
| It's worth noting that Asahi Lina and Alyssa Rosenzweig are two
| separate people though their work does overlap [1].
|
| [1]: https://twitter.com/alyssarzg/status/1533624133929553922
| [deleted]
| Thaxll wrote:
| The voice is very annoying though, amazing work none the less.
| rjzzleep wrote:
| OMG I just saw it for the first time. That's a nightmare. I
| didn't expect it to be like this when I read your comment.
| Tijdreiziger wrote:
| It's weird to me that she's using such a high-pitched voice,
| because there are many successful VTubers with lower-pitched
| voices.
| Karsteski wrote:
| yea, I tried to watch her livestreams but I can't deal with
| the voice. Still though, very cool stuff
| _ph_ wrote:
| For me, it isn't annoying, I basically cannot understand it
| most of the time. Which of course kills the whole thing for
| me.
| unpopularopp wrote:
| Yeah the voice changer is crazy. Like the work and sometimes
| I peak the stream. Wish I could watch it with sound but it's
| unbearable after a couple of minutes.
| riskable wrote:
| What we need is a highly technical VTuber that's good with
| audio to work on this problem for us!
| sscarduzio wrote:
| he's actually very competent at audio, just he really
| clings to this hardly intelligible voice filter for some
| reason.
| wheelerof4te wrote:
| That's because "her" natural voice is male.
|
| You can clearly hear the deeper voice behind high-pitched
| screeching.
| delta_p_delta_x wrote:
| > That's because "her" natural voice is male.
|
| I half-expected this. From what I observe, streamers who
| are both biologically and sexually female (it's a sign of
| the times that I have to clarify this, this much) tend to
| be OK with showing their real selves, but streamers who
| have some form of gender dysphoria (usually male-to-female)
| generally have virtual avatars.
| dotnet00 wrote:
| What? No, this vtuber thing is just very trendy in the
| anime community right now. The "her" is in quotes because
| the avatar is female, which is not related to whether or
| not they're trans.
| garaetjjte wrote:
| He streams normally on his main channel,
| https://www.youtube.com/c/marcan42/videos, just the GPU
| series seems to be April Fools joke taken too far.
| delta_p_delta_x wrote:
| > the GPU series seems to be April Fools joke taken too
| far.
|
| I see; interesting.
| throwaway08642 wrote:
| kzrdude wrote:
| Haha, this all is a weird reveal for me. In particular
| because now I know there are fewer people in Asahi Linux
| than I thought - since two of these personalities are one
| and the same.
| yazaddaruvala wrote:
| Based on my own experience, you need to reevaluate your
| biases.
|
| I've had many avatars online, some male, others female,
| many not human. While it can be for others, my decisions
| were never about my feelings towards my gender or
| sexuality.
|
| I say this just to let you know these things are
| orthogonal. Just as you shouldn't assume anything about a
| female child playing Peter Pan in the school production,
| you shouldn't assume anything about a person's gender or
| sexuality based on their "current" avatar (of possibly
| many current avatars).
| taylorfinley wrote:
| Just a heads up, scare quoting someone's preferred pronouns
| is not a good thing to do and comes off as very
| disrespectful if not outright transphobic.
| hedora wrote:
| While you are not wrong (simply because many people would
| agree with you), systematic bullying of outgroups is
| divisive and also disrespectful.
| raffraffraff wrote:
| I've seen this channel before. I don't care what the content
| is, I can't listen to it.
| duxup wrote:
| I really hope these folks get some AI / video masking / voice
| masking tech that isn't horrible soon.
|
| Dang that video... I think of myself as pretty open to
| whatever folks want to do and all, but it is really hard to
| watch that video.
| bitwize wrote:
| It sounds like something from Interdimensional Cable. Like
| it's Justin Roiland trying to do an anime girl voice but it
| comes out as a sort of Mr. Meeseeks screech.
|
| This is the future of our profession. We've gone from long-
| term, long-form documentation, to blog posts, to talks...
| in the next ten years it'll just be anime pfps squeaking at
| each other.
| Reason077 wrote:
| Really needs subtitles/closed captions to be enabled!
| resoluteteeth wrote:
| It would kind of make sense for people who just don't want to
| show their face even if they don't want to be particularly
| vtuber-y
|
| I was wondering if this would be more common as the technology
| developed but it seems like it hasn't and instead there are
| specific ideas about what vtubers are supposed to be that have
| become entrenched.
|
| There are some people like Hikalium who are using vtuber
| avatars for live programming videos but not particularly doing
| a character though
| dahfizz wrote:
| It's perfectly normal to stream and not show your face at
| all. Preferring to present as an anime character will always
| be niche.
| Dalewyn wrote:
| Is it? I feel there's a much bigger tendency for westerners
| to show their mug and speak while Japanese prefer to hide
| (both mug and voice) if at all possible.
| dahfizz wrote:
| Yeah, definitely. There's a self selection bias where a
| person who wants to stream is going to tend to be a
| person who wants to show their face. But it is not weird
| / frowned upon if there is no face and the content itself
| (gaming, coding, whatever) is the entire screen. I think
| most normies would much prefer no face to an anime
| character.
|
| I do think it would be weird to hide your voice, though.
| unknownaccount wrote:
| However pretending to be a woman seems relatively common
| nowadays.
| gremlinsh wrote:
| cbm-vic-20 wrote:
| For once, I'd like to see a VTuber presented as classic
| Warner Brothers characters. Let's see Porky Pig present
| this stuff.
|
| (Anyway, the work itself is great!)
| NoGravitas wrote:
| I would love to do a tech vtube as Slappy Squirrel.
| bitwize wrote:
| More likely it'll be a character like Dot. Or Bugs Bunny
| in a dress.
| snek_case wrote:
| With deep learning you'll eventually be able to just have a
| very realistic avatar that looks and sounds like a real
| person. Might eventually be hard to tell if people are using
| something like this or not.
| dis-sys wrote:
| From memory, EU used to have very strict laws against reverse
| engineering. Is that still the case today? I mean this whole
| thing is pretty much based on reverse engineering the GPU.
| pantalaimon wrote:
| They are based in Japan anyway
| andreasley wrote:
| What makes you think that?
| stirlo wrote:
| Lina is the vtuber persona of Hector Martin @marcan42 who's
| has been working on the rest of the Asahi Linux project.
| He's based in Japan.
| spyremeown wrote:
| It's not him, though.
|
| https://nitter.tiekoetter.com/marcan42/status/15271299617
| 061...
| p_l wrote:
| Not really. It's more US thing where a license can try to
| forbid Reverse Engineering, and you end up with things like
| clean room RE based on supreme court case.
|
| Meanwhile for example in Poland (EU member), it's _illegal to
| forbid reverse engineering_ - any claim in a contract, license
| or not, that forbids such is null & void. Because the
| copyright law has a paragraph about how "reverse engineering is
| a _right_ of everyone. " - the only thing is that you can't
| just recompile reversed code and claim it's yours (that would
| be copyright violation).
| fps_doug wrote:
| That's the US. EU is fine.
| SeanLuke wrote:
| The US largely has laws against reverse engineering hardware
| for the purpose of circumventing copyright protection. But
| that's not happening here. What other laws were you thinking
| of?
| fps_doug wrote:
| AFAIU, in the US to be on the safe side, you need to apply
| clean room reverse engineering, no matter the goal. In the
| EU, as soon as it's in the name of interoperability,
| reverse engineering is fine:
|
| > The unauthorised reproduction, translation, adaptation or
| transformation of the form of the code in which a copy of a
| computer program has been made available constitutes an
| infringement of the exclusive rights of the author.
| Nevertheless, circumstances may exist when such a
| reproduction of the code and translation of its form are
| indispensable to obtain the necessary information to
| achieve the interoperability of an independently created
| program with other programs. It has therefore to be
| considered that, in these limited circumstances only,
| performance of the acts of reproduction and translation by
| or on behalf of a person having a right to use a copy of
| the program is legitimate and compatible with fair practice
| and must therefore be deemed not to require the
| authorisation of the rightholder. An objective of this
| exception is to make it possible to connect all components
| of a computer system, including those of different
| manufacturers, so that they can work together. Such an
| exception to the author's exclusive rights may not be used
| in a way which prejudices the legitimate interests of the
| rightholder or which conflicts with a normal exploitation
| of the program.
|
| Directive 2009/24/EC
|
| This would allow you to disassemble and modify any parts of
| OSX and its drivers in order to help write a Linux driver.
| Does the same apply in the US?
| bitwize wrote:
| The USA has fairly lax _laws_ regarding reverse
| engineering. It 's just that proprietary software EULAs
| typically forbid it -- and you have to agree to a binding
| EULA in order to use the software.
|
| There were a number of court cases, many involving game
| consoles (incl. _Sega v. Accolade_ , _Galoob v. Nintendo_ ,
| _Sony v. Connectix_ ) that establish that as long as you're
| not distributing verbatim or other infringing copies of
| another company's work such as software or chip designs
| (and you haven't signed any contractual agreements
| otherwise), you're in the clear. To establish that you
| _are_ in the clear, clean-room reverse engineering is the
| recommended approach: one party does the reverse
| engineering yielding a spec; the other implements the
| software based on the spec.
| dis-sys wrote:
| > one party does the reverse engineering yielding a spec;
| the other implements the software based on the spec.
|
| good to know that. asahi linux should be fine, the
| reverse engineering and driver development are done by
| different people.
| bitwize wrote:
| It helps that Apple is aware of this work and, while they
| aren't contributing, they're not actively hindering it
| either.
| [deleted]
| angelmm wrote:
| I've been following Asahi for some time on twitter. The work she
| did is incredible and everything was streamed and the recordings
| are available in Youtube.
|
| In case you're curious about the process, here you have her
| YouTube profile: https://www.youtube.com/AsahiLina
| toxik wrote:
| Wow, that's certainly a novel way to disseminate technical
| information. I could not stand it, and I'm not very dismissive
| of geek content.
| stewx wrote:
| The live anime avatar and high-pitched vocal conversion
| are... idiosyncratic, to say the least
| londons_explore wrote:
| Is there software that does this? Or is it custom made?
| 1ace wrote:
| She's using https://inochi2d.com
| viraptor wrote:
| Which she contributed to, so I guess the answer is...
| Yes.
| Aissen wrote:
| Incredibly fun hack to make it work (start of the video): TLB
| flushing is a bit hard, so let's reset the GPU after each
| frame(!!!). And at the rate this advances, this comment will
| probably be obsolete in less than a week !
| NoGravitas wrote:
| The standard solution: turn it off, and turn it back on.
| sitkack wrote:
| Microreboot - A Technique for Cheap Recovery
|
| https://csis.pace.edu/~marchese/CS865/Papers/candea_microreb.
| ..
| macintux wrote:
| Even earlier: Erlang.
|
| https://erlang.org/download/armstrong_thesis_2003.pdf
| tbrock wrote:
| This is so technically cool and an amazing achievement but wow
| what an odd video.
| phkahler wrote:
| Would love to see Solvespace running on that. The Mac version
| does run native on M1 already and the OpenGL requirement isn't to
| high.
| jmyeet wrote:
| I'm in awe of anyone who can _reverse engineer_ and build a
| driver for something like this that isn 't documented at all
| (AFAIK). Impressive stuff. And to use that knowledge to
| contribute to Linux is a great thing. Kudos to everyone involved.
| pipeline_peak wrote:
| I like when they write kernel drivers, just keep them away from
| my daughter.
| [deleted]
| Rygian wrote:
| https://github.com/AsahiLinux/linux/tree/gpu/rust-wip/rust/k...
| jacooper wrote:
| Great work, the v-tuber wierd thing doesn't affect of the value
| of this work.
| humanistbot wrote:
| Speak for yourself, I could barely understand the content due
| to the high pitch and speed of the vocoder. I hate video
| tutorials in general though, I really wish this was a blog
| post.
| nulld3v wrote:
| I think everybody would agree that a blog post or even a
| nicely edited video is better than this.
|
| But you have to remember that this was an impromptu live
| stream. It took much less effort on her part to create,
| literally just 30 mins (half of which was her trying to
| compile OBS).
|
| And I think that's fine. I think the end result is the goal,
| blog posts are nice but not the focus here.
| naikrovek wrote:
| why would they speak for anyone but themselves? and why would
| you think they were doing so?
| humanistbot wrote:
| It is an expression, another way of saying "You might feel
| that way, but I don't"
|
| See https://idioms.thefreedictionary.com/speak+for+yourself
| naikrovek wrote:
| meh expressions like that don't make sense to me. all
| these people everywhere saying things that don't make
| sense just because someone else said it before them. it's
| all just peer pressure from books and dead people.
|
| meanwhile I'm over here trying to understand and
| participate in conversations and no one cares about
| people who take words at face value. I hate this
| goddamned planet
| KAMSPioneer wrote:
| Speak for yourself, I enjoy using idiomatic phrases
| because I like conveying nuance and expressing myself
| using a common phrases. :)
| denysonique wrote:
| Amazing, now the only missing thing is a proper trackpad driver.
| Rygian wrote:
| "Please temper your expectations: even with hardware
| documentation, an optimized Vulkan driver stack (with enough
| features to layer OpenGL 4.6 with Zink) requires many years of
| full time work. At least for now, nobody is working on this
| driver full time3. Reverse-engineering slows the process
| considerably. We won't be playing AAA games any time soon."
|
| From https://rosenzweig.io/blog/asahi-gpu-part-6.html
| bityard wrote:
| Totally non-sarcastic question: then why bother?
|
| It's an honest question. Even if someone (or a team) could
| somehow be paid for this work, by the time the results are
| usable, the hardware will be more or less functionally
| obsolete.
|
| And that is on top of the fact that ARM64 on MacOS will always
| be a small slice of the gaming pie, and ARM64 on Linux games
| and GPU applications virtually nonexistent.
| bri3d wrote:
| There's a much lower standard than "AAA gaming" which still
| delivers massive value to most users in running a desktop
| environment.
|
| Also, the Apple GPU has evolved from PowerVR roots dating
| back to the 1990s. It is fairly safe to assume that the next
| generation of Apple GPU will share enough with the current
| generation that in 3 years, supporting whatever new hardware
| exists will be incremental rather than transformative ground-
| up work.
|
| This was already the case for M1 into M2.
| vbezhenar wrote:
| I don't really understand what's the difference between AAA
| game and Google Chrome? I thought that modern applications
| heavily use GPU acceleration. Is it some subset of GPU
| commands that's required for desktop, compared to AAA game?
| Is it possible that Google Chrome will crash the OS with
| some tricky CSS animation (may be in the future version)?
| coldtea wrote:
| > _I don 't really understand what's the difference
| between AAA game and Google Chrome?_
|
| Hundreds of GPU features the latter doesn't use in normal
| hw-accelerated rendering of webpages... except maybe in
| doing WebGL content (and even less much fewer and older
| features than what AAA games want)
| mfuzzey wrote:
| GPUs tend to evolve over time rather than change radically.
| So even if the hardware is obselete before the work is
| finsihed the driver for the next generation will start from a
| much better point than the first one.
|
| Also it will be useable for at least some usecases, even if
| not AAA games, before the hardware is obselete.
| coldtea wrote:
| > _Totally non-sarcastic question: then why bother?_
|
| Because most of us looking into Asahi don't care for playing
| AAA games with it. We want Linux on our Mac laptop, with hw
| acceleration for the desktop and apps.
| acomjean wrote:
| You can't tell people who are doing the work what to work
| on..
|
| but considering there is a mountain of linux development for
| people with the expertise to be done for more open platforms.
| This work pretty much only helps one of the richest companies
| and Apple shows very little inclination to help by providing
| documentation or support (they let an alternative OS boot
| seems to be the extent of it).
| colonwqbang wrote:
| Maybe it's the reverse engineering aspect that makes it
| interesting. Those of us in that line of work already spend
| our time at work turning docs into device drivers. It would
| be like working at Apple without getting paid.
| ThatPlayer wrote:
| Box86 translates plenty of x86(-64) games to be playable on
| ARM.
|
| https://youtu.be/Of93GBCEbug Shows some native games, but
| also Skyrim and Metro Last Light working on ARM.
| imiric wrote:
| > why bother?
|
| I wonder the same thing, but from an ideological perspective.
|
| Why should the free software community promote Apple hardware
| by making it more accessible to OSS enthusiasts, when Apple
| only cares about OSS when it directly benefits them? Apple
| makes great hardware, but they're actively hostile to
| everything free software stands for. If Apple cared about
| this user base, they would work on this themselves.
|
| That said, from a technical standpoint, this is nothing short
| of impressive, so kudos to the team. I can't even imagine the
| dedication and patience required to work on this project.
| robert_foss wrote:
| Why bother? Because the next generation of hardware will be
| able to use most of the software written for the current
| generation, and after a few generations the hardware will be
| well supported very quickly.
|
| Additionally there's a lot of shared code between the
| different linux graphics drivers through Mesa, the linux
| userspace graphics driver framework.
| simonh wrote:
| Because AAA games aren't everything.
|
| > a basic OpenGL driver is doable by a single person. I'm
| optimistic that we'll have native OpenGL 2.1 in Asahi Linux
| by the end of the year.
|
| That should be enough to be very useful to a lot of users.
| [deleted]
| gigatexal wrote:
| Getting this off the ground has a chance to get this to
| snowball. Imagine it gets to rough but useable and it's in
| the kernel. Then more and more folks can iterate on it. It's
| development rate will increase.
| pcwalton wrote:
| Your desktop that you're using to post this is likely using
| GPU acceleration to composite your windows. Not having GPU
| acceleration for graphics is a killer with today's HiDPI
| displays. The CPU generally can't keep up, and even when it
| technically can it is extremely power inefficient.
| deaddodo wrote:
| Why bother building a contemporary computer kit on MOS6502
| chips[1]?
|
| Because people want to. Who is anyone to be the arbiter of
| those desires, no matter the practical applications (which
| this has a ton of, as alluded to via the other repliers)?
|
| 1 - https://eater.net/6502
| Denvercoder9 wrote:
| Gaming is not the only thing that uses a GPU. A driver that's
| complete/performant enough to run a Linux desktop and web
| browser is already useful.
| [deleted]
| insane_dreamer wrote:
| Machine learning
| rrss wrote:
| note it's probably a lot less effort to add support for M2's
| GPU than starting from scratch and having to reverse engineer
| everything.
|
| So eventually the gap between hardware release and fairly
| complete driver support could close quite a lot.
| rand0m4r wrote:
| The answer could be: because they like it.
|
| People do great stuff with computers and programming and I
| think this is a good example. Passion is what it's all about.
| coldtea wrote:
| This is not about just doing it for passion or for hacking
| fun despite being worthless of something. There's a very
| pragmatic reason that makes it very useful!
|
| The "why bother" is missing the crucial point, that the
| most important use of the GPU driver for Asahi would be HW
| accelerated desktop (and driving external monitors, etc) -
| it's not like a GPU driver for M1 is useless if no AAA
| games aren't supported...
| bscphil wrote:
| Yeah, it's because of this statement from an extremely
| trustworthy source that I'm looking for context here. I suspect
| most of the big problems haven't been suddenly and magically
| overcome? E.g. how close are we, given this, to supporting an
| AAA game, let's say from a few years ago?
| moondev wrote:
| Let's set up a jira and hold sprint planning
| asiekierka wrote:
| The key words are "optimized" and "OpenGL 4.6 with Zink".
| "Functional" and "OpenGL 2.1" is a different story, and the
| same trustworthy source said in
| https://rosenzweig.io/blog/asahi-gpu-part-6.html that:
|
| > thanks to the tremendous shared code in Mesa, a basic
| OpenGL driver is doable by a single person. I'm optimistic
| that we'll have native OpenGL 2.1 in Asahi Linux by the end
| of the year.
|
| It's likely that even a bare-bones OpenGL driver will
| probably run better than llvmpipe, which is especially
| important in a laptop context due to the resulting power use
| improvements.
| bscphil wrote:
| Ah, so it's a "90% of the iceberg" situation. Great info,
| thanks!
| stu2b50 wrote:
| What AAA games run not only on Linux, but _ARM_ Linux? This
| is more for going on YouTube with hardware acceleration than
| gaming, which is niche upon niche in its current state
| anyway.
| jrockway wrote:
| You can always do this:
| https://wiki.debian.org/QemuUserEmulation to run amd64
| binaries on an arm64 machine, or vice-versa. Docker desktop
| sets this up so you can pull amd64-only Docker containers
| on your M1 and not notice. I did some very minimal testing
| and it's not even insanely slow or anything (but obviously
| for many games, you can't leave this much performance on
| the table).
|
| I do this on my workstation and can run anything, it's
| quite nice: $ lscpu | grep Architecture
| Architecture: x86_64 $
| GOARCH=arm64 go build main.go $ file ./main
| ./main: ELF 64-bit LSB executable, ARM aarch64, version 1
| (SYSV), statically linked, ... $ ./main Hello,
| world.
| bscphil wrote:
| Do Rosetta apps utilize the GPU on M1 (on macOS)?
| jrk wrote:
| Yes. The calls to the platform graphics APIs and
| underlying drivers are identical (and literally hit the
| same code), whether from x86/Rosetta or native/ARM64.
| delroth wrote:
| Box64, FEX-Emu and other x86-64 on ARMv8 emulation projects
| cover that gap and explicitly target gaming as a core use
| case. And of course there's Apple's Rosetta, which we know
| is good enough for gaming on ARM macOS. Apple has released
| a Linux version which should technically be able to run on
| Asahi, but I'm unsure of the legal situation around this.
| johnnymarr666 wrote:
| wow this is so impressive! absolutely stunning work!
| simonw wrote:
| Can anyone explain why it's hard to get GPU-accelerated ML
| libraries such as Torch running on a Mac (Intel or M1/M2)?
| atty wrote:
| In each library, their operations need to be implemented for
| each backend separately (CPU, GPU, TPU, etc). All of these
| libraries support CUDA as their default GPU implementation
| because it's by far the largest in terms of market share. But
| since Apple GPUs do not implement CUDA or a translation layer
| (they use Metal, Apples graphics and compute acceleration
| library), that means all those mathematical operations need to
| be rewritten targeting Metal before torch can even communicate
| usefully with an M1/M2 GPU. That doesn't even touch on the fact
| that different backends need to have work scheduled on them
| slightly differently. Some expect a graph of operations to be
| submitted, some are just submitted as a series of asynchronous
| operations, etc.
|
| Also just wanted to point out that torch does support Apple
| GPUs now, however.
| spullara wrote:
| The nightly of PyTorch does run on the M1 GPU.
| londons_explore wrote:
| The November 2020 M1 machines are nearly getting to daily
| usability in Linux. Support for screen brightness adjustment, the
| webcam, speakers and mic are the remaining things for day to day
| use for me. All look like they should be working in 6 months-1
| year.
|
| It's a bit of a shame that the RAM is so limited on all those
| platforms - I can't imagine it being enough to load many electron
| apps in a few years time.
| infocollector wrote:
| I am waiting to try this on the 16GB RAM M1. M2's have 24G or
| more available. I think this will be my goto machine for Linux.
| lalaithion wrote:
| I use one as a daily driver and run Chrome, Slack, Spotify, and
| VSCode simultaneously and it's been fine.
| Shorel wrote:
| It's enough memory for most applications that are not Electron.
|
| Not to say that it should not have more, far from it. But the
| Electron framework is so wasteful, compared with basically all
| the alternatives.
|
| I wish the framework developed for Sublime Text were not
| secret.
| dilap wrote:
| Yeah it's funny that every cross-platform UI kit seems to
| suck, but both Unity and Sublime have in-house custom things
| that are good.
|
| _Que pedo, wey._
| brundolf wrote:
| A chrome process normally takes up about 100-200MB RAM. Are you
| running 8GB/200MB=40+ different electron apps at once?
| alluro2 wrote:
| I assume you mean when nothing is loaded in it, or it's
| showing a plain HTML page. 1GB+ is completely common for a
| lot of Electron apps in real use. If you run a dev
| environment and are using 2-3 Electron apps, 16GB will be a
| struggle.
|
| Currently sitting at 29GB (on M1 Pro), just for regular web
| dev environment on MacOS.
| kitsunesoba wrote:
| It's technically Chromium Embedded Framework instead of
| Electron, but last time I used the Spotify desktop client
| it was possible to push its RAM usage past 512MB up to the
| 1GB mark just by clicking through albums and artists.
|
| For something extremely functional like a VS Code, which is
| a mini-IDE of sorts, that might be excusable but it's
| beyond silly for a streaming music player.
| brundolf wrote:
| But it has nothing whatsoever to do with it being a web-
| based app. It pretty clearly has to be the result of
| caching lots of album art and/or metadata and/or audio
| data, which is just as likely to happen on a native app.
| kitsunesoba wrote:
| Web technologies in and of themselves aren't bad, but
| their usage is strongly correlated with cost-saving
| measures and the questionable technical decisions that
| result since choosing a web app itself is often a cost-
| saving measure.
|
| VS Code is an example of things gone right, where
| Microsoft has clearly hired an AAA-class team and funded
| them well. Within the same company, Teams is an example
| of the exact opposite and much more representative of the
| typical web app.
|
| In Spotify's case, if they're aggressively caching album
| art, metadata, and/or audio I would say that's of
| questionable value to the user. Art and information on
| songs/albums/artists/etc are in nearly all cases only
| going to be seen once or twice by the user per session,
| and so keeping them sitting in memory doesn't make a
| whole lot of sense. Caching audio that's not been played
| is very questionable (to the point that I don't think
| they're doing this) because many, many people are still
| on metered connections and Spotify would quickly be
| blowing past bandwidth limits if it were pre-caching
| albums left and right.
|
| Disk caching makes a ton of sense for Spotify, given that
| it's being done in a standarized directory that the OS
| can clear to free up space when necessary, but on
| machines with 8GB or especially 4GB of RAM there's a very
| good chance that by aggressively caching to memory
| they're evacuating other things that would better serve
| the user to be sitting in memory.
|
| Using a lot of memory is fine when there's clear user
| benefit but it should still be done intelligently.
| brundolf wrote:
| > their usage is strongly correlated with cost-saving
| measures and the questionable technical decisions that
| result since choosing a web app itself is often a cost-
| saving measure
|
| Correlation is not causation
|
| We can debate the specific design choices that Spotify or
| any other company has made, but my original point was to
| push back against the tired trope that using web
| technologies for an app automatically means runaway
| resource consumption and (apparently) the downfall of
| civilization
| spullara wrote:
| It is probably just caching images in memory.
| unicornhose wrote:
| Ahaha, this is a tangent, but this stupid situation is why
| I'm doing my current web project as God intended: in a
| single .html file, shared with collaborators on Dropbox,
| editing in any dumb text editor.
|
| There are no dependencies.
| brundolf wrote:
| > I assume you mean when nothing is loaded in it
|
| Yes, but that's normally what people mean when they talk in
| broad strokes about "electron apps". Anything beyond that
| is application data, which is going to be roughly the same
| regardless of stack, and in nontrivial apps quickly comes
| to dominate.
|
| > Currently sitting at 29GB (on M1 Pro), just for regular
| web dev environment on MacOS
|
| I mean, I assume you're using more than just some regular
| electron apps. macOS itself is currently using 8GB of RAM
| on my machine, my docker VM is using 4GB (down from a
| default of 8GB), etc. And that doesn't include my IDE and
| its code-scanning and type-checking background processes.
| seabrookmx wrote:
| Does that include docker (a VM?)
|
| Does that include file system cache?
|
| Having a system with lots of RAM, the OS does it's best to
| use it. Just because you see 29GB used doesn't mean you'd
| see a noticeable performance dip on a 16GB machine. You
| might, but it really depends what that RAM is being used
| for.
| that_guy_iain wrote:
| > I can't imagine it being enough to load many electron apps in
| a few years time.
|
| I honestly hopoe Electron has to improve it's performance or
| companies start moving off of it. It's honestly a bit of a joke
| at this point.
| enlyth wrote:
| Are you all using some rare electron apps that are unknown to
| me because I keep hearing this meme repeated but when I look
| at my RAM usage[0], it never corroborates this.
|
| I just don't see how 220MB for Discord is unreasonable in any
| way, when Firefox with 8 tabs takes 1.2GB. Telegram written
| in Qt meanwhile takes 200MB, literally no difference to
| Discord, an electron app.
|
| [0] https://i.imgur.com/cfCRWDS.jpg
| xxpor wrote:
| Because weechat uses <18 megs?
| anthk wrote:
| Kopete, less than 100MB under KDE3 in ~2007. Video calls,
| emojis, inline LaTeX, Youtube videos...
| enlyth wrote:
| Does weechat support rich embedded media like images and
| videos, can you live stream games to your friends on it,
| talk with people, have profile avatars, use emotes, build
| bots that stream music to you?
|
| Even something completely simple such as snip a portion
| of your screen and paste it in the chatbox so others can
| see it immediately, without having to mess around with
| dodgy image upload sites. This is basic functionality for
| 2022.
|
| It's like comparing notepad.exe to Microsoft Word
| dotnet00 wrote:
| How much of that needs to relate to the memory usage
| though? Embedded media doesn't need to be loaded besides
| what's visible in the current channel and perhaps a bit
| of scrollback, perhaps some text and scrollback for other
| frequently viewed channels. Livestreams also shouldn't be
| taking memory unless you're watching, same with voice.
| Avatars and emotes would certainly take memory, but
| certainly not hundreds of megabytes of it.
| anthk wrote:
| I could do that in 2007 with 256 MB of RAM.
| e63f67dd-065b wrote:
| EDIT: ignore me, I thought this was about WeChat, the
| Chinese messaging app, not weechat, the IRC client :(
|
| > rich embedded media like images and videos
|
| Yes
|
| > live stream games to your friends on it
|
| no (there's WeChat livestream (idk what it's called in
| English), but it's not discord style stream-your-desktop)
|
| > talk with people
|
| yes
|
| > have profile avatars
|
| yes
|
| > use emotes
|
| yes
|
| > build bots that stream music to you
|
| yes
|
| > Even something completely simple such as snip a portion
| of your screen and paste it in the chatbox so others can
| see it immediately, without having to mess around with
| dodgy image upload sites
|
| yes? you can paste stuff into wechat just fine. Think
| WhatsApp, not IRC
|
| Idk where GP came up with 18MB tho, it's eating up 100 on
| my laptop right now.
| xxpor wrote:
| I've sent plenty of pictures over DCC in my day. OBS lets
| me stream whatever to wherever at unlimited quality
| without paying.
|
| The point is most of what Discord provides is low value
| for the resources it demands.
| that_guy_iain wrote:
| Spotify uses 1GB of ram for me, while doing nothing, it was
| only started by mistake, it didn't play a song.
|
| Slack was using 1.2 GB. It is in a workspaces but that
| seems a lot for an app that does nothing.
|
| Postman I think is also Electron often uses 1-2GB for
| sending API requests.
|
| Atom though was only using 200MB which is fair.
| chrisweekly wrote:
| Desktop PWA is becoming a pretty reasonable alternative.
| unicornhose wrote:
| PWAs _can_ get better and more platform-friendly though.
| It's two bad choices right now.
| cguess wrote:
| I don't want to run a web browser to run a desktop app. I
| don't care how useful it is to run JS and HTML from a dev
| standpoint it's an absolutely absurdity that my desktop app
| has a CORS vulnerability.
| Melatonic wrote:
| I could be wrong but I feel like literally running some
| kind of little mini virtualized instance and just running
| a desktop app meant for OSX or Windows could end up being
| more efficient than running a whole browser.....
| pseudosavant wrote:
| > my desktop app has a CORS vulnerability.
|
| Yes, because CORS, a way that HTTP requests are
| restricted, doesn't even exist in native. Of course a
| native app can reach out to any URL it wants. That is the
| default, and also how CORS functions when disabled or
| bypassed.
| moonchrome wrote:
| Then you probably won't get Linux desktop support at all.
| Linux camp should be cheering electron.
| that_guy_iain wrote:
| Honestly, if the other OSes had decent native apps for
| some of these things I would probably switch. There is
| just something wrong with Spotify using 1gb when it was
| just opened and never used.
| smoldesu wrote:
| > It's a bit of a shame that the RAM is so limited on all those
| platforms
|
| As long as you didn't get one of the single-channel SSD models,
| it would make plenty of sense to give yourself a 16 gig
| swapfile (or something of the sort).
| jlokier wrote:
| MacOS creates swapfiles automatically as needed (in /var/vm).
| It will allocate a lot more space to swap than the size of
| RAM, if it determines that's useful.
|
| It's actually a problem, if you're low on SSD space the
| filesystem can fill up with swapfiles while the system is
| still reasonably functional because the SSDs are fast enough.
| Then because of an APFS design fault, sometimes it isn't
| possible to delete any files to free up space. It says "out
| of disk space" when you try to delete a file.
| ask_b123 wrote:
| Yes; I have to restart my computer whenever that happens.
| protoman3000 wrote:
| This presentation... Humans are truly amazing.
| rufusroflpunch wrote:
| I'm just getting old, I do not understand VTubers or the appeal.
| rasz wrote:
| body dysmorphia
| ElCheapo wrote:
| You're getting old and you don't know about the Muppets?
| atty wrote:
| Complete speculation on my part, but I think the biggest appeal
| is supply side, that people can be Internet personalities with
| an avatar without sharing their real identity. That helps a lot
| of people who would like to start sharing content but are
| otherwise too shy, or for various reasons think they
| can't/shouldn't use their real identity.
|
| On the consumption side, I find the VTuber method to be more
| compelling than pure voiceovers, even if it's silly. An avatar
| helps create a sense of engagement. It's also interesting to
| see what sort of characters people come up with.
| marcodiego wrote:
| Does it need proprietary blobs?
| [deleted]
| [deleted]
| asiekierka wrote:
| Yes, the Apple laptops need a whole host of proprietary blobs
| for bringup and firmware.
| argulane wrote:
| This is one of the first Linux kernel driver writen in rust!
|
| Also all of this has progressed so fast thanks to Alyssa doing
| bunch of GPU reverse engineering on macOS and writing
| coresponding userspace MESA driver.
| https://rosenzweig.io/blog/asahi-gpu-part-6.html
| krater23 wrote:
| Ok, we put together, its written in Rust, its for a Apple
| hardware and you need reverse engineering to have any big
| involvement in the development. It's a niche project for some 3
| or 4 developers and will never get a big development community.
| d3nj4l wrote:
| Linus himself is using the work Asahi Linux has put in :)
| colonwqbang wrote:
| It doesn't particularly matter if a specific kernel module
| has a big community behind it. 3-4 motivated people would be
| plenty to maintain a module. The major part of a GPU driver
| is in userspace, not the kernel.
|
| The kernel community have slowly started to embrace rust in
| recent years. Maybe the community is not so small as you
| think, or at least won't be in the near future.
| viraptor wrote:
| Most hardware needs reverse engineering to work - we only got
| the opensource AMD GPU driver relatively recently.
|
| Kernel work is niche in general so really you could say the
| same thing about Linux itself - yet here we are, it likely
| works on many devices you use.
| ianbutler wrote:
| This work on Asahi Linux is some of the more impressive work I've
| been following. To basically reverse engineer undocumented
| hardware features and get Linux running on them in such a low
| amount of time is nothing short of inspiring.
| obert wrote:
| what's the app he used for the overlay avatar?
| cesarb wrote:
| It's mentioned in the description for the video: "Animated
| using Inochi2D by Luna the Foxgirl
| (https://twitter.com/LunaFoxgirlVT
| https://twitter.com/Inochi2D)"
|
| And going through the twitter link you can find the homepage
| for that software is at https://inochi2d.com/ (the other
| twitter link gets you the homepage for the developer of that
| software at https://github.com/LunaTheFoxgirl).
| naikrovek wrote:
| i don't understand things like that avatar. maybe i'm too
| old.
|
| [ unpopular opinion incoming!! ]
|
| yes, you are special and unique, sure. we all are. you like
| anime, and stuff from Japan, awesome. lots of people do. why
| is one third to one quarter of the video real estate consumed
| by the avatar? why is the voice so high pitched and hard to
| understand?
|
| i mean, fine. i am not about to tell someone how to present
| themselves, especially unprompted. i will say that i have
| zero interest in this if this is what the community around it
| is like. it feels like i'm being talked to like i am an
| infant, and there is fear that my attention will wane if i am
| not overstimulated visually and aurally. it is insulting, to
| me.
|
| i wish this effort all the best. treat me like an adult,
| please.
| [deleted]
| kzrdude wrote:
| (Am I also old, I ask myself?) I don't like the distorted
| voice but the thought of making an avatar and hiding behind
| it, instead of showing one's face in a video, sounds good.
| I wouldn't mind using the image of an anime girl either.
| naikrovek wrote:
| just don't show yourself at all? that seems very
| preferable to some avatar, to me. I don't need people to
| look at me, and I definitely don't want to pretend I'm
| someone I'm not.
|
| but maybe you're pretending you're someone you're not
| every day, and your avatar could be the you that you want
| to be? if so, absolutely go forth and avatar up! find
| ways to be yourself, always. lots of folks do that stuff,
| and that's awesome, but that kind of thing doesn't add
| anything that I look for in the things I spend my limited
| time on, is all.
| cesarb wrote:
| > why is one third to one quarter of the video real estate
| consumed by the avatar?
|
| From what I've seen, it's not unusual for streamers which
| do not use an avatar to consume a fraction of the video
| real estate with a camera showing their face; the avatar
| merely replaces that.
| naikrovek wrote:
| yeah, I know, but the ratio of avatar to screen share
| area is abnormally large in this case. at least to me.
| gjsman-1000 wrote:
| Some added context: Many may be reading this the first time and
| wondering, What gives with the NVIDIA drivers (Nouveau)?
|
| To put it simply, NVIDIA screwed third-party drivers by requiring
| a ever-changing encrypted and signed blob, hidden deep within the
| proprietary driver package, to be sent to the GPU every time it
| boots. Otherwise, you can't change the clock speed of your NVIDIA
| GPU from the boot clock speed, which is almost unusably slow.
|
| The message from that is screw NVIDIA - not that third party GPUs
| necessarily are that horrible to implement.
| dotnet00 wrote:
| Hasn't NVIDIA been making pretty big steps towards a compromise
| on that front with the open source linux drivers they released
| a few months ago?
| izacus wrote:
| Yes, but let's not have real world infringe of this
| completely offtopic rant about nVidia in Apple themed post :P
| adastra22 wrote:
| Why is this relevant?
| zozbot234 wrote:
| nVidia only requires signed firmware starting from 2nd-gen
| Maxwell cards (released late 2014). There's a _lot_ of existing
| nVidia hardware that could be fully supported.
| mschuster91 wrote:
| > There's a lot of existing nVidia hardware that could be
| fully supported.
|
| But almost no _users_ to justify the huge development effort.
| Many laptops from that era, for example, are completely
| unusable by now - only high end models had 16GB of RAM, most
| were limited to 4 or 8GB - and desktop builds of that age
| simply consume far too much electricity for the performance
| they offer.
|
| In contrast, investing work into current NVIDIA/AMD drivers
| or the Apple Mx architecture makes more sense - the crypto
| boom and bust led to a _lot_ of cheap but current cards which
| means many will simply stick it out with a used RTX 3090 for
| a couple years once NVIDIA releases their new generation, and
| Apple usually keeps their own hardware stacks very similar in
| design which means work done now will still be a foundation
| for Apple 's chipsets five or ten years in the future.
| kelnos wrote:
| 8 years is pretty old in GPU years. Certainly that old
| hardware is still useful, but not if you're doing anything
| where modern GPU performance is helpful, or even necessary.
| [deleted]
___________________________________________________________________
(page generated 2022-09-29 23:00 UTC)