Acer Chromebox 安裝 Elementary OS(chrubuntu) 後的一些調整

參考網站:
How to Install Elementary OS Luna (linux) on an HP Chromebook 14 – Reality Equation

1. 升級系統核心,因為目前系統的核心比較舊,所以進行升級
$ uname -r
3.2.0-75-generic-pae
到網站上下載新的核心 Index of /~kernel-ppa/mainline
因為我是使用 x86 的版本,所以下載 i386 的版本
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-image-3.14.1-031401-generic_3.14.1-031401.201404141220_i386.deb -P ~/Downloads
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-headers-3.14.1-031401_3.14.1-031401.201404141220_all.deb -P ~/Downloads
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.14.1-trusty/linux-headers-3.14.1-031401-generic_3.14.1-031401.201404141220_i386.deb -P ~/Downloads

2. 進行升級
$ sudo dpkg -i ~/Downloads/linux*

3. 系統重新開機
$ sync;sync;sync;sync;shutdown -r now
升級後核心版本
$
uname -r
3.14.1-031401-generic
[@more@]4. 進行 xserver-xorg 升級
$ sudo apt-get install xserver-xorg-lts-raring

5. 修正一些問題
/etc/pm/sleep.d/ 下建立 05_Sound
# sudo vim /etc/pm/sleep.d/05_Sound
#!/bin/sh
# File: “/etc/pm/sleep.d/05_Sound”.
case “${1}” in
hibernate|suspend)
# 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
;;
resume|thaw)
# 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

6. 更改檔案權限
$ sudo chmod +x /etc/pm/sleep.d/05_Sound

7. 在 /etc/rc.local 增加下列幾行
$ sudo vim /etc/rc.local
echo EHCI > /proc/acpi/wakeup
echo HDEF > /proc/acpi/wakeup
echo XHCI > /proc/acpi/wakeup
echo LID0 > /proc/acpi/wakeup
echo TPAD > /proc/acpi/wakeup
echo TSCR > /proc/acpi/wakeup
echo 300 > /sys/class/backlight/intel_backlight/brightness
rfkill block bluetooth
/etc/init.d/bluetooth stop

8. 修改  /etc/default/grub
$ sudo vim /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
改成
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash add_efi_memmap boot=local noresume noswap i915.modeset=1 tpm_tis.force=1 tpm_tis.interrupts=0 nmi_watchdog=panic,lapic"

9. 在終端機下執行
$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.14.1-031401-generic
Found initrd image: /boot/initrd.img-3.14.1-031401-generic
Found linux image: /boot/vmlinuz-3.8.0-44-generic
Found initrd image: /boot/initrd.img-3.8.0-44-generic
Found linux image: /boot/vmlinuz-3.2.0-75-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-75-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-51-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-51-generic-pae
Found unknown Linux distribution on /dev/sda3
Found unknown Linux distribution on /dev/sda5
done
$ sudo update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.14.1-031401-generic
Found initrd image: /boot/initrd.img-3.14.1-031401-generic
Found linux image: /boot/vmlinuz-3.8.0-44-generic
Found initrd image: /boot/initrd.img-3.8.0-44-generic
Found linux image: /boot/vmlinuz-3.2.0-75-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-75-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-51-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-51-generic-pae
Found unknown Linux distribution on /dev/sda3
Found unknown Linux distribution on /dev/sda5
done

10. 修正 TouchPad,因為我使用的是 Chromebox,所以這部分沒有測試
下載
cros-haswell-modules.sh
$ sudo wget https://googledrive.com/host/0B0YvUuHHn3MndlNDbXhPRlB2eFE/cros-haswell-modules.sh

11. 修改 cros-haswell-modules.sh
$ vim ~/Downloads/
cros-haswell-modules.sh

# Grab Ubuntu kernel source
apt-get source linux-image-$mykern
cd $mykernver
改成
# Grab Ubuntu kernel source
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.12.5.tar.xz
tar -xJf linux-3.12.5.tar.xz
cd linux-3.12.5

12. 執行 cros-haswell-modules.sh
$ sudo bash cron-haswell-modules.sh

13. 建立 /usr/share/X11/xorg.conf.d 目錄
$ sudo mkdir /usr/share/X11/xorg.conf.d

14. 在 /usr/share/X11/xorg.conf.d 目錄下建立 50-synaptics.conf
$ sudo vim
/usr/share/X11/xorg.conf.d/50-synaptics.conf
加入下面的內容
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Option "FingerLow" "10"
        Option "FingerHigh" "16"
EndSection

15. 完成收工,重新啟動電腦