Hacker News new | more | comments | ask | show | jobs | submit login
Pixelbook and “Nami” Chromebooks the First to Get Linux GPU Acceleration (aboutchromebooks.com)
102 points by jmsflknr 35 days ago | hide | past | web | favorite | 76 comments



As a developer of this, it's built using Virgil3D[1], which is rather interesting tech, that allows virtualized guests to get hardware accelerated 3D graphics.

It works by having the guest run a Mesa3D (Linux Userspace graphics) driver called virgl in the guest, which takes all of the OpenGL/OpenGL ES commands and send them through through Linux VirtIO[3] to the guest, where they are executed by the virglrenderer[1] application as normal OpenGL / OpenGL ES commands.

This let's you run whichever driver you want on the host, even proprietary ones. And it allows you you to do transparent OpenGL <-> OpenGL ES translation.

[1] https://gitlab.freedesktop.org/virgl/virglrenderer/

[2] https://www.mesa3d.org/

[3] https://lwn.net/Articles/239238/


Does this mean it won't accelerate 2d graphics? Should I expect acceleration in gimp/emacs/etc after the Crostini patch is available?


It'll accelerate 2D graphics that use OpenGL. GIMP and emacs don't use hardware acceleration in the first place. Krita uses OpenGL to draw the canvas so it will get accelerated.


> GIMP and emacs don't use hardware acceleration in the first place.

Honest question: On most OSes, don't regular drawing operations in these programs (Bitblits, font renderings) typically use hardware acceleration through the OS? On crostini, are these things currently done via pure CPU operations, or are they already being mapped to hardware-accelerated API calls, even before the new OpenGL support?


It's complicated and depends on a lot of things. On a typical Linux system, bitblt (well, XCopyArea) and font rendering will go through XRender, which may or may not use the GPU depending on driver support. On xf86-video-intel, it will use SNA, which will use the 2D blitter on Intel chips. It's unmaintained at this point and a bit buggy so some distros turn it off. Instead, one might use glamor, which implements XRender on top of OpenGL, which will use the 3D graphics hardware on Intel chips. So it depends on your system configuration.

For other operating systems, the words and details change, but the overall idea of "it's complicated and depends on your driver and OS version and which apps are running and phase of the moon" still applies.


With Xorg's GLAMOR driver, all 2d graphics use OpenGL.

God knows if Xwayland will incorporate GLAMOR. Since almost all compositors except for Weston assume the presence of a GPU, you'd think it would, but I have not been delighted with Wayland development thus far...


Xwayland has had glamor support since the very beginning.


How does this compare (in performance, experience etc.) to the gvt-g approach ? At least one benefit of gvt-g seems to be that it would also work for windows guests.


Without being familiar with being familiar with GVT-G, I would think Virgl3D performs worse, by a decent margin.


I am a hardcore Linux user. I went so far as buying Chromebooks to wipe ChromeOS and run Linux on them in the last 5 years. As of late, I have decided to leave ChromeOS alone on my new Pixelbook.

There are two reasons for that decision:

- I just love having the ability to have a pen to draw when I needed to share the screen to explain something for my friends when we talk about technical crap. ChromeOS supports the pen reasonably well with its ability to run Android apps.

- The Linux emulation layer on ChromeOS is actually very good. I can run app-get, gcc, Sublime text, Konsole and most of the apps I want to run.

I figured it is a good tradeoff between convenience and utility. I still have to do my embedded work on my desktop which has a real distro. I am very glad they are bringing the upcoming usb redirection support, so I can do embedded work on my laptop. With GPU acceleration I can play games too, fantastic!

Hardware-wise, the Chromebook Pixel has been a disaster. Every once in a while, the USB-C port just craps out completely and I had to do the SMC reset procedure for it to work again. The other day, I left the laptop battery run dry and when I plugged in to charge and tried to turn it on, the keyboard would flicker like a discotheque with nothing on the screen for like 20 minutes when it was charging up. The hardware is just inconsistent and feels flaky as heck.

But all in all, I am actually quite happy with my Pixelbook purchase. If the hardware/firmware experience could improve a bit, then it would have been a very, very good purchase despite all the hates from Youtube reviewers.


> But all in all, I am actually quite happy with my Pixelbook purchase. If the hardware/firmware experience could improve a bit, then it would have been a very, very good purchase despite all the hates from Youtube reviewers.

How do you forgive something like that? The LTE on my Lenovo X1C 6th gen fails randomly (with recent driver updates, it’s just once a week). I’m never buying a Lenovo again, basic functionality like that should just work. Laptops are solved technology. They should not have bugs like this.


It's just code bugs, they're easy to forgive when they get fixed. How much code is in a laptop prior to installing an operating system, it must be a lot with modern hardware.

Management bugs on the other hand are harder to forgive, like that time Lenovo shipped rootkits, or the many times Apple has simply lied about bad hardware design, or that time Facebook decided not to refund children based on if it was their parents asking...

https://www.reddit.com/r/AskReddit/comments/9gsp0m/what_is_t...


I disagree. Apple hardware has had some quirks, but over aggressive throttling is far more forgivable than basic functionality simply not working. My laptop is a tool—it needs to work.


How about when Apple denied 2017's keyboards were shit then they denied it again and again until in 2018 whilst continuing to deny it they iterated on the design to fix the problem and launched a 4 year replacement program for devices otherwise likely to last 10+ years? How much is the EU going to spend in 2021 fighting Apple when the keyboard replacements are still required and cost $700...

How about bent iPads, badly soldered nVidia chips, fraying cables etc?

Code mistakes (sometimes) just get fixed instead of shielded with lies to avoid liability for avoidable mistakes.


Code mistakes, especially when it comes to firmware and drivers generally don't get fixed the same way hardware issues often don't. Neither is acceptable and I don't see why you're trying to argue Apple is worse when they're both terrible companies with terrible behavior.


Highlighting some examples of Apple's unethical behavior is not saying another company is better or that Apple are worse.


The problem is, if you are a Linux user, what else can you buy but Lenovo? Maybe some Dells, but the durability of the laptops is definitely not on par with Lenovo laptops. And other than that? System76? Last time I heard, their laptops were rebrands of another brand, and the quality actually really bad (though this was some years ago, maybe it has changed).


As a Linux fanatic myself, I've been really interested in flashing a cheap Chromebook into Arch or something low resource, and using it as a super mobile workstation. I guess the only problem is, I haven't given up on my T430 from college. Upgraded parts, extended battery and dock makes for a very comfortable setup that's hard to leave.


Take a look at https://galliumos.org -- its Xubuntu tweaked for certain Chromebooks. I've been running it on a first gen Toshiba CB2 (4gb ram, 16gb eMMC, 1080p display) -- and it runs really well. I run i3 and the other standards.

I use it as my out-on-the-town laptop out of fear of either dropping or losing my late 2013 macbook pro.

Anyway, the dev community around this is pretty decent, and other distros do run with varying degrees of success. If nothing else, its a fun, quick little project to get it up and running.

edit: I should also mention that having a 8-10hr actual-use battery life is a dream come true.


> I should also mention that having a 8-10hr actual-use battery life is a dream come true.

This really is where the gold is. Many people don't prioritize battery life when picking a laptop, which is just hilarious in my mind.


Its crazy, right? I confess that I was totally in that camp prior to getting this little chromebook. I always figured that 4 - 5 hours was as good as I'd ever get, but now I've seen the light.

I even gave it a cute cover (that most people think is hideous) using some mactac -- https://i.imgur.com/wO1WW2t.jpg


I don't think Chromebooks make good Linux laptops. I had a cheap Samsung one and still use my '13 Pixel. The latter's screen is too reflective, the keyboard is mediocre and there are no PgUp/PgDown keys, so editing would be cumbersome (uh, yeah, I know of C-v and M-v, but still). It is awesome at watching Netflix and browsing the Web though (when looking at the screen at an angle avoiding the worst reflections ;-} or rather was, as it is now EoL'ed by Google, hence I actually might perform the conversion soonish.


Don't take it personally, but I think it is just growing older and getting more busy with work, life etc.

