Chromebook Pixel 2015 上的 Linux 4.16
This repository contains packages for Debian and Arch Linux that installs the Linux kernel v4.10 with a config that is somewhat optimized for the Chromebook Pixel 2015.
As of v4.9 there is no need to patch the kernel sources to get sound support.
Current kernel version: v4.16.13
The easiest way to get going is to install the packages if you are running Ubuntu, Debian or Arch Linux.
$ git clone --depth=1 https://github.com/raphael/linux-samus
$ cd linux-samus/build/debian
$ sudo dpkg -i *.debInstall the linux-samus4 package from the AUR:
$ yaourt -S linux-samus4The entire kernel patched tree is located under build/linux, compile and install using the usual
instructions for installing kernels. For example:
$ git clone --depth=1 https://github.com/raphael/linux-samus
$ cd linux-samus/build/linux
$ make nconfig
$ make -j4
$ sudo make modules_install
$ sudo make installNOTE the steps above are just the standard kernel build steps and may differ depending on your distro/setup.
Once installed reboot and load the kernel.
The scripts needed to enable audio and switch between the speakers and
headphones are provided in the scripts/setup/audio folder.
scripts/setup/audio/enable-audio.shscripts/setup/audio/enable-speakers.shscripts/setup/audio/enable-headphones.shscripts/setup/audio/mute-toggle.shscripts/setup/audio/volume-down.shscripts/setup/audio/volume-up.shTo get sound working, you must unwind some of the previous samus sound settings:
/etc/pulse/default.pa and ensure these lines are commentted out:#load-module module-alsa-sink device=hw:0,0
#load-module module-alsa-source device=hw:0,1
#load-module module-alsa-source device=hw:0,2/opt/samus and /usr/share/alsa/ucm/bdw-rt5677 /etc/acpi/handler.sh and remove any samus entriesNOTE: settings to toggle headphone/speaker during plug) and unplug) events still need to be implemented.
Since Linux 4.3 the Atmel chip needs to be reconfigured to guarantee that the touchpad works.
See issue #73 for details. The linux-samus/scripts/setup/touchpad directory contains a script
that does the reconfig:
$ cd linux-samus/scripts/setup/touchpad
$ ./enable-atmel.shThis is only needed to be run once.
Chrome OS sets up a number of useful key mappings, such as:
The keyboard.sh script will enable these mappings under standard Linux,
and it will also set up mappings for special functions that do not exist
on a standard 101-key PC keyboard:
i.e. the Chromebook's F-keys will produce F1-F10 without the Search modifier, and perform the marked functions with the Search modifier. F1-F3 can be handled by apps (such as a web browser) while F6-F10 tend to be handled by the desktop environment. The latter keys were tested with Xfce.
This will add a command to ~/.xsessionrc that enables the mappings on login:
$ cd linux-samus/scripts/setup/keyboard
$ ./keyboard.shTo enable X11 acceleration run the xaccel.sh script:
$ cd linux-samus/scripts/setup/xorg
$ ./xaccel.shThe script scripts/setup/brightness/brightness can be used to control the
brightness level.
$ cd scripts/setup/brightness
$ ./brightness --help
Increase or decrease screen brightness
Usage: brightness --increase | --decreasePut scripts/setup/brightness in your path and bind the F6 key to
brightness --decrease and the F7 key to brightness --increase for an
almost native experience.
Similarly the script script/setup/brightness/keyboard_led can be used to
control the keyboard backlight, bind the ALT-F6 key to
keyboard_led --decrease and ALT-F7 to keyboard_led --increase.
Both these scripts require write access to files living under /sys which
get mounted read-only for non-root users on boot by default. If your system
uses systemd (e.g. ArchLinux) then the file
script/setup/brightness/enable-brightness.service contains the definition
for a systemd service that makes the files above writable to non-root user.
Run systemctl enable enable-brightness.service for the service to run on boot.
./setup.systemd.shThe same directory also contains setup.systemd.sh. When executed, it copies
scripts to /usr/local/bin and configures systemd to run the script
enable-brightness.sh on boot.
./setup.openrc.shThe same directory also contains setup.openrc.sh. When executed, it copies
scripts to /usr/local/bin and configures OpenRC to run the script
enable-brightness.sh on boot using the local service.
This repo exists so that we can all benefit from one another's work. Thomas Sowell's linux-samus repo was both an inspiration and help in building it. The hope is that others (you) will also feel inspired and contribute back. PRs are encouraged!
暂无开放 Issues,或尚未同步最近议题。