Skip to content

Instantly share code, notes, and snippets.

@xthezealot
Created June 7, 2022 18:59
Show Gist options
  • Save xthezealot/c0cb34d05217c956dfc1eaa917ef7f4d to your computer and use it in GitHub Desktop.
Save xthezealot/c0cb34d05217c956dfc1eaa917ef7f4d to your computer and use it in GitHub Desktop.
Kali Linux on Surface Pro 4

Kali Linux on Surface Pro 4

  1. Enter UEFI (keep volume [+] and ⏻ button at power up), disable Secure Boot and make USB first in boot order.

  2. Install Kali with Gnome environment.

  3. Install the Linux Surface kernel.

    wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg
    
    echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" | sudo tee /etc/apt/sources.list.d/linux-surface.list
    
    sudo apt update
    sudo apt install linux-image-surface linux-headers-surface iptsd libwacom-surface intel-microcode linux-firmware
    sudo systemctl enable iptsd
    
    sudo apt install linux-surface-secureboot-mok
    sudo update-grub
  4. Comment out Wayland disabling from Kali.

    nano /usr/lib/systemd/system/gdm.service.d/disable-wayland.conf
    
    rm -f /run/gdm3/custom.conf
  5. Disable fractional scaling by disabling Wayland experimental features. This prevents blurred XWayland apps (like Chromium or Firefox).

    gsettings set org.gnome.mutter experimental-features "[]"
  6. Enable Wayland mode for Firefox.

    mkdir -p ~/.config/environment.d
    
    echo "MOZ_ENABLE_WAYLAND=1" >> ~/.config/environment.d/envvars.conf
  7. Install a complete on-screen keyboard for Gnome: Improved OSK.

  8. Reboot

To fix

  • Cameras (back & front) do not work
  • On-screen keyboard doesn't show up in Chromium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment