Google Chromebook Pixel LTE

Warning
This document describes how I installed Gentoo on google's chromebook pixel LTE. These were very dangerous steps that could cause serious damage. I strongly advise against using any of these steps. I take no responsibility if someone uses this information.

Any views presented are my own and not representative of any company or organization.

Hardware disadvantages
Glossy screen. Very hard to do any serious work on. And when working on dark background (e.g. console), I have a mirror instead of a display. :-(

No ethernet socket. This forced me to buy a USB dongle network card and makes the machine more bulky and not as light, mobile, and portable as advertised. Also external ethernet card probably uses slightly more energy than a built-in would. The case (not including screen) is around 2mm thicker than ethernet plug, so they could have included a plug. There was also a lot of space left inside the case. I hope maybe they will have it in next version.

SIM card slot didn't open. This was a suprisingly low-quality mechanism. I couldn't open it with a pin. There is no manual even on google page how to do it. After trying for a few days, with pins of various sizes, I gave up, only to find out later when I opened the case that the mechanism was damaged by my trials.

I've read somewhere that it should be possible to use SIM cards from other providers by executing something like 'modem_set_carrier Generic UMTS' (don't remember exactly). However, when I run this command, I got an error message saying that my modem doesn't allow changing the carrier. :-(

No user manual of any kind (e.g. explaining how to enter BIOS, how to replace SIM card).

Nothing is upgradeable, mSATA SSD drives don't work in the LTE modem slot. It's the same mSATA socket, but only for the modem.

Battery is built-in. So no, I cannot have an extra battery when traveling. And as soon as battery ages and it only holds for half an hour, I'll have to buy a new laptop instead of just a new battery. That's very nice planned obsolescence by google.

The SSD is SanDisk SSD i100 64GB ATA-9 (61057 MiBytes). Small and not too good quality. And soldered-in, can't be replaced if it fails. And cannot be upgraded to something more robust or larger.

Not fanless and noisy. Sometimes when running dd I could clearly hear some very high-pitched noise (not coming from the fan). At room temperature of around 22 degrees Celsius, the fans start several seconds after running any nontrivial task, i.e. any task that doesn't sleep most of the time. Also, the case gets very hot compared to other machines I've used. All of these thermal issues may have something to do with unnecessary fact that google wanted to make the laptop look beautiful, so they've decided only to have very narrow slit for ventilation. I would rather prefer ugly laptop with big ventilating holes with better thermal/cooling characteristics.

Very strange keyboard lacking many useful keys, e.g. PAGE_UP, PAGE_DOWN for console scrolling, DELETE, HOME, END, CAPS_LOCK, etc.

The laptop has a fatal bug - when battery runs out to zero, my Gentoo installation is erased. It's some kind of security measure. After full discharge any non-signed OS is erased. And I need to install Gentoo again from scratch. Needles to say this is a show-stopper.

A related problem is that the DC power plug does not sit firmly in the laptop's power socket. It lacks some kind of "click" to hold it in place. It can easily slide out without notice a couple of millimeters, at which point the power no longer reaches the laptop.

Very little rubber on the bottom means the laptop slides on the wooden desk all the time. If at least one of four small rubbers doesn't touch the desk directly, I have to use both hands to open and close the lid.

Every time I boot I have to go through the scary 'OS verification is OFF - press space to reenable' screen. If I do, I guess my whole Gentoo installation will be wasted. Instead, a hidden combination CTRL+L must be pressed in order to boot. So I have to be very careful each time I boot not to do what I'm told and not allow anybody else to boot the laptop, as they would probably just press space as they are told to and erase my Gentoo installation.

This also means that I cannot e.g. reboot the machine remotely, as it will not boot without pressing CTRL+L.

I haven't found any way to set 'power on after power failure'.

All of that makes this machine almost useless as a remote server of any kind.

I haven't found any way of entering and setting up the bios.