The returns on investment on the time you spend tickering with your laptop are lower - because you have other uses for your time, and because you have expectations set in the past while ChomeOs keeps improving.

Now if you take a long sabbatical or go back to school, maybe you'll tinker again!


Absolutely. Same reason I stopped doing custom ROM for my phone. Growing up is hard :(


It doesn't take much tinkering to install Linux these days (unless you choose to go with Arch for some reason). If you know how to reinstall Windows 10 from external media, you know how to install Linux.


Don't take it personal, but it's hardly a challenge. The process of download and burn then reboot really taxes you?


No, but the zillion little fixes sap a limited amount of energy

I wouldn't be satisfied unless I compiled an optimized kernel with almost no module left, etc. This takes more time than I can allot


> The Linux emulation layer on ChromeOS is actually very good. I can run app-get, gcc, Sublime text, Konsole and most of the apps I want to run.

What emulation are you talking about? ChromeOS is based on Gentoo Linux.



Yes, but it definitely isn't an emulation layer. It's just virtualization.


Unfortunately Pixelbook is not supported by GalliumOS, otherwise a multiboot with actual linux would prove to be a better alternative.

Google sent me a free Acer Chromebook 11 N7, with custom firmware I'm able to dual boot ChromeOS & GalliumOS (built on Xubuntu) & use the latter for running some experiments where fan-less X86 arch comes in handy.

Till X86 based SBC become affordable & widely available, the Celeron based Chromebooks seems to be an google alternative.


So, why don't you just use Windows or Mac laptop? You'd have all the same advantages without hardware/firmware problems.


>why don't you just use Windows or Mac laptop?

Linux tooling support is still very important to me. I want to be able to enjoy Konsole and Sublime text.

Windows Subsystem for Linux is getting there, but I don't think it's as advanced as ChromeOS' yet. Besides, I don't like the Metro interface and Windows 10 in general.

Mac means tying to Apple hardware. Apple hardware means crappy keyboard, heavy laptop, and no touch screen.


I had a Win 10 laptop with WSL and a touchscreen as my main workstation for a year and I loved it. Sublime is already superceded by VS Code in my mind. Haven't tried Konsole, but I've seen some threads to indicate it can be done. My new job requires me to have a Mac because we do some iOS work and generate a lot of Keynote decks and I just hate it.


I'm just using Windows with Linux in a VM. All the hardware support and all the Linux goodies. (Some extra memory is required, but my thin-and-light 14" laptop had 32G, so it's ok.)


I finally sprung for VMware instead of VirtualBox and running a Linux guest on Windows has gotten so much better for me.


I don't know if this is his reason, but at the price range of a Chromebook I assume all Windows notebooks are crap and Macs are non-existent.


You're wrong, but only because the Chromebook price range goes from $200 on the low end to $1650 for a Google Pixelbook with the high-end configuration. In between you can find lots of usable hardware from other vendors, including two configurations of the 13" MacBook Pro with retina screens.


The first reason given was the ability to write on the screen with a pen. That wont happen with an MBP.


A "crap" Windows notebook becomes perfectly usable, even quite snappy, when the Windows install is wiped out and replaced with Linux. (Barring hardware issues, of course.) It's not like low-end Chromebooks have better hardware specs for the price.


I'm not talking about the hw specs, I'm talking about the shitty build all cheap Windows laptops have. Correct me if wrong but I think all Chromebooks are sturdy and durable regardless of the price.


Some cheap laptops are available with basically the same hardware running either ChromeOS or Windows. See for example HP's Chromebook and Stream line, they are near-identical aside from the keyboard layout and the Windows models having more storage.


My partner has an Acer £250 Chromebook and their work machine is a £1000 HP, I bought a £140 Lenovo, and the build quality of the HP and Lenovo is on par. The case and screen on the ACER is better than both. The battery is quite poor on the HP, but compared to the other machines it has a better CPU - so could explain it. I'm not saying machines are much of a much-ness, but sometimes more money doesn't buy you better quality. There are HP lines that start from £200 - £1000, and they have the same cases but different flavours of memory and CPUs, I doubt there is much between them in build quality.


There's plenty of refurbished hardware that's built in a sturdier way. Or you can pay a few hundred dollars more and get a new laptop with a better build - it's worth it just to not have to deal with the weird issues in Chromebook firmware. I'm sorry but a computer that will wipe its install simply because you did not press the right key combination at startup is a useless toy, nothing more than that. (And no, I'm not going to look up my Chromebook model in a firmware-replacement guide and spend my weekend tinkering with it just so it doesn't do that anymore. That's ridiculous.)


Does this mean Chromebooks have been running without HW acceleration all these years?

Or is this about something else?


No, the "real" ChromeOS has had acceleration all along. It is about the Chromebooks getting HW acceleration for its virtualized Linux environment when you want to run real Linux apps on it.


Thank you, now I understand the other comment here about the implementation using virtualization - i felt i was missing a kernel/host in that explanation - Linux running under Chrome os makes more sense :)


There is no so much HW acceleration required for canvas, CSS layouts and WebGL 2.0, versus OpenGL 4.6, OpenGL ES 3.2, Vulkan, Metal, DirectX 11/12 are capable of.

So I guess now they are getting big boys HW acceleration.


Only slightly related, but I once had a chromebook I was very happy about, until after a few years it just failed to boot. I've repaired many linux laptops in my life, usually using an USB key to boot a live system and fix the disk-drive or something. But with this chromebook, there was absolutely nothing I could do. No access to something like a DOS or anything, nothing booted from the USB port. Just a black screen.

I've never bought any chromebook since.

Was I just unlucky and should I git it an other try?


I had once an update that broke the system. Here are the instructions I used to recover: https://support.google.com/chromebook/answer/1080595?hl=en

In short you need a pendrive and another computer with Chrome to to download a recovery image and flash the pendrive. Afterwards use a key combo on Chromebook and it should be fixed.

In my case it helped, but I retained this pendrive with instructions for my wife if it would happen again (and she managed). I had to skip updates for some time.

A lesson for me was to not buy an ARM Chromebook again.


Chromebooks have recovery mode. This is functionality in the firmware to reinstall the OS from a signed image on a USB drive or SD card (device obviously needs to have the SD card reader for this). Just look up instructions online for more details which will be better than anything I could write.


I'd get annoyed with many sealed offerings with soldered hardware. It's not just Chromebooks.


This is all very cool stuff of course. Somewhat tangentially, I wonder if, collectively, a lot of recent developments such as WSL and crostini push the year of the linux desktop even further out. A new generation of people will experience traditional GNU/linux as we know only in the context of walled garden setups like windows, chromeos, and android (samsung dex I think has something similar). Objectively, this is an improvement by most metrics. However, it also means that this will be good enough for most people. I'm worried that it may lead to even fewer resources and exposure to full blown linux desktops. Canonical has also shifted focus away from desktop.


You are pretty much right, GNU/Linux as mass market desktop has lost its opportunity.

ChromeOS market share is irrelevant outside North America, just check the worldwide market share in your favourite source.

Only Android/Linux has really taken off and even there we still don't know what are Google's plans regarding Fuchsia. It might pretty well be that some future Android version will get a new kernel, announced at Google IO.

It is now quite common to attend Linux conferences just to watch the presenters using macOS with a Linux distribution running either on a local or remote VM.

Assuming WSL keeps improving, it wouldn't surprise me to see similar sessions being done from a W10 laptop.


I agree that ChromeOS is largely irrelevant but IME, GNU/Linux is more popular than ever on the desktop. The other operating systems in common use are all terrible in their own ways, and users are increasingly aware that Linux may be a meaningful alternative depending on their needs.


If by more popular than ever, you mean a bigger market share than on the beginning of the century, yes that is quite true.

However since we are talking about graphics acceleration, not that much looking at the Steam community numbers, or the posts from a couple of game studios a couple of weeks back.


I would bet on something like Chromebooks combined with steam being the only chance of Linux on desktop succeeding. Gnome and Ubuntu just sucks too hard to win on it's own.


