Difference between revisions of "Acer C720 Chromebook"

From ArchWiki
Jump to navigation Jump to search
(Touchpad and Touchscreen kernel modules unite)
(Installation: remove duplicate: installation process on haswell chromebooks)
Line 7: Line 7:
 
== Installation ==
 
== Installation ==
  
First enable legacy boot / SeaBIOS, this can either be done by enabling the pre-installed version of SeaBIOS or by installing a custom ROM. The pre-installed SeaBIOS route has the advantage of being officially implemented by Google whereas the custom ROM route has other advantages such as being more up-to-date, reducing the boot time, removing the Developer Mode screen and enabling VMX. After accessing SeaBIOS you will be able to install and boot Linux as you would on a traditional x86 BIOS system.
+
The installation process for Haswell Chromebooks described at the [[Chromebook#Installation_on_a_Haswell_Chromebook|Chromebook]] page.  
 
 
{{Note|If you intend to stay using pre-installed SeaBIOS route and think you won't appreciate having to press {{ic|Ctrl + L}} every time you boot to reach SeaBIOS then you can set coreboot to boot to SeaBIOS by default so it isn't necessary to press {{ic|Ctrl + L}}; this currently must be done inside of Chrome OS and requires removing the write-protect screw so if you would like to do this then it may be a good idea to remove the write-protect screw now so that you will not have to reinstall Chrome OS later with recovery install media. If you would like to do this now then you can do so by removing the bottom panel of the laptop by removing the 12 visible screws and another one underneath the warranty sticker, then separating the plastic starting at the back and finally completely removing the write-protect screw from the motherboard, which is labelled as #7 in [http://www.chromium.org/_/rsrc/1381990807648/chromium-os/developer-information-for-chrome-os-devices/acer-c720-chromebook/c720-chromebook-annotated-innards.png this picture].}}
 
 
 
=== Enabling Developer Mode ===
 
 
 
[http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/acer-c720-chromebook#TOC-Developer-Mode Developer Mode] is necessary to access the superuser shell inside Chrome OS; which is required to make the changes to the system to allow you to boot through SeaBIOS.
 
 
 
{{Warning|Enabling Developer Mode will wipe all of your data.}}
 
 
 
To enable Developer Mode:
 
 
 
* Turn on the Chromebook.
 
* Press and hold the {{ic|Esc + F3 (Refresh)}} keys, then press the {{ic|Power}} button. This enters Recovery Mode.
 
* Press {{ic|Ctrl + D}} (no prompt). It will ask you to confirm, then the system will revert its state and enable Developer Mode.
 
{{Note|Press {{ic|Ctrl + D}} (or wait 30 seconds for the beep and boot) at the white boot splash screen to enter Chrome OS.}}
 
 
 
=== Accessing the superuser shell ===
 
 
 
After you have enabled Developer Mode you will need to access the superuser shell.; how you do this depends on whether you've configured Chrome OS or not.
 
 
 
==== Accessing the Superuser shell without Chrome OS configuration ====
 
 
 
If you haven't configured Chrome OS, just press {{ic|Ctrl + Alt + F2}} (F2 is the "forward" arrow on the top row, →), you'll see a login prompt.
 
 
 
* Use {{ic|chronos}} as the username, it should not prompt you for a password.
 
* Become superuser with {{ic|sudo bash}}.
 
 
 
==== Accessing the superuser shell with Chrome OS configuration ====
 
 
 
If you have configured Chrome OS already:
 
 
 
* Open a crosh window with {{ic|Ctrl + Alt + T}}.
 
* Open a bash shell with the {{ic|shell}} command.
 
* Become superuser with {{ic|sudo bash}}
 
 
 
=== Enabling SeaBIOS ===
 
 
 
This method will allow you to access the pre-installed version of SeaBIOS through the Developer Mode screen in coreboot.
 
 
 
* Inside your superuser shell enter:
 
# crossystem dev_boot_usb=1 dev_boot_legacy=1
 
* Reboot the machine.
 
 
 
You can now start SeaBIOS by pressing {{ic|Ctrl + L}} at the white boot splash screen.
 
 
 
==== Boot to SeaBIOS by default ====
 
 
 
If you want to make SeaBIOS default, you must do the following:
 
 
 
{{Warning|If you do not remove the write-protect screw then your system will become corrupted, on empty battery Chrome OS is forced to recover and you lose your Arch Linux. If you would like to remove the write-protect screw then you can do so by removing the bottom panel of the laptop by removing the 12 visible screws and another one underneath the warranty sticker, then separating the plastic starting at the back and finally completely removing the write-protect screw from the motherboard, which is labelled as #7 in [http://www.chromium.org/_/rsrc/1381990807648/chromium-os/developer-information-for-chrome-os-devices/acer-c720-chromebook/c720-chromebook-annotated-innards.png this picture].}}
 
 
 
* Inside your superuser shell enter:
 
 
# sudo su
 
# set_gbb_flags.sh 0×489
 
 
 
=== Installing Arch Linux ===
 
 
 
{{Poor writing|Duplicated content}}
 
 
 
Create an [https://wiki.archlinux.org/index.php/USB_Flash_Installation_Media Arch Linux Installer USB drive] then plug the USB drive into the Chromebook and start SeaBIOS with {{ic|Ctrl + L}} at the white boot splash screen. Press {{ic|Esc}} to get a boot menu and select the number corresponding to your USB drive. The Arch Linux installer boot menu should appear and installation can proceed as normal.
 
 
 
{{Note|Choose [https://wiki.archlinux.org/index.php/Beginners%27_Guide#GRUB GRUB] as your boot loader for now instead of Syslinux. See [[#Syslinux | Known Issues]]}}
 
 
 
==== 64-bit installation with the newest 2014.07.03 ISO ====
 
 
 
Create a new FAT32 partition on your USB drive e.g. with gparted and '''label it as ArchLinux'''.
 
 
 
{{Warning|Without the label it won't work}}
 
 
 
*Mount the new partition (replace x with the correct letter as shown with sudo fdisk -l and username with your own username)
 
 
 
# mount /dev/sdx1 /mnt/ -o uid=username,gid=users
 
 
 
Install GRUB2 on the USB drive
 
 
 
# grub-install --no-floppy --root-directory=/mnt /dev/sdx
 
 
 
Create a new directory in /mnt/boot
 
 
 
# /mnt/boot/archlinux-20140703-dual
 
 
 
Mount the archlinux-2014.07.03-dual.iso
 
 
 
$ mkdir ~/iso
 
# mount -o loop archlinux-2014.07.03-dual.iso ~/iso
 
 
 
Copy the mounted files to the usb drive
 
 
 
$ cp -r ~/iso/arch/* /mnt/boot/archlinux-20140703-dual
 
 
 
Create the grub.cfg file
 
 
 
{{hc|head=/mnt/boot/grub/grub.cfg|
 
output=menuentry "Arch Linux 64 Bit" {
 
linux /boot/archlinux-20140703-dual/boot/x86_64/vmlinuz archisobasedir=/boot/archlinux-20140703-dual archisolabel=ArchLinux
 
initrd /boot/archlinux-20140703-dual/boot/x86_64/archiso.img
 
}
 
}}
 
 
 
=== Xorg video driver ===
 
 
 
[[Pacman|Install]] the {{Pkg|xf86-video-intel}} driver.
 
  
 
=== Touchpad and Touchscreen kernel modules ===
 
=== Touchpad and Touchscreen kernel modules ===
Line 263: Line 160:
 
}}
 
}}
  
=== Fixing suspend ===
 
 
The following are instructions to fix the suspend functionality.
 
Depending if you use the pre-installed SeaBIOS or John Lewis' pre-built custom ROMs with {{AUR|linux-chromebook}} you might no need the following fix.
 
With the recent 3.17rc5 kernel the suspend fix still needed.
 
 
There have been a few alternatives discussed and those may work better for some. [https://bbs.archlinux.org/viewtopic.php?pid=1364376#p1364376] [https://bbs.archlinux.org/viewtopic.php?pid=1364521#p1364521]
 
 
NOTE: Lid suspend doesn't work directly after boot, you need to wait a little.
 
 
Create the following {{ic|cros-acpi-wakeup.conf}} file.
 
 
{{hc|head=/etc/tmpfiles.d/cros-acpi-wakeup.conf|
 
output=w /proc/acpi/wakeup - - - - EHCI
 
w /proc/acpi/wakeup - - - - HDEF
 
w /proc/acpi/wakeup - - - - XHCI
 
w /proc/acpi/wakeup - - - - LID0
 
w /proc/acpi/wakeup - - - - TPAD
 
w /proc/acpi/wakeup - - - - TSCR}}
 
 
Then, create the following {{ic|cros-sound-suspend.sh}} file. Only the EHCI binding/unbinding lines are listed below; see the alternatives linked above for additional sound suspend handling if you experience issues.
 
 
{{hc|head=/usr/lib/systemd/system-sleep/cros-sound-suspend.sh|
 
output=<nowiki>#!/bin/bash
 
 
case $1/$2 in
 
  pre/*)
 
    # Unbind ehci for preventing error
 
    echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/unbind
 
    # Unbind snd_hda_intel for sound
 
    echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
 
    echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/unbind
 
    ;;
 
  post/*)
 
    # Bind ehci for preventing error
 
    echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/bind
 
    # bind snd_hda_intel for sound
 
    echo -n "0000:00:1b.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
 
    echo -n "0000:00:03.0" | tee /sys/bus/pci/drivers/snd_hda_intel/bind
 
    ;;
 
esac</nowiki>}}
 
 
Make sure to make the script executable:
 
# chmod +x /usr/lib/systemd/system-sleep/cros-sound-suspend.sh </code>
 
Then add the following kernel boot parameters. Different combinations have been mentioned, with {{ic|1=tpm_tis.force=1}} being the most important.
 
 
{{hc|head=/etc/default/grub|
 
output=GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap boot=local noresume noswap i915.modeset=1 tpm_tis.force=1 tpm_tis.interrupts=0 nmi_watchdog=panic,lapic"}}
 
 
Then [[GRUB#Generating main configuration file|rebuild your grub config]].
 
  
 
=== Improving WLAN and BT performance ===
 
=== Improving WLAN and BT performance ===

Revision as of 12:53, 19 September 2014

zh-cn:Acer C720 Chromebook

Warning: This article relies on third-party scripts and modifications, and may irreparably damage your hardware or data. Proceed at your own risk.

The Acer C720 Chromebook (and newer Chromebooks in general) features a "legacy boot" mode that makes it easy to boot Linux and other operating systems. The legacy boot mode is provided by the SeaBIOS payload of coreboot. SeaBIOS behaves like a traditional BIOS that boots into the MBR of a disk, and from there into your standard bootloaders like Syslinux and GRUB.

Installation

The installation process for Haswell Chromebooks described at the Chromebook page.

Touchpad and Touchscreen kernel modules

Kernel 3.16.1 should be the last kernel that requires these patches, as a fix has been merged into 3.17-rc1.

Install patched kernel

Install linux-chromebookAUR from AUR

Manually build the modules

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Low quality scripts (Discuss in Talk:Acer C720 Chromebook#)

Enabling the touchpad currently requires building a set of patched Haswell Chromebook kernel modules.

  • For kernel 3.16.1, simply run this script after installing these packages:
$ pacman -S wget sudo patch make gcc git
$ git clone https://github.com/masmullin2000/arch-c720p.git
$ cd arch-c720p
$ sh ./touch.sh

Touchpad Configuration

  • Edit the Xorg touchpad configuration file

Add the Xorg touchpad configuration below for better usability (increases touchpad sensitivity).

/etc/X11/xorg.conf.d/50-cros-touchpad.conf
Section "InputClass" 
    Identifier      "touchpad peppy cyapa" 
    MatchIsTouchpad "on" 
    MatchDevicePath "/dev/input/event*" 
    MatchProduct    "cyapa" 
    Option          "FingerLow" "10" 
    Option          "FingerHigh" "10" 
EndSection

If you want to remove the "right-click" behavior from the touchpad from the bottom right area (you can still right-click with two finger clicks), you should comment out the following section from /etc/X11/xorg.conf.d/50-synaptics.conf

/etc/X11/xorg.conf.d/50-synaptics.conf
#Section "InputClass"
#        Identifier "Default clickpad buttons"
#        MatchDriver "synaptics"
#        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
#       Option "AreaBottomEdge" "82%"
#EndSection
  • Use a graphical tool

Synaptiks is a touchpad configuration and management tool for KDE. It provides a system settings module to configure basic and advanced features of the touchpad. Although it is said to be currently unmaintained and seems to crash under KDE 4.11, it works well with this Chromebook under KDE 4.12.2. Another utility, kcm_touchpad, does not work at all.

Reboot for the touchpad to become operational.

Fix Audio

Create /etc/modprobe.d/alsa.conf

/etc/modprobe.d/alsa.conf
option snd_hda_intel index=1

Create this specific ~/.asoundrc file

~/.asoundrc
# Standard
pcm.!default {
  type hw
  card 1
  device 0
}

ctl.!default {
  type hw
  card 1
}

pcm_slave.slavej {
  pcm "hw:1"
  channels 2
  rate 44100
}

pcm.plugj {
  type plug
  slave slavej
}

# HDMI
#pcm.!default {
  #type hw
  #card 1
  #device 3
#}

#ctl.!default {
  #type hw
  #card 0
#}

To fix FlashPlugin audio with PulseAudio use this specific .asoundrc file

~/.asoundrc
# Standard
pcm.pulse {
  type pulse
}

ctl.pulse {
  type pulse
}
pcm.!default {
type pulse
#  type hw
#  card 1
 # device 0
}

ctl.!default {
type pulse
 # type hw
  #card 1
}

pcm_slave.slavej {
  pcm "hw:1"
  channels 2
  rate 44100
}

pcm.plugj {
  type plug
  slave slavej
}

# HDMI
#pcm.!default {
  #type hw
  #card 1
  #device 3
#}

#ctl.!default {
  #type hw
  #card 0
#}


Improving WLAN and BT performance

The C720 comes with a AR9462 WLAN+BT chip. Both Bluetooth and WiFi can use 2.4 GHz, which can cause interference. You can enable Bluetooth coexistence to improve the performance of the card. Additionally, you can enable power savings and antennae diversity to reduce power usage and boost performance:

/etc/modprobe.d/ath9k.conf
options ath9k btcoex_enable=1 ps_enable=1 bt_ant_diversity=1

Post Installation Configuration

For information on general Chromebook post installation configuration (hotkeys, power key handling ...) see Chromebook#Post_Installation_Configuration.

Known issues

Syslinux

Syslinux fails to set the bootable flag with syslinux-install_update -i -a -m. After setting the bootable flag manually in fdisk and installing Syslinux to the MBR with syslinux-install_update -i -m, SeaBIOS boots Syslinux, but Syslinux then complains about a missing OS. Use GRUB for now.

Unbricking with Raspberry Pi

Get yourself an SOIC clip [1], and hook up the SOIC clip and jumper wires [2] [3] [4]

Install flashrom. Enable spi:

# modprobe spi_bcm2708
# modprobe spidev

Backup ROM:

flashrom -r backup-rom.bin -VVV -p linux_spi:dev=/dev/spidev0.0

Flash the new ROM:

flashrom -w new-rom.bin -VVV -p linux_spi:dev/dev/spidev0.0

See [5] for BeagleBone instructions.

See also