https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mediamind&feedformat=atomArchWiki - User contributions [en]2024-03-29T09:15:54ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Acer_C720_Chromebook&diff=306365Acer C720 Chromebook2014-03-21T21:02:45Z<p>Mediamind: </p>
<hr />
<div>[[Category:Acer]]<br />
[[ja:Acer C720 Chromebook]]<br />
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 [http://www.coreboot.org/SeaBIOS 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.<br />
<br />
== Preview ==<br />
<br />
You can watch the preview on what Arch on Acer C720 looks like https://www.youtube.com/watch?v=dEbCFlyUw5c<br />
<br />
== Installation ==<br />
<br />
First enable legacy boot / SeaBIOS from the developer mode of Chrome OS. Then install and boot Linux as you would on a traditional x86 BIOS system.<br />
<br />
=== Enabling Developer Mode ===<br />
<br />
{{Warning|'''This will wipe all of your data!'''}}<br />
<br />
To enter developer mode: <br />
* Press and hold the {{ic|Esc+F3 (Refresh)}} keys, then press the {{ic|Power}} button. This enters recovery mode.<br />
* Now, press {{ic|Ctrl+D}} (no prompt). It will ask you to confirm, then the system will revert its state and enable developer mode.<br />
* Press {{ic|Ctrl+D}} (or wait 30 seconds for the beep and boot) at the white boot splash screen to enter Chrome OS.<br />
<br />
=== Enabling SeaBIOS ===<br />
<br />
After changing to developer mode, configure Chrome OS so that you can log in.<br />
<br />
To enable the legacy bios:<br />
* Open a crosh window with {{ic|Ctrl+Alt+T}}.<br />
* Open a bash shell with the {{ic|shell}} command.<br />
* Become superuser with {{ic|sudo bash}}<br />
* Enable legacy boot with:<br />
# crossystem dev_boot_usb=1 dev_boot_legacy=1<br />
* Reboot the machine<br />
<br />
You can now start SeaBIOS by pressing {{ic|Ctrl-L}} at the white boot splash screen. If you want to make SeaBIOS default, you '''MUST''' first remove the write protect screw and then run:<br />
<br />
{{Warning|'''I'm serious! You HAVE to remove the write-protect screw first! Otherwise the system will be corrupted and you'll need to recover it'''}}<br />
<br />
# set_gbb_flags.sh 0×489<br />
<br />
=== Installing Arch Linux ===<br />
<br />
Create a [https://wiki.archlinux.org/index.php/USB_Flash_Installation_Media USB drive] with the Arch Linux installer. 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. Follow your favorite [https://wiki.archlinux.org/index.php/Beginners%27_Guide installation guide].<br />
<br />
A few installation notes:<br />
* For a 64-bit installation, use the 2013.10.01 ISO, and boot into the x86_64 installer with the {{ic|1=mem=1536m}} kernel option. (You can download torrent on [http://linuxtracker.org/index.php?page=torrent-details&id=4343552155062db9a7a05a10904f5c68f98b1216 linuxtracker.org])<br />
* A fresh DOS partition table on the SSD with one bootable 16GB root partition works. Note that this will wipe Chrome OS.<br />
* Choose [https://wiki.archlinux.org/index.php/Beginners%27_Guide#GRUB GRUB] as your bootloader, for now, instead of Syslinux.<br />
* After installing it's not Ctrl + D to boot OS it's Ctrl + L (To save you hours figuring out why you can't boot)<br />
* Use [[GUID_Partition_Table]] (GPT) instead of MBR, you can use cgdisk to create partiton. And don't forget a 1-2M size BIOS boot partition for [[GRUB]] is needed.<br />
<br />
=== Xorg Video Driver ===<br />
<br />
Use the {{ic|xf86-video-intel}} driver.<br />
<br />
$ sudo pacman -S xf86-video-intel<br />
<br />
=== Touchpad Kernel Modules ===<br />
<br />
Enabling the touchpad currently requires building a set of patched Haswell Chromebook kernel modules. Fortunately, ChrUbuntu provides a script for automatically building and installing these modules: [http://goo.gl/kz917j cros-haswell-modules.sh].<br />
<br />
A modified version for Arch Linux is available here [http://pastie.org/8763538 cros-haswell-modules-archlinux.sh] (tested with Linux 3.13).<br />
For kernel 3.12 or earlier, the earlier script can be found [http://pastie.org/8540561 here].<br />
<br />
$ wget http://pastie.org/pastes/8763538/download -O cros-haswell-modules-archlinux.sh<br />
$ chmod +x cros-haswell-modules-archlinux.sh<br />
$ ./cros-haswell-modules-archlinux.sh<br />
<br />
====configuration====<br />
* Edit Xorg touchpad configuration file<br />
Add the Xorg touchpad configuration below for better usability (increases touchpad sensitivity).<br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-cros-touchpad.conf|<br />
Section "InputClass" <br />
Identifier "touchpad peppy cyapa" <br />
MatchIsTouchpad "on" <br />
MatchDevicePath "/dev/input/event*" <br />
MatchProduct "cyapa" <br />
Option "FingerLow" "10" <br />
Option "FingerHigh" "10" <br />
EndSection}}<br />
<br />
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 <code>/etc/X11/xorg.conf.d/50-synaptics.conf</code><br />
<br />
{{hc|/etc/X11/xorg.conf.d/50-synaptics.conf|<br />
#Section "InputClass"<br />
# Identifier "Default clickpad buttons"<br />
# MatchDriver "synaptics"<br />
# Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"<br />
# To disable the bottom edge area so the buttons only work as buttons,<br />
# not for movement, set the AreaBottomEdge<br />
# Option "AreaBottomEdge" "82%"<br />
#EndSection<br />
}} <br />
<br />
*Use graphical tool<br />
[[Touchpad_Synaptics#Graphical_tools | 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, KDE 4.12.2.<br />
Another untility, [https://aur.archlinux.org/packages/kcm_touchpad/ kcm_touchpad], does not work at all.<br />
<br />
Reboot for the touchpad to become operational.<br />
<br />
=== Touchscreen (C720P model) ===<br />
<br />
If you're using a touchscreen-enabled model (such as the C720P), you may use a modified version of the previous script to install patched modules for the touchscreen as well<br />
<br />
It is available here [http://pastie.org/8834223 cros-haswell-modules-archlinux.sh] (tested with Linux 3.13).<br />
For kernel 3.12 or earlier, the earlier script can be found [http://pastie.org/pastes/8581310 here].<br />
<br />
$ wget http://pastie.org/pastes/8834223/download -O cros-haswell-modules-archlinux.sh<br />
$ chmod +x cros-haswell-modules-archlinux.sh<br />
$ ./cros-haswell-modules-archlinux.sh<br />
<br />
=== Power Key and Lid Switch Handling ===<br />
<br />
==== Ignore using logind ====<br />
<br />
Out of the box, {{ic|systemd-logind}} will catch power key and lid switch events and handle them: it will do a poweroff on a power key press, and a suspend on a lid close. However, this policy might be a bit harsh given that the power key is an ordinary key at the top right of the keyboard that might be pressed accidentally.<br />
<br />
To configure logind to ignore power key presses and lid switches, add the lines to {{ic|logind.conf}} below.<br />
<br />
{{hc|head=/etc/systemd/logind.conf|<br />
output=HandlePowerKey=ignore<br />
HandleLidSwitch=ignore}}<br />
<br />
Then restart logind for the changes to take effect.<br />
<br />
$ sudo systemctl restart systemd-logind<br />
<br />
Power key and lid switch events will still be logged to journald by logind. See http://www.freedesktop.org/software/systemd/man/logind.conf.html for additional handling options.<br />
<br />
==== Fixing suspend ====<br />
<br />
The following are instructions to fix the suspend functionality. There have been a few [https://bbs.archlinux.org/viewtopic.php?pid=1364376#p1364376 alternatives] [https://bbs.archlinux.org/viewtopic.php?pid=1364521#p1364521 discussed] and those may work better for some.<br />
<br />
Create the following {{ic|cros-acpi-wakeup.conf}} file.<br />
<br />
{{hc|head=/etc/tmpfiles.d/cros-acpi-wakeup.conf|<br />
output=w /proc/acpi/wakeup - - - - EHCI<br />
w /proc/acpi/wakeup - - - - HDEF<br />
w /proc/acpi/wakeup - - - - XHCI<br />
w /proc/acpi/wakeup - - - - LID0<br />
w /proc/acpi/wakeup - - - - TPAD<br />
w /proc/acpi/wakeup - - - - TSCR}}<br />
<br />
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.<br />
<br />
{{hc|head=/usr/lib/systemd/system-sleep/cros-sound-suspend.sh|<br />
output=<nowiki>#!/bin/bash<br />
case $1/$2 in<br />
pre/*)<br />
# Unbind ehci.<br />
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/unbind<br />
;;<br />
post/*)<br />
# Bind ehci.<br />
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/bind<br />
;;<br />
esac</nowiki>}}<br />
<br />
Make sure to make the scrip executable:<br />
<code> # chmod +x /usr/lib/systemd/system-sleep/cros-sound-suspend.sh </code><br />
Then add the following kernel boot parameters. Different combinations have been mentioned, with {{ic|1=tpm_tis.force=1}} being the most important.<br />
<br />
{{hc|head=/etc/default/grub.cfg|<br />
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"}}<br />
<br />
Then [[GRUB#Generating main configuration file|rebuild your grub config]].<br />
<br />
== Hotkeys == <br />
<br />
The c720 has function keys with [https://support.google.com/chromebook/answer/1047364?hl=en dedicated Chromebook shortcuts] within Chrome OS. By default these work as regular function keys, but they can be mapped to match their appearance.<br />
<br />
=== Sxhkd configuration ===<br />
<br />
Below is an [[Sxhkd]] configuration file that specifies behavior similar to the shortcut defaults in Chrome OS. Besides the sxhkd daemon, this requires [[Advanced Linux Sound Architecture|amixer]], {{Pkg|xorg-xbacklight}}, and {{Pkg|xautomation}}.<br />
<br />
{{hc|~/.config/sxhkd/sxhkdrc|<br />
# Web browser Back/Forward shortcuts<br />
{@F1,@F2}<br />
xte 'keydown Alt_L' 'key {Left,Right}' 'keyup Alt_L'<br />
<br />
# Web browser Refresh shortcut<br />
@F3<br />
xte 'keydown Control_L' 'key r' 'keyup Control_L'<br />
<br />
# Awesome WM maximize current window<br />
# Adjust as necessary for different window managers<br />
@F4<br />
xte 'keydown Super_L' 'key m' 'keyup Super_L'<br />
<br />
# Awesome WM move one desktop right<br />
@F5<br />
xte 'keydown Super_L' 'key Right' 'keyup Super_L'<br />
<br />
{F6,F7}<br />
xbacklight -{dec,inc} 10<br />
<br />
F8<br />
amixer set Master toggle<br />
<br />
{F9,F10}<br />
amixer set Master 10{-,+} unmute<br />
}}<br />
<br />
===xbindkeys configuration===<br />
There is another way to configure hot keys using [[xbindkeys]].Below is an [[xbindkeys]] configuration file that specifies behavior very similar to the shortcut defaults in Chrome OS. This requires [[Advanced Linux Sound Architecture|amixer]] and {{Pkg|xorg-xbacklight}}.Besides, [http://homepage3.nifty.com/tsato/xvkbd/ xvkbd] is needed for sending string (key shortcuts) to focus window. Some of the configuration comes from thread [https://bbs.archlinux.org/viewtopic.php?id=173418&p=3 vilefridge's xbindkeys configuration].<br />
<br />
{{hc|~/.xbindkeysrc|<br />
<br />
# Backward, Forward, Full Screen & Refresh is just for web browser<br />
#Backward<br />
"xvkbd -xsendevent -text "\A\[Left]""<br />
m:0x0 + c:67<br />
F1 <br />
<br />
#Full Screen<br />
"xvkbd -xsendevent -text "\[F11]""<br />
m:0x0 + c:70<br />
F4 <br />
<br />
#Forward<br />
"xvkbd -xsendevent -text "\A\[Right]""<br />
m:0x0 + c:68<br />
F2 <br />
<br />
#Refresh<br />
"xvkbd -xsendevent -text "\Cr""<br />
m:0x0 + c:69<br />
F3 <br />
<br />
# on ChromeBook, it "Enter Overview mode, which shows all windows (F5)", see also https://support.google.com/chromebook/answer/1047364?hl<br />
# here it work at KDE, it "Switch to next focused window", see also http://community.linuxmint.com/tutorial/view/47<br />
#Switch Window<br />
"xvkbd -xsendevent -text "\A\t""<br />
m:0x0 + c:71<br />
F5 <br />
<br />
#Backlight Down<br />
"xbacklight -dec 5"<br />
m:0x0 + c:72<br />
F6 <br />
<br />
#Backlight Up<br />
"xbacklight -inc 5"<br />
m:0x0 + c:73<br />
F7 <br />
<br />
#Mute<br />
"amixer set Master toggle"<br />
m:0x0 + c:74<br />
F8 <br />
<br />
#Decrease Volume<br />
"amixer set Master 5- unmute"<br />
m:0x0 + c:75<br />
F9 <br />
<br />
#Increase Volume<br />
"amixer set Master 5+ unmute"<br />
m:0x0 + c:76<br />
F10 <br />
<br />
# added Home, End, Pg Up, Pg Down, and Del keys using the Alt+arrow key combos<br />
#Delete<br />
"xvkbd -xsendevent -text '\[Delete]'"<br />
m:0x8 + c:22<br />
Alt + BackSpace <br />
<br />
#End<br />
"xvkbd -xsendevent -text '\[End]'"<br />
m:0x8 + c:114<br />
Alt + Right <br />
<br />
#Home<br />
"xvkbd -xsendevent -text '\[Home]'"<br />
m:0x8 + c:113<br />
Alt + Left <br />
<br />
#Page Down<br />
"xvkbd -xsendevent -text '\[Page_Down]'"<br />
m:0x8 + c:116<br />
Alt + Down <br />
<br />
#Page Up<br />
"xvkbd -xsendevent -text '\[Page_Up]'"<br />
m:0x8 + c:111<br />
Alt + Up <br />
<br />
#<br />
# End of xbindkeys configuration}}<br />
<br />
Once you're done configuring xbindkeys, edit your {{ic|~/.xinitrc}} and place <br />
xbindkeys<br />
<br />
before the line that starts your window manager or DE.<br />
<br />
== Audio ==<br />
Getting alsa to work with the C720 is as simple as creating or editing your <code>/etc/modprobe.d/alsa.conf</code> and adding the line<br />
{{hc|/etc/modprobe.d/alsa.conf|<br />
output=options snd_hda_intel index=1}}<br />
<br />
An alternate approach to getting alsa to work is by creating a .asoundrc file and pasting in the following:<br />
<br />
{{hc|.asoundrc|<br />
# Standard<br />
pcm.!default {<br />
type hw<br />
card 1<br />
device 0<br />
}<br />
<br />
ctl.!default {<br />
type hw<br />
card 1<br />
}<br />
<br />
pcm_slave.slavej {<br />
pcm "hw:1"<br />
channels 2<br />
rate 44100<br />
}<br />
<br />
pcm.plugj {<br />
type plug<br />
slave slavej<br />
}<br />
<br />
# HDMI<br />
#pcm.!default {<br />
#type hw<br />
#card 1<br />
#device 3<br />
#}<br />
<br />
#ctl.!default {<br />
#type hw<br />
#card 0<br />
#}<br />
<br />
}}<br />
<br />
== Unresolved Issues ==<br />
<br />
* The 64-bit installer in Arch Linux installation ISOs newer than 2013.10.01 causes an immediate system reset<br />
* Syslinux fails to set the bootable flag with {{ic|syslinux-install_update -i -a -m}}. After setting the bootable flag manually in {{ic|fdisk}} and installing Syslinux to the MBR with {{ic|syslinux-install_update -i -m}}, SeaBIOS boots syslinux, but syslinux then complains about a missing OS. Use GRUB for now.</div>Mediamind