This feature, along with the sound support, is what's gonna finally make the pixelbook a game changer for Linux desktops. I can't wait for those, and the pixelbook 2.


Sound support? I still have various sound issues on Debian, to the point I just can't be bothered to sort it out. It kind of works.


Sound support on crostini specifically: https://www.google.com/amp/s/amp.reddit.com/r/Crostini/comme...

Today Linux apps installed on chrome os don't have sound support yet.


Wow, this is progressing much faster than I expected. I bought a Pixel on discount a few months ago with the intention to set up my dev environment (Docker, Java, Node, IDEs, etc) when hardware acceleration and Docker were working. Time for me to get cracking!


Hopefully this will allow applications like VS Code (Electron) to use straight Wayland rather than the slower XWayland as they do now. Of course, it's pretty amusing to have an embedded Chromium app running in a container inside a Chromium OS.


Electron doesn't use Wayland?

I just set it all up, got VS Code and IntelliJ running, and of the two, VS Code looks the best. It's the only app I've seen that integrates the menu bar items into the ChromeOS menu bar, which saves a lot of space and looks way better.


It's really an XWayland application, i.e. it uses X, whose protocol is forwarded to Wayland. That's why in this article you need to pass -X to Sommelier:

https://medium.com/@kennethrohde/sharp-looking-vscode-on-chr...

That post also highlights how, because it's not a Wayland native app, VSCode will still look crummy when e.g. you use it on monitors with varying DPI. Real Wayland apps have multiple, per-screen DPI settings:

https://wiki.gnome.org/Initiatives/Wayland/XWayland

"Multi DPI intends to allow clients to seamlessly move around on a display with multiple monitors connected, where each monitor may have very different DPIs, thus different scales, without any sudden size changes or glitches, while at the same time allowing clients to switch between different scaling factors."


Bought my dad a Spin 15 for Christmas. I wonder if that will get acceleration?

https://www.youtube.com/watch?v=PK0dMnrKb_A


I'm in as soon as Lenovo/HP/Dell introduces a 4GB+ RAM Chromebook with TrackPoint/PointStick/TrackStick.


I wish more Chromebooks would support Project Crostini. It would make a perfect development environment for me.


How good is the Virtualized Linux Environmen for developmentt? Can I run stuff like Docker on it?


Docker mostly works. However, `sudo docker run -it centos bash` fails because the centos image (as do many others) uses extended attributes, which are not compatible with the underlying btrfs filesystem. In those cases, I've been rebuilding the Docker images myself from source, when possible. It's frustratingly close!

wstein@penguin:~$ sudo docker run -it centos bash

Unable to find image 'centos:latest' locally

latest: Pulling from library/centos

a02a4930cb5d: Extracting 75.17MB/75.17MB

docker: failed to register layer: ApplyLayer exit status 1

stdout: stderr: operation not permitted.

See 'docker run --help'.


btrfs definitely supports extended attributes (and if it didn't you'd get ENOTSUP not EPERM when trying to use them). It's far more likely this is because you cannot set certain xattrs within a user namespace (such as some security.* ones) -- and LXC is being used with user namespaces in ChromeOS.

In fact, I added code to Docker almost 4 years ago to ignore ENOTSUP on xattr errors specifically because of filesystem support (AUFS was the issue at the time). So if it was a support issue you wouldn't see it, because the code already handles it. :P


Thanks for the clarification. I love btrfs by the way.


I love btrfs, but I love my data even more.


Is there some way I could try ChromeOS on my regular PC? Inside VMware or natively.


ChromeOS, no. ChromiumOS, yes. vmware/virtualbox, unlikely without hacking. Qemu/kvm, yes in theory. Native, yes. Possible options for native: 1) https://arnoldthebat.co.uk/wordpress/chromium-os/ 2) https://www.neverware.com/


I see the ChromeOS team has their own set of scripts to run ChromeOS on KVM, but they are Linux-only it seems. Bad luck :P

I also tried the first option for native but it froze while the "ChromiumOS" logo was shown.


Try the second option (cloudready). It should have undergone more testing.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: