Samsung ARM Chromebook (XE303C) Linux user experience

Asus C201 ARM Chromebook Linux user experience

October 16, 2020
L406 review.
October 11, 2020
Decision.
October 9, 2020
Ugh.
September 10, 2020
Fatigue.
June 4, 2020
5 years.
December 9, 2019
New xkb.
May 8, 2019
Dear god, a second crash.
April 20, 2019
Drop.
August 25, 2018
Speakers, man.
July 2, 2018
New battery.
May 5, 2018
Speakers.
September 2, 2017
Hinges again.
April 23, 2017
GL, finally
April 7, 2017
Hinges again!
December 9, 2016
My god, this laptop isn't perfect
August 6, 2016
Hinges: the gift that keep on giving
March 22, 2016
Toddler strikes again
February 5, 2016
Progress report
July 28, 2015
A few notes...
June 10, 2015
Asus C201 Review
June 6, 2015
To crouton, or not to crouton?
June 3, 2015
Seduced
May 7, 2015
Seduction
February 27, 2015
The bell tolls for hinges
November 9, 2014
Thus passes keyboard
July 28, 2014
Sic transit keyboard
February 5, 2014
Staying power
June 4, 2013
Illustration of systematic development fail
April 5, 2013
Still not perfect
March 21, 2013
A couple more struggles
March 7, 2013
GLES fail
March 4, 2013
armsoc vs. fbdev, kernel build
March 2, 2013
Keyboard fix
March 1, 2013
Observations
February 28, 2013
Details
February 27, 2013
Debian config
February 26, 2013
First impressions
February 26, 2013
First impressions

My iBook G4 lasted for 5 years. It fell to a combination of becoming too slow and unsupported for modern web browsing, accumulated hardware damage, and acute disk failure. My Lenovo IdeaPad U150 lasted for 3 years. In fact, it is still going strong -- it is certainly fast enough and up-to-date, and its battery is still good for more than 3 hours, and the software config is "perfect". I have only two complaints about it: its keyboard is "mushy", and it gets ludicrously hot despite making a ton of fan noise. Oh, and it kind of is stupidly shaped because it has a huge off-center battery in the back. It never sits well on anything.

So, I happened across a reviewer calling the Lenovo's keyboard "mushy", and I realized, he doesn't use the word "mushy" to describe every single keyboard he reviews. In fact, words like "joy" make their way into reviews of the Chromebook's keyboard. The Chromebook has ARM processor and so should be cool (it doesn't even have a fan!). And its sleek shape should rest on anything. So I clicked "buy."

It is very thin. When you first pick it up, you can't tell it's a thin plastic box around mostly empty space. But if you try to flex it, it bends a lot. Its LCD is about a quarter inch not-as-wide as the Lenovo's, which is vexing because they have the same specs on paper. The keyboard has a very nice crisp feel, but it is much lower profile than I'm used to, so it will take a little while to get used to it.

It has few LEDs: a stupid LED under the power button in the keyboard, an apparent activity LED by the webcam, and a hidden charging indicator by the power jack. One stupid surplus LED, but only one. That is a big deal to me. Apple laptops have a minimum of LEDs and display them tastefully. My Lenovo, by contrast, has 9 garish LEDs that don't tell me anything of value. 3 are always on, 4 are always off, 1 flashes when it's sleeping, and 1 flashes when it's thinking.

Speaking of Apple-esque innovations, here is something even Apple hasn't caught onto yet: lower-case letters on the keycaps! Neat!

The LCD seems to be the weak point, with apparently awful viewing angles and contrast (even worse than the Lenovo's, which I'd thought of as bad). But I'm not entirely certain I've convinced the chrome OS to display "black" on the screen yet, so we'll see if it grows on me.

The trackpad is probably great, but it basically sucks because it has an acceleration setting that I find unusable, and have not figured out how to change. It is certainly very flimsy-feeling, if that matters.

