Update ChrUbuntu 12.04 to 13.04 on the Samsung Chromebook

The update process is not as smooth as the install process which I blogged about here. Most of the instructions are laid at the following two sites:

1. Update Using the Aptitude Repositories

Let’s get to it, first let’s point the Aptitude repositories to point to the “Raring” release:

sudo sed -i 's/precise/raring/g' /etc/apt/sources.list

Then update the repositories cache:

sudo apt-get update

Then start the upgrade process:

sudo apt-get dist-upgrade

The process will actually fail at the end of the update, but that is okay we can just force it:

sudo apt-get -f install

In the process some packages will be removed unintentionally, so re-install them:

sudo apt-get install ubuntu-desktop gnome-control-center nautilus nautilus-share nautilus-sendto eog unity libgnome-desktop-3.4 gnome-settings-daemon

2. Finishing Touches

Let’s enable the Chromebook Hacker PPA and install the Chomebook utilities and updates:

sudo add-apt-repository ppa:chromebook-arm/ppa
sudo apt-get update
sudo apt-get install cgpt vboot-kernel-utils linux-image-chromebook
sudo apt-get autoremove
sudo apt-get remove flash-kernel

Let’s sign our kernel:

echo "console=tty1 printk.time=1 quiet nosplash rootwait root=/dev/mmcblk1p7 rw rootfstype=ext4" > FILE

Notice my device is the external SD card (mmcblk1), now for the signature:

sudo vbutilkernel --pack /boot/chronos-kernel-image --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kerneldatakey.vbprivk --config FILE --vmlinuz /boot/vmlinuz-3.4.0.5-chromebook --arch arm

Also let’s copy our signed kernel to the SD Card:

sudo dd if=/boot/chronos-kernel-image of=/dev/mmcblk1p1 bs=4M

Now reboot and you will boot into ChrUbuntu 13.04.

3. Fix the Window Manager

When the Chromebook reboots, it won’t be able to start it’s window manager and we have to pick a new one. So press CTRL+ALT+F1 and log in with the user/user credentials and first install the new video driver:

sudo apt-get install xserver-xorg-video-armsoc

Then I installed icewm:

sudo apt-get install icewm

I, then, made IceWM the default window manager by editing the /etc/lightdm/lightdm.conf file and making it looks like this:

[SeatDefaults]
user-session=IceWM
greeter-session=unity-greeter
#autologin-user=user

then I updated the rest of the packages:

sudo apt-get update
sudo apt-get upgrade

I rebooted one more time, and I was then able to login into IceWM without issues.

4. Fix Post-Update Issues

After I rebooted, my sound stopped working for some reason. The alsamixer settings were correct but it seemed like pulseaudio was messing up my sound, so I removed pulseaudio and alsa-base like so:

sudo apt-get remove --purge pulseaudio alsa-base

and then I just re-installed the alsa-base package:

sudo apt-get install alsa-base

and then my sound started working without issues. Another issue I ran into was with my touchpad, the double tap and triple tap functionality was reversed (ie tripped tap was right click and double tap was middle click) not sure why. After messing around with synclient, I discovered the following settings fixed it:

synclient | grep -i TapBu
TapButton1 = 1
TapButton2 = 3
TapButton3 = 2

To make those permanent, I added the following :

Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"

to the /usr/share/X11/xorg.conf.d/10-synaptics.conf file.

The last issue that I ran into was Chromium stopped playing HTML5 audio for some reason. I ran across this post, and I fixed the issue by running the following:

sudo apt-get install chromium-codecs-ffmpeg-extra

just for reference here is my chromium version:

chromium-browser --version
Chromium 22.0.1229.94 Built on Ubuntu 12.10, running on Ubuntu 13.04

5. Some keyboard tweeks

I wanted to use the volume up and volume down keys on the keyboard (they corresponded to F9 and F10), since I was using IceWM it was pretty easy. I just added the following into my ~/.icewm/keys files and they worked great:

key "F8" amixer -c 0 set Speaker toggle
key "F9" amixer -c 0 set Speaker 1%-
key "F10" amixer -c 0 set Speaker 1%+
key "Ctrl+F8" amixer -c 0 set Headphone toggle
key "Ctrl+F9" amixer -c 0 set Headphone 1%-
key "Ctrl+F10" amixer -c 0 set Headphone 1%+

This allowed me to modify the HeadPhone and Speakers volume with the keyboard shortcuts that I defined.

I also wanted to have the brightness keys work as well (those corresponded to F6 and F7). I tried the package xbacklight but it didn’t work. Later I found that the /usr/lib/gnome-settings-daemon/gsd-backlight-helper worked without issues. So I wrote this quick script:

elatov@crbook:~$ cat /usr/local/bin/chbr
#!/bin/bash
cur_bri=$(/usr/bin/pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --get-brightness)

if [ $1 == "up" ] ; then
    /usr/bin/pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness $(($cur_bri+100))
fi

