Fascinating Captain

Tech Guides and Buying Advice


Automate Chromebook fixes for Linux

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

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?


  • 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)



  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.

  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.


  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,


    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


        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

          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


    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.
      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…

  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

  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?


    • 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

    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


        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!

Leave a Reply

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