The big question for me is whether to hack things in on top of ChromeOS (it's X11, right?), or to install Debian on it. Luckily, my Lenovo is not dead yet so I can spend some months figuring that question out.

If I use ChromeOS, at a minimum I want to get NFS, and a decent shell, screen, mplayer, a decent window manager, openvpn, stellarium, etc. Which might not be too hard, really, if ChromeOS doesn't fight me on window management. I hope to be able to simply unpack binaries from Debian for most simple applications, so long as the library dependencies don't become too onerous.

If I use Debian, I have to struggle to track down all the little laptop details like power management (sleeping), trackpad, wifi, audio, GPU (GPU especially worries me -- I'd like for mplayer to be usably fast), and flashplayer (there is no linux-arm flashplayer plugin for firefox, just the proprietary chrome one that comes stock). Plus I abandon whatever neatoness is to be had in ChromeOS.

Anyways, the first impression has me leaning strongly towards Debian! "crosh" (control-alt-T) is an awful shell within a browser tab, which has a truly awful ssh client. There is nothing in ChromeOS that jumps out at me as useful or slick (just "app" versions of all the google goodies you're used to using under Firefox). That's in contrast to Android, which I am absolutely in love with. The trackpad config sucks (though that'd probably be the easiest thing to work around). Oh and did I mention that crosh sucks? Plus the taskbar is just crappy, it is hard to predict what will happen from the various ways to launch an application.

But one thing about the first impression that completely knocked my socks off is keyboard configuration. There is a serious shortage of configurable options on this device, which is to be expected. But out of the box, it let me use Dvorak, and it let me remap the stupid "search" button to "control"!!! That's very important to me, and something the iBook never really achieved.

But then they made up for it by intercepting control-O before it gets to ssh...

But I think the biggest thing is that in a laptop I really know exactly what kind of environment I want. I haven't seriously changed my expectations, UI-wise, from a laptop since about 2003. So the constant-upgrade scenario that Google promises with Chrome OS sounds pretty undesirable to me. At best, it will inadvertently wipe out my customizations. At worst, it will break everything constantly.

Oh and a detail that often goes unremarked is aspect ratio of the bezel stuff. The Lenovo has basically an 0.75" bezel around the whole screen, and that then forms the outer boundary of the laptop. Combined with how the hinge works, it puts the bottom of the screen barely 0.5" above the keyboard. But the Chromebook has a little more bezel below the screen, and the hinge holds it more raised. So the screen is more like 1.5" above the keyboard. It is hard for me to explain what a big difference this makes in the perception of the device. I'm not sure which is ergonomically preferable, but I'm betting it'll turn out to be the higher screen.

Installing Debian

Okay, installing Debian on it. Here are the steps I am following, roughly.

Entered developer mode. Three finger salute (ESC+F3+POWER) brings us to the recovery bootloader, which has a magic control-D to enable development mode.

chrome://imageburner did not work for me, it probably did not like the SD I had. Which is lame, because I had just bought that SD for that sole purpose. But it turns out, you can download a recovery image from a normal computer, and unless you bypass some hard read-only wall, it will always be possible to unbrick your chromebook with one of those. But I did take a backup (tar --one-file-system -cvzf /media/removable/UNTITLED/chromeos-root.tar.gz), so I can harvest proprietary DLLs and so on from it.

I grabbed the debian unstable installer-armhf mx5 netboot uInitrd. It can be extracted as easily as:

$ dd if=uInitrd of=initrd.cpio.gz bs=1 skip=64
$ zcat initrd.cpio.gz | cpio -i

I extracted that into an ext4 partition on an SD card that I configured according to the directions from Andrew Wafaa. Note that I copied over the kernel exactly as he described there. One thing that was not entirely clear to me: the cgpt and vbutil_kernel programs he is suggesting you run are part of Chrome OS, run them on the chromebook (I bothered to build them for my PC from the git repository before I figured this out). I also copied lib/firmware, lib/modules, and boot from Chrome OS. I also downloaded debian armhf packages for net-tools, libc6 (for libm), libiw30, and wireless-tools, and manually unpacked them into that partition. That was so that I could run iwconfig manually.

debinstroot.tar.gz - here is a tarball of the root image I used to install debian. Hopefully that's all kosher to redistribute, despite its frankenstein pedigree.

I ran crossystem dev_boot_usb=1 to enable control-U at the boot screen to boot off of SD. A note about the boot screen. The 3-finger salute here (ESC+F3+POWER) brings up the recovery screen. Recovery screen is basically good for nothing except recovery and enabling developer mode, and telling you that nothing is working. From there, POWER will turn off the thing. Then POWER again will enter the normal bootloader, which gives you a 30-second delay if you're in developer mode, during which control-D will boot from the internal MMC and control-U from the external USB or SD.

I booted the debian installer. It would not detect my wireless. Then it would, but it wouldn't do dhcp. Then I iwconfiged it manually, and then used the debian installer's UI to provide a static IP address. And then it worked. *shrug* So long as you have the /lib/modules and /lib/firmware from Chrome OS, you should eventually be able to get it to say hello to "mlan0".

It is a normal debian install from there on, except that it will constantly remind you that it cannot install the kernel or modules properly, because you are using Chrome's. Also, note that I installed it on the SD card mmcblk1p3 (overwriting my installer image). It is absurdly slow to download and install, I think because SD is slow. Note that I would not expect a Debian tasksel of GUI crap to work. I am going to install Xorg piecemeal at a later date.

After Debian was done installing and wanted to reboot, I had to re-run the cgpt commands -- apparently the Debian partition manager overwrote the kernel's success and priority flags. Also, I had to copy over /lib/modules, /lib/firmware, and /boot from Chrome OS again. I went ahead and put the whole Chrome OS root in /chromeos, so I would have it handy for harvesting binaries.

Then I booted into Debian, and ensured that wi-fi works, which is enough that I should not be stranded if I overwrite Chrome OS. Now I run this variation on Andrew's script to package a kernel for booting from internal MMC (you may want to /chromeos/usr/bin/cgpt show /dev/mmcblk0 to make sure KERN-A is partition 2):

echo "console=tty1 debug verbose root=/dev/mmcblk0p1 rootwait rw" > /tmp/config
/chromeos/usr/bin/vbutil_kernel --pack /tmp/newkern \
--keyblock /chromeos/usr/share/vboot/devkeys/kernel.keyblock --version 1 \
--signprivate /chromeos/usr/share/vboot/devkeys/kernel_data_key.vbprivk \
--config=/tmp/config --vmlinuz /boot/vmlinuz-3.4.0 --arch arm
dd if=/tmp/newkern of=/dev/mmcblk0p2
dd if=/tmp/newkern of=/dev/mmcblk0p4

Note that I am using /dev/mmcblk0p1 for root. It is about 11GB on my system, and used to hold the modifiable state information in Chrome OS. p3 and p5 are each about 2GB and were used to hold redundant copies of Chrome OS read-only root partition, and I am going to leave those partitions there unused, and accept the waste of 4GB to avoid the hassle of figuring out how easy it is to spook u-boot.

Then set up the new root on internal SD:

mkfs -t ext4 /dev/mmcblk0p1
mount /dev/mmcblk0p1 /mnt
cp -ax / /mnt

At this point, my root image is about 1.5GB, so that copy takes a while, but not forever....

I'm not sure it's important, but I went ahead and changed the UUID in /mnt/etc/fstab to match the one in /dev/disk/by-uuid for mmcblk0p1.

Then umount /mnt and reboot. Control-D this time. "Look ma, no SD!"

February 27, 2013
Debian config

Okay, now I'm bringing things up one-by-one in Debian. First, audio. I copied /usr/share/alsa/ucm from Chrome OS, and installed alsa-utils. It still doesn't make noise. I eventually ran alsaucm set _verb HiFi, which seemed to do it. Now it makes noise, and the amixer set Speaker 0-100 command works. I haven't tried headphones or mic yet.

I installed xserver-xorg-video-fbdev. It didn't seem to work very well, but I just wanted a framework in which to copy in binaries from Chrome OS. So I copied over /usr/lib/xorg/modules/drivers/armsoc_drv.so. X11 works now, but I think it is just using fbdev. I got my xmodmap configured, and it is a magical victory. The trackpad is truly fubared (it only works with my thumb!), but I don't hardly use the mouse anyways. It is my laptop now!

So...now to configure xorg.conf

Okay, I can't use the binaries from Chrome OS because they are built against glibc 2.15 while debian is still on 2.13, and since ANSI C changed so fucking much in the last month, they found it very important to break the ABI. And while I was tracking this down, I discovered a whole host of infuriating issues:

I was about ready to set it down in disgust, but on impulse I let Debian install mplayer. It works great out of the box, even with xserver-fbdev. Of course, I don't believe in HD, so that shouldn't be so surprising. But I can tell victory is not too far off, so I'm gonna keep on working on the basics...

Okay, sleeping is important to me. It seems to put proper lid open/close events on /dev/input/by-path/platform-gpio-keys.8-event, which do wind up in acpid's /etc/acpi/actions/lm_lid.sh with "$3" = "close". (because I installed acpid and laptop-mode). I have a fancy custom script for this, but you just need to make sure echo mem > /sys/power/state happens, and you'll have suspend on lid. I use xautolock to suspend on time-out, personally.

And the massive inappropriate use of UTF-8 can be corrected with export LANG=C.

To provide page up/down and home/end, I changed .xmodmap to map the left control button to Mode_switch (I had already mapped the search button to Control_L), and then I set Prior/Next/Home/End as the third choice for Up/Down/Left/Right. It is not perfect.

Essentials which Debian has failed to package for armhf, like xlockmore and x3270, seem to be compiling well from source. Debian is doing a good job of providing most of the libfoo-dev packages that I require.

I found Ubuntu Firefox 19.0 builds, but even Precise requires glibc 2.15. So I am going to bite the bullet and install Debian experimental libc6 (glibc 2.17). I added this to /etc/apt/sources.list:

deb http://ftp.us.debian.org/debian experimental main

And then apt-get update and apt-get -t experimental install libc6.

Crossing the epic fingers.

Pfew! I have Firefox 19. It is palpably slow.

Now I am following directions from debian's installation tips. Now to start grabbing the X11 binaries:

/usr/lib/xorg/modules/drivers/armsoc_drv.so
/usr/lib/xorg/modules/input/cmt_drv.so
/usr/lib/libgestures.so.0
/usr/lib/libevdev*
/usr/lib/libbase*.so
/usr/lib/libmali.so.0.0.35
/usr/lib/libEGL.so.1.0.35
/usr/lib/libGLESv2.so.2.0.35

And I added this to /etc/X11/xorg.conf:

Section "Device"
        Identifier "card0"
        Driver "armsoc"
#       Driver "fbdev"
        Screen 0
        Option          "fbdev"                 "/dev/fb0"
        Option          "Fimg2DExa"             "false"
        Option          "DRI2"                  "true"
        Option          "DRI2_PAGE_FLIP"        "false"
        Option          "DRI2_WAIT_VSYNC"       "true"
#       Option          "Fimg2DExaSolid"        "false"
#       Option          "Fimg2DExaCopy"         "false"
#       Option          "Fimg2DExaComposite"    "false"
        Option          "SWcursorLCD"           "false"
EndSection

Section "InputClass"
    Identifier      "touchpad"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Driver          "cmt"
    Option          "AccelerationProfile" "-1"
    Option          "Pressure Calibration Offset" "-1.73338827637399"
    Option          "Pressure Calibration Slope" "2.06326787767144"
    # Disable some causes of delay on daisy
    Option          "IIR b0" "1"
    Option          "IIR b1" "0"
    Option          "IIR b2" "0"
    Option          "IIR b3" "0"
    Option          "IIR a1" "0"
    Option          "IIR a2" "0"
    Option          "IIR Distance Threshold" "1000"
    Option          "Input Queue Delay" "0"
    # Extra filters for Daisy
    Option          "Box Width" "1.0"
    Option          "Sensor Jump Filter Enable" "1"
    Option          "Sensor Jump Min Dist Non-Move" "0.3"
    Option          "Sensor Jump Min Dist Move" "0.9"
    Option          "Sensor Jump Similar Multiplier Move" "1.5"
    Option          "Split Merge Max Movement" "6.5"
    Option          "Merge Max Ratio" "0.5"
    Option          "Max Allowed Pressure Change Per Sec" "4000"
    Option          "Max Hysteresis Pressure Per Sec" "4000"
    Option          "Tap Drag Lock Enable" "1"
    Option          "Three Finger Click Enable" "1"
EndSection

The touchpad got much better, though now it has the same obnoxious acceleration behavior as under Chrome OS. For a while it even had two finger scrolling. But then it stopped. *sigh*

I'm not sure what all those options do, I got them mostly from /chromeos/etc/X11/xorg.conf.d/50-touchpad-cmt-daisy.conf, and they did make the tapping more responsive. The final two are pretty neat. Tap drag lock is basically if you triple-click and then move your finger, then it acts as if you are dragging. Three finger click is for the middle mouse button (paste).

I think I'm just gonna get used to the acceleration, because no amount of messing with the xinput settings seems to make it actually more linear.

Okay, I also tried xserver-xorg-input-mtrack. It has very good clicking behavior, and its acceleration control is much more sensible. However, it seems to be kind of noisy as you lift your finger off of the touchpad, and its palm rejection seems to be completely broken. xserver-xorg-input-multitouch has basically no config options and doesn't default to palm rejection, so it is right out.

I have investigated what the raw /dev/input/event1 output is (using evtest), and it seems to me that halfway-decent palm rejection should be easy as pie. Okay, it disables its palm rejection for "pressure"-based touchpads. I made a patch to fix that, but its palm rejection still kind of sucks because it doesn't reject inputs that originate at the very edge of the trackpad (only the "bottom" of it).

February 28, 2013
Details

Sleeping seems to work. Overnight (8 hours), the battery went from 98% to 95%. That's acceptable to me, it should be able to sleep for a few days at any rate. My Lenovo is not totally reliable about sleeping through the weekend, so it is "good enough" for me.

I further hacked the mtrack driver to change BottomEdge to EdgeSize, and now it rejects palm inputs with authority. Having source code is awesome, being able to re-build X11 drivers without re-building all of X11 is awesome, and mtrack is awesome. Anyways, here is my new config:

Section "InputClass"
        Identifier      "touchpad"
        MatchIsTouchpad "on"
        Driver          "mtrack"
        Option          "AccelerationProfile" "-1"
        Option          "IgnorePalm" "1"
        Option          "DisableOnPalm" "1"
        Option          "PalmSize" "20"
        Option          "FingerHigh" "5"
        Option          "FingerLow" "5"
        Option          "Sensitivity" "1.35"
        Option          "ScrollDistance" "20"
        Option          "EdgeSize" "20"
EndSection

And here is my custom mtrack_drv.so.

And here are my patches, which I will try to get accepted upstream in some form:

Web browsing is still pathetically slow, especially scrolling and first drawing the web browser when you switch from another program. And it is oddly jumpy, if you request a scroll then it doesn't do anything for a moment and then suddenly it's awake. My theory is that the CPU frequency governor is taking a full tenth of a second or so to wake the CPU to full 1.7GHz. I installed cpufrequtils, and set the frequency to a hard 1.7GHz (cpufreq-set --min 1700000), and it got subjectively more responsive in the web browser. The battery usage monitor did not increase too much, either. Much like the Intel processor, the CPU frequency setting is not nearly as important as actual usage -- if it is set to 1.7GHz but executing HALT, it is nearly as efficient as executing HALT at 200MHz. The "interactive" governor is designed to address this exact problem (cpufreq-set -g interactive), and seems to work well.

March 1, 2013
Observations

This is now my laptop. Even though my old one still works great and is roughly twice as fast at CPU and many many times faster at GPU.

Remember the original netbooks? If you closed one and sat it on the table, it took up real vertical space. From top to bottom: screen, keyboard, compact computer. By comparison the proto-ultrabook Lenovo is a miracle, its computer part is impressively compact, though it still has a bulky and heavy battery. But the Chromebook has a totally different profile when closed. Top to bottom: screen, keyboard. Physically, there's no computer, compact or not. It makes my ultrabook-wannabe look and feel like a monster, maybe a good bludgeon. Now that I have experienced what a laptop *should* be, I am not eager to compromise on the form factor. I will learn to love slow firefox, and perhaps use the old laptop or the Nexus 7 for Stellarium.

Anyways, I'm not going to go on about any of the outstanding problems until I've had a go at fixing them. That's another thing I love about this laptop -- I have easy access to source for 90% of everything, and a surprisingly large number of things can be easily fixed, and need to be. :)

Oh, and a rave about the speakers. At about 60% volume, they are fantastic. Louder than the Lenovo's, super super crisp in the highs, and totally discernable lows. A nice touch! The sound is so good that it is actually sad when it is muffled by a stray leg or blanket.

I was surprised the speakers review so poorly elsewhere, but I think people are just responding to the fact that the sound breaks up if you turn the volume to the max. But they are plenty loud at 60%! Also, reviewers are probably spoiled by the sort of speakers that come with a 15 inch 6 pound laptop. But personally, looking at the Dell 15" for comparison, first it is unusably bulky, but second, the speakers are "high-fidelity JBL(tm) speakers with Waves MaxxAudio(tm) 3". Personally, I don't care what it sounds like, I don't want speakers that are so intensely branded that they needed TWO trademarks. Especially since "(tm)" usually means "unconscionable and uncorrectable bass boost." Google says my Chromebook has "Stereo internal speaker." Much better.

Oh, and I'm not afraid of frying them anymore. The sound driver (through alsamixer) provides access to a *huge* variety of routing switches, and you can obviously wreak some havoc with them. But I just use the Chrome OS UCM settings as suggested to set the switches. I only use the ALSA mixer controls to set volume on the Speaker channel. Stay away from the switches and you'll be fine.

And I got a real 5 hours (with 6% remaining) of usage out of it yesterday, which is pretty sweet.


Alright! I started having major problems with suspend (crashing X instead of suspending, waking to a crashed X, etc) once I actually started using the chromebook regularly, which in hindsight was the first real use of timeout-based suspend. Now, I'm not 100% certain this is the problem, but some rather cryptic allusions in forums complaining about this suggested that it is due to X trying to power down the display separately. And I checked, X was configured to start screensaving just before the laptop was supposed to suspend. So I added this to my .xinitrc:

xset s off
xset -dpms

So far so good!

March 2, 2013
Keyboard fix

I found my .xmodmap approach dissatisfying. I had remapped search to Control, and had mapped the left control key to Mode_Switch, and had used Mode_Switch+arrows to generate page up/down/home/end. However, it is kind of limited. When I would hit control+up, it would generate the keysym for page-up (Prior), but it would generate the keycode still of Up. Firefox checks the keysym, but mplayer and anything based on SDL would look at the keycode, instead, so it just straight-up did not work.

I was hitting a brick wall with deciphering xkb until I met Doug Palmer's excellent and not-entirely-reliable Unreliable Guide to XKB Configuration. It's not Doug's fault it's unreliable, any light bright enough to reach into all of xkb's crevices would surely burn xkb to a crisp. Anyways, he oriented me and here's what I came up with.

I created two new files. First, /usr/share/X11/xkb/types/greg:

partial default xkb_types "superl" {
    type "SUPERL" {
        modifiers = Mod2;
        map[Mod2] = Level2;
        level_name[Level1] = "Base";
        level_name[Level2] = "Mod2";
    };
};

What that does is make a new "SUPERL" (I named it that because the default mapping of LWIN is Super_L, *shrug*) type of key which is one that has two "levels" (modifier states): Base and Mod2. This key type will be used for the arrow keys. Here is the other file, /usr/share/X11/xkb/symbols/greg:

default partial modifier_keys
xkb_symbols "searchcontrol" {
        key <LWIN> {
                type = "ONE_LEVEL",
                symbols [Group1] = [ Control_L ],
                actions [Group1] = [ SetMods(modifiers=Control) ]
        };
        key <LCTL> {
                type = "ONE_LEVEL",
                symbols [Group1] = [ Control_L ],
                actions [Group1] = [ SetMods(modifiers=Control+Mod2) ]
        };
        RedirectKey.ClearMods=Control+Mod2;
        key <UP> {
                type = "SUPERL",
                actions [ Group1 ] = [ NoAction(),RedirectKey(keycode=<PGUP>) ]
        };
        key <DOWN> {
                type = "SUPERL",
                actions [ Group1 ] = [ NoAction(),RedirectKey(keycode=<PGDN>) ]
        };
        key <LEFT> {
                type = "SUPERL",
                actions [ Group1 ] = [ NoAction(),RedirectKey(keycode=<HOME>) ]
        };
        key <RGHT> {
                type = "SUPERL",
                actions [ Group1 ] = [ NoAction(),RedirectKey(keycode=<END>) ]
        };
	key <POWR> {
		type = "SUPERL",
		symbols [Group1] = [ Delete, Insert ]
	};
};

First, I remap the search key (LWIN) to be a normal control key that sets the Control modifier. Then I remap the left control key (LCTL) to be a special control key that also sets the Mod2 modifier. Mod2 is typically NumLock, which is pretty irrelevant because there are no keypad (KP_*) keys on this keyboard, so for most keys that will act just like control. Then I provided these four up/down/left/right actions. NoAction() for the first action means that the Base behavior (no modifiers) is unchanged (i.e., default). The second action is applied if Mod2 (left control) is pressed, and RedirectKey generates the keycode of another key, so for everything downstream of xkb it looks as if a fictitious separate PGUP key was actually pressed.

And because it happened to be where my old laptop put it, I mapped the power key to delete. Note that you have to disable power-down in acpid, or it will not be advantageous.There is one other detail. Supposedly you can configure xkb manually in /etc/X11/xorg.conf, I found numerous documents suggesting that approach. But it just did not work for me (it still used the default rules-based configuration, as if the "evdev" driver is somehow stupid, or there is an xorg.conf.d somewhere that I could not find), so I put this setxkbmap invocation in my .xinitrc instead:

setxkbmap -compat 'complete' -keycodes 'evdev' -types 'complete+greg' \
-symbols 'pc+us(dvorak)+inet(evdev)+terminate(ctrl_alt_bksp)+greg' \
-geometry 'pc(pc104)'

But you probably don't want Dvorak, so:

setxkbmap -compat 'complete' -keycodes 'evdev' -types 'complete+greg' \
-symbols 'pc+us+inet(evdev)+terminate(ctrl_alt_bksp)+greg' \
-geometry 'pc(pc104)'

Victory! I guess I could imagine an appropriate formulation for contributing it upstream, but that just doesn't strike me as good times.

March 4, 2013
armsoc vs. fbdev, kernel build

When I "upgraded" from fbdev to armsoc, I noticed it didn't get faster. But it did start up a lot quicker, which seemed like a good sign. Anyways, after trying this test which is explained in this video, I realized armsoc is a huge fail for normal usage. Apparently ChromeOS uses some limited subset of armsoc's functionality that is not slow, while general X stuff fails preposterously on it. Or in other words, I get around 3fps with normal firefox on armsoc, 13fps with gfx.xrender.enabled=false on armsoc, or 22fps with normal firefox on fbdev! So that's nice to solve that question, what I have to do to enable decent X performance is to not install the fancy ChromeOS armsoc video driver. 2D programs (Firefox, SDL, etc.) are now much faster, but anything that uses GL is about the same (Stellarium is still too slow). *sigh*

The only reason fbdev seemed slow before is the cpufreq scheduler set to ondemand.

So on the list of issues: one down, a zillion to go. "Suspend doesn't work reliably" is the highest priority, but hardest to get traction on of course... I keep hoping it will "just start working" after one of these random changes.

Oh, and I think it was laptop-mode that kept on re-enabling DPMS on me, which also might be another suspend-breaker.


And I built a kernel! I used the directions from Olof Johansson, and they got the job done. I used the GOOGLE_RELEASE value from /chromeos/etc/lsb-release to determine that I needed to checkout branch release-R23-2913.B. I copied in the config file from /boot/config-3.4.0 (provided by Chrome OS), and added NFS support. My new kernel works for me just like the provided one (plus NFS).

I noticed the git repository had release-R26-3701.B, but the kernel I built with that did not work. For some reason wifi didn't come up automatically, and then it didn't accept keyboard input either and appeared hard-frozen, or at least completely I/O-immune. So I used prepareconfig, to catch a few settings that had changed from R23 to R26, and at least the keyboard worked, but I was getting a bizarre "Operation not permitted" error from modprobe, and I found out it is caused by some new crazy security feature added at R24. It can be disabled by adding lsm.module_locking=0 on the kernel command line.

And I have been setting my backlight by writing to /sys/devices/platform/s3c24xx-pwm.0/pwm-backlight.0/backlight/pwm-backlight.0/brightness, and now the range is 0-2800 instead of 0-255, so I just multiplied my brightness setting by 10.

So now time will tell if suspend/resume has been fixed (either by R26 kernel, or by fbdev video driver). strace has definitely been fixed. An "unbalanced irq enable" error message in dmesg has also been fixed, which may be related to suspend difficulty. Those are my 3 big outstanding issues. Nice job, Googlers!

Minor nit: irq/426-cyapa still takes mad crazy CPU time to do nearly nothing. Not sure if that is a simple flaw, complicated flaw, or inexorable result of massive interrupt volume.

It is certainly nice to have access to the active git repository, with things being fixed without me hardly lifting a finger!

Oh, and I am building my kernels on the Chromebook, not using some crazy cross-environment. It isn't even slow. make bzImage -j 8 takes 10m4s (yeah, I know, -j 8 is overkill with flash storage). The kernel source eats 1.3GB, but I still have more than half of the 11GB partition free.

March 7, 2013
GLES fail

I want Stellarium to be fast (it is around 1fps). So I downloaded the Mali GLES SDK (for Windows cross building or something, but whatever), and I symlinked the .h files into /usr/include, and I downloaded Qt4 source, and I built Qt4 with ./configure -opengl es2 -nomake tests -nomake examples -opensource, and I built Stellarium with cmake -D OPENGL_MODE:STRING=ES2 -D BUILD_STATIC_PLUGINS=0 ../, and I ran Stellarium, and it said:

QEgl::display(): Cannot initialize EGL display: "Not initialized (0x3001)"
QEglContext::chooseConfig(): Could not find a suitable EGL configuration
Requested: "type=es2 rgba=0,0,0,0 surface-type=window"
Available:
QGLContext::makeCurrent(): Cannot make invalid context current
QGLShader: could not create shader
...

Even with the armsoc video driver. I guess I'm not quite there.

On the bright side, suspend has suddenly become rock solid (knock on wood), after the changes on the 4th. So it was either fixing laptop-mode to stop enabling DPMS, upgrading the kernel, or switching to fbdev.

I whipped out the stopwatch and it takes 2.0 seconds to wake up to X11, and 5.0 additional seconds to bring up my wifi. That is very fast.

And I don't imagine this will ever see upstream light of day, but I noticed that this keyboard seems prone to bouncing. I monitored my typing for a day, and I monitored the time between the last key-up event for a given key, and a new key-down event. That is as short as 23ms for intentional repeated letters, but faster than that it was only a few instances of 11ms or 12ms, and those were all errors. So I hacked evdev input driver to ignore any key repeated less than 15ms after its last key-up event. So far so good.

And if you want to build ltrace for the Chromebook, make sure to find the git source and check out the pmachata/arm branch!

March 21, 2013
A couple more struggles

I had to reboot, the computer just got slower until it crashed. But I didn't really try too hard to figure it out, it could just have been that wi-fi trouble caused an NFS stall in an unfortunate process. Knock on wood.

I have had an ongoing battle with youtube. When I first installed the Debian edition of the gnash plugin, youtube worked. Then I got a bunch of bizarre intermittent behavior, and then youtube stopped working. I think this may be partly because youtube has many different encodings and player styles embedded within it, depending on which video you are viewing and what it decides your client is capable of. Anyways, I purged the debian package and re-built gnash from source (relatively painless), and that worked fine for a couple weeks.

Then today I start getting some MediaHandlerGst::createAudioDecoder: Couldn't find a plugin for audio type audio/mpeg! -- MediaHandler::createFlashAudioDecoder: no available FLASH decoders for codec 2 (MP3) popups, in lieu of audio. I went through some fails, but eventually determined that it was only happening for some videos. Eventually out of desperation I installed Debian's gstreamer0.10-plugins-ugly package, and that *seems* to have fixed the issue for all videos. It does seem like plugins-ugly includes libmad support, so that seems pretty essential. Presumably on x86 hardware I would have access to some sort of pretty codec, and not need this ugly one.

Oh, and the de-bouncer has really made me much more appreciative of its keyboard.

Oh, and this laptop gets insanely great battery life. I had just gotten used to forced re-charging every 3 hours, so going 4 or 5 hours without even getting to "low" is a miracle.

April 5, 2013
Still not perfect

I just cannot break more than about a week uptime.

It hasn't crashed on me again, so I think that problem really was just mplayer grabbing the display+keyboard and then hanging on NFS. But it's got a new and totally unexpected failure mode.

Whenever I shove the chromebook into the diaper bag, it hard resets. The lid is closed, and it should be sleeping (though it may not be, because flexing the case clicks the trackpad button and wakes it up). But when I got to the park and opened it, it was showing me the bootloader screen. And lest I write that off as a fluke, on the way home it did the same thing.

My old laptop would do things like this because its battery-retention tabs were falling apart, but this one has a hard-wired battery so I don't see what the cause could be. I've sat here with it on and open and dropped it and smashed it and so on, and it won't turn off for me. Must be something particular about how it is smashed when it is closed in a bag. Lame to the max. I'd love to know if this is a manufacturing defect of some sort, or what.

And it is increasingly frustrating that it flexes so much. On the one hand, a flexible computer takes less damage (it has fallen lots of times already), it is a good match to its light weight. But on the other hand, if I hold it with one hand, I cannot type on it with the other because the trackpad button is flex-triggering madly. There are a few tweaks I want to make to the mtrack input driver, and when those are done I think I will disable the trackpad button entirely.

On the other hand, even in Debian, it boots pretty darn quick. So it is not really a serious disadvantage that it resets on occasion. Just lame, and hard to diagnose or treat.

Oh and a real bonus is that once it is at the park, I can throw it in the grass. It has no fan so it doesn't ingest debris. And the only holes in the bottom are for the speakers, so barring an actual puddle it should be fine. It remains to be seen how the keyboard is going to fare, though.

The only other real continuing frustration is that GLES is still undefinably broken. I don't really need to play any video games, but it would be nice to run regular stellarium spiffy-fast. I've done a few hacks to disable visual features and now it gets around 3fps, which is "totally usable", but I'm at the point where, to make it go any faster, I have to optimize the drawing of great circles, which is mad stubborn slow. I'm not sure why Mesa is slow at it (maybe something is inadvertently triggering a worst-case), but I am sure that I would rather have GLES "just work" than get to the bottom of that particular conundrum.

And it runs commander keen (under dosbox), and sdlquake (41fps at 1366x768!), and prboom just fine. Those are all the games I really care about...

And I have totally gotten used to how slow it is. It doesn't bother me at all. Compiles are fast. Web browsing is plenty fast. Anymore, websites tend to either be just fine or unusably slow (buggy/crappy), with very little in between. That was true on my fast-hot laptop, and equally true on the Chromebook. And I've resigned myself to being unable to use flash, I really don't miss it. At least YouTube works.

It is actually a benefit, I have decided to think of it as a thin-ish client, so a lot of things are actually a lot faster because I run them on my big PC now. But it is still plenty powerful enough that I can copy my work codebase onto it, and work on it while I am out and about.

And I can't say enough good things about the battery life. I think I must get about 6 hours of real use out of it, compared to about 3 hours with my old laptop. It is a huge difference. I have only plugged it in "because it is low" a couple times. My daily schedule has a couple hours in the morning and a couple hours in the afternoon where it is plugged in about 50% of the time (depending on coincidences), and that is always enough that I never even have to think about the battery. At all. I changed my status display to show red text if the battery is less than 20%, and I've only seen it once!

June 4, 2013
Illustration of systematic development fail

I happened to run across an example that serves to illustrate a systematic failure in the Google Chromebook development process.

I believe when I installed Debian on my Chromebook, it previously had ChromeOS R23 on it. When I built my own kernel, I used the kernel branch for R26. OpenGLES2 doesn't work, so I was eager to try something new. So I built an R28 kernel.

The R28 kernel would not boot, it could not read the MMC at all, and failed to find the root partition.

It is the result of this bug.

It seems that kernels for R27 and above depend on firmware 2695.117.0 or above, and specifically is known not to work with 2695.104.0. To their credit, they verified that ChromeOS's default upgrade path would guarantee no one would use the R27 kernel with the older firmware.

But for anyone maintaining or supporting another distribution, this is a nightmare. The firmware, kernel, and userland should be separate projects with broad compatibility across multiple versions. Especially bundling firmware updates with kernel updates is something distributors are not used to dealing with.

I think this is probably representative of the story that has broken OpenGLES2. Everything from firmware version, kernel version, libraries and Xorg modules, all may have undocumented interdependencies. What works perfectly for one user will not work for another, and they will not have the resources necessary to determine which component has an incompatible version.

It reminds me too much of the flaws I experience using Google's cloud services. In pursuit of fastest advancement, Google has sacrificed much that users and developers would like to count on. Standardized interfaces are dead, even the interface to the BIOS is subject to constant pointless reinterpretation.

It is clearly the future. But I've got complaints about it.

I installed Debian Woody on my PC in May 2003, about 10 years ago. Since then, I switched to debian-unstable, and have just periodically apt-get update and then apt-get install whateverpackageineed. It has always figured out all of the interdependencies automatically for me, almost never giving me trouble. In that decade, there was one instance where a kernel upgrade and userland upgrade were forced to coincide. It was more difficult than it should have been, so I sent a suggestion to a Debian package maintainer to make it easier, and they eventually implemented it.

In all of those 10 years, I never once had any experience where anything was tied to a BIOS update.

By comparison, in the 3 months I've had my Chromebook, they've already tied a kernel update to a BIOS update, and presumably several userland updates as well. And without any documentation.

It is fair for to say that I am not using the Chromebook as Google intended. However, this haphazard development model seems to be the norm for *all* ARM hardware, for *all* Google-influenced hardware, and for decently-portable hardware in general.

Bummer.

But to make lemonade, I need to find a resource to download new ChromeOS images. Here is a script to install the newest ChromeOS over a current Chromium (though it seems to be for x86 Chromebooks, or something). It uses this link: https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.conf, which points to the current ChromeOS. It uses crazy stuff like: mount -ro loop,offset=$((`cgpt show -i 12 -n -b -q $image_file`*512)) $image_file $WORKDIR/chrome_efi_mount to mount the filesystems within the image. Yeah, the image has a GPT (GUID Partition Table) inside of it.

Unfortunately it is currently ChromeOS 3701, which I think is R26. So I will have to wait a while for a complete official R28...

February 5, 2014
Staying power

I have young children, which is bad for my laptop. One of my favorite things about the Chromebook is that it is so light and plasticy that it can be dropped with minimal damage, so I don't have to be so paranoid about it. It has fallen about 2 feet at least 20 times in the past year. When it falls, its flimsy plastic clips pop apart -- just snap them back together and it's good as new. Once, the charging connector bent (but still works *shrug*).

But last night's fall finally broke the screen instead of popping the plastic clips. *sigh*

So I am writing this post to tell you: oh my god my old PC luggable (Lenovo Ideapad) is *SO* crappy! Its "skinny" parts are huge, and even so they are smaller than its gigantic battery in the back that is heavier than the whole Chromebook. It takes its huge battery about 3 hours to charge, which is barely faster than it discharges -- I'm going to be tethered all day. It is so heavy there is no illusion it will survive getting thrown to the floor so I'm going to have to carefully babysit it to make sure my kid doesn't get ahold of it. Its keyboard *SUCKS*. It's already hot! Its fan is so loud, I can hear it across the room. It's not any faster than the Chromebook unless you run GLES, and then the fan really kicks on!

Punchline: It is absolutely worth the $50 to get a new screen for the Chromebook.

July 28, 2014
Sic transit keyboard

A couple months ago, my down arrow key popped off. I'm an experienced keyboard surgeon but I could not discern the cause of failure. I managed to snap it back on, but if you hit it wrong it will still pop off every now and then. *shrug*

Now the 'a' key and control key have both popped off, and since they are bigger keys I had an easier time diagnosing it. The key is built out of a cap, a flimsy plastic scissor jack, and then some metal clips built into the laptop. The cap snaps to the scissor jack, and the scissor jack snaps to the clips. On other keyboards, I have had the scissor jack fail, but that does not seem to be the problem here.

Basically, the interface between the metal clips and the scissor jack has a tiny overlap. On these keys that are popping off, the overlap is only sufficient to hold together if the scissor jack is extended. If it is fully compressed (such as when you hit the key) then for a brief instant, the key is free to leave the keyboard. The little metal part is actually what deforms -- it seems to be a soft metal, and apparently it can only take ~200,000 key presses before failure.

Obviously, firefox killed down arrow (which is extra flimsy because it's small), and screen killed control-a. But other keys are obviously beginning to fail in the same way, so it is time for a new keyboard. I haven't ever had a laptop keyboard last more than a year without damage, though this is perhaps the most incapacitating damage I've seen yet.

So, new keybord time! $20 on ebay for the whole top half of the bottom half of this laptop (keyboard+trackpad+plastic cover).

But now that the new keyboard has arrived, I am bold enough to aggressively bend the little metal tabs to where I think they belong, and maybe I have fixed all of my problems??? To be continued...

November 9, 2014
Thus passes keyboard

Since I had the new keyboard, I was confident enough to do forceful surgery on the old one and that actually worked fairly well. But a few days ago I had a scare -- pulseaudio screwed the pooch such that I thought the built-in audio chip was actually broken, and I briefly considered buying a new laptop before I figured it out. I settled on the Asus C200 even though it has a Celeron in it!

I realized I might never get to use the new keyboard, with its (much needed) new speakers. So I acted decisively.

Taking apart the Chromebook was pure joy. A big relief since I am hardly a laptop surgeon. The bottom half only has three types of screws in it and they're easy to tell apart. The display hinge comes apart fairly easily. There is so much extra space and so few cables that there is no moment of "how??" to contend with.

Inspecting my old speakers revealed the problem: they had attracted a variety of scraps of metal that were pinching the membrane to the permanent magnet. Since I use the laptop at my workbench, that is not very surprising. For the new speakers, I covered the ports up with tape. The tape muffles the sound a little bit, but is not nearly as bad as the iron filings were.

The new keyboard has a slightly different -- and overall probably not as preferable -- feel than the old one. And there is some sort of structural difference now too. I can pick up the laptop by one of the corners and wave it about in the air, and it doesn't flex enough to trigger the physical trackpad button. Way cool!

And an anecdote about how fantastic this laptop is. I was dangling it, open, by the corner of the LCD as I walked about the house. I wanted to pick up something off the shelf that needed two hands, so I did that. While I was picking up the thing, I was not holding the laptop. Accordingly, gravity acted on the laptop and the laptop fell 2 feet to the floor. Once my hand was free again, I stooped down and picked up the laptop. This is not an unusual moment of thoughtlessness, it's just how I treat 2.5lb laptops.

My old Lenovo is a damn brick by comparison, even though it manages to come in under 4 pounds. It is a bad idea to carry it around by the LCD, and unthinkable to drop it.

February 27, 2015
The bell tolls for hinges

A couple months ago, my 1 year old put his knees on the keyboard, then he put both hands on the screen and put his weight on it, like chest compressions in CPR. He hyper-extended the hinge nearly all the way to flat open. The hinges have long flimsy metal bars that extend all the way to the top of the display because the plastic around the display is not rigid enough to really support it with just one small hinge anchor point -- the bars spread the stress out. One of those arms snapped.

So the screen was super floppy on one side, and the plastic was getting flexed like crazy. So I ordered a new hinge. It eventually got here, and I installed it, and now my laptop is good as new again (except for a cosmetic crack from the plastic being devastated).

Each time something crazy like this happens to my poor laptop, I think, maybe this is the end. In all honesty, the Asus C200 probably would work better for me anyways because it has slightly better battery life. But then I perform the repair, and each time I am blown away by how great the laptop is after I repair it.

New screen, keyboard, and hinges...the only stock parts left: battery, motherboard, and 3/4ths of the plastic.

May 7, 2015
Seduction

My Samsung Chromebook XE303C has barely lasted two years, but my disloyal eyes are already wandering.

My Lenovo Ideapad U150 still gets about 2 hours of battery life, which is pretty good for its age (only a little worse than when it was new). But it takes it about 2 hours to charge so I am tethered at least 50% of the day. Which sucks. Especially because kids eat tethers.

My Chromebook has about 5.5 hours of battery, which is also nearly as good as when it was new. And it charges in about an hour, so I'm tethered at most 25% of the time, and many days I am not tethered at all because I charge it during lunch. One charge during lunch lasts me the whole workday, though it's cutting it pretty close. Not bad.

But the new Asus C201! It uses a Rockchip ARM, which is apparently even further down the relative performance scale today than the Exynos was two years ago. It has a 10-12 hour battery! I might go the whole workday without recharging, and perhaps as few as 10 minutes on the charger during lunch would give it a comfortable margin.

And it's only $170! The only thing stopping me from buying it is that I don't really want to go through the hassle of configuring a new laptop from scratch right now. The Chromebook I have is really perfect as it is. I just have this idea that if the improvement from 2 hours to 5 hours was fantastic then maybe the improvement from 5 hours to 10 hours will blow my mind.

So, is confessing my crush an alternative to acting on it? Or is it just another step towards infidelity? Time will tell.

June 3, 2015
Seduced

One of my children spilled a bunch of water directly in the keyboard. To its credit, it was constrained to the keyboard. But a little must have gotten into the membrane because a few keys are a little flakey now.

I pulled out the Lenovo "loaner notebook" while the Chromebook was drying, and that thing is awful. So hot and loud and slow at charging and fast at discharging.

So I ordered an Asus C201. And a replacement keyboard.

Weird.

June 6, 2015
To crouton, or not to crouton?

Okay, new chromebook time! The Asus C201 is just like my old one, basically.

Crouton (Debian in chroot under chromeos) appears to be more of a path-well-travelled now, so I'm going to try it first. I see a few big upsides:

And some downsides:

I'm especially afraid of learning about ChromeOS. If I can tell it's there, it's probably not worth it. OTOH, it would be nice to have real flash player when I need it??? I don't think so...

The fact of the matter is, I don't want it. But I've made it this far, so I'm gonna see if I can resolve those questions. Though I must point out that chrome is using 300MB just showing these two terminal sessions. But 300MB doesn't matter. I guess.

Building some kernel modules using the sources at git clone https://chromium.googlesource.com/chromiumos/third_party/kernel. I checked out branch release-R43-6946.B-chromeos-3.14 (because that's what my chromeos is). I ran ./chromeos/scripts/prepareconfig chromiumos-rockchip, then make menuconfig to enable NFS.

I have come to the dreaded Chromium OS LSM: init_module denied while trying to install NFS modules into the ChromeOS kernel. Down with Chrome OS!

I built the full kernel under the crouton environment. I got a debian initrd from ftp://ftp.us.debian.org/debian/dists/unstable/main/installer-armhf/current/images/netboot/initrd.gz. I extracted it with zcat initrd.gz | cpio -i on a microsd card that I configured, again according to the directions from Andrew Wafaa. I had to remember to run cgpt add -i 1 -S 1 -P 10 -T 5 /dev/mmcblk1 when done installing the kernel in /dev/mmcblk1p1.

Building the kernel was a little more work than I remember, and I'm not precisely following Olof's directions anymore... I ran make bzImage, and make modules, then make dtbs. Then I used this kernel.its:

/dts-v1/;

/ {
    description = "Chrome OS kernel image with one or more FDT blobs";
    #address-cells = <1>;
    images {
        kernel@1{
            description = "kernel";
            data = /incbin/("arch/arm/boot/zImage");
            type = "kernel_noload";
            arch = "arm";
            os = "linux";
            compression = "none";
            load = <0>;
            entry = <0>;
        };
        fdt@1{
            description = "rk3288-speedy.dtb";
            data = /incbin/("arch/arm/boot/dts/rk3288-speedy.dtb");
            type = "flat_dt";
            arch = "arm";
            compression = "none";
            hash@1{
                algo = "sha1";
            };
        };
    };
    configurations {
        default = "conf@1";
        conf@1{
            kernel = "kernel@1";
            fdt = "fdt@1";
        };
    };
};

Then I ran:

mkimage -f kernel.its kernel.itb
echo "console=tty1 debug root=/dev/mmcblk1p3 rw rootwait" > config.txt
vbutil_kernel --pack kernel.signed \
      --keyblock /usr/share/vboot/devkeys/kernel.keyblock \
      --version 1 \
      --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
      --config config.txt --vmlinuz kernel.itb --arch arm

That's kind of tedious but still pretty straightforward. Then I booted on the microsd, knock on wood.

Apparently I have to edit Debian's /sbin/init. Change the tmpfs size to 200MB:

if mount -t tmpfs -o size=200M tmpfs /mnt ; then

And, yuck, before running make modules bzImage, I apparently have to run export WIFIVERSION=-3.8 (the native 3.14 brcmfmac driver doesn't seem to be maintained as actively as the one in wireless-3.8.

And thankfully, after all that, the debian installer doesn't really give any trouble. I don't have to manually configure the wifi or anything like that. I did the same process as last time of installing on the SD card, verifying that wlan works, and then copying to the internal storage. This time I was a little bolder and re-partitioned to use ROOT-A, ROOT-B, and STATE as one big partition (14.5GB). I did preserve all of the other partitions because I don't actually know (or care) how vboot works.

So....I did get utility out of the crouton install, it let me rebuild my kernel without futzing with cross compilers. The laptop is "very slow", but that means it took 15 minutes to build kernel+modules. When I was a kid, it took 30 minutes just to build a tiny 1.2.13 kernel. So not bad.

I copied over the UCM files (/usr/share/alsa/ucm), and I initialized sound with alsaucm -c ROCKCHIP-I2S set _verb HiFi. Then the amixer set Speaker control works.

The wifi driver (brcmfmac) isn't super reliable, and never comes back after suspend. And the webcam (/dev/video2) always reports itself as busy. And mplayer installed a crap AVI codec. But alsa, X11, firefox, nfs, vpn all work just fine. I'm most of the way there. But the wifi problems are going to reduce my productivity...

...

Okay, this is pretty much all I've done all day, but I figured out why brcmfmac wasn't suspending reliably. Long story short, you need to copy over /etc/modprobe.d/blacklist-btsdio.conf from ChromeOS. It contains:

blacklist btsdio

If I were Google or Asus, I would have just not shipped btsdio with the kernel config for this laptop. But anyways, if btsdio (the generic bluetooth-over-SDIO) driver gets loaded, then it attaches to the same internal MMC slot as the wifi (both are in one chip), and the generic driver doesn't support power management so it removes it instead of suspending it, and then it never adds it back! I feel like the amount of effort to figure this out is a failure in Linux's MMC layer. *sigh*

To that end, here's a patch I submitted to LKML that would have made a useful error message here and saved me about 6 hours. Of course, if you're reading this you already know the punchline (blacklist btsdio).

If you actually want bluetooth, there's a fairly straightforward process to get a brcm firmware loader for the bluetooth, which does seem to work...but I'll never actually use it.

The webcam seems to not wake up until it is opened, which is why it always says it is busy. It seems to simply work to start it twice. It's worth noting it seems to show up as /dev/video2 due to some bogus v4l devices that are created for hardware codecs??

So I just have to figure out the mplayer codec problem and I'm in business!

And mplayer seems to be just pickier about a few marginal videos. So that's that -- it's my new laptop now. That wasn't so bad, was it?

June 10, 2015
Asus C201 Review

I've had it for a few days as my daily driver and here are some observations.

The battery life is everything you could hope for. I have had a hard time getting it below 50% charge! I decided to skip the lunchtime charging I'm used to -- so, 9 hours -- and was down to 47%! When it's idle, it draws about 0.27A. That's even lower than the Samsung Chromebook! I have no doubt this thing could do 12 hours, and then some. That's insane! My old Chromebook had about an hour left after the end of the afternoon shift, while this one has probably 3-5 hours left after a whole workday!

It is *slightly* smaller than the Samsung Chromebook. It is much more rigid. I have never had the trackpad click when I didn't want it to. It also has no interface cover plates which will fall apart.

The speakers are pretty alright. They don't seem to get hot, which is a step up from the Samsung. Also, I predict their grills will do a better job of preventing random scrap metal from collecting on them.

The charging port is kind of stupid. It has something that looks kind of like a micro-USB connector, but isn't. It's invertible. I said to Sarah, "look the power plug is invertible!" and she said, "your old one was a cylinder and didn't care about the angle at all." : |

You know how when you plug in a full-sized USB connector, it doesn't go in, so you turn it upside down and it still doesn't go in? Well, this connector is like that except it has the one advantage that you know turning it over won't solve your problem. It basically sucks. But I never have to charge so whatever.

The SD card slot only takes microSD, but the card doesn't stick out when it's installed so that's a step up from the Samsung (not that I need more storage).

It is incredibly similar to the Samsung Chromebook. The keyboard feels about the same (which is good). The trackpad is only marginally better. The screen is glossy instead of matte, but it doesn't bother me much. Otherwise, the screens are about equally crappy. The weight is very similar. They have the same LEDs.

The Samsung's keyboard had a few subtle flaws -- poor de-bouncing of keys (I solved it in software) and sometimes it would register an enter press for no reason (probably cross-talk/capacitance?!). The Asus does not seem to have these flaws.

And the new configuration does HTML5 video in Firefox acceptably -- I don't know if that's the Firefox upgrade (version 38.0), or the new driver/library stack. Pretty cool, though.

We'll see how it weathers, but I'm super optimistic.

July 28, 2015
A few notes...

Now that I've had it for a while, I think I've run into all of the surprises...

Did I mention it is just like the Samsung Chromebook in every way? Except with perfect battery life.

I've now dropped it a few times, and it seems to be just as durable as the old one...

I noticed it took a long time to restore wifi after waking from sleep, and it turned out to be dhclient. DHCP has a stupid overdesigned system so that if you have a hundred PCs that all power on at the same time and broadcast on an unswitched network, they will not tend to collide with eachother when they all cry out for an IP address. Practically speaking, it means that if the first DCHP request is lost (which it always is), then it waits a real duration before retrying. I added two lines to the end of /etc/dhcp/dhclient.conf:

initial-interval 1;
backoff-cutoff 1;

Now it reliably takes 5 seconds from opening the lid to being fully resumed, which is about as good as I've ever seen on a laptop.

And one more thing I had to do battle with -- headphones. On the Samsung, I just set the volume independently on the Speaker and Headphone channels, and that worked. But on the Asus I also have to tell UCM to enable the headphones (which disables the speaker). So here is a complete list of idioms (which I have wrapped up in shell scripts, naturally):

# enable the speaker at bootup:
alsaucm -c ROCKCHIP-I2S set _verb HiFi
# set speaker to half loudness:
amixer set Speaker 50%
# enable headphones (disable speaker):
alsaucm -c ROCKCHIP-I2S set _verb HiFi set _enadev Headphone
# set headphones to half loudness:
amixer set Headphone 50%
# disable headphones (enable speaker):
alsaucm -c ROCKCHIP-I2S set _verb HiFi set _disdev Headphone

I have no idea if those will be useful to anyone -- surely Gnome/KDE take seamless advantage of UCM. But I found UCM to be totally overdesigned, undocumented, and underdesigned all at once. Anyways, there is another _enadev and _disdev target called Mic that I think enables a microphone on the headphone port (otherwise, it uses the internal mic?). Anyways, I have not attempted any recording so YMMV.

February 5, 2016
Progress report

I've had this laptop for a while, and I have something to say:

[greg@rat] ~$ uptime
 09:16:04 up 216 days,  1:07,  7 users,  load average: 0.13, 0.14, 0.22

I've owned this laptop for 245 days, so....basically, once I got it set up, it is stable. I don't really mind that the older Samsung Chromebook would hard-reset from a hardware fault when subject to mechanical shocks. I would not go to heroic lengths to save my Asus C201 from a reboot. Even so, this laptop hasn't rebooted since I first set it up! Pretty cool!

That beats my PC (137 days since a power outage), my linode (68 days since a reboot for hypervisor security fix), and basically everything else in my life except for a pair of obsolete palmtops that have been sitting idle on chargers since 2010. Pretty cool!

And this is my most-used daily driver, subject to NFS-over-wifi stalls, toddlers ("SOMEBODY touched the laptop," my oldest tells me), physical shocks and drops, Firefox DOSing my X server, 12-hour stints off the charger, and so on. Pretty cool!

About those physical shocks, it is holding up fine, and it has fallen quite a few times. It is much more rigid than the Samsung Chromebook was, but it does not seem to be more brittle for it. The plastic is slightly warped at a couple corners from drops, but not as bad as the Samsung was.

About those marathon laptop sessions, the battery is still good for 12 hours. I have rarely run it below 10% (the "red zone" on my status display), but even so, I have never had to adjust my habits because of the battery. Every previous laptop, I had set up the charger so I could reach it from a seat, but this one is tied off so it can only be used when the laptop is out of reach. I have never regretted that. It is not so much that I'm impressed with my Asus (in fact, I take it for granted). Really, I'm shocked that anyone ever accepted less.

I still think it's fast. When it's slow, it's due to obvious failure modes in Firefox. Firefox sucks. The modern web sucks. I run things like compilers and GIMP locally, and never feel anything is slow except Firefox.

About that keyboard... I generally feel good about it, but for indefinite reasons I think it is not as good as the Samsung Chromebook's keyboard, but the difference is pretty subtle. I have not had to clean it. I did get a bad feeling about the "c" key, and when I took it apart, a piece of plastic broke off. I think the plastic actually broke and caused trouble before I took it apart. It went back together without complaint and I've been using it for a month since. I anticipate going another 6 months before replacing the keyboard. Knock on wood.

The keyboard has a very soft touch, and I actually have long liked typing lightly. But I think it may have finally jumped the shark -- lately, I've noticed I often don't bother to press the keys hard enough to make contact.

March 22, 2016
Toddler strikes again

I sat the laptop on the back of a chair for about 30 seconds, and when I came back, it was (apparently still) there and two kids were hovering around it. Fred said, "Rufus touched a laptop." It turns out, in addition to sending some cryptic punctuation to my boss, SOMEBODY broke the hinge and display.

It was still on my local network, but the screen was blank (though not obviously damaged). I gave it a hard reset (power+F3) to see if the screen would come back, and it did not. Uptime was:

12:52:51 up 262 days,  3:45,  6 users,  load average: 0.43, 0.33, 0.29

It did not reboot once between when I installed the OS and when the kids broke it!

I used the Samsung Chromebook to finish off the afternoon. It was pretty much exactly as I remember it -- and barely different from the Asus C201. Pfew! Just a little heavier and not nearly as battery-ish. Maybe slightly slower -- specifically, at accessing the builtin flash storage.

Easy to take apart. Remove the six obvious screws on the bottom -- no need to get the screws under the rubber feet (the plastic they connect to has broken). Unsnap the two parts of the lower half with a pocket knife. The keyboard side is only hanging on by the flat ribbons for the keyboard and trackpad. Unfortunately, the battery connector is hidden behind a metal shield that may very well be a heatsink, so I left it powered on the whole time!

The plastic parts holding the screws that connect to the left hinge had separated from the case, and the hinge took the LCD cable off the motherboard as well.

The holes in the metal of the hinge were about 2.5mm in diameter, so I drilled 3/32" holes in the case directly under where the screw-receivers used to be, using a drill press. Then I put the metal plate of the hinge back in position and slid short (8mm?) M2.5 screws through it. They slid in easily up to the holes I drilled, then I used a screwdriver to thread them roughly into the plastic case. They stuck out the bottom just enough for the appropriate nut.

Then I injected hot melt glue under the hinge plate as well as I could, so it wouldn't tend to wiggle too much. Mostly because it was no longer resting on flat plastic. And I used a little hot melt glue on the outside to discourage the nuts from vibrating loose, and to avoid scratching the furniture.

I reattached the connectors for the screen, keyboard, and trackpad, and put the whole thing back together -- it works! The LCD connector was just a press-fit with no kind of locking bar or anything. The flexible part of the connector interfered with one of the screws I put in -- its head wasn't quite as low-profile as the original had been. But the original would have interfered too -- lame. I hope the connector doesn't loosen up over time. Jinx! Knock on wood. Etc.

Eventually I will want to replace the keyboard, and it bums me out that there are not any C201 keyboards on ebay etc. I don't know if it just takes time for things to percolate through these channels (maybe new production is cornering the market on the keyboards). I do notice you can get C200MA keyboards easily enough (13NB05M1A-PR), and they look very similar. But the keyboard is very integrated with the case (plastic rivets), so if there is a different screw layout or ribbon position, that will not be very feasible to make work. And I have no guarantee that they use the same mechanism so it may not even be a good supply of spare key parts.

The backside of the keyboard has the code 13NB0912AP0401 / 3B0Q1TCJN30 on it. Searching for that does yield a couple foreign hits, so maybe it'll be possible by the time I need it.

August 6, 2016
Hinges: the gift that keep on giving

Well, the second hinge went. It had two screws in it, and from its behavior I think the first one went long ago -- perhaps even in the March incident. The second screw went a couple days ago. Since there was no video on that side, the laptop was still functional, just the hinge was slowly breaking the top part of the case (the keyboard part).

Just as easy to replace the screws, but now that I've looked at it twice, I'm convinced it's not just an incident of toddler trauma, but actually a flaw in the laptop. For one, the plastic bits that hold the nuts to the cases are not beefy enough. They should have greater attachments to thicker plastic spreading the load out across the case.

But much more trivially, there are the wrong number of screws. Even after my repairs, when I open the laptop, the hinge is solid -- in that direction, the screws are cantilevered against solid plastic and motherboard grounding pad. But when closing the laptop, the hinge naturally lifts off of the motherboard grounding pad and flexes the screws a little bit. The problem is that both of the screws are too far away from the axis of the hinge, and are in a line with eachother, so the screws alone don't provide any rigidity along the important bending axis.

A third screw -- or even just moving one of the two screws to be in a better place -- would make it so the plastic doesn't have to flex every time you open and close the laptop.

I had to reboot to get the trackpad to come back. And I think if I have to do this again, I will destroy its little flat cable. *sigh*

December 9, 2016
My god, this laptop isn't perfect

Today my wi-fi died in the middle of normal usage. I immediately blamed my kid. Surely he found his way into the closet and unplugged the access point! Surely he flexed a bit of CAT-5E past the breaking point! Surely he pushed the damn "stop working" button Motorola so thoughtfully put on top of the cable modem!

Imagine my surprise when iwconfig hung, dmesg was full of wlan errors, and rmmod brcmfmac also hung. A race case or data corruption or something caused the wlan driver to develop an uncorrectable disability! My god, this laptop isn't perfect!

It had an infelicity that wasn't directly caused by my kids. After only 17 months of ownership, it manifest a single failure. I can't believe it. This is not the apex of perfection I have come to expect from this $180 budget disposable toy.

C'est la vie. 3 minutes to accept the diagnosis, 30 seconds to hard-reset and find it works again, 4 minutes to complain about it here. Life goes on.

April 7, 2017
Hinges again!

I bought a replacement keyboard because they're cheap now, but the key which was dying (home row 'e') "fixed itself" when I pushed real hard on it after having the replacement in hand. Just like with the last Chromebook, having the replacement available obviated its need.

The replacement keyboard came with a bonus part, the bottom piece of plastic, and it shows exactly the same damage as mine did: 3 of the 4 hinge screw receivers are totally sheared off. Jinx!

So a couple weeks later, I notice that the hinge on the right has failed again. This time it is on the screen side of the hinge. Oh boy!

I pried up the bezel by spudging along the outside, and I could see that only one of the two screws was still attached on that side. I could not completely remove the bezel without taking apart the whole shebang, so the first thing I did is use a ~3/16 drill bit to drill a hole in the bezel so I could access the top of the old screw. Then I removed the old screw and used a ~3/32 drill bit to drill a hole clean through the back of the display plastic under where the screw had been.

I inserted a short M2.5 screw, and to give it something to hold onto on the back (because the hole in the back was not entirely snug against the screw), I made a washer out of a bit of a license plate. Then I put a nut on top of it, and gauze and hot melt glue (to protect from snags) over that.

I'm getting over my fear of taking a drill press to a powered-on laptop, let me tell you.

I wonder which hinge screw will fail next!

I'm astonished that I'm able to repair this so easily, but it really points to a trivially-avoidable oversight in the mechanical engineering.

April 23, 2017
GL, finally

I did wind up installing the new keyboard, and it is astounding how different it is from the old one. Only one key was at all damaged, so it's not a huge improvement, but it is just *weird* to have keys that haven't been rubbed smooth or warped from over-use.

Taking apart something like this, it is easy to forget what laptop surgery used to entail. In my PC laptops, there were many more components and they were much more tightly packed. There were often two boards on top of eachother. There was never enough space for a proper frame so things like the HDD were structurally relevant, which is simply hard to believe but I've seen it with my own eyes.

I'm not saying Asus wasted any space, but it is absolutely not cramped in this thing at all. There's a small number of boards and they're all clearly visible and accessible in a single layer. You can immediately see where all the cables are routed. I have dreamed of this laptop all my life. The future is great.

Anyways, I decided to give Mali GL a try again.

ARM now provides a slightly better set of Mali binaries. The Firefly board sounds most similar to the Asus C201, so I got that. The R43 kernel I had been using has the kernel driver for Mali r5p0 built into it, so I downloaded malit76xr6p002rel0linux1x11tar.gz in hopes of compatibility.

I deleted the libEGL*, libGLES*, libOpenCL* files that were alread in /usr/lib/arm-linux-gnueabihf and replaced them with the libraries (symlinks to libmali.so) from that tarball.

Then I had to configure /dev/mali0 to be writable by my user account.

Bam -- incompatible:

file /dev/mali0 is not of a compatible version (user 9.0, kernel 8.0)

So I did a git pull on my kernel source cloned from https://chromium.googlesource.com/chromiumos/third_party/kernel. I decided to go with release-R47-7520.B-chromeos-3.14, as it is the oldest kernel that uses the Mali r6p0 driver. I'm going to include fairly detailed kernel build instructions again, because each time I am nervous that I have forgotten everything.

First, I run:

chromeos/scripts/prepareconfig chromiumos-rockchip
export WIFIVERSION=-3.8
make oldconfig

I just accept the defaults for oldconfig. Then make menuconfig, and I disable everything under Security, because otherwise I can't load the Broadcom firmware. And I enable NFS Client, because I use it. Then make modules, make bzImage, and make dtbs, and make modules_install (as root).

I have the same kernel.its device tree file as from before. I have a file named cmdline that contains this line:

console=tty1 debug noinitrd root=/dev/mmcblk0p1 rw rootwait

And I have a script I've named doit:

#!/bin/sh
echo before running this, export WIFIVERSION=-3.8\; make bzImage dtbs

rm -f kernel.itb kernel.signed
mkimage -f kernel.its kernel.itb
vbutil_kernel --pack kernel.signed \
      --keyblock /usr/share/vboot/devkeys/kernel.keyblock \
      --version 1 \
      --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
      --config cmdline --vmlinuz kernel.itb --arch arm
echo run:
echo dd if=kernel.signed of=/dev/mmcblk0p4
echo cgpt add -i 4 -P 15 -S 0 -T 1 /dev/mmcblk0
echo and eventually: dd if=kernel.signed of=/dev/mmcblk0p2

I run doit and then follow the instructions for installing a temporary kernel in /dev/mmcblk0p4.

To set up the permission for /dev/mali0 correctly, I added this line to /etc/udev/rules.d/99-custom.rules:

ENV{MAJOR}=="10", ENV{MINOR}=="55", MODE="0660", GROUP="staff"

A few other things that have come up: I needed to adduser me input to get my trackpad to work under new version of xserver-xorg (because it isn't setuid root anymore). And I couldn't get the stock umountnfs script to work so I put umount -t nfs -a into a new script /lib/systemd/system-shutdown/custom.

A reboot and...it kinda-sorta works. WebKit2 GTK browsers like Titanium and Epiphany now run and are passably fast, but fail to display a lot of things. eglInitialize() still returns FALSE, so I can't run stellarium. But at least my laptop still works.

The next step was a lot of work. I built armsoc using the devel/rockchip branch of https://github.com/RaumZeit/xf86-video-armsoc.git (RaumZeit's branch is needed for newer versions of xorg -- mmind's has not kept up). But that was not enough, there has been a change in xorg that breaks armsoc! I have an egregious hack to work around it and now eglInitialize() works, and so does stellarium! webkit2gtk still fails to render a lot of things, though, so I guess that wasn't really the cause there.

When I get to the bottom of armsoc's breakage, I'll post more detailed instructions here, I guess...

But I did find this link that you might enjoy. It is the fruit of another person's quest using Crouton on an Asus C201.

September 2, 2017
Hinges again.

The right top hinge flange detached again. I previously had replaced one of two screws, and the other one failed. While taking it apart this time, I discovered a third screw on that hinge flange, which had probably failed a long time ago, putting stress on the second screw.

So I've now replaced 7 of 10 screws, on 3 of 4 hinge flanges. On the bright side, none that I've replaced have failed yet. And the plastic hasn't developed creeping cracks around them or anything, either. 2 years and 3 months out of a $180 Chromebook, so far.

One weird thing I noticed... I got the bezel all the way off the screen (it's little clips are all fubared now), and I saw a "danger do not touch" sticker. I imagine it is the high voltage supply for the CCFL backlight? I assumed everyone had switched to LED backlighting??

May 5, 2018
Speakers.

When I replaced the keyboard last year, I did not bother to replace the speakers because they were attached with double-sided tape. But the speakers have just gotten worse over time so a couple weeks ago I finally replaced them. One of the screws was already kaput - the technology to bond the screw-receivers to the plastic outer case of the laptop is just a real weakness all around. But it doesn't seem to matter.

Anyways, having working speakers is awesome. The trouble with the old ones is they were coated in metal dust from sitting at my workbench (grinder, drill press). Magnets suck, etc.

To prevent the same happening to the new speakers, I put medical tape over the orifices before I even installed the speakers. I always think this will muffle the sound but I am always impressed how much less it muffles the sound than the iron filings did.

And for the record, these little speakers get hot, have always gotten hot. I think there are some frequencies where they are able to just soak up watts like nobody's business, just like in the Samsung Chromebook.

Anyways, pretty crazy that I've gotten 3 years out of a $180+$27(kbd)=$207 laptop. The battery is showing some mild sign of weakness (as little as 10 hours), but I am still incredibly lackadaisical about charging it. Very disappointing that looking for new chromebooks reveals mostly 10 hour Intel devices -- this may very well be the best laptop I will ever own.

I did finally put in an 8GB SD card to basically soak up all of the storage usually wasted on ephemeral files in my home directory. Should have done that years ago. It is surprisingly tolerably fast. Very poor testing procedure, but I find 6MB/s write speeds for the built-in flash and 8MB/s writing to the SD card. So really, if I ever wanted storage I would presumably just buy one of the obscene SD cards.

So RAM is the only thing I would upgrade.

... Oh my god, there is a creeping crack in the bottom case plastic that started at the 3.5mm headphone jack and is already 10% of the way across the laptop.

July 2, 2018
New battery.

It took about two years for the battery to become detectably aged but it then deteriorated quickly until my real battery life is under 10 hours today. And since I like to plug it in at 20% (so as to avoid an unscheduled power down), that's more like 8. I really believe I used to get up to 14 hours, so that is pretty severe for me. But newer Chromebooks are more expensive, more Intel, ?more hot?, and (at best) no better battery, I decided not to get a new laptop.

I found the market is distinctly split between batteries around $60 which claim to be new, and batteries around $25 that claim to be used, with very little in between, which is promising. I did not find anything that looked like an official channel for Asus parts, though, which is not promising. I wound up going to ultrabook-battery.net.

I feel I must review them: their website is easy to use. Payment is on PayPal (which has a good refund policy), which implies legitimacy. I placed my order on June 13th, received a shipping notice on the 15th, sent them a "are you going to send the battery?" on the 23rd, and received the battery today (July 2nd). So the shipping is kind of slow (nearly 3 weeks to receive the battery), and the communication is pretty bad (they never answered my query), but the battery did arrive. They are not a scam.

The battery itself is visually nearly indistinguishable from the original. The silk screen is nearly identical, and of the same quality. The connector and cabling appear identical. The I2C info about the battery (in /sys/devices/ff110000.spi/spi_master/spi0/spi0.0/cros-ec-i2c-tunnel.1/i2c-20/20-000b/power_supply/sbs-20-000b) is comparable, and suggests the battery is indeed new (capacity says it is above the design spec, the old one said it was much below).

There were three differences: the old battery says 4840mAh, while the new one says 4900mAh; the old battery has scuff marks from the screws; the new battery has a QC sticker that says 2018/06, while the old battery has no sticker there. All together, I have good confidence the battery is actually new and that it is actually genuine. If it's a fake, it's a much better fake than previous aftermarket batteries I've obtained. I will update here when I have an empirical judgement.

As for installation, it was not so bad. The heatsink does come off pretty easily. It has an extremely thick layer of heat sink goop on it, a lot of which was still over the CPU and not smooshed out the sides...I decided not to molest that except to remove a couple hairs, as I think it still covers everything. I'm a little anxious about it, so I stress tested. Idle, the reported temperature is around 42C which is typical (ambient is 29C). I put all 4 cores in a busy loop and it rapidly reached 65C, which is too hot but is probably survivable. With 1 core busy, it is closer to 50C which is probably tolerable. Unfortunately I didn't think to collect "before" data, but my recollection is that multi-threaded compiles were on the far side of tolerable so this is probably not a change.

Anyways, assuming the battery thing is taken care of...

The only truly fatal flaw with the C201 is web browser obsolescence, and I have a plan that may last indefinitely. I want to run a "normal" operating system (Ubuntu, probably) with a "normal" browser stack (Firefox on Gnome garbage, probably) under a virtual machine on my x86 host and access it over VNC. Pretty ambitious, huh? Wish me luck.

August 25, 2018
Speakers, man.

The left speaker already sucks again. It's been taped over so it's not just the magnets attracting external metal dust, but I haven't taken it apart to see if there's internal debris or a tear in the membrane or a mounting difficulty of some sort. It just sucks that replacing the speakers didn't turn out to be an improvement for long.

What makes it a real disappointment is my phone (Nexus 5x) has had much better audio quality and loudness, and it has not diminished at all despite being exposed to water and dust of every variety. And it's much smaller and it doesn't get as hot. If I didn't use my phone every day, I wouldn't believe it's possible. But it is possible and I want a phone speaker in my laptop. There's so much empty space in here that maybe I should give it a try. This fundamental relationship of crap delicate hot audio on my chromebook vs. loud durable clear audio on my phone has persisted through two chromebooks and three phones.

The new battery is definitely a win, I haven't had any incident where I had to think about the battery since I replaced it. But the before situation hadn't gotten bad yet -- merely noticable -- so this is one of those rare cases where I can say in hindsight: I replaced the battery at the correct time.

April 20, 2019
Drop.

I just dropped my laptop. Again. This time it was because I failed to balance it on the bathroom sink, which just has a curved rim. I am all the time balancing it on curved things. Arms and backs of upholstered chairs, sinks, the edge of beds, whatever. And it's always falling off. And ever since I replaced 7 out of 10 hinge screws, it just doesn't care. It's almost 4 years old, and it's still indestructible. This is definitely the best laptop ever.

The battery still rocks. The speakers still suck. Might be nearing the end of the second keyboard, it's hard to tell. It makes funny noises sometimes, but it works great.

For a few months now, I've been successfully running my browser remotely. I've got a Docker image on my PC that runs Chrome under Xvfb (headless X) and then exports that over VNC. Some operations are negligibly slower and a lot of operations are much faster, and my laptop never ever gets warm anymore. I can even watch video "well enough", but I haven't bothered to configure audio. There is some loss of image quality (JPEG compression in VNC), but it doesn't bother me.

There are websites that I used to avoid because they decreased my battery life significantly. Websites that decrease battery life. Jeesh. But problem solved. No looking back.

On top of that, since it's all under Docker I can experiment with different browser versions and all of their ridiculous modern dependencies without trashing anything I care about.

A little review of Docker? Its security model is really really really bad. I think a lot of people using it don't realize that anyone who has permission to access /var/run/docker.sock can become real host root in an instant. It terrifies me. Its central event loop polls, which isn't a big deal but makes me suspicious of the quality and pedigree of the authors. It's got a ton of cryptic configuration options, and the documentation isn't very good. But the thing it does, it really does it, it makes it trivial to keep around separate system images and execute them in an environment slightly (slightly!) removed from your host OS.

It has an incremental system of building images, and each step can get cached as its own image. I think that's pretty slick.

Anyhoo I took someone's chrome-in-docker project and maintained it and made it my own. I guess no one really likes Docker because everyone that's bothered to publish their project doesn't maintain it, so they must not actually use it. But I actually use this, so it's maintained if you're interested:

git clone http://galexander.org/git/chrome-in-docker.git
git checkout private
May 8, 2019
Dear god, a second crash.

Resumed the thing this morning, and all read/write to the root filesystem (built in MMC) gave EIO! Hard reset and all is fine. It had 308 days of uptime, so it had been in a nice stable groove. A very bad omen.

December 9, 2019
New xkb.

The old xkb setup worked well enough, but the modifiers for page up/down were never quite right. I had to make a stupid hack to vncviewer to get it to work right, and when I made that into a smarter hack, it stopped working. So I finally decided to get to the bottom of it, again.

The underlying problem, I think, is that I had the LCTL button setting both Mod2 and Control modifiers, as if it was still a control key that just had special treatment for page up/down. Really, I only use LWIN ("search", where capslock would be) for control, so LCTL can be just Mod2. And then it all kind of falls out naturally.

And now I'm using lctrl+F9/F10 for INS/DEL, because the POWR button is not reliable, the firmware intercepts it intermittently somehow...

So here are my current xkb files... /usr/share/X11/xkb/types/greg:

partial default xkb_types "def" {
    type "SUPERL" {
	modifiers = Mod2;
	map[None] = Level1;
	map[Mod2] = Level2;
	level_name[Level1] = "Base";
	level_name[Level2] = "Mod2";
    };
};

And /usr/share/X11/xkb/symbols/greg:

default partial modifier_keys alphanumeric_keys
xkb_symbols "def" {
	key <LWIN> {
		symbols = [ Control_L ],
		actions = [ SetMods(modifiers=Control) ]
	};
	key <LCTL> {
		symbols = [ Mode_switch ],
		actions = [ SetMods(modifiers=Mod2) ]
	};
	RedirectKey.ClearMods=Mod2;
	key <UP> {
		type = "SUPERL",
		actions = [ NoAction(), redirectKey(keycode=<PGUP>) ]
	};
	key <DOWN> {
		type = "SUPERL",
		actions = [ NoAction(), redirectKey(keycode=<PGDN>) ]
	};
	key <LEFT> {
		type = "SUPERL",
		actions = [ NoAction(), redirectKey(keycode=<HOME>) ]
	};
	key <RGHT> {
		type = "SUPERL",
		actions = [ NoAction(), redirectKey(keycode=<END>) ]
	};
	key <FK09> {
		type = "SUPERL",
		actions = [ NoAction(), redirectKey(keycode=<INS>) ]
	};
	key <FK10> {
		type = "SUPERL",
		actions = [ NoAction(), redirectKey(keycode=<DELE>) ]
	};
};
June 4, 2020
5 years.

Well, the Asus C201 has made it 5 years. I'm honestly not at all interested in replacing it. My only regular complaint is that its display is kind of glossy with distracting reflections when used outside. Not sure if matte displays are really that great but that's the only upgrade I want. Replaced the keyboard and battery and a bunch of hinge screws and the only thing that's chronicly broken is the speakers, which I guess I'm just used to. The creeping crack on the bottom stopped creeping.

So I have something to say:

15:55:40 up 393 days,  6:07,  7 users,  load average: 0.11, 0.12, 0.13

Pretty good! It's a keeper!

I imagine I'll replace it when there's a catastrophic hardware failure. At this point I'd probably still replace the battery or keyboard if they died. I've certainly never been more satisfied with a 5 year old laptop before.

September 10, 2020
Fatigue.

It is still in most regards an excellent laptop, but there's clearly another round of replacing worn out parts ahead of me that is giving me a little pause compared to earlier rounds.

I started to get bad wifi reception. Replaced the access point, no good. Moved the access point all over the house, eventually noticed that my reception changes dramatically each time I move the hinge on my laptop. Working on replacing that, but since I don't have much faith in trying to buy another one on ebay (maybe that's stupid of me, there's certainly one out there, but salvaged C201s by now will be as old as this one), I'm going to just use a mismatched one from another kind of laptop. That might really degrade the physical shape of the laptop...

Also, the keyboard is starting to collect enough gunk under the keys to be mushy. My awful Lenovo IdeaPad needed the key caps to be cleaned every 3 months, this one it is apparently every 3 years. The replacement keyboard now lasted longer than the original keyboard.

There's nothing else going too badly, but the speakers and screen are neither like new. And the battery is 2 years old, when the original only lasted 3 years. The failure of one hinge-passing cable makes me nervous about the other ones.

So I'm looking around in case I have to ditch this thing, and I'm really quite disappointed. There are a small number of ultra-modern laptops with similar weight / battery life but >$1000 prices, and they're all over-powered Intels, "business laptops." Sarah is borrowing a Dell Latitude 5300 2-in-1 from work, and it is hot, 25% heavier, and even though the battery is reported to be 15 hours, she has had dissatisfying battery life from it (and her standards are low). It is powered off and hot right now (Windows is insane!). I don't know, it doesn't make me optimsitic. Then there's a few chromebook sort of things, on the scale of the Asus L203MA (1x weight, but "up to 10 hour" battery: same size battery but Intel CPU). Or the HP Chromebook 11 G8 (32% heavier, up to 13.5h with a bigger battery and Intel CPU). And even these garbage Chromebooks are >$200. Even the modern Pixelbook GO 13 is is 5% heavier and only 12hours, at $650! So I'm looking at paying potentially quite a bit more for a laptop that's not remotely as good. I just can't imagine going heavier or less battery life, and hot would kill me.

This is making me anxious so I have been beating the bushes for opportunities. I am even considering getting a 14" laptop, if I have to get something heavier it could at least be bigger? Every laptop I've owned has been roughly the same size, though I used to get 4:3 screens instead of 16:9. Anyways, compared to a 14" PC, even a Pinebook is starting to look interesting! It's nominally a 6-8 hour battery on the bigger Pinebook Pro (14" for only 30% more weight), and I don't know how if I could really improve consumption at all, if it's even possible if I went around trying to enable all the power save functions in the unused chips and so on. Probably still nowhere near enough, huh? The battery is nominally the same (probably) as what I have, so even if the ARM is as efficient, the larger screen will cut into battery life. Too bad, because people apparently (surprisingly) love all the components and the case. The 12" Pinebook is also unobtanium, but apparently its battery life is nothing to write home about either.

There's also Pi-Top 3 (up to 10 hour). Teres A64 (bad wifi? no battery life specified), seems to be very similar to the regular Pinebook, but $280 instead of $100, and obtanium? Maybe this is the best list I've found.

Then there's the Qualcomm 835 laptops. Asus NovaGo (41% heavier, 13", >$400 only available used, but great battery). Lenovo Miix 630 (actually a tablet). HP Envy x2 detachable (a tablet). Or 8cx, Lenovo Yoga 5G (14", 35% heavier, probably very expensive, not released yet). Maybe the first ARM generation of MacBook Air. *sigh*

There's just nothing. I remember the other Rockchip laptops of 2015 were not any longer battery life or lighter, either. It's such a desperate situation, I'd look at 13" or 14" PC laptops with good battery life, no fan, and only a 30-40% weight penalty? Like Asus E410MA/L410MA or Acer Swift 1? I mean, at a 6 hour battery life I might as well dust off my Samsung Chromebook (which still works, btw).

October 9, 2020
Ugh.

I got a new antenna module for it and it has basically the same behavior as before. It just gets miserable wifi reception even in places where every other device I have works easily. I am tempted to put a wifi access point outside to try to work around it, but I just have the feeling that it will be unreliable even then. So I am increasingly of the thought that it needs to be replaced.

I've been desperately searching for alternative laptops. There are a bunch of options but a lot of them are dubious or vaporous. There's a few 12" laptops like the Asus E203 that have a similar weight and 38Wh battery to my chromebook, but the Intel tax means they probably won't last as long as this one. Then there's a few 14" laptops like the Asus E406 or E410, HP Stream 14", Acer Swift 1. Their weight penalty seems easier to forgive (1.3kg-1.7kg, depending on model), and some of them have unusually large batteries in them. However, they are all smoke and mirrors! They're a confusing mishmash of old variants you can't buy new anymore, or new variants that are out of stock, or what-have-you. You can't actually buy any of them, or anything even close really, directly from any manufacturer's website.

It's really quite maddening. Anyways, there are a few Chromebooks in stock, but I started looking at specific models and apparently they no longer include an unlockable bootloader??? At least, there are many reports that you can't really boot your own Linux on, like, an Acer Chromebook 314. Very vexing.

I'm so lost on this decision that I'm looking at the Chuwi HeroBook pro, which probably can deliver a real 9 hour battery life, 14" display, and only 40% weight penalty. The reviews are atrocious. Do I even want a 14" laptop? I've always bought 12" before.

Then there's higher-end laptops, but mostly what I could find in the $600 range had abysmal battery life (the first step is the "upgrade" to spinning fans and spinning HDDs), and you really have to get to absurdly high prices before battery life picks up again.

I used to think 9 hour battery life would be very good, but since I have been having real battery life over 12 hours with this chromebook, it is very hard to go back. It crosses a special threshhold where I never need to plug it in while I'm working at it, the battery always lasts long enough that I was ready to set it down anyways. I've literally never used this C201 while it was plugged in!

I almost think, if I have to go backwards in battery life just to work in the sun, I should dust off my old Samsung Chromebook and use it just for the sitting-in-the-yard parts of my day. Anyways that would be a good way to prove the wifi problems are specific to the C201.

...

I got out my old Samsung Chromebook. I forgot I had replaced the keyboard right after I abandoned it, it is bizarre to see such a clean machine! But I had forgotten, the charging connector is bent and at some point the wire to it had been patched. This is really a stark reminder of the cost of having a laptop that needs to be tethered for even a fraction of the day.

Also, I had forgotten, but its storage is really slow. Which only matters because I'm doing some "apt update" kind of crap (hey there old buddy, long time no see). There's an extent to which I don't care, but it is weird to have a performance complaint when I haven't in so long. Bummed that I have to fight with systemd again. Note to self: you can just "/etc/init.d/dbus stop", permanently. Anyways, two hours of dorking around with it and now it is "just like" my C201!

I can notice the extra weight, for sure, but I don't think I care. The keyboard isn't as good, and there is some sort of de-bouncing deficit I fixed in 2013 and never thought of again, and now I need to re-apply the fix (/usr/src/evdev/evdev-git). And same for palm rejection in mtrack driver (/usr/src/mtrack/xf86-input-mtrack/). Another hour. And now it's fine.

And wifi works fast and reliably way out into the yard. Sigh.

And power consumption is nearly twice, accounting for its halved battery life. I really don't know why an idle Exynos draws hardly anything at all...?

Speakers are much better (they might have been replaced with the keyboard), as is the webcam.

October 11, 2020
Decision.

I have really been agonizing over this decision, but I have finally decided. I just ordered an L406MA-WH02, new on ebay for $300 $350 (couldn't find it new except on ebay?? crazy). The last hurdle to buying a might-not-be-any-better product was just convincing myself that $350 is still very cheap for a laptop. I should not hold the fact that the Asus C201 was unreasonably cheap ($180, really, $180) against every future laptop I buy.

But I already feel remorse about it, because the C201 is not truly in need of replacement, and truly neither is the old Samsung Chromebook. So to try to soothe myself, I'm cataloging C201 flaws...

Extremely poor wifi. It took me a long time after this problem manifest itself before I realized it was the laptop, so I'm not sure how long the problem has existed. I can pretend the problem doesn't exist, until I can't and I find myself on a rubberband keeping me within 10 feet of the AP. I figure I could work around it tolerably well by putting an AP in the greenhouse. To fix the laptop, I'd have to replace the logic board -- might as well buy another C201 -- and I'm not sure it would really fix the problem, maybe it was bad from the start and it took me 5 years to notice???

Almost unusable speakers. I cannot keep more than one speaker working at a time for the life of me, even after I taped over them. They're moderately hard to replace because they interfere with the battery. Also they suck -- quiet, tinny, hot. I do have a spare set of laptop speakers (from my old Averatec) I was thinking about replacing them with, but it'd be a pretty involved surgery.

Kernel bug causes VPN packets to be dropped under upstream load. This has been a minor annoyance for a long time...there is an apparent kernel bug in the tun driver that causes upstream packets to get dropped very easily. I've known about this problem forever but I hate messing with the kernel. If it ain't broke don't fix it. I'm afraid of breaking the bootloader, X11, suspend, and possibly wifi. I don't feel like I'm guaranteed success, either, since I don't really know where the problem is. It feels like a lot of work.

And then there's some things that don't really make a difference but which are minor strikes:

Keyboard. The keyboard is still excellent, perhaps better than any other laptop! But it is clearly aging -- this one is at 42 months, but I replaced the other one at only 22 months. Keys are attracting dust to exactly the spot that the Lenovo did...I've cleaned out about a third of the keys but there's this steady trickle of a key gets hard to push and I have to clean out under it. It takes a *lot* longer than the Lenovo does to attract that much dust, but it is definitely a strike against it. I can still get replacement keyboards off of used laptops on ebay.

Battery. The battery is still excellent, perhaps better than any other laptop! But it is clearly aging -- this one is at 28 months and I replaced the other one at 36 months. It is just getting, in use, to where I suspect sometimes it isn't lasting as long as it used to (sometimes I do see a low battery indication). According to the numbers, I replaced the old one at 82% of nominal (31.2Wh) and this one is currently at 87% (33.2Wh). So I suspect it will go just like the old one, it's on the threshhold. I will go from seeing low battery once in a blue moon to once in a week, and then I will want another one...in about a year.

If I could solve the 3 problems that matter, replacing the keyboard and battery would be a no-brainer, and the replacement parts are still available (ebay, ultrabook-battery.net). I have anxiety about continuing access to replacement parts, and perhaps diminishing quality over time (if they all come from used devices). Really, if I knew I had a sure-fire attack on the wifi problem, I would even consider buying another C201.

The thing is, these are pretty minor flaws, and they are *all* of the flaws. In every other way it is perfect. For example, the plastic case is cracking all to hell but it hasn't mattered in any way at all. It hasn't made it hard to hold or flexible or anything like that. I'm totally satisfied with using VNC to a desktop for the browser or OpenGL and so on. And even the wifi flaw is pretty minor -- I'm sitting on the porch right now and it has been usable. I can convince myself it doesn't exist, until it gets really bad. I do think the replacement antennas might be a slight improvement, which is a bummer because they are rather obnoxiously located, taped to the back of the screen.

Anyways, the new laptop. Asus L406MA-WH02. 14" 1366x768. 4GB. 64GB. Intel Celeron N4000. 56Wh battery! 1.3kg. Honestly, I don't understand how it has 50% more battery and 45% more screen and only 30% more weight.

Pretty anxious about getting a 14" laptop but that's the one I could find with an absurdly large battery, and I'm curious if I might like a bigger screen.