🐧

SrfacePro4にDebian12を入れたときにやったこと

2025/02/02に公開

Debianをインストールする

  1. 音量アップボタンと電源を長押しして起動
  2. セキュアブートを無効化する
  3. Boot順を変えUSB Storageをトップに持ってくる
  4. Debianを適当にインストールする

https://learn.microsoft.com/ja-jp/surface/manage-surface-uefi-settings

タッチパネルを有効化するために

カーネルを置き換えてタッチパネルを有効化する

LinuxSurface

https://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup#Debian--Ubuntu

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 libwacom-surface iptsd
sudo apt install linux-surface-secureboot-mok
sudo update-grub
sudo reboot

古いカーネルを消す

sudo apt purge linux-image-6.1.0-*

zramの導入

搭載メモリが4GBと少ないのでzramを導入してswap領域を作成しておく。

sudo apt install zram-tools
/etc/default/zramswap
# Compression algorithm selection
# speed: lz4 > zstd > lzo
# compression: zstd > lzo > lz4
# This is not inclusive of all that is available in latest kernels
# See /sys/block/zram0/comp_algorithm (when zram module is loaded) to see
# what is currently set and available for your kernel[1]
# [1]  https://github.com/torvalds/linux/blob/master/Documentation/blockdev/zram.txt#L86
ALGO=lz4

# Specifies the amount of RAM that should be used for zram
# based on a percentage the total amount of available memory
# This takes precedence and overrides SIZE below
PERCENT=50

# Specifies a static amount of RAM that should be used for
# the ZRAM devices, this is in MiB
#SIZE=256

# Specifies the priority for the swap devices, see swapon(2)
# for more details. Higher number = higher priority
# This should probably be higher than hdd/ssd swaps.
#PRIORITY=100
systemctl restart zramswap.service 

タッチパネルを便利に使う

ドックやアプリケーション一覧を表示する。

GnomeShellExtension

sudo apt install \
gnome-shell-extension-appindicator \
gnome-shell-extension-dashtodock \
gnome-shell-extension-manager

OnScreenKeybord

機能拡張されたスクリーンキーボード。
https://extensions.gnome.org/extension/4413/improved-osk/

バックグラウンドアプリの表示

ExtensionManagerでAppIndicator and KStatusNotifierItem Supportを検索してインストール。
https://extensions.gnome.org/extension/615/appindicator-support/

ここからは完全に自分用

Flatpak

https://flathub.org/ja/setup/Debian

sudo apt install gnome-software-plugin-*
sudo flatpak remote-add --if-not-exists flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo

ATEM Controler

https://openswitcher.org/

sudo flatpak remote-add openswitcher https://flatpak.brixit.nl/brixit.flatpakrepo
sudo flatpak install https://flatpak.brixit.nl/switcher-stable.flatpakref

Discussion