When using powersave or conservative governor, the CPU frequency only falls to ~0.9 GHz. As I spend most time editing text, 0.1 GHz would be enough. :-(

Only 4 ports, including only 2 USB 2.0.

The price was very high. It included a lot of crapware: 1TB google drive, 12 GoGo Internet sessions, US verizon LTE SIM card. This crapware has many disadvantages: probably increased the price, will probably not work with GNU/Linux, doesn't allow users to choose their prefered service providers, etc.

The WIFI and bluetooth hardware cannot be removed or turned off by any hardware switch. So if one works at a physics laboratory, airplane cockpit, or in a hospital, where the rules forbid any RF emitters, it's impossible to take it to work.

Completely useless 'light bar' (set of colorful LEDs), which just uses precious energy.

Very square edges mean it's not very comfortable resting my hands against them e.g. when operating the touchpad.

Slightly outdated CPU. Macs are updating to newest CPU with each new release from Intel, but pixel is left with older CPU.

Only US plug included with the AC/DC power adapter. The plug is actually removable, I guess so they can ship it with UK plug in UK, EU plug in EU, etc. But since the plug costs nothing, they should give me all the plugs so I can just use it when traveling instead of having to search for power plug adapters. Especially in such an expensive product.

Hardware advantages
Touchscreen.

Intel GPU. For now Intel has the best open source driver support, so it's least problematic.

I can run Gentoo on it without reflashing or resoldering anything and without fighting any BIOS-OS DRM/cryptography. It wasn't easy, but possible.

It's possible to open the case and remove the provided verizon SIM card and LTE modem.

I removed LTE modem because I don't need it. I was worried that it could be set up for some google+nsa spying. Also if it isn't there, it won't use precious energy. And won't emit that energy needlessly into my body.

Large screen resolution. However, after buying it, now I can see that the text is still much, much more readable on my old matte 1920x1200 screen than on glossy 2560x1700 screen due to all the glare, reflections, and the mirror effect.

No 'windows key', making CTRL and ALT larger and easier to use.

AC/DC transformer works also in Europe (but see the disadvantages - the plug is US only, so power plug converter is needed).

Hardware summary
Many more disadvantages than advantages.

So why did I buy it if it's so bad? Mostly due to 2560x1700 screen resolution. I cannot stand the low 1920x1200 resolution and I wanted to put my money where my mouth is and in this way vote for and contribute to the increase of screen resolutions. Also because I have only seen 'The Century of the Self' after I bought it. I got caught in the net of consumerism. It was shiny and looked nice. But this shinyness is inversely proportional to usability. Sure, if there's no ports and no ventilation, it will look nicer. Only after I bought it did I realize how much I need these ports (especially ethernet) and ventilation. And how impossible it is to do any work on the glossy screen.

All in all I give it a very generous 1 star (out of 5).

Software installation
I followed advices to start the dev mode and boot from USB:

http://vger.kernel.org/~davem/chromebook_pixel_linux.txt

http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/chromebook-pixel

https://plus.google.com/100479847213284361344/posts/QhmBpn5GNE9

http://blog.brocktice.com/2013/03/09/running-debian-wheezy-7-0-on-the-chromebook-pixel/

I had problems starting dev-mode, because nothing happened when I pressed CTRL+D. However, after shutting down 7-8 times, finally it worked. Note: I tried with different time delays after seeing the recovery screen. When it worked, I pressed it after around 3 seconds. And I could see whether it worked or not, because a confirmation dialog was displayed.

I didn't need to use google acount. I could use the crossystem command from guest acount, when in dev mode.

However, in order to use the guest account, I had to set up the chrome OS, select keyboard, language, etc. I could only do it after connecting to wireless network. That's right, I need to connect to WIFI network before being able to install another OS. WTF? Probably some google+nsa spying takes place, so I used public wifi access point for this, so that they don't know my location. I haven't tested whether maybe it would work with my wifi router after disconnecting it from the Internet (so the laptop get wifi connection but cannot send the spy data to google/nsa).

Also, during the chrome os setup in dev mode there was some small gray link named something like "advanced security" (I don't recall exact name). After clicking it, it displayed the Trusted Platform Module password, which I remembered, as it could be useful some day.

Anyway the goal was to execute the following before I could boot from USB:

shell sudo bash crossystem dev_boot_usb=1

Boot from USB
The minimal Gentoo ISO can easily boot. I put it on a USB stick:

dd if=install-amd64-minimal-DATE.iso of=/dev/USB_DEVICE

My USB_DEVICE was /dev/sdb on the machine where I did it.

Installing Gentoo
For the rest of the installation I just followed the Gentoo Handbook, with the following remarks.

After booting Gentoo from USB I backed up the whole SSD into another USB stick (/dev/sdc1) in case I want to easily recover chrome OS without contacting google:

mount /dev/sdc1 /mnt/gentoo dd if=/dev/sda | gzip > /mnt/gentoo/pixel_dd_dev_sda.gzip umount /mnt/gentoo

The resulting backup of whole 64GB took only 1.5GB after gzipping.

Partitioning
I used whole /dev/sda for partitioning. There were many partitions, but I just removed all of them - I zeroed whole device to get rid of GPT:

dd if=/dev/zero of=/dev/sda

Then I used fdisk to create simple MBR partition table.

I have selected LILO as my boot manager, as it's easier to configure and maintain.

LiveCD networking
Unfortunately, the livecd didn't seem to contain ath9k module for wifi, so there was no network connectivity (I didn't have the USB ethernet card yet - later I verified that it was recognized by the livecd). Fortunately, it is possible to install Gentoo without network connection.

I downloaded stage file on the old machine and moved it to the new using USB stick.

I copied the portage tree from another fully updated machine:

cd /usr/ tar cjpf portage.tbz portage/

Then I moved portage.tbz to new machine using USB stick and untarred it there. This included distfiles, so on the new machine I could emerge packages I had on the old one without network access. It turned out some distfiles were missing, but I could fetch them on the old machine. I could check which files are needed by running:

emerge -avf foo

Then I observed which files were fetched and moved them using USB stick to the new machine.

Systemd
I have noticed after completing the handbook installation that udev is not running. It was not added to sysinit and the handbook didn't link to udev guide. But it did link to systemd guide as an option, and therefore I installed systemd. It's magnificent and I hope it will soon become the default!

To keep the console messages on first VT, I followed advice from:

https://bugzilla.redhat.com/show_bug.cgi?id=828007

That is, I put the following in /etc/systemd/system/getty@tty1.service:

.include /lib/systemd/system/getty@.service [Service] TTYVTDisallocate=no

And I rebooted.

Console fonts
I wanted as large font as possible on the console. Since I used systemd, I did:

emerge terminus-font echo 'FONT=ter-v32n' >> /etc/vconsole.conf

After-install networking
Of course when I built my own kernel, I can select the WIFI driver and get wireless networking. So no wifi was only a limitation of live cd.

To get automatic static networking for the USB ethernet card under systemd, I did the following:

I adjusted lilo.conf as follows:

append="init=/usr/lib/systemd/systemd net.ifnames=0"

as I prefer that my device is called eth0 instead of enp0s29u1u2.

I created /etc/systemd/system/staticnet.service and wrote in it:

[Unit] Description=Static eth0 networking BindsTo=sys-subsystem-net-devices-eth0.device After=sys-subsystem-net-devices-eth0.device

[Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/ifconfig eth0 192.168.1.109 broadcast 192.168.1.255 netmask 255.255.255.0 up ExecStart=/bin/route add default gw 192.168.1.100 eth0

[Install] WantedBy=sys-subsystem-net-devices-eth0.device

Where eth0 is my device, 192.168.1.100 is my router's IP, and 192.168.1.109 will be my laptop's IP. Then I run:

systemctl enable staticnet systemctl start staticnet

This configuration starts the static networking as soon as I plug in the USB ethernet card.

It was also necessary to put my ISP's nameservers in /etc/resolv.conf to be able to talk directly to the world.

Kernel
I enabled the following in my kernel:

ath9k atmel_mxt_ts chromeos_laptop tpm_tis

/etc/make.conf
I added -march=native to the CFLAGS.

Also, to get the touchpad and touchscreen working I did:

INPUT_DEVICES="evdev synaptics"

It's confusing, because these are Atmel maXTouch devices, not Synaptics, but there was no corresponding INPUT_DEVICES option. However, they seem to work this way.

The situation with the graphics driver is very confusing. The only driver in current kernel is i915. However, the official Gentoo Intel WIKI states that Ivy Bridge uses i965 driver. I couldn't find i965 neither in the kernel, nor as any package. What's even more confusing is that mesa package allows all three options for VIDEO_CARDS: intel, i915 and i965. But xorg-drivers only has one: intel. Not knowing what I should do, I have enabled all three:

VIDEO_CARDS="intel i915 i965"

It looks like there is hardware accelleration, however when I run:

LIBGL_DEBUG=verbose glxinfo > /dev/null

I get some error message: libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so libGL: OpenDriver: trying /usr/lib64/dri/i965_dri.so

But maybe it's harmless, I don't know.

Anyway, I tried some of the newest 3D indie games and they seem to work, even those that claim to work only with nVidia or AMD proprietary drivers, so I'm OK for now.

DPI
Getting the huge DPI right in Xorg server is very difficult. X can see my phisical screen size and resolution correctly, so it could just calculate and set the correct DPI. However, Xorg devs have officially decided not to do automatic DPI detection and always force it to 96 DPI in order to be "compatible with MS Windows". This is embarrasing and I lost any respect for them after reading that. The only way I found to force the DPI I wanted was to manually modify the sources. I looked for any file having any constant defined named *dpi* and having value of 96. I found 3 places, replaced them with my wished DPI, recompiled, and it works.

I hope to try soon Wayland, maybe it has automatic DPI detection.

Another option is to use Gnome 2. It allows to set its DPI in system settings.

Desktop environment
The big problem is finding any desktop being able to work well with such high DPI. I tried Enlightenment, Xfce 4, Fluxbox, TWM, Gnome 3, Gnome 3 classic, Gnome 2, KDE Plasma, KDE/Openbox and LXDE.

All of them suck at DPI close to 300. Problems include tiny icons, tiny text, GUI elements not fitting in other elements, GUI not being scalable, etc.

The one that sucked least is Gnome 2 (no, not Gnome 3 classic - this sucked a lot). Here almost everything scales well, including text and icons. Some elements still remain super small, e.g. scroll bars, window borders, some icons. But it was the only one that I found actually usable.

Gnome 2
Gentoo devs rock. They still allow installing Gnome 2, even though it's 2014.

Gnome 2 has its own DPI configuration in System/Preferences/Appearance/Fonts/Details. This setting is respected throughout the desktop, even without recompiling the X server with modified DPI constants.

I was getting some compilation/linking errors. E.g. when gcc complained about missing libm, I just added:

LDFLAGS="-lm" emerge -a1v gnome-media

I didn't have any entries in Applications menu. But the elogv showed me that gnome-menus package has left a note about this. In order to get the menu, I had to start Gnome from GDM.

GDM 2
Starting GDM was not trivial, as version 2 ebuild does not provide a systemd file. Well, just calling gdm was enough. It seems to self-manage.

The themed greeter does not scale so well at high DPIs. However, the simple one does perfectly, so I have configured GDM to use it.