Fascinating Captain

Tech Guides and Buying Advice

blog

Automate Chromebook fixes for Linux

Use this script to make tweaking your Chromebook quick and easy.

In this post you can use my script to run any fixes and tweaks needed to get your Chromebook working under Linux. To make this script better please feel free to add your suggestions to add a feature.

You’ll find several guides on this site that help you install Linux on a Chromebook and you’ll also find several fixes that need to be applied after the install. These range from fixing audio, remapping multimedia keys and other tweaks.

I have also noticed from the comments section that for many people this is their first time installing and using Linux. For those brave souls and for those of you who want an easy, automated solution, there is a simple script that I have written to do just that.

How to Use

To use the script simply copy and paste the following commands in a terminal window (press Ctrl+Alt+T on most Linux systems) and press Enter (this will get the script from my GitHub repository and run it).

cd ~/Downloads; sudo apt-get -y install curl; curl -LOk https://github.com/fascinatingcaptain/CBFixesAndTweaks/archive/master.tar.gz; tar -zxvf master.tar.gz; cd CBFixesAndTweaks-master; sudo -E bash CBFixesAndTweaks.sh

What will this script Fix or Improve?

Keyboard

  • The top row multimedia keys are mapped correctly (after installing Linux they defaut to the F keys). From left to right they become: Back, Forward, Refresh, Print screen, Super, Decrease brightness, Increase brightness, Volume Mute, Decrease volume, Increase volume.
  • Pressing Ctrl+Alt+multimedia key emulates the function keys (F1 to F10).
  • The search key becomes the CAPS LOCK key.
  • Pressing Shift+arrow keys emulates the Home, End, Page Up and Page Down.

Fixes sound on Toshiba Chromebook 2 (2014 version)

  • Sound works (you may need to check speakers are default in sound settings in your Linux distro).
  • Headphones will work but you need to manually change between speakers and headphones in sound settings in your Linux distro.
  • HDMI sound out works.
  • MIC is still not working, only option is external mic.

This script has been confirmed working on the following Linux Distros:

  • Ubuntu 16.04
  • Ubuntu Gnome 16.04
  • Linux Mint 17.2 – thanks Neil
  • lubuntu 16.04 – only partially working
  • Elementary OS Freya
  • Elementary OS Loki – thanks Harold
  • Kubuntu 16.04 – thanks Trent

Suggestions for improvements and features:

  • Maarten asked: Could you also include the pagedown/pageup/end/home using ctrl+ arrowkeys? (completed 15/07/16)

 

