Skip to content

Latest commit

 

History

History
272 lines (185 loc) · 5.36 KB

File metadata and controls

272 lines (185 loc) · 5.36 KB

pixel_native

Running Ubuntu on the Chromebook Pixel 2 LS (Samus) natively.

Ubuntu 16.04

Install ectool

git clone https://chromium.googlesource.com/chromiumos/platform/ec
cd ec
sed -i 's/\(COMMON_WARN =\)/\1 -Wno-error=maybe-uninitialized/' Makefile.toolchain
make BOARD=samus build/samus/util/ectool

Install raphael/linux-samus kernel

  • Check current kernel

    $ uname -a
    Linux neutrino 4.8.0-22-generic #24-Ubuntu SMP Sat Oct 8 09:15:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    
  • Install linux-samus kernel

    git clone --depth=1 https://github.com/raphael/linux-samus
    cd linux-samus/build/debian
    sudo dpkg -i *.deb
    
    sudo update-grub
    sudo shutdown -r now
    
  • Verify new kernel

    $ uname -a
    Linux neutrino 4.9.6-ph+ #17 SMP Fri Jan 27 11:38:18 PST 2017 x86_64 x86_64 x86_64 GNU/Linux
    

Fan control

Dependencies:

  • "Install ectool" section

Steps:

  • Turn off all fans
    sudo ~/env/ec/build/samus/util/ectool --interface=lpc fanduty 0
    

External display

X11 acceleration

Dependencies:

Steps:

  • Install dependencies

    $ sudo apt-get install xserver-xorg-video-intel
    
  • Run the setup script

    $ cd ~/env/linux-samus/scripts/setup/xorg
    $ ./xaccel.sh
    

Trackpad

Dependencies:

Steps:

  • RUn the enable-atmel.sh script

    cd ~/env/linux-samus/scripts/setup/touchpad/
    
    ./enable-atmel.sh
    
  • Install and configure touchpad-cmt-samus

    sudo add-apt-repository --remove ppa:longsleep/pixel-extras
    sudo apt-get update
    sudo apt-get install libevdevc libgestures xf86-input-cmt
    
    sudo mv /usr/share/X11/xorg.conf.d/50-synaptics.conf /usr/share/X11/xorg.conf.d/50-synaptics.conf.old
    sudo cp /usr/share/xf86-input-cmt/50-touchpad-cmt-samus.conf /usr/share/X11/xorg.conf.d/
    
  • Verify configuration

    cat /usr/share/X11/xorg.conf.d/50-touchpad-cmt-samus.conf
    cat /usr/share/X11/xorg.conf.d/40-touchpad-cmt.conf
    
    xinput list-props 'Atmel maXTouch Touchpad'
    

Keyboard

Laptop keyboard

ll X/pixel_native/keyboards
cat ~/.xsessionrc
xkbcomp ${HOME}/env/keyboard/server-0.xkb.pixel_ubuntu_samuskernel_mod ${DISPLAY} 

External keyboard

References

Display brightness controls

Dependencies:

Steps:

  • Use linux-samus

    cd ~/env/linux-samus/scripts/setup/brightness/
    
  • Run the setup script

    ./setup.systemd.sh
    
  • Enable the service

    systemctl enable enable-brightness.service
    
  • Configure keyboard keys via i3. Add to ~/.config/i3/config:

    bindsym XF86MonBrightnessUp exec brightness --increase
    bindsym XF86MonBrightnessDown exec brightness --decrease
    

Keyboard LED

Dependencies:

  • All steps in "Display brightness controls"

Scripts:

  • Turn off keyboard LED
    echo 0 > "/sys/class/leds/chromeos::kbd_backlight/brightness"
    

Ubuntu 18.04

Keyboard

Same as 16.04

Display brightness controls

Same as 16.04.

Keyboard LED

Same as 16.04.

Trackpad

The default libinput trackpad driver seems to work well.

Get info:

  • xinput
    
  • xinput list-props 'Atmel maXTouch Touchpad'
    

Test configuration parameters live:

  • xinput set-prop 'Atmel maXTouch Touchpad' 'libinput Accel Speed' 0.8
    

Configuration:

  • The default config already exists:

    cat /usr/share/X11/xorg.conf.d/40-libinput.conf
    
  • An override file exists with custom configs:

    cat X/pixel_native/50-touchpad-libinput-martin.conf
    
  • Install the override config via:

    sudo cp X/pixel_native/50-touchpad-libinput-martin.conf /usr/share/X11/xorg.conf.d/
    

Audio

  • Enable the audio

    ./home/martin/env/linux-samus/scripts/setup/audio/enable-audio.sh
    ./home/martin/env/linux-samus/scripts/setup/audio/enable-speakers.sh
    
  • Create symlinks

    sudo ln -s ~/env/linux-samus/scripts/setup/audio/volume-up.sh /usr/local/bin/volume-up
    sudo ln -s ~/env/linux-samus/scripts/setup/audio/volume-down.sh /usr/local/bin/volume-down
    sudo ln -s ~/env/linux-samus/scripts/setup/audio/mute-toggle.sh /usr/local/bin/volume-mute-toggle