News for hackers. Stuff that matters.
Re:Linux on the Mac – state of the union by matt4077 on Sunday December 11, 2016 @10:42PM (#13155346)
Apart from being wrong, that narrative doesn't even make sense as an intro to this article: the criticism was directed at the new MBP hardware – so why would these super-professional uber-users buy it and then replace the OS?

(Not to mention that, if I understood it correctly, Linux currently doesn't even support the keyboard, and is otherwise probably in its usual desktop mode of "WLAN, Sound, or functioning sleep – choose any two".

Re:Linux on the Mac – state of the union by l1k on Monday December 12, 2016 @06:19AM (#13157269)
Author here. As explained in the intro, folks like antirez are considering moving back to Linux and in his linked HN comment he specifically talks about trying Linux on the MacBook he's currently using to see where he's headed. The article seeks to give these folks in particular a helping hand in understanding what works and what doesn't:

https://news.ycombinator.com/item?id=12820490

That said, the kernel developers working on Mac hardware support aren't Apple haters. We're fans. I also don't share the "not for professionals" criticism that was widely directed at the new MacBook Pro fully: E.g. as stated in the article, the four Thunderbolt ports are interesting for HPC applications as you can build a portable compute cluster with up to five fully-meshed high-speed networked nodes. If that's not professional I don't know what is.

Re:Linux on the Mac – state of the union by willvarfar on Monday December 12, 2016 @09:08AM (#13158067)
Really liked the article.

Quickly jotted down my own progress as a user http://williamedwardscoder.tumblr.com/post/154376389528/linu...

Really appreciate people making this stuff work, and hope I can use my retina MBP in the long run.

Re:Linux on the Mac – state of the union by l1k on Monday December 12, 2016 @12:29PM (#13159862)
Thanks! The FileVault2 driver for Linux that you couldn't find is probably this one:

https://github.com/libyal/libfvde/wiki

It's experimental though. Better back up your data.

I'd recommend to create a partition for ZFS and move data there that you want to use on both OSes, or outright install Linux on a zpool and mount that on macOS. This has worked remarkably well for me, even with lz4 compression and all the other great features. Layer ZFS on TrueCrypt if you need encryption, I wrote a howto a while ago but never had the time to update it:

https://github.com/zfsonlinux/pkg-zfs/wiki/Dual-booting-OS-X...

Re:Linux on the Mac – state of the union by scotu on Monday December 12, 2016 @07:55AM (#13157690)
maybe, but not all pros are computer science pros, e.g. photo and videographers for example are pretty pissed that the sdcard reader was removed as far as I know... but then again that's solvable, ram limits far less (3d artists might like it?)
Re:Linux on the Mac – state of the union by asragab on Monday December 12, 2016 @11:47AM (#13159450)
That's right. But it seemed for a while that the MacBook Pro had the feature set, hardware configurations and broad appeal that allowed both groups to be aligned on their hardware choices (i.e. a MacBook Pro).

It is perhaps too early to wave goodbye once and for all to that coalition, but it does seem like some of the design directions that Apple has taken have drifted away from that user base.

That said, this war on the professional and creative class of users began sometime ago - I think the introduction of Final Cut X was the first salvo, while the platform has significantly evolved from the first couple of problematic releases, I personally know some who considered the product a literal betrayal and abandoned ship to Premiere Pro or AVID.

I sense Microsoft is attempting to reassemble that coalition with their offerings, namely the Surface line (especially that gorgeous looking Surface Studio) and the introduction of Bash on Windows, which while still quite limited in its functionality, can be a seen as a step.

I really like my MBP 2013 (NVIDIA GPU) and I guess I am going to keep it a while longer.

Re:Linux on the Mac – state of the union by pjmlp on Monday December 12, 2016 @11:41AM (#13159389)
There are computer science pros that only care about Swift and Objective-C programming, not UNIX.
Re:Linux on the Mac – state of the union by andrepd on Monday December 12, 2016 @07:18AM (#13157512)
> E.g. as stated in the article, the four Thunderbolt ports are interesting for HPC applications as you can build a portable compute cluster with up to five fully-meshed high-speed networked nodes. If that's not professional I don't know what is.

Can you elaborate on what you mean by that? Are you implying a MacBook cluster is an effective HPC platform?

Re:Linux on the Mac – state of the union by l1k on Monday December 12, 2016 @07:53AM (#13157686)
Let's say you're a penetration tester, you're on-site trying to break into a network, have no Internet connectivity (e.g. because you're in a shielded data center or don't want to raise suspicion) and need to crack some passwords. 5x Skylake CPU + 5x Polaris GPU would be a sufficiently beefy platform for Hashcat, and it would fit into your backpack.

Or let's say you want to quickly set up a Hadoop cluster to crunch some data.

Five machines is certainly small as HPC clusters go, and in reality you'll probably have to cap this to four machines because you need one port to attach to a power socket if you need the cluster for more than 2-3 hours. Nevertheless the 4x 40 GBit/s Thunderbolt ports offer some really interesting possibilities, and I'm not aware of any other portable machine that has this right now.

Re:Linux on the Mac – state of the union by TazeTSchnitzel on Monday December 12, 2016 @11:34AM (#13159326)
There's 4 40Gbit/s ports, but their total bandwidth is not 160Gbit/s. IIRC, the ports on the right side of the machine have less total bandwidth because of how they're connected, for example.
Re:Linux on the Mac – state of the union by l1k on Monday December 12, 2016 @11:51AM (#13159486)
That is correct. The Thunderbolt controller has two DisplayPort sink ports which are wired to the GPU, in addition to the PCIe 3.0 4x interface which goes to a root port in the CPU. So to actually max out the 40 Gbit/s, you need to drive external displays and also max out the PCIe 3.0 4x interface. Which is another way to say that 8 Gbit/s are reserved for DisplayPort.
Re:Linux on the Mac – state of the union by skynetv2 on Monday December 12, 2016 @08:16AM (#13157809)
Can you run network stack at 40 Gbps on those ports?
Re:Linux on the Mac – state of the union by l1k on Monday December 12, 2016 @10:05AM (#13158492)
Yes, but as stated in the article only on macOS or Linux on non-Macs. Not with Linux on Macs unfortunately. Someone needs to scrutinize the Intel-developed code for non-Macs, figure out how to port it to Andreas Noever's driver, and fill in the missing parts by reversing the macOS driver.

Also, the Alpine Ridge controllers are attached with PCIe 3.0 4x lanes, that's 31.504 GBit/s, so you can't exhaust the available bandwidth fully.

Re:Linux on the Mac – state of the union by prodigal_erik on Sunday December 11, 2016 @11:03PM (#13155432)
The article talked about how Linux supports several models, not just the latest one. If I owned an older Macbook but now regarded the product line to be doomed, I'd want to know how painful it would be to start migrating to a different platform on my current hardware.
Re:Linux on the Mac – state of the union by drvdevd on Monday December 12, 2016 @01:30AM (#13156079)
Although I have experienced that choice on Apple hardware recently (2015 mbp retina), lately Linux seems to, let's say, 95% Just Work on non-apple x86 hardware for me, WLAN, sound, and suspend/resume.

[edit] and this is with any distro, perhaps with more or less setup work

Re:Linux on the Mac – state of the union by kagamine on Monday December 12, 2016 @02:58AM (#13156406)
I find sleep/resume is successful when the proprietary driver is installed, nouveau isn't doing it doing it for me on Ubuntu derived 16.x distros (this month I have tried KDE Neon and Bodhi). The problem though, is that installing the drivers can be a pain. Last time I tried I soft bricked the PC and ended up doing a full reinstall to save time. As someone further down this thread said, what advantage is there these days in Nvidia not open-sourcing the drivers? They are still going to be selling the display cards.

The other problem for Linux I have encountered recently that burned through my free time was updateing the bios, there are no bios updates with Linux installers, which is annoying because the bios is update is OS agnostic. I had to create a bootable USB drive from a windows program (luckily I have a Windows PC for work) and boot from that. But the how-to guide from HP was lacking in details, and on one PC the program doesn't allow me to create the drive on one PC for use on another, so no bios update there.

The problems I have with Linux never seem to be to do with Linux, it is almost always hardware manufacturers being obstinate and refusing to share their toys with other adults.

Re:Linux on the Mac – state of the union by drvdevd on Monday December 12, 2016 @03:08AM (#13156451)
Yeah in the future, I will certainly be buying hardware that is designed to run desktop/server Linux (and support features you mention like BIOS upgrades easily as well) or is otherwise known to support it well. No more random COTS buys for me without research first. I'm done burning hours on this sort of weird crap vendors want to give us. So if a vendor wants to sell me a PC or enterprise anything, it needs to support Linux well.

I also don't plan to purchase any brand new Apple hardware. I will only adopt Apple hardware late (and used) and will only run OS X if absolutely necessary for some reason.

Re:Linux on the Mac – state of the union by rodgerd on Monday December 12, 2016 @03:50AM (#13156628)
> what advantage is there these days in Nvidia not open-sourcing the drivers?

AMD have demonstrated that trying to do the right thing will get you shit from the maintainers and abuse from bystanders, who will then go and buy Nvidia because it gets a better frame rate.

Re:Linux on the Mac – state of the union by wtallis on Monday December 12, 2016 @03:55AM (#13156662)
AMD's been in the news for trying to half-ass the right thing, and asking the community to lower their standards because AMD is too poor to do the job right.
Re:Linux on the Mac – state of the union by antspiders on Monday December 12, 2016 @01:03PM (#13160177)
I never understand this sentiment: AMD is still putting in effort for a token market (Linux is something like 0.3% of computers if you don't count servers/embedded). Would you rather have them do nothing and leave the cards poorly supported?
Re:Linux on the Mac – state of the union by prodigal_erik on Monday December 12, 2016 @03:56PM (#13161821)
They're putting in token effort and trying to create an impediment for Linux kernel development even on other hardware. And they were warned months ago that it wasn't going to fly.

Having a driver is good, but putting it in-kernel is bad if the kernel devs can't read it and fix it.

Re:Linux on the Mac – state of the union by coldtea on Monday December 12, 2016 @03:07AM (#13156444)
>95% Just Work on non-apple x86 hardware for me

That has been the case for a decade or so now. 95% is not enough (for non-tinkerers)

Re:Linux on the Mac – state of the union by vetinari on Monday December 12, 2016 @08:28AM (#13157870)
That 100% support includes a research before purchase. You just cannot purchase random hardware and hope for the best.

For me, major distributions work out of the box. For example, with my T430s, everything works, including the fingerprint reader and WWAN.

Re:Linux on the Mac – state of the union by drvdevd on Monday December 12, 2016 @03:10AM (#13156462)
Agreed. It's still frustrating -- see my other comment in thread. Even for non-Apple x86 stuff, I'm researching well going forward.
Re:Linux on the Mac – state of the union by drvdevd on Monday December 12, 2016 @03:25AM (#13156522)
This is a really great article I should add and I do wish them luck in their endeavors to support Apple hardware. The developers tone is quite inspirational.
Re:Linux on the Mac – state of the union by WWLink on Monday December 12, 2016 @12:58AM (#13155923)
I wouldn't necessarily blame the "WLAN, sound, or sleep" thing on linux. I'd blame that on cheap parts manufacturers that refuse to distribute open source drivers for fear of releasing company secrets and lack of profit margins to operate on.
Re:Linux on the Mac – state of the union by dispose13432 on Monday December 12, 2016 @02:25AM (#13156294)
>I wouldn't necessarily blame the "WLAN, sound, or sleep" thing on linux. I'd blame that on cheap parts manufacturers that refuse to distribute open source drivers for fear of releasing company secrets and lack of profit margins to operate on.

I don't understand why would anyone not open-source their drivers?

What's NVIDIA's secret sauce? Being able to build great silicon.

What's Intel's secret sauce? Being able to build great silicon.

What's Samsung's secret sauce? Being able to put together great silicon.

So let's say tomorrow Nvidia open-sources all their drivers?

So now you know that which registers do you use to shade what. So now what's AMD going to do? Copy the interface?

It's already copied. Most users use standard OpenGL/DirectX to communicate with their board.

I mean look at Intel. You practically know what's what there. You can make an OS on (at least older) Intel chips without drivers.

Did it help anyone compete?

Re:Linux on the Mac – state of the union by CountSessine on Monday December 12, 2016 @04:10AM (#13156730)
What's NVIDIA's secret sauce? Being able to build great silicon.

NVidia's defining characteristic has been designing good drivers.

Even when they've been behind ATI/AMD in hardware, they've been ahead in driver stability and performance. Especially on Linux where they largely own the CG/post/design market (which mostly uses Linux workstations) and they are the only GPU vendor that has somehow squeezed Windows-competitive performance out of Xorg.

Re:Linux on the Mac – state of the union by coredog64 on Monday December 12, 2016 @10:21AM (#13158616)
> NVidia's defining characteristic has been designing good drivers.

This. When shopping for discrete video cards, I no longer look at AMD's offerings because I'm not willing to fight with their driver, fret over whether or not I should apply updates, etc.

Re:Linux on the Mac – state of the union by vetinari on Monday December 12, 2016 @08:36AM (#13157911)
What is the NVIDIA and AMD secret sauce?

First, read this: http://www.gamedev.net/topic/666419-what-are-your-opinions-o...

So basically, most 3D applications and games are broken to a certain degree. Both NVIDIA and AMD invested quite a lot resources into making those applications run at acceptable level and not looking broken.

Now, when you figure out how to unbroke something and put it into fast path, your competitor can lift that easily into their driver. Neither of these players want that.

The good news is, that DX12/Vulkan/Metal have quite a different approach, they don't have complicated state machine and validation in the driver, making the driver simpler and these workarounds unnecessary. If everything goes well, we may see drivers for these stacks.

Re:Linux on the Mac – state of the union by vacri on Monday December 12, 2016 @02:41AM (#13156339)
As I understand it, Nvidia and AMD can't open-source their graphics drivers are parts of them are under third-party NDA.
Re:Linux on the Mac – state of the union by dispose13432 on Monday December 12, 2016 @02:53AM (#13156389)
>As I understand it, Nvidia and AMD can't open-source their graphics drivers are parts of them are under third-party NDA.

OK, so the question is upstream. Why would Qualcomm, ARM, or any upstream care about people finding out the interface to their hardware?

What secrets are there in the drivers?

Re:Linux on the Mac – state of the union by unwind on Monday December 12, 2016 @05:43AM (#13157142)
Modern graphic card drivers contain full compilers, for the GPU's shading language. It seems reasonable that you can extract performance with better compiler technology.

On the other hand it also seems reasonable that a compiler for e.g. NVIDIA's hardware might be hard to re-target to another vendor's hardware while retaining the same advantage.

Re:Linux on the Mac – state of the union by Someone on Monday December 12, 2016 @03:02AM (#13156427)
One argument I've heard is that they fear patent lawsuits because it might give hints as to how their hardware works.
Re:Linux on the Mac – state of the union by dispose13432 on Monday December 12, 2016 @03:14AM (#13156480)
How would it?

As I understand things (which I'm clearly not an expert at all), CPU opcode is like an ABI,

put this value into register A, this value into register B, and a magic opcode into register C,

and poof, the register D contains the value of A+B.

A driver will say that you put int X into memory point A, Y into memory point A+1, and call function C with argument of A and D will contain the multiplied number.

So how does #2 protect IP over #1?

Re:Linux on the Mac – state of the union by Someone on Monday December 12, 2016 @12:51PM (#13160064)
Let's say your driver exports an API that computes f(x,y,z) where the math turns out such that g(h(x,y),i(y,z)) is an easier and/or numerically better way to compute it.

Let's also say your hardware implements g, h and i, but doesn't wire them together yet. So, your driver's code calls the three functions.

Unknown to you, the trick to use that decomposition is patented. if you release your driver's source code, you make it easier for the patent holder to figure out that you are violating their patent (your programmers might even have made it patently obvious by mentioning the paper describing the trick in a comment)

Unlikely? Maybe, but the way patents are written, who knows? For an almost random example, I searched for "driver code and hardware patents". The first link I clicked was https://www.google.ch/patents/US20090006831. Reading that, I wouldn't know what driver would _not_ infringe on it.

Also, there are many patents on ways to move data around efficiently. Avoiding all of them while still writing a performant driver at not be possible.

Re:Linux on the Mac – state of the union by WildUtah on Monday December 12, 2016 @03:21AM (#13156514)
Mostly because open source would make them easier targets for patent trolling.
Re:Linux on the Mac – state of the union by umanwizard on Monday December 12, 2016 @02:30AM (#13156306)
"Blame" might be the wrong word since nobody involved with Linux has committed any moral failing here. It can certainly be analyzed as a drawback of the open-source model.

Microsoft has a lot of resources to incentivize hardware manufacturers to go to great lengths to make sure their drivers work well with Windows. No organization connected with "Desktop Linux" has that.

Re:Linux on the Mac – state of the union by DasIch on Monday December 12, 2016 @01:22AM (#13156029)
Or it could be that Apple just really doesn't care and most Apple customers don't either.
Re:Linux on the Mac – state of the union by digi_owl on Monday December 12, 2016 @09:00AM (#13158034)
And don't want to reveal the number of ugly hacks they have implemented to get things working in the first place.

the reason Linux drivers are a "mess" is that the hardware they are trying to support are a mess, and said mess is papered over in Windows by the OEM drivers.