136 Comments

  1. Maarten

    very nice! Could you also include the pagedown/pageup/end/home using ctrl+ arrowkeys?

    • Captain

      Hi Maarten,

      This is something I haven’t been able to figure out yet because xkb remapping uses a hierarchy of settings for key combinations like the ones you suggest. It’s a good suggestion and when I figure it out I will add to the script. To encourage more suggestions, I’ll make a list at the bottom of the post with current ideas.

      • Maarten

        I’ve been using the script from crouton which is here : https://github.com/dnschneid/crouton/blob/master/targets/keyboard . I put my version of it here: https://gist.github.com/maartenst/bae1d1db61240b80353c655e815c5054

        • Captain

          So I checked out those links and looked into using overlays for key mapping which is what dnschneid is using.
          After lots of head scratching and googling I realised how the modifier keys work in xkb. I’ve now updated the script and the post.
          Thanks for your suggestion, it’s helped me understand xkb a bit better (although it’s seems way more complicated than perhaps it needs to be).

      • Christopher

        Hey Captain I Installed Ubuntu 16.04 in my acer chromebook 14 and the trackpad works but the sensitivity is hard and the Keys don’t work any ideas ?

        • Captain

          Hi Christopher, you could try adjusting the sensitivity in the trackpad/mouse settings. Otherwise it may be driver related, perhaps you could try GalliumOS, the drivers are more geared to being optimised for Chromebooks.

  2. Neil Barnes

    This works for an up-to-date mint 17.2, which didn’t work, then did, then didn’t as various updates came through.

    Neil

  3. Neil Barnes

    Actually, Captain, I just modified my copy – I wanted only the brightness and volume keys, and in particular I want the F5 key to do ‘refresh’ which is a key I use a lot. A simple matter of commenting out the first five of the key-mappings you added to the list in ‘pc’. This isn’t for everyone, of course.

    Thanks again,

    Neil

    ———————-
    default partial alphanumeric_keys modifier_keys
    xkb_symbols “pc105” {

    key { [ Escape ] };

    // The extra key on many European keyboards:
    key { [ less, greater, bar, brokenbar ] };

    // The following keys are common to all layouts.
    key { [ backslash, bar ] };
    key { [ space ] };

    include “srvr_ctrl(fkey2vt)”
    include “pc(editing)”
    include “keypad(x11)”

    key { [ BackSpace, BackSpace ] };

    key { [ Tab, ISO_Left_Tab ] };
    key { [ Return ] };

    key { [ Caps_Lock ] };
    key { [ Num_Lock ] };

    key { [ Shift_L ] };
    key { [ Control_L ] };
    key { [ Super_L ] };

    key { [ Shift_R ] };
    key { [ Control_R ] };
    key { [ Super_R ] };
    key { [ Menu ] };

    // Beginning of modifier mappings.
    modifier_map Shift { Shift_L, Shift_R };
    modifier_map Lock { Caps_Lock };
    modifier_map Control{ Control_L, Control_R };
    modifier_map Mod2 { Num_Lock };
    modifier_map Mod4 { Super_L, Super_R };

    // Fake keys for virtualreal modifiers mapping:
    key { [ ISO_Level3_Shift ] };
    key { [ Mode_switch ] };
    modifier_map Mod5 { , };

    key { [ NoSymbol, Alt_L ] };
    include “altwin(meta_alt)”

    key { [ NoSymbol, Meta_L ] };
    modifier_map Mod1 { };

    key { [ NoSymbol, Super_L ] };
    modifier_map Mod4 { };

    key { [ NoSymbol, Hyper_L ] };
    modifier_map Mod4 { };
    // End of modifier mappings.

    key { [ XF86Display ] };
    key { [ XF86KbdLightOnOff ] };
    key { [ XF86KbdBrightnessDown ] };
    key { [ XF86KbdBrightnessUp ] };

    };

    hidden partial alphanumeric_keys
    xkb_symbols “editing” {
    key {
    type= “PC_ALT_LEVEL2”,
    symbols[Group1]= [ Print, Sys_Req ]
    };
    key { [ Scroll_Lock ] };
    key {
    type= “PC_CONTROL_LEVEL2”,
    symbols[Group1]= [ Pause, Break ]
    };
    key { [ Insert ] };
    key { [ Home ] };
    key { [ Prior ] };
    key { [ Delete ] };
    key { [ End ] };
    key { [ Next ] };

    // added by Captain, removed by barnacle 🙂
    // key { [XF86Back, NoSymbol, NoSymbol, NoSymbol, F1] };
    // key { [XF86Forward, NoSymbol, NoSymbol, NoSymbol, F2] };
    // key { [XF86Refresh, NoSymbol, NoSymbol, NoSymbol, F3] };
    // key { [Print, NoSymbol, NoSymbol, NoSymbol, F4] };
    // key { [Super_L, NoSymbol, NoSymbol, NoSymbol, F5] };
    key { [XF86MonBrightnessDown, NoSymbol, NoSymbol, NoSymbol, F6] };
    key { [XF86MonBrightnessUp, NoSymbol, NoSymbol, NoSymbol, F7] };
    key { [XF86AudioMute, NoSymbol, NoSymbol, NoSymbol, F8] };
    key { [XF86AudioLowerVolume, NoSymbol, NoSymbol, NoSymbol, F9] };
    key { [XF86AudioRaiseVolume, NoSymbol, NoSymbol, NoSymbol, F10] };
    key { [Caps_Lock] };

    // added by Captain
    key { [ Up, Page_Up ] };
    key { [ Left, Home ] };
    key { [ Down, Page_Down ] };
    key { [ Right, End ] };

    };

    • Captain

      Cool and you’re right for newbies this will look like gobbledygook!

      • Daniel

        I appreciate the helpful keymap. I did like Neil and modified your file for my own purpose. I remapped some of the keys to their special functions and some to their original F* keys. And then remapped my F3 button (which has a refresh logo on it) to my F5 key since Chrome wasn’t recognizing XF86Refresh as a refresh command. It’s all working great.

        Thank you for clear code and good comments!

  4. Bruce

    Hi, Captain!

    Just a quick question. Do you think the full custom firmware image (Full ROM) for Swanky is able to solve the mic issues?

    Just found full rom for baytrail from this website: https://mrchromebox.tech/

    • Captain

      Hi Bruce,
      These are full ROMs that require opening up your Chromebook to disable write protect which carries the risk of bricking the laptop.

      The issue with the the MIC is more to do with the driver/firmware I believe so a full ROM will not help.

      • Bruce

        I installed the full rom and then install the gallium os. After that I found when I wanted to suspend my device, it always led to a reboot. But when I changed from full rom to boot_stub, the suspend function worked well. So I thought the full rom may affect the driver or firmware. Maybe I will give it a try when I have time.

        Anyway, thanks for your reply😃

      • Bruce

        Hmm..

        Please just ignore my last comment, I think the suspend issue is a bug of the full rom..

  5. Maarten

    Hi Captain, somehow I can’t get the keyboard to work with your changes on Lubuntu. I have done a clean install and ran your script and rebooted, and do not know what o look for other then checking if the /etc/default/keyboard was set to pc105, which it is. I also confirmed your changed pc file has overwritten the original one.

    • Captain

      Hi Maarten,
      I just tested quickly in lubuntu and it looks like the 3 volume buttons and caps lock isn’t working. I’ll see if I can fix it when I get a chance.

      • Maarten

        Neither for me but my biggest gripe is in the not working end, home and page up/down as I need those in my browsing and programming

        • Captain

          Maarten,
          I did some testing using xev and when pressing the keys the right keycodes are being generated and match the active keyboard setup but lubuntu seems to be ignoring the keycodes??? So I think this is a problem particular to lubuntu rather than the key mappings. Unfortunately, I don’t think this is one that I have the time (or maybe the patience) to solve – sorry!

          You might however what to try a different lightweight distro, Ubuntu Mate or Xubuntu? Having been testing lubuntu along with 4 other lightweight distros for the last couple of weeks I have to say that it’s getting a thumbs down on my Chromebook at least because there are other issues like the wifi randomly not working and abiword continuously flashing when I try to write anything. There are workarounds but I found lubuntu disappointing…

  6. Maarten

    Captain,

    I installed Ubuntu Mate (which is great, thanks for the tip) and the top row keys are working perfectly, but the caps lock and the shift+arrow keys don’t.
    Can I do something to help debug this? I noticed in the file I referred to that they are explicity setting an overlay key, might that be a solution ( I do not know too much about xkb :-()

    Oops…looked into xev more and now found this : http://pastebin.com/raxWDtKa
    It seems that pagedown/up are not working because they are seen and next and prior, home and end seem to be recognized. My testing was not right then. So how can ‘we’ fix next and prior to be pagedown and pageup?

    Oh..and for editors a modifier like shift is not too great as it is also used for selections, so maybe another modifier is better (sorry for the comment spam) [3 comments edited by captain to combine them into 1]

    • Captain

      Hi Maarten,

      Just tested in Mate and have managed to fix caps lock. Just to clarify, the file that you need to be looking at is /usr/share/X11/xkb/symbols/pc. In there you will see there is an entry for LWIN (not the one added by me). If you remove that, the caps lock will work.

      The ‘next and prior’ allocations are the correct ones for Page up and page down and they work fine in Mate.
      So,
      Shift + arrow down is page down and Shift + arrow up is page up.
      Shift + arrow left is home on that line and Shift + arrow right is end on that line.
      Ctrl + Shift + arrow left is home for the whole page and Ctrl + Shift + arrow right is end for the whole page.

      I hope this helps and that maybe you can experiment with the settings to customise to your needs…

      • Eric D.

        27 May 2017

        Captain,

        If you’ve been hearing a several-day-long streak of blue language echoing up the Jefferies tubes, it’s been me. Apologies. But that’s over and done with now.

        After many DAYS, this Unix developer of several decades has finally gotten that accursed Search key to stop being an xev(1) ‘Super_L’ or ‘Control_L’ and be a proper ‘Caps_Lock’ key. So that I could then use my usual $HOME/.xmodmaprc file to swap it with Control_L (as shown in the xmodmap(1) manual page).

        My hardware and software:
        – ASUS C300 Chromebook (Baytrail / Quawks)
        – running a Full ROM
        – running GalliumOS 2.1 (Distributor ID=Ubuntu, Description=GalliumOS 2.1, Release=16.04, Codename=xenial)

        My solution was nearly the same as your suggestion to electrosam, below, and others, to remove the ‘key LWIN’ entry from the /usr/share/X11/xkb/symbols/pc file. Except that the straight removal didn’t work for me; I needed to change that entry from ‘key LWIN Super_L’ to ‘key LWIN Caps_Lock’, and then reboot.

        Thank you for your web site and your efforts. Very much.

        Regards,
        Eric D.

        fortune cookie:

        [ “Experience is a good teacher, but she sends in terrific bills.” –Minna Antrim, Naked Truth and Veiled Allusions ]

        • Captain

          Hi Eric, I have removed the other comments as requested and edited this comment to remove the contents of the pc file, but i get the gist of your solution. The commenting system in WordPress automatically remove some formatting in code and I really should get around to finding a way to sort that out.

          I feel your frustration with the key mappings, I had a few times when I wanted to throw the keyboard out of the window. Even worst, there is no one configuration that works in all distros.

          I have to say though hearing that such an experienced unix developer had to jump through a few hoops makes this relatively new Linux guy feel a certain degree of comfort!

        • Captain

          Comment amended as requested -Captain

  7. trent

    Unsurprisingly, this works wonderfully on Kubuntu! Thanks mate!

    • Captain

      Cool, thanks Trent for letting me know, I’ll add Kubuntu to this post as working.

  8. Ryan Hayden

    Thanks for the amazing tutorials. You’ve allowed my Toshiba Chromebook 2 to go from a nice way to watch Netflix videos to a machine I can actually take with me and work on. I have one question and it may be a stupid one. How do I use the super/windows key on my Chromebook 2 after running this script. I’ve got LInux Mint installed and I’d like to be able to pull up the launcher.

    • Captain

      Great work getting more out of your Chromebook. The script will have mapped the super key correctly but I don’t think the launcher responds to the super key in Mint. I believe you can change it in the settings under keyboard shortcuts though…

  9. bitdeetboop (@dotbeepdoot)

    Hey Captain,

    You’ve been more than helpful to me over the last few weeks so thank you very much.

    In a case of not leaving well enough alone I installed the script on top of GalliumOS because I thought that the back/forward keys weren’t working properly in chrome although all other keys were fine.

    After installing I noticed that when I am in file manager or apps that have multiple items in a list format and attempt to select multiple items from either the top or bottom of a list but holding shift and pressing down/up it no longer allows me to go one-by-one up or down a list.

    I have a minimal understand of changing system commands in the terminal so if there is a way to reverse the script or if there is just one setting I can change if you could spell it out for me I would, once again, be very appreciative.

    Thanks again.

    • Captain

      Hey bitdeetboop,

      GalliumOS already has fixes and key mappings for Chromebooks so my script isn’t needed! My script backs up the original config file for the key mappings so you’ll need to revert back to that. I know you’re not comfortable with using the terminal but hopefully you’ll find this fairly simple, open a terminal window and use these commands:

      sudo rm /usr/share/X11/xkb/symbols/pc

      sudo mv /usr/share/X11/xkb/symbols/pc.bck /usr/share/X11/xkb/symbols/pc

      sudo rm -rf /var/lib/xkb/*

      After a reboot, the original GalliumOS keymapping should be restored.

      • bitdeetboop (@dotbeepdoot)

        That did the trick and once again I appreciate your help. I’m good with sudo commands for the most part, anything other than that though I get myself in trouble.

  10. Kurt

    This is great, and thanks again for your help on my delete key request on the other post about keyboard remapping for the C720. I did the copy-paste trick for this script on a fresh ubuntu install and the delete key modification you gave me, but one thing that I’m not understanding is that when I hit the search key thinking it was going to give me caps lock, I get a nearly full screen keyboard shortcut menu and numbers appear on the icons in the launcher. I’m not sure what this is doing, any experience with this happening?

    • Captain

      Not sure what’s happening there. Look at the key mapping config again and maybe try commenting out the caps lock mod. Don’t forget to update before you reboot.

  11. E.J

    Hey Captain,

    Thank you for all the work you put into making a script such as this! I just wanted to know what I can do about my speaker playing sound quietly while my headphones are plugged in? I think it is coming from the left side of the keyboard, near the sd card reader on my Toshiba Chromebook 2 (Baytrail).I currently have elementary OS Loki Stable installed with this kernel installed:

    Linux (“name”)-Swanky 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

    (I used the terminal command uname -a )

    Thanks Captain!

    • Captain

      Hi E.J,

      That’s a strange problem and I was sure I had someone comment and post an answer a couple of months ago, guess what after searching, it turns out it was you! lol
      You wrote:
      I put Element=speaker back to where it was and I started messing around a little bit to see some result. Luckily after so many trials and errors, I found something! In that same file I changed “Element=Headphone” from “volume=merge” to “volume=zero”.

      Now there is no sound at all from speakers when I plug in my headphones on the TB2! Hope this helps someone out there 🙂

      • E.J

        Yes I do remember writing that when I had Elementary OS Freya, but that same method now with Loki ends us disabling the sound completely! I am not sure if its a kernel issue, ALSA issue, OS issue, or some other kind. 🙁 I know that it is built on Ubuntu 16.04 if that helps.

        • Captain

          I’ve not had the problem myself and not had anyone else have the same issue. I it may be your headphones perhaps?

  12. jskier

    For some reason the brightness decrease key doesn’t do anything in Mate / Marco (but increase works fine). If I switch to Mate / xfwm4 it works. All other keys work perfectly otherwise in both window managers. Has anyone experienced this with Mate? I was thinking it’s a Mate / Marco bug, but don’t see any git issues on it for Mate.

    • Captain

      Hi jskier,

      From some other comments there are some random keys that don’t work with this script. I’m starting to think that one script fits all isn’t going to be possible, there’s just too many variables!

  13. Thomas

    Hi Captain: So, I’d like to restore my top keys on my Acer c740 and employ caps lock with CTRL-Search (because I use Search as my actual menu key). I like the Ctrl+Alt+multimedia key emulates the function keys (F1 to F10). Mint 18 actually makes home end, page up/down functional so I don’t need these either. If I downloaded the script, would everything be installed or do I have a choice what to select? Thank you for your website and YouTube videos (I’m subscribed). Thomas

    • Captain

      Hi Thomas,

      Thanks for subscribing!:) The script will change most of the keys you need but you will need to customize/swap some of the other keys. You can see how to do that in this post.

  14. Thomas

    Hi Captain: moderate success. I was able to add a delete key from a previous post (Backspace, delete) and the Caps Lock key at the Search (although I will remove it in the end, I just did it for experience).

    Remapping the F keys was a a little different. I simply copied your script into gedit to reduce the chance of errors and here are the results:

    Back & Forward work.
    Refresh yields a square with a circle and slash.
    Print screen actually creates a savable screenshot,
    Super recalls the Menu.
    Decrease brightness & Increase brightness work perfectly.
    Volume Mute works.
    Decrease volume, Increase volume do nothing.

    I am running Mint 18 Sarah 64 bit and Cinnamon on an Acer C740. I was going to paste both xmodemap -pke and key mapping but the former is pretty big and I don’t know if it would be necessary.

    • Captain

      I’m running Mint 18 Sarah 64 bit and Cinnamon as per my recent post, and all the keys work as expected. Can you paste the contents of your /usr/share/X11/xkb/symbols/pc file in pastebin so I can take a look?

      • Thomas

        I just posted it. Thank you for your help Captain!

        • Captain

          You’ll need to send me the link Thomas!

          • Thomas

            DOH! Sorry about the bonehead move Captain. I just signed up for it and I guess I thought I was the only Thomas on the Internet. Without further ado, https://www.pastebucket.com/558235

          • Captain

            The config is fine and I was puzzled why it worked on my Toshiba Chromebook.

            After googling it turns out this is a problem with some Acer laptops in general. I’m currently working on a review for a regular Acer laptop and sure enough the brightness up/down keys don’t work.

            As a workaround, you can always click on the battery icon and change brightness from there.

          • Thomas

            Thanks for looking and I am glad you validated the problem with the Acer you’re reviewing. I think for now I’m going to restore the script to normal and move on. Print screen, full screen, and volumes were my main concerns but I think I can set those as custom shortcuts. Thanks again for all of your help Captain. :o)

          • Captain

            No problems.

  15. Uriel Sb GMS - LATAM

    Hi captain, i already install galliumOS on chromebook cer cb3-531, everything works fine, keys, video, hdmi, but i cant hear nothing, the sound doesnt work, can you help to solve it, please and thanks

    • Captain

      Hi there,

      Please can you try the following:
      Go to https://github.com/fascinatingcaptain/CBFixesAndTweaks and right click on the asound.state file and choose save link as.
      Now run the following commands:
      sudo alsa force-unload
      sudo cp ~/Downloads/asound.state /var/lib/alsa
      Restart and check the speakers are default in the settings.

  16. James Snelling

    Hi there,
    I have a Toshiba CB35-B3330 that I’ve put the most recent Ubuntu on. I’ve remapped the keys to work according to the printing on the top row, and have got the sound mostly working, but for the life of me, I can’t get the backlight on the keyboard to work…Do you have a fix for this? Thanks.

    • Captain

      Hi James,

      The CB35-B3330 doesn’t have a backlit keyboard, if you mean the CB35-C3300, see my post here that includes a link to Josh’s fix for the backlit keyboard.

      • James Snelling

        Hi Captain,
        Sorry, that was a typo. Indeed, I did mean the 3300. Thank you, Captain.

      • James Snelling

        Hi Captain, I realized I’ve already tried this fix. For some reason, when I try to install the chromebook_kb_backlight module, I get an error message. What am I doing wrong?

        • Captain

          Sorry James, it’s not something I can help with because it’s not the model of Toshiba Chromebook I have and so have not tried this fix.

  17. electrosam

    Great tutorial!
    I flashed my Asus Chromebook 300C by removing write-protect screw on motherboard, and flashing RW_LEGACY BIOS.
    Installed Elementary Loki 64 bit and it runs beautifully, I would say even faster than the ChromeOS.

    The sound worked after unmuting from alsamixer (kernel 4.4)

    I also ran your post-fix script and I am able to get F1-F10 keyboard shortcuts default.
    However, the “Search” button is still the Windows Button.

    1. How do I make the Search button Caps Lock and maybe move Windows button to Right Ctrl ?
    2. Is there a way to default load SeaBIOS and boot from eMMC; instead of having to press Ctrl + L, Esc and then choose Option 2 eMMC ?

    Thanks again for great tutorials.

    • Captain

      Hi electrosam,

      Try taking out the extra LWIN entry in the pc file (use this post to help you if you’re not sure how). If that works let me know and I’ll take it out of the main script. As far as not seeing the Ctrl + L, you can’t get rid of that I’m afraid.

  18. Robert

    Hi Captain! Appreciate your great guide on dual booting. Everything seems to be working for me except that the trackpad is rather slow when I tap to click — there’s about a half-second delay before anything happens. When I do an actual click there’s no lag. Do you know of a fix for that?

    Thanks,
    Robert

    • Captain

      Hi Robert,

      What Chromebook is it and which distro and version are you running?

      • rbrtmrtn

        Hi Captain, this is a Swanky (2014) and I’m running Ubuntu 16.04. I’m using a Samsung Fit USB 3.0 drive, 128 GB.

        • Captain

          That’s strange, I have the same one and the touchpad works normally. Maybe it’s being caused by an update in Ubuntu. Sorry I can’t be more help but I’ve got Linux Mint installed at the moment.

  19. alehel

    Hi. Ran your script on my Toshiba Chromebook 2. Keyboard keys now work, but sound doesn’t. I assume this is related to the fact that I’m running 16.10. The script worked for sound running 16.04. Any chance of an update to the script?

    • Captain

      Hi Alehel,

      I did a test yesterday on my Toshiba CB2 2014 (Swanky) and you’re right, the sound doesn’t work. The problem is the new kernel being used in Ubuntu 16.10 which doesn’t have the drivers anymore. Since this is a higher level issue it’s better to raise a bug request on the Ubuntu forums.

      I would suggest going back to Ubuntu 16.04. Also the team at GalliumOS are proactively trying to support these Chromebooks, so they may find a fix for this soon.

  20. MBWD

    FC, first I want to thank you for all you do for the Linux on Chromebook world. Between you and John Lewis, many a user has been able to unlock the capabilities of these little gems.

    I have posted this elsewhere, but I wanted to make sure you were aware that the Mic issue on the 2014 Toshiba Chromebook 2 (Swanky) appears (from my experience) to be a kernel issue. I tried all of the various suggested fixes to alsa-base.conf, the asound file, and others. But what worked was chancing upon one of the kernels that — for reasons unknown to me — enables the built in mic.

    To be specific regarding the mic issue on Swanky, using pavucontrol, the Input Device port listed under byt-max98090 Analog Sterero is “Analog input Headphones (Unplugged)” under most kernels. And it can’t be changed.

    The kernel that works for me is 4.1.21. Using this kernel, pavucontrol’s input Port for bytmax-989090 Analog Stereo is “Analog Input.” And the Mic works fine.

    I don’t know if people have an issue going back to this kernel, and I don’t know if there is a more recent one that works (I tried 4.4.0-45 and -43 running 16.04 and it doesn’t).

    • Captain

      Hi MBVD,

      Very kind of you to say but mine is a very small contribution (People like John are the real heros).

      The issue with the mic (and sound on Baytrail Chromebooks) is an on and off problem. You’re right, it is a kernel issue with drivers (right now running kernel 4.8 results in no sound and no mic because the byt-max driver has been removed!).

      The guys at GalliumOS have built their own compatable kernels for baytrail Chromebooks and you could use that in most distros. They have instructions on their site.

      With this script, I was trying to build an easy to use way of making Baytrail Chromebooks work with any distro but GalliumOS’s approach is probably a better option.

  21. Ryan

    Captain,
    Really appreciate this guide. I’m new to Linux after getting my start on a Raspberry Pi. I was able to follow the guide to completion (Ubuntu 16.04) and ran the script above, but can’t get the sound to work on my Asus C300ma. Any help would be greatly appreciated.

    • Captain

      Hi Ryan,

      You may just need to choose the speaker (it may be defaulting to HDMI sound) in the sound settings in Ubuntu. Otherwise you could try GalliumOS.

      • Ryan

        Captain,

        Thank you for your reply. I’ll be sure to give it a try. I appreciate your time. Thank you for contributing to the community.

  22. Andrew

    For some reason the script wouldn’t work for me. I followed directions and kept getting an error could it be trying to run it under Ubuntu 16.10?

  23. Luke A (@LSansco)

    Fixes the top keys on HP Chromebook G4 2015, but not sound.

    • Luke A (@LSansco)

      Sound fixed. Perhaps you just have to wait a little bit. I played around with the sound settings, I added the “allow louder than 100%” and clicked the “test sound” button a few times and then it started working. So thankyou for your script, finally makes my HP Chromebook 14 100% working with Linux.

  24. harold

    The script also works on Elementary OS Loki, at least with the Toshiba Chromebook 2 (Swanky) it does.

  25. tekcommnv

    Thanks, this worked on my baytrail tablet. Thank you very much Captain!

  26. Jason

    Hey Captain! Your dual-boot guide has been a huge help to me, I really appreciate it! I have Kubuntu up and running on my Toshiba Chromebook 2 just fine, with one minor annoyance. I decided to modify the key mappings further, as I realized I will be using the function keys more frequently than the media functions (I’m a programmer), so in the “pc” file I swapped the function key with media key in each entry. My assumption was that I could then press the media keys for F1-F10, then Ctrl+Alt+MediaKey to get the media function (volume, brightness, etc.) Unfortunately, while the F1-F10 keys work just fine, I can’t get the media functionality anymore.

    I did some searching to try and understand what you did, and I’m a bit lost. The closest I got to understanding was with the concept of “types” in xkb, which apparently define what the array of key bits do. I tried to clearly specify that I wanted a type that resulted in the fifth bit in the array to occur when Ctrl+Alt is pressed, but no luck.

    This is all hard to talk about cause it’s a very complicated system, haha, so I put my two attempts to make this work here: http://pastebin.com/jnNLcThh. Let me know if you can offer any insight here!

    • Captain

      Hi Jason,

      I’ve looked and looked again and can’t find any problems with your first attempt, it should work.
      I’m not sure about the type way of doing things.

      At some point I would like to change this to remap keys using the overlay method but I just have too many other projects that I’m working on. Here’s a link to how David did it in his crouton scripts, it may help you figure it out https://github.com/dnschneid/crouton/blob/master/targets/keyboard

      • Jason

        Thanks for the tip, I’ll look into it! The problem could be Kubuntu-specific, who knows. I’m definitely functional without it for now.

      • Jason

        Ooh actually, could you point me to whatever source(s) you used to come to your solution (putting the function keys in the fifth slot of the array)? I’m curious to know where that came from.

  27. Jelle

    Hi Captain, thank you very much for your script and your tutorials!

    Could you maybe add a delete key to your script? Regular chromebooks emulate a Delete key by pressing ALT + Backspace!

    Thank you,

    Jelle

    • Captain

      Hi Jelle,
      You are most welocme, the nearest I got was the following (it uses SHIFT instead of ALT):
      Do the following in a terminal window:

      sudo gedit /usr/share/X11/xkb/symbols/pc

      On the line near the top of the file (about the 10th line) you’ll see the BKSP definition as Backspace, Backspace. Change that to Backsace, Delete. Save the file and run the following command:

      sudo rm -rf /var/lib/xkb/*

      After a reboot, SHIFT + Backspace will work as the delete key.

  28. Nicholas

    Hey, Captain. I recently flashed a couple of Toshiba Chromebook 2’s to run Ubuntu Yakkety and just wanted to let you know that everything except sound is working. This is NOT due to your script, but rather the alsa packages which have not yet been updated for Yakkety (16.10). Returning both systems to Xenial (16.04.1 – yes, the point release) and rerunning your script works. So, to clarify, everything works on the point release for the Chromebook 2’s (one CB-35 B3340 and one CB35 C3350), but no sound on 16.10 on either machine due to alsa dependency. The 16.10 builds are more stable (and quicker) for me, with much less freezing but again no sound. Thanks for your hard work – it simplified my process for sure.

    • Captain

      Hi Nicholas,

      No probs, the issue with sound is due to the Linux Kernel 7.8 and above removing the drivers. So that means any distros running with the Kernel 7.8 and higher will have this problem 🙁

  29. Neil Barnes

    Hi Captain,

    You’ll be pleased to know that the autoscript works fine with mint 18.1, on a fresh install on a Tosh CB II with the 4G/IPS screen. I’ve removed the configs for the first five keys (as discussed in a precious note).

    As an aside, sadly the script from John Lewis no longer offers an option to change the boot stub; just the ‘legacy’ option. This appears to install, but doesn’t offer an obvious way to boot from the USB… I did however find a working script which allows the boot stub overwrite here: https://mrchromebox.tech/#fwscript – that did the trick.

    Regards,

    Neil

    • Captain

      Many thanks Neil, appreciate the confirmation.
      I saw a while ago that John had indicated on his website that he was losing interest in this project.

      I have been recommending Matt’s script from his Mr Chromebook site in the comments section recently. I think you’ll agree that his script is alot more robust than John’s.

      I intend on updating my guides but am currently tied up with another project at the moment.

      Thanks again 🙂

  30. Cupio

    Damn, this is exactly the thing I was hoping to find…but it doesn’t appear to work for Gallium

    • Captain

      Hi Cupio, you don’t need to run my script for GalliumOS since they have already optimized the distro for Chromebooks so sound and keyboard keys work out of the box.

  31. Pieter

    Hi captain,

    I have a toshiba chromebook 2 with antergos installed on it.
    Your script works great for keybinding, but the sound still doesn’ t work.
    After a bungs of research found something about newer arch kernels not the sound cards.
    I don’t have a lot of experiance with linux, so I have no idea how to solve this.
    Do you have a solution?

    Regards, Pieter

    • Captain

      Hi Pieter, with the newer Linux kernel sound does not work because the driver was removed. I would suggest a using an older distro.

    • Jeremy MJ

      Or use an LTS kernel. I’m not familiar with anterfos, but if it’s based on ArchLinux, the linux-lts package works most of the time with sound. My kernel version is: 4.4.43-1-lts

  32. observativetiger

    Thanks for the write-up and the git. I’m running LM18.1 on my HP Chromebook 14. I’ve written a post with the steps I took, and I even posted a git repo with a few of my automation scripts as well. It nice to read your post as confirmation of my own steps, thanks again Captain!

    http://www.observativetiger.com/2016/05/linuxmint.html

  33. Dustin Golden

    Hey, I love this script accept for one thing, I never use caps lock, how do I get my search button back?

    • Captain

      Hi Dusin, you just need to remove the
      LWIN...Caps_Lock
      at the bottom of the /usr/share/X11/xkb/symbols/pc file.
      You can see how to edit this file in my post, follow steps 2 and 3.

  34. Luke Skaff

    This script did not fix audio and the backlight dim button (the backight brighter button works) in Linux Mint 18.1 on a Toshiba chromebook 2. If anyone has figured out how to get sound working with this setup please let me know.

  35. Neil D

    Debating on doing this, I see this on this site also likes the mint flavor of linix lol

  36. Paul D

    Wow! Fantastic script. I love Mint and just installed Mint 18.1 on my Chromebook Pixel (2013). I thought I’d have a bit of a struggle to get the top row of keys behaving properly but you made it easy. Thanks. Now if I can get the pinch function working on the touchscreen I’ll be all set.

  37. Dave

    I have a Toshiba CHromebook 2 and I installed Linux mint 17.2 xfce on it and everything went well including your script I ran after installation. The problem is I still have no audio and the only audio interface it says I have is the HDMI output. Is there something else than needs to be configured to get audio through the speakers and headphone jack? Also the screen brightness buttons don’t work but the other top row buttons do.

    • Captain

      Hi Dave, for some reason the brightness keys don’t work when using the xfce desktop and I haven’t been able to fix it! If I recall correctly, there should be a way to change brightness in the settings.

      Sound doesn’t work if you’ve got a newer kernel but on Mint 17.2 sound should be ok. You may just need to go into the sound settings and make the speaker the default.

  38. Salil

    Hi Cap! Firstly, am close to two years of having a stable LInux system on my Toshiba Chrombook 2 2015, ALL THANKS TO YOU. Recently moved to Lubuntu 16.01 from Ubuntu 14.04, can’t get sound to work despite every possible solution mentioned here and on the ubuntu forums. Card shows up as
    0 [PCH ]: HDA-Intel – HDA Intel PCH
    HDA Intel PCH at 0xd0914000 irq 264
    but despite pulse and alsa tinkering cannot get the byt-99090 to show up in the hardware, as I had done previously. Thank you for your time, no problem at all if you are too busy!

    • Captain

      Hi Salil, most of the credit should go to the creators of the BIOS mod (John and Mr Chromebook) but I’m glad I could help.

      Sound on Baytrail CBs is a pain with newer kernels since the driver was removed. I haven’t had time to tinker recently so you should either opt for a distro with an older kernel or I saw this post recently that might point you in a useful direction.

      • jskier

        I thought I would add to this. I have been using the patched stable kernel in Arch linked to, and it works fairly well for playback most of the time (kernel log is noisy).

        If you want to have the internal mic and sound work, use linux-41lts (in AUR for ArchLinux – be sure to use the latest version though, for backport security fixes). I’ve found the internal audio and mic work flawlessly in this kernel version. Unfortunately projected EOL is September this year for 4.1 kernel; I hope they fix this soon!

  39. Danilo scrignoli

    I us this:
    Sudo apt-get install linux-firmaware
    Afte i have download assound.state
    Sudo alsa Force-unload
    Sudo cp ~/downloads/assound.state /var/lib/alsa

    • Captain

      Hi Danilo, that’s effectively what the script does on the sound side (you can look at the script on github), but this won’t work with newer Linux kernels for BayTrail Chromebooks.

  40. Jpelletier

    Hi,

    Thank you for your tutorials.

    I have install ubuntu 16.04 LTS 64 bits on the Toshiba Chromebook 2 (Swanky).
    All works except the patch for sound.

    Stack backtrace :

    CBFixesAndTweaks-master/
    CBFixesAndTweaks-master/CBFixesAndTweaks.sh
    CBFixesAndTweaks-master/README.md
    CBFixesAndTweaks-master/asound.state
    CBFixesAndTweaks-master/pc
    Unloading ALSA sound driver modules: snd-hda-codec-hdmi snd-hda-intel snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-timer (failed: modules still loaded: snd-hda-codec-hdmi snd-hda-intel snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-timer).

    Thank you for the feedback

    • Captain

      Hi Jas, after a reboot, go into the sound settings and make sure the speaker is set to default (change from HDMI output).

  41. Jpelletier

    Hi,

    I have no input and output devices detected.
    Here is a screen printing : https://mega.nz/fm/gmwUxB7b

    Thank you

    • Captain

      Can you confirm the version of Ubuntu you are running please by typing the following in a terminal window:
      lsb_release -a

      • Jpelletier

        Is the Ubuntu version compatible for the fix?

        I also tried with Xubuntu 16.04 but I also did not manage to make the sound work.

        • Captain

          I currently have Xubuntu 16.04.2 LTS installed on my CB and my sound is working. It appears that if you are using the RW-LEGACY mod, sound is not working.

          I removed write protect and installed the BOOT_STUB mod which is why my sound works. Mr Chromebox does not mention this on his site so I am not 100% sure. I suggest sending his a quick email to clarify.

          • Jpelletier

            Hi,

            You’re probably right.

            I removed write protect and installed the RW_LEGACY to change operating system easily and because I had encountered problems booting on my usb key.
            Can not boot with this mode, I am obliged to change the mode BOOT_STUB from linux

            For my installation I also followed the following notice (boot times and start seabios by default) :
            https://johnlewis.ie/neutering-the-developer-mode-screen-on-your-chromebook/
            https://johnlewis.ie/how-to-make-the-legacy-seabios-firmware-slot-the-default-on-a-haswell-broadwell-based-chromebook/

            Can I flasher the bios from ubuntu?

            Thank

          • Captain

            Ok, some of John’s articles are old now and Mr Chromebox has automated those tasks.
            In Ubuntu, run Mr Chromebox’s script in a terminal window and go through these options one by one:
            – use option 8 to reset the BOOT_STUB slot
            – use option 2 to update the BOOT_STUB slot
            – use option 4 to set boot options (GBB flags)
            – use option 6 to remove the developer mode screen

            That should reset everything for you. You may then need to do a fresh install of Ubuntu 16.04.
            If you’re not sure about any of these options please read the info provided by Mr Chromebox as the documentation is very clear and helpful.

          • Jpelletier

            Thant you,

            I have run Mr Chromebox’s script and used the 8, 2, 4, 6 as you recommanded.
            Starting the system is now more efficient.
            In addition I reinstalled ubuntu 16.04.2 64 bits

            However, I still do not sound after launching your script.

            I think the problem comes from the kernel

            Recall :

            Version of Ubuntu :
            No LSB modules are available.
            Distributor ID: Ubuntu
            Description: Ubuntu 16.04.2 LTS
            Release: 16.04
            Codename: xenial

            Kernel :
            4.8.0-49-generic

            Do you have any idea of ​​the problem?

          • Captain

            It may be just a matter of making sure the speaker is the default output device in the settings menu. Other than that I have to admit, I’m out of ideas as to why sound doesn’t work for you…

          • Jpelletier

            The speaker is the default output device in the settings menu are :
            – Output devices : Digital Stereo HDMI Output (unplugged)
            – Configuration : Digital Stereo HDMI (unplugged)

            I have restore the Stock Firmware (Mrchomebox) and reinstall xubuntu 16.04.2 64 bits to test but still no sound with patch.

  42. Jpelletier

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 16.04.2 LTS
    Release: 16.04
    Codename: xenial

  43. Ragav

    Hi Captain, I am running Ubuntu 14.04 on my Acer C720. Everything works great. When I’m editing code on Atom, I am pressing ctrl+shift+ it takes me to the beginning or end of line. And with up or down key it takes me to the beginning or end of page. I don’t want this. I just want to select the word to the left when I press ctrl+shift+left key, like in a normal keyboard.

    Everything else works but this is a deal breaker for me since I’m running ubuntu specifically for coding.

    Is there a way for me to change it. And if I must go back to removing the script how do I do that? It’d be nice if you could list out instructions to uninstall the script in the article, for general reference.

    Thanks.
    PS – Btw I’m a linux noob. Be kind. 🙂

    • Captain

      Hi Ragav, the uninstall idea is a good one and I should really add it to the script. You can find info on modifying the key mappings in this post.

      You will find my comments for what I modified in the pc file. Welcome to Linux BTW, we are all noobs depending on who we are talking to – there’s always someone who knows less than you and more than you 🙂

      • Ragav

        I actually posted that comment and wondered why I should not upgrade from noob status. So I basically went through the github repository and figured out how the script works and experimented and got the key mappings modified the way I wanted it. So yay!

        But the uninstall script is still necessary I feel, especially if someone messes up the modifications by accident and just wants to go back to normal.

        Thanks anyway 🙂

        • Captain

          Cool, I’ll get around to the uninstall when I get a chance.

  44. Tony Jackson

    Confirmed working for Mint 18.1 🙂

  45. Davide Riboli

    Hi Captain,

    today I’ve installed Ubuntu Gnome Xenial LTS 16.0.4.2 on my Chromebook Toshiba 2 Swanky.

    Everything was OK, but sound.

    To have sound back, I’ve just purged the original (and updated) linux-image and the linux-headers and then installed linux-image-lts-xenial and linux-headers-lts-xenial. Now everything but mic is working like a charm. LTS headers and linux image are available in xenial repo.

    Thanks for your time and and your work.

    • Captain

      Hi Davide, thanks for posting your fix and your Linux Ultrabook!

  46. Aaron Poole

    Heya Captain,
    Thanks for all the work on linux and chromebooks.
    I ran this edit after installing elementary OS onto my chromebook following your guide. All functions work as you said they would, except now (I think it worked at first) the refresh button on my Toshiba Chromebook 2 opens up the find bar in a chrome tab rather than refreshing page.
    Not a massive nuisance, but obviously would prefer if worked as supposed too.
    Any ideas?
    I look forward to your reply,
    Thanks,
    Aaron

    • Captain

      Hi Aaron, I have had other people telling me about quirks in different distros and I’m afraid it’s going to be a matter of trail and error to get different keys to work. Read this post to get an idea of what config file you need to look at.

  47. Steven Nichols

    Confirmed working on Solus OS as well

Comments are Closed

Product names, logos, brands, and other trademarks are the property of their respective trademark holders.