if [ $1 == "down" ] ; then
    /usr/bin/pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness $(($cur_bri-100))
fi

and if you pass in up or down it decreases or increases the brightness by 100. My max brightness was at 2800 so this worked out for me (you can check out the max brightness by running /usr/lib/gnome-settings-daemon/gsd-backlight-helper --get-max-brightness). Then I added the following to my ~/.icewm/keys file:

key "F6"    /usr/local/bin/chbr down
key "F7"    /usr/local/bin/chbr up

I also noticed that the keyboard button right below the “Tab” key (the Search Key) was functioning as a “Windows” Key. That is usually the “Caps_Lock” key, so I changed the mapping for it to actually be the “Caps_Lock” key. Initially I used xev to find out what is the keycode of the keyboard button and then I added the following to my ~/.Xmodmap file:

elatov@crbook:~$ cat .Xmodmap 
keycode 133 = Caps_Lock

Another thing I noticed was the “Disable Keyboard While Typing” Option wasn’t working. Starting up the syndaemon fix the issue for me. Here is what I added to my ~/.icewm/startup file to start the daemon on startup:

elatov@crbook:~$ grep syn .icewm/startup 
syndaemon -t -k -i 1 -d

Lastly, I didn’t have the “Delete”, “PageDown”, or “Home” keys. In ChromeOS the following keyboard shortcuts existed that helped me.

Page up                Alt and the up arrow
Page down              Alt and the down arrow
Home                   Ctrl+Alt, and the up arrow
End                    Ctrl+Alt, and the down arrow
Delete                 Alt and Backspace

You can see the full list here. There is a actually a forum about my exact inquiry here: To get this working we first need to install xbindkeys and xvkbd.

elatov@crbook:~$ sudo apt-get install xbindkeys xvkbd

then create a ~.xbindkeysrc file with the following contents:

"xvkbd -xsendevent -text '\[Delete]'"
Alt + BackSpace

"xvkbd -xsendevent -text '\[Home]'"
Alt + Left

"xvkbd -xsendevent -text '\[End]'"
Alt + Right

"xvkbd -xsendevent -text '\[Page_Down]'"
Alt + Down

"xvkbd -xsendevent -text '\[Page_Up]'"
Alt + Up

then start xbindkeys by running:

xbindkeys

We can add the above command to the ~/.icewm/startup file, if we want it to auto-start upon login into IceWM. There are other alternatives to the keyboard shortcuts:

And that’s it. Last note, you can check the status of your battery with the upower utility:

elatov@crbook:~$ upower -d | grep -E 'time|percent|state'
    state:               charging
    time to full:        1.4 hours
    percentage:          34.1355%

