Initial M1 support merged into Linux SoC tree
git.kernel.org
git.kernel.org
https://asahilinux.org/2021/03/progress-report-january-febru...
It still applies to what got merged; the past month was spent on clean-ups, fixes, and review feedback, but there are no major changes to the approach. This initial merge was quite complex as it has to touch a number of subsystems and core kernel code in order to support the M1's quirks, and it was CCed to ~20 people. Now that it's done we can more efficiently work on individual drivers and subsystems, so I expect the pace to pick up.
If you would like to support my work on this project, I do have a Patreon: https://www.patreon.com/marcan
I also streamed initial development on YouTube and will be resuming streams next week (patch feedback and git rebasing and munging doesn't make for very interesting streams, but now I'm back to coding). Coming up I have some driver support other people have been working on, and then I'll be writing a minimal hypervisor that can run macOS as a guest, to help reverse engineer the hardware - this will be important for reverse engineering more complex drivers cleanly, especially the GPU kernel side.
Until now we've used a serial cable to debug/load kernels (needs a DIY arduino thing, an proper design I'm working on which is still vapourware, or another M1 box), but Sven added support for the USB device controller and I'll merge it into our bootloader soon, so from this point on anyone will be able to do quick kernel iteration, debugging, and hardware exploration with just a standard USB cable and any other host machine.
One thing I was surprised by: LuaJIT doesn't compile on an M1. LuaJIT 2.1.0 technically compiles, but it core dumps whenever you have a syntax error, which makes it quite a bit less useful.
A reason for this might be due to the lack of __threadlocal support in M1's (apparently, or so says clang). Is there some way this could be addressed in the Linux work?
I'm not sure I have a coherent question here, but my goal is mainly (a) to express surprise that LuaJIT, of all things, doesn't run on an M1, and (b) to maybe suggest that it would be cool as heck to have it running in the Linux M1 work as a benchmark, if possible. I'd hate to see such a wonderful tool get left behind by the new arch.
An informative post about this from the Zig folks: http://www.jakubkonka.com/2021/01/21/llvm-tls-apple-silicon....
Mimalloc had to trudge through the same thing: https://github.com/microsoft/mimalloc/issues/343
I'm not surprised that Zig is using LLD. Zig wants to be fully self-contained, able to cross-compile for any supported platform without requiring the user to install a toolchain for that platform. And they already use LLVM for code generation, so LLD for linking is the natural choice.
It's a beautiful vision - really. Toolchain installation sucks. And the stuff they're doing with processing and bundling OS C headers [1] is quite innovative. It's just that using LLVM for everything is not a reality for Apple platforms yet. Hopefully it will be soon, once Apple whips LLD into shape.
Edit: mimalloc is different; it reimplements thread-local storage by hand, using `asm` statements, rather than using native `thread_local` variables, presumably because the latter can be slow.
[1] https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace...
Apple first sponsored development of LLVM, before clang or LLD existed. Then they sponsored clang development.
LLD came much later. I believe Rui created LLD at Google with an intention of linking Chrome on Windows. That was a very different use case than what Apple had in mind.
Eventually LLD abstracted the target object file, could link ELF executables, and had a good design for furthering support for mach-o. Facebook is developing that in LLD surely to support linking their iOS app much faster. Apple remains disinterested from what I can tell.
While certainly not bug free, you may be overstating things.
> once Apple whips LLD into shape
Pretty sure it's engineers at Facebook contributing mach-o fixes to LLD, not Apple. Apple is happy with their linker ld64.
Ah, sure enough. My mistake.
https://github.com/ziglang/zig/pull/8282
https://chromium.googlesource.com/chromium/src/+/refs/heads/...
How are things looking on the "primary job goal" accounting for GitHub sponsors as well? Think you'll hit it this summer?
https://github.com/linux-3ds/linux/wiki/Table-of-Contents
It's not my project in the sense that I didn't start it, or do most of the work; I just enjoy contributing some fixes here and there and its my first experience working on a bootloader. There's a ton of great documentation (from the community, and ARM) at https://www.3dbrew.org/wiki/Main_Page as well as existing code to reference from others in the community. So I'm still in awe of how marcan goes about finding out how the hardware works without documentation from Apple (which IIUC he has done before with the Wii and BootMii).
I'm hoping to put out a release soon, and maybe stream some development on https://www.twitch.tv/ndesaulniers, then pursue upstreaming what we have.
I guess I should have known better, just like nature, open source "finds a way".
[1] https://www.realworldtech.com/forum/?threadid=196533&curpost...
[2] https://news.ycombinator.com/item?id=25216680
etc..
As another poster has said, there's still a long ways to go for support.
> Hello everybody out there using minix –
> I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386(486) AT clones. (.. .)
> Linus
> PS. Yes – it’s free of any minix code, and it has a multi-threaded fs. It is NOT portable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that’s all I have :-(.
It did sound a bit like a taunt to enlist the community in figuring it out.
Not necessarily.
Reverse engineering the unknown architecture and porting the Linux kernel to the new machine is impressive work that we should support and celebrate.
But making it to be a usable desktop or laptop computer (e.g. with functional power management, 3D acceleration and other drivers) is another matter. See Nvidia graphics. Even after 10 years, some cards are still not fully supported by Nouveau due to the lack of documentation. I'm afraid that Apple M1 is going to stuck at a similar state for a long time - technically, Linux boots, but it's not a machine you'd like to browse the web, write code, or carry around.
There's mainline support for ODROID boards, for example, but you're still dependent on the manufacturer for making sure new kernels actually work with the hardware and for new images. Once that manufacturer stops maintaining the kernel and images for their old hardware, either the community has to step up or you'll be running an increasingly out of date kernel and distro until you buy new hardware.
You're using it here as a substitute for "I believed what he said", when in fact "Drank the kool-aid" means you are admitting you were brainwashed into believing a doomed idea to the point you're practically willing to die for it.
The followers of Elizabeth Holmes or Adam Neumann can be said to have "drank the kool-aid".
If you're not aware, it's a direct reference to the Jonestown mass suicide, so to me it comes off pretty jarring to see it used to refer to something as noncommittal and inconsequential as "I didn't disbelieve his statement".
https://asahilinux.org/2021/03/progress-report-january-febru...
I'm using an m1 macbook air right now and it's the first compelling mac laptop for me since 2015. It's absolutely amazing. But for any workload that uses docker, my linux desktop is streets ahead.
(Yep you need ARM Docker images when running on ARM of course)
I guess to some extent that might be generally useful, what with things like AWS's Graviton ARM processors, but I expect it'll take a while.
[1]Especially now that public docker hub is ip rate limited to uselessness.
There is no point in getting the M1 Macbook (which is last year's model) since they will either announce a M1X or even a M2 Macbook this year which will most certainly be more performant and optimised than the last generation.
One of the several reasons why I stayed away from the first generation of Apple Silicon Macs, and still the software ecosystem is still unoptimised for it.
From [0] (From Preview)
Known issues:
Webview doesn't work
No sound
No device skins
Video codecs not working
32 bit ARM apps won't work
Graphical glitches in some Vulkan apps
Popup on startup about not being able to find the ADB path (ADB will still notice the emulator if you have it installed though)
When building, it may be faster to start then cancel the Python triggered build and then reissue ninja -C objs install/strip versus letting the Python triggered build finish.
This is not even available in the stable release of Android Studio and is still not production ready. What is the point of using this when it clearly says it has missing functionality and is less functional than the android emulators found on macOS on Intel?Once again, Another thing the M1 Macbook early adopter hype-squad omitted as they are still suffering from a sunken cost while I get a second or third generation Apple Silicon Macbook which will be much more optimised and by then the ecosystem will be better supported out of the box.
Now, explain yourself.
[0] https://androidstudio.googleblog.com/2020/12/android-emulato...
It's rough around the edges and whether or not your use case is successful is definitely very specific, but for my personal hobby projects (ECU reverse engineering), it's been an excellent tool. Ghidra worked out-of-the-box in Rosetta and natively with a few simple build system tweaks, tricore-qemu was trivial to build, Mono is working, VSCode is nicer than ever, and CrossOver Wine (in Rosetta) even works great for running Windows-only toolchains. The battery life and performance-to-price ratio on the Air have been amazing. And, some things like GMP are _ridiculously_ fast - a brute-force RNG -> RSA attack I developed is actually faster on the M1 MacBook Air than on my not-that-old Ryzen desktop.
I agree that the hype is tiring, and yes, some things like Android development don't work correctly yet - but not everyone is an Android developer, and dismissing the first-gen Apple Silicon products in a blanket way goes against the experience of many people. Thus, downvotes.
I've been hearing something similar when I got a PS4 in summer 2019. PS5 is still barely available, and I've had almost 2 years of gaming fun. To be fair, the PS4 didn't have as many rough edges back then. But "no point" is a generalization that isn't true for many people.
I only apply this rule to Apple as they seem to think that people upgrade their Macs like they upgrade their iPhones which is every year.
A tool that exists is far more useful than a tool that does not exist.
Or as they used to say in the olden days: A bird in the hand is worth two in the bush.
A tool that already works (Intel Mac) is far more useful and much better than buying a tool that exists and doesn't work with your existing setup or requires more tweaks and more hacks for it to work. (M1 Mac).
Or as they used to say in the olden days: If it ain't broke, don't fix it.
(In the case for Apple which release new product generations every year, always skip the first generation)
Apple is known to frequently update their Macbook line up every year so I am in no hurry to upgrade my Intel Macbook, until they eventually 'start' the process of removing Intel support which by then a third or forth generation Apple Silicon Mac will be available.
Plenty of time to wait and use what already works, rather than jumping on early tech and then finding out that the software support is still WIP or in preview state.
I also see some changes to what looks like common arm64 code, which isn't guarded to check for Apple or non-Apple; it seemed strange to me that those changes would be ok.
I wonder if both of those things are just changes from an unrelated merge that are showing up in this diff for no reason.
Mostly the section on IRQ.
This is the exact opposite of your e.g. android phone "fork and abandon" where someone does the absolute minimal and ugliest hacks that upstream would never accept.
Cyclades removal was about dead, unmaintained code: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/...
This is a 60-commit branch, which had to decouple a lot of different bits of ARM-platform code. Specifically, they use a totally different boot method, have a weird and special power-management system, and other stuff I don't know. See this article: https://asahilinux.org/2021/03/progress-report-january-febru...
Here are the original commits:
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/...
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/...
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/... is the better commit to look at for the stuff that I just merged that was not already part of linux-next.
(Thinking back to the stuff in https://asahilinux.org/2021/03/progress-report-january-febru...)
I too would love an MBP than could run Linux well.
While it's great that we can boot it on pretty much every device out there, I would much prefer if it was a viable Windows alternative on a few devices instead.
Just yesterday, I plugged an external screen into my Ubuntu laptop. And then I had to duck-duck for like an hour to figure out how to make the fonts large enough to be readable again.
And why doesn't the file browser reliably show me all the files in a folder? Sometimes, the first file in alphabetical order is just omitted.
I sincerely want to like Linux for Desktop as much as I love it on servers. But the fact is, OSX and Windows just make you so much more productive, because things just work.
These businesses have no interest in trying to develop a desktop UI when Mac OS and Windows work fine already and someone else is doing all the work for it already.
Not everyone is like that but that's definitely the prevailing attitude. A good example is the regular hate that SystemD receives. Nobody wants a modern system that supports hotplugging and GUI configuration. They think you should edit init.rc files by hand and reboot your desktop (laptop? what's that?) whenever you plug something in.
I personally hate SystemD also, but that's more because it makes it such a pain to stuff like look at logs. I never remember the correct journalctl command. Just let me cat/tail a file like everything else. I don't know anyone who hates SystemD because it allows GUI configuration. It's just that SystemD made some other changes also that people don't like.
After that, cd’ing around my minimal - yet blazing fast - thinkpad w/ void linux felt nearly exhilirating. Didn’t have to touch the mouse for many minutes at a time.
The best way is just to take the plunge. Immerse yourself by removing other OSes from your own PC. In a few weeks you'll be flying.
Here's a few pain points:
- Scroll direction can only be set globally so either touchpad or mouse scrolling feels awkward for me
- You need an extra click on another window before you can interact with it
- No focus-follows-mouse (there used to be 3rd party plugins but those seem to be gone now)
- While basic split screen tiling works and you can set up a global kb shortcut to move windows to left/right of the screen, Firefox seems to completely ignore those
- If you're running multiple displays macos for some reason always picks the most awkward display to open new windows in
- I really miss being able to grab and resize windows using a modifier key like in XFCE
I'm sure I'd get used to many of those, but the lack of focus-follows-mouse and easy window manipulation are the big one for me and I don't think that'll change much. Actually I think those were already pain points when I last tried out Mac OS in the late PPC days.
There's of course plenty of things that I like, especially the tight integration with my iphone and trackpad gestures (although I'm not sure how ergonomic using the trackpad all day is).
I was hoping it could become my main driver at home, but now I ordered a Ryzen mini PC for that.
edit: Oh, I completely forgot the biggest deal breaker for me at the moment. As of now the GUI version of Emacs (either downloaded through brew or from https://emacsformacosx.com/) doesn't work. MacOS simply refuses to start the binary.
I don't have this issue, I can interact with a window just by hovering over it with the mouse pointer
> - If you're running multiple displays macos for some reason always picks the most awkward display to open new windows in
You can set the default display in the settings (under arrangement, drag the white bar to the display you want to make the default)
Agree about the other issues though.
Hm, maybe it's just Firefox that's a bad citizen here, like with the global shortcuts.
I think the other poster has some addon installed and forgot about it.
But, having clicks work on hover instead of after focus is fine, and simply has a different set of trade offs.
You can also switch focus to a window without raising it by holding down Control+Option and clicking the window.
At any rate, a lot of these things can be chalked up to different philosophies, I think. Personally, I really don't like focus follows mouse; when I was using FreeBSD and Linux many years ago, I would try it and then end up disabling it after a short while.
It is worth noting that Terminal has a hidden preference for focus-follows-mouse:
defaults write com.apple.Terminal FocusFollowsMouse -bool true
You can also change that setting, along with those of some other quirky system things, in third-party apps like TinkerTool and Onyx.I fully understand if you find this to be not really good enough, but this is the only way to make them work for you.
Because Apple interfaces are highly opinionated and generally fairly consistent, learning to do things the Apple way is a valid life choice for many people.
The fact that many online Linux users take offense to lack of customization is not really something to worry about in my opinion. I used to customize Linux installs endlessly, but only truly found zen when I stopped worrying committed to stick to Fedora's default install.
[1]: Besides the point but Gnome is arguably far and away the most customizable desktop shell on Linux, as its extension "mechanism" consists of literally overwriting the JS code that powers its shell interface. For better and worse.
Under macOS, windows just kind of exist as they want to be and pile up until you intentionally change them, and the environment doesn't push you to manage it, so you end up not putting much thought into anything but the 1-3 windows you're using at that exact moment.
The mac approach taps a bit into spatial memory too, which makes auto-tiling like with i3 irritating because then windows no longer have an inherent size or position — it all continually changes as windows open and close unless I start maintaining window sets, so at the end of the day I'm still putting more thought into management than I would've under macOS.
Because of this it's long been a desire of mine to have a Linux DE that closely mimics macOS. Some will point to GNOME, but it's more like iPadOS if it were adapted to the desktop. Elementary gets closer but still misses the mark. It would be a neat hobby project to take up but figuring out how to get started is rough, especially with all Wayland example WMs and tutorials being for tiling instead of traditional floating.
- resize and move windows with shortcuts: https://rectangleapp.com/
both free and open source
Personally I consider the stock macOS desktop experience to be perfectly fine.
In any case I guess it'll get fixed eventually.
cd /Applications/Emacs.app/Contents/MacOS
./Emacs-arm64-11_2
- No focus-follows-mouse (there used to be 3rd party plugins but those seem to be gone now)
- While basic split screen tiling works and you can set up a global kb shortcut to move windows to left/right of the screen, Firefox seems to completely ignore those
- If you're running multiple displays macos for some reason always picks the most awkward display to open new windows in
- I really miss being able to grab and resize windows using a modifier key like in XFCE
All of these things can be done with yabai https://github.com/koekeishiya/yabai
brew tap d12frosted/emacs-plus
brew install emacs-plus@27
Edit: codeThere are some gaps in Wayland - screen sharing being the obvious one. But these gaps are in the process of being closed (pipewire being part of the picture). Give it another year and I believe that Wayland will be a solid solution for all the major use cases (multi-monitor, high-dpi, screen sharing).
My other issue with Linux as a workstation solution is OOM handling, and even that is being worked on!
I'm going to be sad that a lot of little WMs are probably never going to make the jump. I'm not sure Wayland is ever going to get that many.
> And then it still needs a centralized way to monetize the development work.
I disagree: once you put money into the equation, the quality of packages will go down as programmers try to shake as much money out of the users. Compare programs like MATLAB vs GNU Octave or Photoshop vs GIMP for example.
> And to get all that, you need a ton of paying users, not a bunch of freeloading tinkerers.
Do you really? I mean you are basically saying that the only way linux can compete is if it sacrifices most of what makes it good in the first place. I really doubt that users think "hmm today i'm going to pay for a bunch of crappy apps that each do some trivial thing for me while uploading my data to the cloud, then watch some ads, and then wade through a bunch of graphical menus to disable this one stupid feature I don't like, i love using iWinux this is so much better than other OS's".
There's GTK2, GTK3, vanilla Qt, KDE-Qt with additional tooling... The problem in Linux is the lack of integration between these tools. The fragmentation of the GNU/Linux ecosystem forbids the possibility of an unified API like HaikuOS kits. (https://www.haiku-os.org/docs/api/)
And are you saying that gimp is a superior product to photoshop? It’s not like you can’t get gimp or octave on non-free OSes, but for some (good) reasons illustrators and scientists and engineers choose to pay for photoshop and matlab.
Having any distro running Gnome 40 with full gesture support would be seriously compelling for daily driving.
Here's what I want:
- Something that is faster than the last Apple laptop I loved which, I bought in 2012. I currently have a 2017 model which is barely faster and has the famous cluster fuck of a keyboard that I loathe with a passion. The 2012 model would have been a MBP 15" with a quad core i7, 16GB, and 256GB. Anything less than those specs is beyond pathetically and woefully inadequate. Anything not at least 2-8x better than that is still unimpressive given that we've had 4 iterations of Moore's law since then. Right now, I'd probably settle for 64GB RAM and some nice 8-16 core CPU. I'd take more if I could. Those AMD chips look pretty nice. Core i-9 also not too bad.
- 13-15" hdpi, non negotiable. I will never downgrade to anything less than a 4K screen. I'm writing this on an imac with a 5K screen. It's from 2014. My current laptop has a retina screen. It's four years old. It's 2021. I don't want/need a screen that was outdated and underwhelming 6 years ago.
- A trackpad that doesn't suck. I don't want want/need physical mouse buttons. I'm not ever going to use an external mouse. I want something I can use that doesn't actually suck. Apple nailed that more than a decade ago. Some manufacturers come close to this platonic ideal of a trackpad. Bot most don't even pretend to bother. Also, linux support for this seems to be a perpetual work in progress.
- A keyboard that is comfortable to use. Seems obvious but again hard to get. Apple messed this up and is in the process of correcting that mistake. It matters. I use laptops, a lot. My wrists matter to me. So do ergonomics. Or having an actual escape key (seriously, WTF Apple).
- Modern ports (USB-C, thunderbolt), bluetooth and wifi that work and with recent specs. I don't actually care about legacy ports that much and certainly not about the extra space and weight that seems to imply. But I do care that my headphones connect and that I can plug in a fancy screen with high resolution and its own assortment of ports. I.e. a thunderbolt screen that I can daisy chain to other screens and my laptop.
- A sensible design and weight. I don't want a ten kilo brick in my backpack.
- Lap friendly cooling. I actually use my laptop on my lap. I don't want it leaving scorch marks on my pants. Nor do I want it to sound like a vacuum cleaner.
What I described is a pro laptop. High end requirements. I know of a handful of models that come close to this. All of these have issues with Linux support. Key components that don't work or are not fully supported or require lots of hacks to get working.
That's going to be a long wait. Most consumers don't need more than 4 cores and 16GB and that's where the mass market is. Prosumer models don't reach that high and pro workstations are big and clunky because companies would rather buy a stationary workstation and a light laptop instead of paying $6k or whatever such a beast would cost. With ubiquitous networking, the trend plays against you, I think.
Cost just under £4k in total.
It's hard to emphasize this enough but the MacBook trackpad is so good that even when I have a mouse attached to the laptop, I use the trackpad.
The gestures are indispensable for my workflow. Excluding the touchbar, the entire workflow is far more ergonomic than anything I have seen on the market.
I sincerely wish someone would exactly clone the MacBook pro 13 and leave it as an open platform for whatever OS you want to run.
I think shipping the unreliable butterfly keyboards for so long might be the largest mishap modern Apple has made.
That said, I know at least one person who genuinely prefers the butterfly mechanism, there must be dozens such people out there.
Edit: The late 2013 one got a new keyboard in early 2020 as part of a inflated battery exchange, so it's not mushy due to wear.
Now I've capitulated and am just waiting for the next iteration of the Apple silicon Macbooks.
It is sad, but due to not generating sales at the same scale as MS or Apple, Linux lacks the development power to keep up.
Usable as a pointer, maybe, but the trackpad has about 12 other features. Gestures, tap to click, have made the trackpad indispensable to me.
Thank you in advance. You will find appreciative audience here in HN for such engineering porn.
Here is one effort to port all of M1 macs to linux: https://www.patreon.com/marcan
Macs seem to support Linux a few years after release. They were usually a great choice when modern macOS got too slow for that model.
I also never found a good fit on the Windows side for a Linux laptop. I always ran Linux on a desktop. So maybe I would choose a Mac laptop to run Linux...
I have 2016 and 2018 Intel laptops (non-Apple, but similar in "class"), and it's surprising how much better the graphics is on the 2018 model.
I would love to try a laptop with AMD graphics, but the laptops I find with AMD kit in them generally don't meet my requirements for other reasons. And I'm forever scarred by mid-'00s experiences with Nvidia on Linux, so I refuse to buy Nvidia hardware.
I do some light gaming (not enough to justify a desktop/gaming PC), and even with 2010-era games I can't run them on 2018 Intel graphics with the quality settings above "medium", so I'll take the fastest Intel graphics I can get.
I really doubt that Apple will latch onto the Linux porting effort at all. Their goal is to get people to buy their laptops and run macOS on them, and to lock developers in via Xcode and the Mac (and iOS) App Stores. Linux would be a distraction, at best.
That does not require graphics, though. Actually I would not be surprised if they would release information for everything but graphics and wireless.
Not sure why everyone in this thread is so hesitant about Linux on a laptop? It literally just works (tm) for me and I haven’t used windows for 10 years and will never have a personal Mac.
If I didn't use my computer for music production I'd have no problem going Linux only.
But yeah, short-term there's a bit of a barrier to entry. Once it's overcome, though, this might be what pushes me to voluntarily buy any piece of Apple hardware made after 2007.
I am not sure why would would expect better success with this processor than we have had with x86? Most PC hardware is directly supported by the OEM in Linux.
But you're right - the experience is way better than a decade ago and these days I'd expect anything that's been on the shelf of a local office store to work just fine.
* Bumblebee/Optimus is a pain in the ass to install
* Performance on the second screen with Optimus is dreadful (sub 30Hz refresh rate)
* Being an NVidia card, I have the choice between Nouveau which can only put it into its low power state (which fucks me over when I need to use the Android emulator), or the proprietary nvidia ones which are, well, shit.
* Putting the laptop to sleep with an external display connected is a sure way to have it crash when it starts back up.
* Just kidding it doesn't actually go to sleep, the GPU stays on and runs like crazy.
I would _love_ to be running Debian on this machine. Sadly, the state of some things on Linux makes it impossible for me.
My emergency laptop, an 8 year old low end HP with a broken keyboard is still happily running along with Debian though.
Whenever I need to run CUDA stuff (my only use case for the nvidia GPU), I power it up, and pass it through to a VM that also runs Linux, but with the horrid nvidia stuff installed. Works like a charm.
I have this going on two very similar machines: A circa 2017 XPS 9560, and a circa 2020 XPS 7590. Both are 15". I don't have the 9560 near me at the moment, but the 7590 has
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev ff)
I'm happy to help you debug if you want. What happens if you remove all nvidia drivers and plug something into the HDMI port? Do you notice any response from the external screen if you hit for example control f2?
Use this instead:
https://download.nvidia.com/XFree86/Linux-x86_64/440.31/READ...
https://download.nvidia.com/XFree86/Linux-x86_64/465.19.01/R...
And https://download.nvidia.com/XFree86/Linux-x86_64/465.19.01/R... for power management, including turning off the GPU entirely when unused.
This includes mostly graphics driver issues (either simply Nvidia, or hybrids, or some exotic protocols such as DisplayLink), but also touchpad, power/suspend issues (e.g. wake-up failure), lack of fingerprint or smartcard reader drivers... Without mentioning certain manufacturers forcing you to use Windows simply to update docking station firmware drivers (like Dell does).
I still favor Linux whenever I can, but there is a real issue in several models, especially bleeding-edge powerful laptops from brands favored by businesses. Linux certification does improve things, but it often omits "optional" components such as fingerprint readers.
Overall, about 1-2 years after the new laptop model has been released, almost everything works fine, but when you're among the first users, some amount of time will be spent in forums trying to find solutions and workarounds for such issues.
It’s the lack of hibernate that really sucks. I got my 2013 MBA battery replaced. Leave it unplugged for 10 hours. 1% battery drop.
XPS 17 on Pop OS LTS with kernel 5.8. I have to shut down if I want battery left.
It is such a frequent issue I wrote an article 10 years ago that is still extremely relevant with simple instructions to enable a kernel work-around [0].
Specifically the problem is the ACPI DSDT (Differentiated System Description Table) - which is actually byte-code installed by the device manufacturer (but executed by the host OS) that handles device power states and enablement.
The problem is almost always DSDT methods are written to conditionally configure system hardware optimally ONLY when the host OS is a version of Windows as declared by the host OS's ACPI OSI (Operating System Identification).
When Linux boots only a minimal configuration is applied which very often has never been tested and thus devices fail to work reliably, especially for suspend/resume, in interesting ways.
Fortunately, Linux has a WORKAROUND that allows passing a 'fake' OSI on the kernel command-line in the form:
acpi_osi=! "acpi_osi=Windows XXXX"
The first instance (=!) clears all built-in kernel OSIs to avoid confusion. The second string sets the 'best' and only OSI value which has been found in the DSDT of that PC.That can be discovered from a Linux boot using:
sudo strings /sys/firmware/acpi/tables/DSDT | grep -i 'windows ' | sort
E.g: on my Lenovo E495 (AMD Ryzen 7 3700U) I have: Microsoft Windows NT
Windows 2001
Windows 2001.1
Windows 2001 SP1
Windows 2001 SP2
Windows 2001 SP3
Windows 2006
Windows 2006 SP1
Windows 2009
Windows 2009
Windows 2012
Windows 2013
Windows 2015
Windows 2015
Windows 2016
So, on the basis that "Windows 2016" is the 'latest' and likely the OSI expected to enable all features optimally I use that. On Debian/Ubuntu I therefore have: /etc/default/grub.d/local.cfg
GRUB_CMDLINE_LINUX="acpi_osi=! \"acpi_osi=Windows 2016\" "
Notice the escaped quote-marks inside the shell string since the argument contains a space.(some folks might prefer to edit the package-shipped /etc/default/grub but I prefer to leave that virgin to avoid package-upgrade prompts when that file is replaced.)
After:
sudo update-grub
/boot/grub/grub.cfg
will have the acpi_osi= entries added to all the "linux ..." command linesE.g:
$ grep acpi_osi= /boot/grub/grub.cfg
linux /vmlinuz-5.12.0-rc5+ root=/dev/mapper/ELLOE000-rootfs ro acpi_osi=! "acpi_osi=Windows 2016" systemd.unified_cgroup_hierarchy=1 nosplash
[0] https://iam.tj/prototype/enhancements/Windows-acpi_osi.htmlhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
https://www.kernel.org/doc/Documentation/firmware-guide/acpi...
Clearly in some cases the manufacturers overrides for Linux are required...
Before the update: Windows sleep was strange, it would sleep but drain battery like crazy. Linux sleep was perfect, I could have the laptop sleeping for days.
After the update: Linux sleep started showing the exact problem as Windows now.
I did not dive much further because I switched jobs and got a ThinkPad at the new one which works perfect.
Semi on topic: I don't have one either but I would really like to, simply because then I could have a stronger account password.
Having to frequently use sudo restricts the length/complexity of the password since a longer one would simply be a pain in the ass to use. With a fingerprint reader this problem wouldn't exist.
It depends on the category of device and what feature you want. I recently got an X1 Tablet (the 2-in-1 version of the X1 Carbon), and it barely works on Linux; there's a veritable zoo of inscrutable bugs that render the device very annoying to use (for example, Plasma's night mode disables when you re-attach the keyboard). It's clear that the FOSS ecosystem as a whole places little priority on touchscreeny things, either on the device end or the software end; the overlap between people hackish enough to fix weird bugs and people who find 2-in-1 tablets compelling enough to hack on is evidently smaller than with normal laptops.
I think the best bet is going with as much of a run off the mill device as possible. In my experience a separate tablet works much better than a 2-in-1 compromise anyway. When your sole input device is a touchscreen, UX is (unsurprisingly) massively better with a touch-first UI compared to a mouse-first UI.
Android, on the other hand, is strictly improved by the addition of a hardware keyboard.
If you’re still looking, you could check out JingOS. I haven’t tried it personally but it seems to be basically an iPadOS desktop environment for Linux.
On ubuntu 18.04 or before you could/should do this : sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
Starting with 20.04 it's by default so you don't even need it IIRC.
I've also had good experiences with linux laptops. Maybe not perfect, but more like easily resolved in 20 minutes of googling, which is totally reasonable to me.
Your best bet is a Dell laptop with an integrated Intel gpu chip.
At some point the churn got to me and I stopped customising my computer environments. Just use the defaults. By this time OSX was a "real UNIX" and I hopped over. No regrets. It does what I need it to do, which is still mostly to run a terminal and a browser.
I will say that reliably turning on and off when I close the lid is a great quality of life improvement.
One solution is getting a wired mic.
E: Realised "sharing" would be ambiguous - I mean screen sharing on video calls, etc.
That Linux MS Teams client can only do read-only sharing (no giving control to remote party) is another matter, which bothers me a lot.
I feel like this is true of every computing platform in general.
"I don't even have any problems with bluetooth, audio or a secondary display"
Why would you mention these? Why would anybody expect to have problems with that? ;)
FWIW I use linux on laptop for dev, it's great for my specific use case (terminals flying around), I would not recommend it to my family.
i3wm FTW
Because other people on Hacker News always mention problems like them.
Because you can expect issues with this for example on mac?
https://www.reddit.com/r/macbookpro/comments/ekh86o/macbook_...
1. Poor discoverability and ease of use - if you have an issue or a need, it's often really hard to find out how to solve it. Even if you do manage to find a solution, often it's not quite plug-and-play and you have to mess around in configs or compile something yourself in order to get it to work. Fun for college students, but a massive pain for everyone else.
2. Hardware drivers: 50% of my issues with linux come from nvidia being an ass. Fuck you, nvidia. Likewise with other devices that often only get third-party drivers which aren't good enough or require more wrangling, see problem 1.
Every OS will add annoyances and bugs on top. But it's on Linux where people usually have to fight/configure/trial-and-error to get basic things working more often than Windows and macOS.
And this is not some Linux hater notion. It has been complained about by people like ESR, Linus, and Miguel Icaza. If the original "bazaar" proponent, the founder of the OS, and the original creator of the still major desktop environment have issues with ease-of-use and just-works, who are we to say otherwise?
I have a nice list of issues that contradicts that statement. For example, M1 macs like to kernel panic for some reason.
> But it's on Linux where people usually have to fight/configure/trial-and-error to get basic things working more often than Windows and macOS.
Depends what you are trying to achieve. If you were trying to hackintosh some random ASUS+AMD laptop, your experience would not be nice either. Similarly, when you are trying to use random crap (that's technical term) where nobody ever did any integration with Linux, the experience will be bad (that someone doing the integration is going to be you). If you use either supported machine model (where the machine vendor did all the work), or machine that's very near to reference designs (where the chip vendors did the work), you experience will be much better.
Better than my colleagues who use a Macbook and can't use Display Ports correctly, can't plug a cable into one side without it ramping up CPU, can't use their keyboards after a while, etcetcetc.
My XPS 15 wifi won't wake automatically after sleep on Windows. Wifi works perfectly on Linux, but there are things that don't work with the touchscreen in tablet mode on Fedora that I've been told work on Ubuntu.
My T2 MacBooks are little nightmares sometimes, fans screaming during video meetings and crashing and draining battery instead of sleeping, and I still haven't seen a compelling reason to give up my 2015 13". If the second gen M-series solves the weirder problems, maybe.
The 2016-2019 mbp have been ripped on by everyone, Mac fan or not. I'm not sure if they will go down as the worst Macs of all time, but it might the longest stretch of bad Macs in the history of the Mac.
With the M1 that time appears to be over - finally.
security = 1 / convenienceIf you wanted to use a TPM to store the FDE passphrase, well, you have the patience of a saint. Compare this to Mac or Windows where you click a single button and it's all setup, including TPM!
As much as I love linux for server environments, it remains a failure when it comes to modern desktop environments.
On top of what you mentioned, software distribution on Linux is still a nightmare for normal users. Yea apt-get is great for us nerds, but Bob the Accountant has no desire to use a CLI. Linux will not be viable on the modern desktop until the user never has to see a CLI.
- a limitation of the laptop
- a limitation of linux
- a configuration issue (limitation of time / person)
I also have an older Macbook Air, and when I tried to auto-update it to the latest MacOS, the update process corrupted my partition and lost all my files (thankfully backed up in the cloud).
Also had issues with Windows Update being broken out of the box when I tried to set up a PC for my mom with Windows 8. Seriously, I needed to manually download an update on a thumb drive to fix windows update. Like, how did this OS release ever pass QA?
I would honestly say Linux on the desktop and on laptops is pretty good in my experience, and if it had just a little more support from hardware vendors it would be near-perfect. I would definitely say that compared to Windows, the Linux experience is a lot better.
(To be fair, my first Mac+Linux experience was on a PowerBook, which surprisingly worked rather well, though power management was terrible so battery life suffered. Once the Intel train started, it was... not great.)
In 2016 I bought a Razer Blade Stealth, and Linux ran perfectly on it; there was even 3rd-party support for custom things like the tweakable RGB keyboard backlight.
Like a fool, I didn't learn from my mistakes, and in 2018 I installed Linux on an employer-provided 2016 MacBook Pro. At the time, the keyboard and trackpad required an out-of-tree kernel driver (so I needed a USB keyboard and mouse to install), and audio and suspend-to-RAM didn't work (well, suspend was fine, but the disk drive wouldn't wake up on resume). My timing here was actually good, as not long before this, the NVMe drive itself didn't even work.
In 2019 I bought a Dell XPS 13, and aside from the fingerprint sensor, Linux again runs perfectly on it.
So, if you get yourself a laptop that is either specifically made to support Linux, or you've determined via research works well with Linux on it, then you should be fine. Otherwise, you'll probably have issues, unless you're lucky.
(Avoiding laptops with certain things, like Nvidia video and Broadcom WiFi, helps a lot.)
- Support for Optimus laptops with on-demand rendering offload, if one does the research and uses the correct env variables or tries the "Launch using Dedicated Graphics Card" menu item in GNOME.
- Some whispers of Nvidia finally using dmabuf in the next version of its drivers. With appropriate code/kernel module restructuring for GPL compatibility, I guess.
For me kernel update does not sound as something big, at least I know that something like kernel exists in Linux, the point is that average computer user these days does not have such knowledge.
That was just one example. Many people can give more and more on various issues. Some edge cases with routers provided by ISP. With wifi repeaters/boosters. With printers. DLNA equipment connectivity (I had this one too - again, after googling I've installed some software and it started to work, but average... and so on).
Typically older equipment and standard peripherals work ok. But people use all kind of stuff.
Touchpad is not Macbook-level, though. But may be XPS is better.
I also find it to be stable and generally good distro, but of course that's more subjective.
Everything graphics related is crap compared to Windows and MacOS. From Optimus not working to all kinds of high DPI issues, to the ease of not completely breaking things with a bad driver update.
It's not really Linux's fault, but it affects the user experience for sure.
The Ubuntu bluetooth stack has been misconfigured for a long time, and it still is (specifically, the pulseaudio bluetooth module is misnamed; there is an open bug). I use an Ubuntu MATE, but I think this applies to the other Ubuntu distros as well.
It also had other misconfigurations in the past, and anyway, the bluetooth stack has always been poor quality (nowadays is much better though).
Even the Dell XPS, which is supposed to be perfectly compatible, has minor niggles (in other areas).
So, Ubuntu/Linux works acceptably... yes, but perfectly, definitely not.
I feel the only people that say Linux works great on a laptop is because A) it manages to boot it and 2) Never used a MacBook Pro or similar so they don't know what something working well means.
I'd love to use a linux laptop and I've used it many years in the past, but not going back this year. It is not ready yet for my expectations.
My current benchmark for laptop integration is a Dell XPS 13 2-in-1 that my previous employer bought me with Windows 10. It had a high-DPI screen and there were so many bugs it wasn't even funny. The touchpad was horrible to use. Connecting and disconnecting external monitors was a fun adventure not unlike playing roulette to see if the big presentation you're about to make will ever show on the projector.
Overall, I'd say my Windows and Linux experiences on laptops has been about equal in terms of frustration and annoyance. I haven't had a Mac since like 2007 when I got rid of my G4 PowerBook which was probably the most polished laptop I've ever used in terms of hardware/software just working-ness.
Windows 10 is a mess. It makes Linux on a laptop much easier to bear :)
I'm very skeptical we will ever see such a good integration in the linux or windows world because there isn't any single entity doing both.
My ideal situation would be a Macbook Pro running linux to the perfection, or just having MacOS open source. I don't think I'm going to see any of this in my lifetime.
Had no problems plugging my 4k LG CX with at 1440p@120Hz mode, which is kinda more than I managed to do with Mac.
>Never used a MacBook Pro or similar so they don't know what something working well means
Nope. Used three different macs over course of 4 years due to fact that three employers provided me them. I hated those machines, especially constant overheating issues when using external monitors. Maybe M1 fixed that, but they still won't offer it with 16' ones.
Also hated the UI with burning passion. Only thing that made it usable is the fact that maximizing window switches the window to a different "workspace". If only those were numbered, persistently assigned to monitors and windows could be configured to only spawn on particular workspaces it would be pretty nice though.
One thing I really liked though is retina display on two later ones.
On the contrary; if you use all three systems, you realize, that all of them have quirks. You just got used to them, so you don't get disturbed to them, but the quirks of the system you don't use regularly will get noticed quickly.
For example, only with the above-mentioned MacBook Pro I experienced a situation, where I'm connected to the wifi, unless suddenly I'am not, all network packets go to null and to get connected again, I have to reboot the machine. Or the machine randomly not waking up from sleep, when connected to TB dock. Or - new on M1 - machine kernel panicking, the menu bar getting non-responsive or not recognizing ethernet adapter in the TB dock at all.
Eventually whoever was posting these probably moved on to a different model, which meant mine would stop working correctly when I'd upgrade Ubuntu.
I used Ubuntu on my sole/main machine for a month up until recently: i9 10900K, 32GB, 1TB NVMe SSD, GTX1080, MSI Z-490-A Pro, 3 x screens.
In my day job I'm a .NET developer so I created a Windows 10 VM for VS 2019 and allocated 4 cores and 12GB RAM. I used VMWare Workstation 16. It was smooth as hell.
I developed PHP/Laravel/Wordpress stuff in Linux using PHP Storm and VSCode. Docker on Linux natively is faster than in WSL2 (I know it's to do with accessing the file system but still...).
I learned a whole bunch of commands in this time and learned to live inside the terminal for a chunk of my work. It was fantastic. I loved it.
I also loved being able to configure Ubuntu and make it look like I wanted with new icons and whatnot: I didn't go mental, but it looked cool when I was finished.
All in all, as a dev machine (and browsing 'n' stuff) it worked... quite ok, sort of: it wasn't all plain sailing. Here are the issues I had
1. Realtek 2.5GB nic would not work so I bought a 1G USB nic and it ran fine without all kinds of tweaking (yes, I tried a bunch of stuff I found online but I can't get the realtek nic to work: something to do with the older kernel)
2a. When waking from sleep it sometimes lost network so had to reboot
2b. When waking from sleep AND with NordVPN on in the background it always failed to find a network card... reboot fixed it
3. Printer (HP MFP M477DW) would disappear frequently. Ubuntu would find it again when I asked but it wouldn't print to it. This required wizardry to get it running... more miss than hit so I ended up only using it through the Windows 10 VM
4. It would hang sometimes. Music would still be playing in the background but would become unresponsive. Happened maybe 5 times in a month. Reboot to fix.
5. VMWare workstation wouldn't work properly if I had display scaling turned on inside Ubuntu: it had no idea what resolution to show so I had to turn it off making things smaller than I'd like on the Ubuntu DESKTOP
6. Sound would fail regularly: usually crackled when I opened a web page. So I either close every browser window or stop all sound playing for a minute or so. I use a soundblaster something-or-other card.
7. OnlyOffice would open off-screen every single time. I had to do Alt+Space every time. Works perfectly on Windows 10. I switched to Libreoffice
All in all, it has come a long way since I last used it a few years ago but I NEVER have any of these issues in Windows 10. Ever. And, whether we like it or not, we tend to remember the bad stuff and I can't get away from the fact that W10 is just more stable.... for me, on my hardware, at least.
But I should caveat that by saying that I've disabled literally EVERYTHING in W10 using O&O Shutup, including updates (I've also deleted the Windows Update Medic Service dll so it doesn't turn updates back on). I hate notifications and I want to pick when I run updates myself - given the spotty nature of the updates I usually wait a while, like when I've finished some client work and can afford a bit of downtime if the update fails)
In Linux' defense, VMware workstation 16 running Windows 10 is smoother than a Windows 10 VM on VMware workstation on Windows. No idea why, it just runs smoother. If Linux stability was fixed (waking from sleep especially) I would switch immediately but all the tiny, annoying niggles that I just don't get with W10 are enough to keep me on W10... W10 is a tool and, for me, it's a better one for now.
Reminded me about a time years ago I had to do some c# work in Windows 7. At the time, I found the best Windows laptop experience was running it in a VM on a MBP.
I will say that running natively on Windows is still faster but the VM of Windows 10 in VMWare Workstation on Linux is noticeably faster and smoother than running that same Windows 10 VM on VMWare Workstation on Windows 10... it just defies logic!
It's not like it's a Type 1 hypervisor in Linux and Type 2 in Windows (well, I assume it isn't!).
Or all you do is use the browser.
But honestly, just buy a Thinkpad and everything works out of the box. Yes, everything.
For example, the microphone of the X1 Carbon 7th generation still doesn't work out of the box. You need to blacklist a handful of kernel modules and edit your PulseAudio configuration to force the loading of an ALSA source hooked to the correct device ID.
The Arch wiki has an article cataloguing issues and workarounds (with various degrees of success) for every generation of the X1.
My laptop after that at least had a BIOS option to disable the Nvidia graphics. I only bought an Nvidia model again because the OEM made a mistake and sold it for hundreds less than the Intel one on their website. Every distro needed me to do something to get the screen brightness keys to work.
WiFi chipsets could also be a hassle though they have gotten much better.
My current laptop, a 2018 MacBook Pro, is basically near unusable as a Linux laptop. By default the trackpad and keyboard don't work and you need someone's kernel patch to use them. You can't currently have both sleep and sound. A bunch of little other gremlins.
When I tried again ONE change made all the difference. reconfiguring the trackpad settings. I think before there were confusing click regions for different buttons. I think I changed to one-finger two-finger tap and it was like a different machine.
So I get where folks are coming from.
Which makes it more unlikely that they will pull the plug. Of course, it's always a possibility.
But those of us who daily-drive macs but need to use Linux occasionally are very much rooting for this to be a going concern.
> As for Windows running natively on the machine, "that's really up to Microsoft," he said. "We have the core technologies for them to do that, to run their ARM version of Windows, which in turn of course supports x86 user mode applications. But that's a decision Microsoft has to make, to bring to license that technology for users to run on these Macs. But the Macs are certainly very capable of it."
— https://arstechnica.com/gadgets/2020/11/we-are-giddy-intervi...
We know the latter isn't going happen.
Going back on it and locking it down could end in another lawsuit like the OtherOS removal from the PS3 (Which ended in $65 settlement payments it seems)
So we decided to merge a specific point from tty-next into this branch first, before the rest of the patches. Those patches are already in the pipeline for upstream inclusion. So it pulled in everything in tty-next that was before the Samsung changes, and it shows up in the diffstat, but those aren't really part of this series, it's just caused by the merge from tty-next.
I think that ‘simply’ is the wrong word.
"The project final concept closed in Q1 2019 and we are launching today, so your estimate is right. Took us 2 years for RKL"
https://www.reddit.com/r/intel/comments/memyfv/ama_march_30t...
edit: also don’t forget intels fabs are actually better than tsmc when nodes are the same
They haven’t been on the same node size for quite a while though. I wonder if this will be true in the future. Intel has a problem because even if they catch up and for some reason TSMC will be blocked at 5nm, TSMC will still have a multi year experience and will be able to improve the 5nm process.
It's still not a level playing field as they'd be implementing different ISAs. If Intel acquired an ARM architecture license and then designed an ARMv8 CPU with identical constraints then you'd get a valid comparison.
Although you'd likely have different IP in other areas which could skew the results.
If you're looking for a comparison of the ISA's I think the decoding issues / execution width points to a likely ARM win still - only question is by how much.
I wish there were sleek, metal body lightweight laptops with Linux (w/o Windows hence minus some cost) which just worked out of the box (one that didn’t require hunting around forums to have basic functionalities), but there isn’t. And no I don’t mean that one or two exotic OEM/model. But a general availability.
So people for whom cost isn’t a concern they buy Macs.
In general, it's because they get out of the user's way and it becomes invisible to the user's workflow. Linux always involves tweaking the system just to get work done. The integration of the software and hardware of the Mac is why the user experience is no competition.
Apple went out of their way to add support for third party OSes to Macs. They actively made tools to allow the Asahi Linux folks and others to boot unsigned OSes on M1 Macs. They would have had much less work - both in terms of making and maintaining the tools as well as customer support work - if they kept the boot system more similar to the iPad boot system it derives from. In general really Apple doesn't seem to be interested in closing down the Mac at this level. Hence why you can (attempt to) run third party OSes on virtually all Macintoshes going back to 1987 [1].
I for one am happy with that. If I buy an Apple Silicon Mac, I won't be running Linux on it - at least not on bare metal. But I might do that in 10 years after Apple's support has ended.
[1]: NetBSD claims to still support the Mac II, a Motorola 68030 based Mac release in March 1987: https://wiki.netbsd.org/ports/mac68k/