Hacker News new | ask | show | jobs
by sweden 2034 days ago
Keep in mind that something as fundamental as the GPU driver wouldn't be available even they managed to get Linux up and running.

And the M1 GPU is Apple's full custom GPU. Even if someone tried to reverse engineer a driver, it would take decades.

2 comments

He seems relatively optimistic about getting a GPU driver going: https://twitter.com/marcan42/status/1333126014910701568

I don't think it'd take decades. Nouveau was pretty ok after like 5 years, wasn't it?

And Nouveau has to work with dozens of Nvidia cards, not just one, and full of legacy nonsense. I'm fairly optimistic it won't take 5 years.

(Especially not to the point of having a composited desktop; long tail game compatibility is less of a critical thing since, well, there are next to no games for ARM Linux...)

If you are just planning to hack something to show some basic and buggy 2D rendering, 5 years might be realistic.
This talk was posted in another comment chain: https://media.ccc.de/v/33c3-7946-console_hacking_2016

This was 3 years after the hardware release, presented on substantially more locked-down (but x86 and PC-like GPU to be fair) hardware with a demonstration of Portal 2 running in real time. Presented by the person you are replying to. I'm also assuming there was no funding involved given the requirement to build an exploit just to boot anything on the PS4.

As an unabashed cynic myself: Your cynicism as someone uninvolved with the project is outweighed by the informed opinion of someone who has demonstrated ability in the field of porting linux to other platforms.

To be fair, as the author of that: that was mostly a job of reverse engineering what was weird/broken/different about the PS4's GPU, which is otherwise a standard Radeon. It was effectively adding support for a new Radeon variant chip of an existing GPU generation. There was definitely a deep dive into the platform and I reverse engineered the proprietary Radeon firmware CPU architecture in the process (which nobody had done before), though, so I think I get some credit for that. But e.g. the userspace side "just worked" after a few trivial library patches; AMD's entire userspace blob GL/Vulkan driver worked completely unmodified once the kernel side was fixed up.

This would be adding support for a completely different GPU, which is a whole different ballgame and order of magnitude of complexity.

That said, as many hours as went into the PS4 Linux project, it was a hobby thing and I'm pretty sure if you add up the hours spent on the GPU side it wouldn't hit one month's worth of full-time work. I'm also offering a whole different order of magnitude of time investment here.

If you get funding to do the Linux to Apple hardware port, have you considered streaming the whole process on e.g. Twitch?

Would be very interesting to watch everything from the sideline. And as a reason to do it, aside from being inspiring and educational to others, by live-streaming your work you will certainly be able to attract even more funding over time.

Somewhat responding to a twitter post you made, but the Apple GPU is absolutely not a legacy-free architecture: it still looks broadly (very broadly) similar to a PowerVR GPU, which I don't think anyone would claim is even remotely sane.

To give you some context for the scope of the task: with all the hardware documentation and close to 32 years (combined) experience with that specific architecture it took around two years to write a conformant Vulkan implementation. Not including the compiler, kernel driver, or firmware.

Source: I have worked both on PowerVR and Apple GPU drivers.

I know very well who marcan is and I also have quite some experience in this area. I know how challenging these kind of things are and I just didn't expand on my argument because it is a very ambitious project.
"Just 2D" isn't really a thing, given modern GPU usage is all based on fully programmable 3D pipelines anyway. What I mean is the endless frustrating job of debugging closed source game corner cases (and often outright game bugs) is less critical here, since those games won't exist for ARM anyway. If it gets to the point where X11 and Wayland, desktop environments, common widget toolkits, browsers, media players, etc work smoothly and stably and perform well, then a lot of people will be very happy already. The long tail will always be there to chip at, and that will take years (not like vendor drivers are bug-free on any OS either!), but it's not a blocking factor to a usable desktop Linux experience. Lower-hanging fruit first.
It has been longer than that and 3D support is still a bit shaky. And this is based on known hardware.
Maybe Apple can provide some blobs? Like the closed Nvidia drivers
I doubt Apple would though. Why help people run non-standard OSs on your hardware with no App Store?
Because it sells the hardware, where they make the most money. I don't think they will do something like that, but I think the reason is that they just don't care enough to dedicate internal resources.
Well, even for BootCamp, a marketed feature, they only dropped a halfarsed set of drivers which worked very poorly and were pretty never updated. We need to use hacked AMD drivers to get updates for the Radeons and the Macs still overheat and burn a lot energy due to lack of even basic power saving features. Heck, even the GPU switching isn't implemented.

Why would there be expectation they'd do anything more for Linux?

> Why would there be expectation they'd do anything more for Linux?

Linux is more complementary, compared to Windows which has been an existential threat to the Mac since the 90s.

I agree with an earlier comment: I don't expect Apple will provide any assistance, but neither do I see it as entirely unlikely.

Windows in the Bootcamp role was also compliment ary, in that it enabled a company or individual worker to consider Ape hardware where Windows was a requirement or desired as a personal preference.

This also enabled those users to spend time in MacOS or switch to virtualizing Windows and may lead to one or more personal purchases for themselves or members of their household.

Apple is turning into a services company, though, look at their numbers.

And one of those core services is the App Store.

I'm pretty sure the vast majority of Mac apps still aren't distributed on the App Store. The Mac App Store almost certainly isn't a big money-maker.
They're turning the screws, the ARM Macs are the first Macs that will not run unsigned binaries.

It's already at the point where macOS will treat apps as if they're radioactive if the developer didn't pay the $100 Apple tax before distributing it.

Yet.