2 Pingbacks/Trackbacks

  • Doug

    Step two has a few typos that took me a bit to figure out..

    sudo vbutilkernel –pack /boot/chronos-kernel-image –keyblock /usr/share/vboot/devkeys/kernel.keyblock –version 1 –signprivate /usr/share/vboot/devkeys/kerneldatakey.vbprivk –config FILE –vmlinuz /boot/vmlinuz-3.4.0.5-chromebook –arch arm

    should be vbutil_kernel
    should be kernel_data_key.vbprivk
    should be vmlinuz-3.4.0-5-chromebook

    • Karim Elatov

      sorry… the formatting must have gotten messed up :)

      Thanks for the heads up

      -Karim

      • Doug

        No problem, thankes for putting this together!

        I’ve gotten most of the way through step 2, but it stalled on the apt-get upgrade (which took forever last night).

        Rebooted and tried again to no avail. Tried reinstalling ubuntu-desktop and unity, but still no gui. Trying to start Unity from command line stalls at plugin imgpng…

        Trying to install xubuntu-desktop now

        • Karim Elatov

          Did you try a ‘apt-get update && apt-get upgrade’ one more time to see if it went through?

          -Karim

          • Doug

            I did indeed. It does load and shows the wallpaper/background, but I can’t seem to get the rest of the desktop to load.

            It does show some notification bubbles and I can get to a terminal…

            Any help is greatly appreciated.

          • Doug

            Ok I did get xubuntu-desktop loaded and am trying to run the partial upgrade again. I’ll let you know how it turns out.

          • Doug

            :( Partial upgrade finished a couple days ago and just getting back to this.

            Now it’s completely toast. Doesn’t get past this.
            https://www.dropbox.com/s/brhu5921lf6xeyx/2013-03-21%2014.26.19.jpg

            plymouthd: ply-terminal.c:611: ply_terminal_open: Assertion ‘terminal!= ((void *)0)’ failed.

            Possibly the most obscure error message I’ve ever typed :)

            Any ideas?

          • Karim Elatov

            Yeah I see that message during boot all the time, but only briefly. After that messages shows up, lightdm loads and I can login. What happens when you hit CTRL-ALT-F1 or F2, does that yield another tty?

          • Doug

            https://www.dropbox.com/s/r2ad87pizgck6yq/2013-03-24%2013.14.44.jpg

            Nope. The console login will show up for a second, but then it just goes back to this error.

            Problems on the sd card?

          • Karim Elatov

            I think that means there is an issue with your wireless. Check out this page. Can you try to boot up in ChromeOS and check out the contents /var/log/boot.log or /var/log/messages or /var/log/kern.log on the SD card ? Maybe that can hint as to why it’s not booting all the way?

            -Karim

          • Doug

            Just wanted to follow up. I’ll just sit tight until 13.04 hits and hope the script gets updated or a less intense method is offered. Just don’t have any more cycles to put into this really.

            Thanks so much for your help! I’m learning a lot!

          • Patola

            Hi, just for all to know, I’ve had the plymouth problem after upgrading 13.04. It was a simple matter of restoring the /etc/X11/xorg.conf.d/exynos5.conf file. I had to boot through chromium, chroot to the SDCard where ubuntu is installed, recreate (mkdir) the /etc/X11/xorg.conf.d directory and then create an exynos.conf file with the following contents (without the cut here lines):
            ———– cut here
            Section “Device”
            Identifier “Mali FBDEV”
            Driver “armsoc”
            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 “Screen”
            Identifier “DefaultScreen”
            Device “Mali FBDEV”
            DefaultDepth 24
            EndSection
            ————- cut here

            Got this configuration from this URL: https://gist.github.com/vvuk/4986933

            Hope it can help someone.

          • Karim Elatov

            Thanks for the info.

            -Karim

  • Ben

    Hi there,
    Thanks for the tutorial. I should’ve stayed on 12.04, as I didn’t realize that the standard ubuntu window manager was not supported on the Chromebook yet. I’ll wait to upgrade until it matures.

    As a side note, do you think it will be possible to dual boot with ChromeOS without needing to enable Dev Mode and turning off OS verification? I really like the idea of having Linux when necessary, but not at the expense of exposing everything to security holes and turning off auto updates in Chrome.

    • Karim Elatov

      In theory this should work, just disable Developer mode and you can set which partition to boot from. Since we used the ‘vbutilkernel’ utility to sign the kernel it should be able to boot from it. You can use the script from this blog post to change which partition to boot from. Here is the command you would run from ChrUbuntu to boot back into ChromeOS:

      [code]
      sudo cgpt add -i 6 -P 5 -S 1 /dev/mmcblk0
      [/code]

      Since I haven’t tried it, I can’t guarantee outcome :) I would pose the question to the communities or the author of this post.

      -Karim

  • tom

    Karim, Thanks for the hard work. I’m running chrubuntu 13.04 on a Samsung ARM Chromebook thanks to you. However, I’m using XFCE. Will all the keyboard shortcuts you tweaked above work on XFCE or are they only specific to icewm?

    Thx!

    • Karim Elatov

      Yeah everything except the media keys and the brightness stuff will work out since you launch *bindkeys*, and that is independent of the window manager.

      • tom miller

        Thanks. May have to switch to icewm as I’d really enjoy the media keys working.
        Thank You.

  • Gregg

    This is awesome – used to get my Acer C7 / Lubuntu setup – the button file is ~/.config/openbox/lubunut-rc.xml and use the F6-F10 as key names (instead of volume up. down etc. and got the following working:
    F4 – toggle full screen
    F6 – brightness down
    F7 – brightness up
    F8 – toggle mute (but does not untoggle)
    F9 – vol down
    F10 – vol up

    thanks a ton for posting this and the brch script.

  • Edric

    Hi Karim,

    Ive tried all the above steps, when i boot now i het the background And some icons , but the window manager doesnt work. I tried editing the lightdm.conf file like you explained, but it says i dont have permission tot edit the file. Im a bit new at this, any suggestions?? And i dont think signing the kernel worked for me, i have Ubuntu install on mmcblk0 , And partition 5 i think, what should then be the command to sign?

    Thnx for the help.
    Edric

    • virtuallyhyper

      If you are booting into the kernel then the signing of the kernel is all working. It seems that your lightdm is not starting up properly. If it’s giving you a permission denied, when editing the file type ‘sudo vi /etc/lightdm/lightdm.conf”. You might want to skip lightdm and enter your username to be auto logged in. Not sure if that will help. It’s been a while since I posted this, maybe try another window manager like xfce to see if that helps out.

      Hope that helps.

      -Karim

      • Edric

        Hi,

        I tried the sudo vi , opens the file. But how do i then edit it in the terminal? Backspace isnt working, zo how do i change ‘Ubuntu’ into ‘IceWM’ ?

        Thnx again for helping.

        • virtuallyhyper

          Try ‘sudo nano /etc/lightdm/lightdm.conf’. That is an easier editor to use.

          -Karim

  • Pingback: Using PolKit to Change Screen Brightness on a Mac BookPro Running Fedora 19 | VirtuallyHyper

  • Pingback: Update ChrUbuntu 13.04 to 13.10 on the Samsung Chromebook | VirtuallyHyper