UJP - 技術情報1

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

Surface Go 2 にLinux-Surfaceカーネルをインストールする

Surface Go 2 にLinux-Surfaceカーネルをインストールする


概要

更新履歴

  • 2026/04/30 初版

目次

はじめに

  • このドキュメントは,Microsoft Surface Go 2にUbuntu Serverをインストールし,有志が作成しているLinux-surfaceをインストールする.
  • Surface Go 2はUbuntu Serverをインストールすればネットワーク,タッチパネル,タイプカバーキーボードアドの動作は問題なく行えるが,内蔵カメラを使いたいので,今回はLinux-Surfaceカーネルをインストールする.

インストール

  • パッケージのインストール.
sudo apt update🆑
sudo apt install -y curl gnupg2🆑

linux-surfaceリポジトリの追加

  • GPGキーの追加
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🆑
  • 実行すると次のようなレスポンスがあった.
4+1 records in
4+1 records out
2233 bytes (2.2 kB, 2.2 KiB) copied, 0.107591 s, 20.8 kB/s
  • たまにリポジトリの場所が変わることがあるらしい.

リポジトリの追加

echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" \
  | sudo tee /etc/apt/sources.list.d/linux-surface.list
  • 次のようなレスポンス.
deb [arch=amd64] https://pkg.surfacelinux.com/debian release main
  • リポジトリが登録されたか動作確認.
sudo apt update 2>&1 | grep -i surface🆑
apt-cache search linux-surface🆑
  • 次のようなレスポンス.
Get:4 https://pkg.surfacelinux.com/debian release InRelease [1,830 B]
Get:5 https://pkg.surfacelinux.com/debian release/main amd64 Packages [7,948 B]
linux-headers-surface - Meta-package for linux-surface headers.
linux-image-surface - Meta-package for linux-surface kernel images.
linux-surface-secureboot-mok - Secure-boot machine owner key for linux-surface kernels

linux-surfaceカーネルのインストール

sudo apt install -y linux-image-surface linux-headers-surface \
  libwacom-surface iptsd linux-surface-secureboot-mok🆑
  • レスポンスは次のようになる.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libcairomm-1.0-1v5 libsigc++-2.0-0v5 libwacom-bin-surface libwacom-common-surface libwacom2-surface libwacom9-surface
  linux-headers-6.18.7-surface-1 linux-image-6.18.7-surface-1

ー略ー
Setting up linux-surface-secureboot-mok (20251230-1) ...

The secure-boot certificate has been installed to

    /usr/share/linux-surface-secureboot/surface.cer

It will now be automatically enrolled for you and guarded with the password

    surface🈁

To finish the enrollment process you need to reboot, where you will then be
asked to enroll the certificate. During the import, you will be prompted for
the password mentioned above. Please make sure that you are indeed adding
the right key and confirm by entering 'surface'.

登録プロセスを完了するには、再起動が必要です。再起動後、証明書の登録を求められます。インポート中に、上記で説明したパスワードの入力を求められます。正しいキーを入力していることを確認し、「surface」と入力して確定してください。

Note that you can always manage your secure-boot keys, including the one
just enrolled, from inside Linux via the 'mokutil' tool.

Setting up libwacom-common-surface (2.17.0-1) ...
Setting up libwacom9-surface (2.17.0-1) ...

ー略ー

Scanning processor microcode...
Scanning linux images...

Pending kernel upgrade!
Running kernel version:
  6.8.0-110-generic
Diagnostics:
  The currently running kernel version is not the expected kernel version 6.18.7-surface-1.

Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

User sessions running outdated binaries:
 server @ session #1: lxqt-session[2529], xinit[2515]

No VM guests are running outdated hypervisor (qemu) binaries on this host.
  • セキュアブートのパスワードが表示されているのでメモをしておく.
  • ほとんどの場合,surfaceとなっているそう.今回の場合もそうなっていた.
  • grubを更新しOS再起動する.
sudo update-grub
sudo reboot

MOK管理

  • MOK管理画面でパスワードの設定を行う.
    • Surfaceにおける「MOK (Machine Owner Key)」は、セキュアブートを有効にしたまま、Microsoft以外の署名付きブートローダーやカーネル(主にLinux)を起動するための自己署名キー管理機能です。
    • UEFI上でカスタム署名を登録し、安全に外部OSを起動する役割を持ちます。
    • SurfaceにLinux (Ubuntu, Fedora等) をインストールし、セキュアブートを「Microsoft & 3rd Party CA」に設定して起動する際に必要。
    • Surfaceでセキュアブートを完全に無効化せず、安全にLinuxを運用したい場合に必須となる知識です。
  • 再起動すると,次のような青い画面Shim UEFI key management画面が表示される.

  • 10秒くらい放置すると先に進むので,何かキーを押す.
  • Enroll MOKを選択.

  • Continueを選択.

  • Yesを選択.

  • 先ほど表示されたパスワードを入力.
  • 多くの場合はパスワードは"surface".

  • Rebootを選択

カーネルを確認

  • OSが再起動したら採用されているカーネルを確認.
$ uname -r🆑
6.18.7-surface-1🈁
$
  • surfaceカーネルになったことが確認できた.

認識されているデバイスを確認

  • Linux側で,Surface固有のデバイスが認識されているか確認する.
$ cat /proc/bus/input/devices | grep -A 5 -i touch🆑
N: Name="Microsoft Surface Keyboard Touchpad"
P: Phys=usb-0000:00:14.0-7/input3
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:09B5.0007/input/input35
U: Uniq=
H: Handlers=mouse3 event10
B: PROP=5
$
  • キーボードが認識されている.
  • 全ての入力デバイスを確認.
$ cat /proc/bus/input/devices | grep "^N:"🆑
N: Name="Power Button"
N: Name="Lid Switch"
N: Name="AT Translated Set 2 keyboard"
N: Name="ELAN9038:00 04F3:2A1C"🈁
N: Name="ELAN9038:00 04F3:2A1C Stylus"🈁
N: Name="Microsoft Surface Keyboard"
N: Name="Microsoft Surface Keyboard Consumer Control"
N: Name="Microsoft Surface Keyboard System Control"
N: Name="Microsoft Surface Keyboard"
N: Name="Microsoft Surface Keyboard Mouse"
N: Name="Microsoft Surface Keyboard Touchpad"
N: Name="Intel HID events"
N: Name="Intel HID 5 button array"
N: Name="Intel HID switches"
N: Name="Video Bus"
N: Name="HDA Intel PCH Mic"🈁
N: Name="HDA Intel PCH Headphone"
N: Name="HDA Intel PCH HDMI/DP,pcm=3"
N: Name="HDA Intel PCH HDMI/DP,pcm=7"
N: Name="HDA Intel PCH HDMI/DP,pcm=8"
$
  • 認識されている代表的なデバイス.
    • Lid Switch
      • 本体にカバーが閉じられたことを検知する.
    • ELAN9038:00 04F3:2A1C
      • 本体のタッチスクリーン
    • ELAN9038:00 04F3:2A1C Stylus
      • ペン入力
    • HDA Intel PCH Mic
      • マイク
  • カメラがない模様.
  • カメラが認識されているか確認.
$ cam --list 2>&1 | grep -i camera🆑
[4:23:30.846522667] [13245]  WARN IPAManager ipa_manager.cpp:154 No IPA found in '/usr/lib/x86_64-linux-gnu/libcamera'
[4:23:30.846607438] [13245]  INFO Camera camera_manager.cpp:284 libcamera v0.2.0
[4:23:30.967808238] [13251]  WARN CameraSensor camera_sensor.cpp:248 'ov7251 3-0060': Recommended V4L2 control 0x009a0922 not supported
[4:23:30.967839733] [13251]  WARN CameraSensor camera_sensor.cpp:315 'ov7251 3-0060': The sensor kernel driver needs to be fixed
[4:23:30.967849190] [13251]  WARN CameraSensor camera_sensor.cpp:317 'ov7251 3-0060': See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information
[4:23:30.968259455] [13251]  WARN CameraSensorProperties camera_sensor_properties.cpp:262 No static properties available for 'ov7251'
[4:23:30.968282815] [13251]  WARN CameraSensorProperties camera_sensor_properties.cpp:264 Please consider updating the camera sensor properties database
[4:23:30.968292313] [13251]  WARN CameraSensor camera_sensor.cpp:463 'ov7251 3-0060': Failed to retrieve the camera location
[4:23:30.968300547] [13251]  WARN CameraSensor camera_sensor.cpp:485 'ov7251 3-0060': Rotation control not available, default to 0 degrees
Available cameras:
$
  • カメラが認識されてない.Available camerasの後にリストされてない.

libcamera-ipaをインストール

  • libcamera-ipaは,オープンソースのカメラフレームワークのlibcameraにおいて,映像処理アルゴリズムを担うモジュール.
  • Image Processing Algorithmの略.
sudo apt install -y libcamera-ipa🆑
  • インストールを確認.
$ ls /usr/lib/x86_64-linux-gnu/libcamera/🆑
ipa_ipu3.so  ipa_ipu3.so.sign  ipa_vimc.so  ipa_vimc.so.sign  ipu3_ipa_proxy  vimc_ipa_proxy

$

  • カメラが認識されているか確認.
$ cam --list 2>&1 | grep -i camera🆑
[4:39:52.197763824] [14031]  INFO Camera camera_manager.cpp:284 libcamera v0.2.0
[4:39:52.311021866] [14035]  INFO IPU3 ipu3.cpp:1141 Registered Camera[0] "\_SB_.PCI0.LNK0" connected to CSI-2 receiver 0
[4:39:52.312824127] [14035]  INFO IPU3 ipu3.cpp:1141 Registered Camera[1] "\_SB_.PCI0.LNK1" connected to CSI-2 receiver 1
Available cameras:
1: Internal back camera (\_SB_.PCI0.LNK0)🈁
2: Internal front camera (\_SB_.PCI0.LNK1)🈁
$
  • カメラが認識された.
  • フレームが認識されているか確認.
mkdir -p /tmp/cam_test🆑
cam -c 2 --stream=width=640,height=480 --capture=5 --file=/tmp/cam_test/ 2>/dev/null🆑

  • 実行した結果,フレームのファイルが保存されたか確認.
$ ls -la /tmp/cam_test/🆑
Using camera \_SB_.PCI0.LNK1 as cam0
cam0: Capture 5 frames
17652.629766 (0.00 fps) cam0-stream0 seq: 000000 bytesused: 307200/153600
17652.647761 (55.57 fps) cam0-stream0 seq: 000001 bytesused: 307200/153600
17652.664682 (59.10 fps) cam0-stream0 seq: 000002 bytesused: 307200/153600
17652.682506 (56.10 fps) cam0-stream0 seq: 000003 bytesused: 307200/153600
17652.699090 (60.30 fps) cam0-stream0 seq: 000004 bytesused: 307200/153600
total 2268
drwxrwxr-x  2 ujpadmin ujpadmin   4096 Apr 30 19:27 .
drwxrwxrwt 16 root   root     4096 Apr 30 19:27 ..
-rw-rw-r--  1 ujpadmin ujpadmin 460800 Apr 30 19:27 frame-cam0-stream0-000000.bin
-rw-rw-r--  1 ujpadmin ujpadmin 460800 Apr 30 19:27 frame-cam0-stream0-000001.bin
-rw-rw-r--  1 ujpadmin ujpadmin 460800 Apr 30 19:27 frame-cam0-stream0-000002.bin
-rw-rw-r--  1 ujpadmin ujpadmin 460800 Apr 30 19:27 frame-cam0-stream0-000003.bin
-rw-rw-r--  1 ujpadmin ujpadmin 460800 Apr 30 19:27 frame-cam0-stream0-000004.bin
$
  • ファイルがあるので認識された模様.
  • うまく認識されない場合は,次のようなコマンドも実行してみる.
  • Intel IPU3(Image Processing Unit)が認識されているか確認.
$ lsmod | grep ipu3🆑
ipu3_cio2              40960  0
ipu3_imgu             221184  0
ipu_bridge             16384  1 ipu3_cio2
videobuf2_dma_sg       20480  2 ipu3_cio2,ipu3_imgu
videobuf2_v4l2         36864  2 ipu3_cio2,ipu3_imgu
videobuf2_common       73728  5 ipu3_cio2,videobuf2_v4l2,videobuf2_dma_sg,ipu3_imgu,videobuf2_memops
v4l2_fwnode            36864  6 ipu3_cio2,ov7251,ov5693,ov8865
v4l2_async             28672  6 v4l2_fwnode,ipu3_cio2,ov7251,ov5693,dw9719,ov8865
videodev              344064  9 v4l2_async,v4l2_fwnode,ipu3_cio2,ov7251,videobuf2_v4l2,ov5693,dw9719,ov8865,ipu3_imgu
mc                     81920  10 v4l2_async,videodev,ipu3_cio2,ov7251,videobuf2_v4l2,ov5693,videobuf2_common,dw9719,ov8865,ipu3_imgu
$
  • 次のような機能らしい.
    • ipu3_cio2(カメラ入力)
    • ipu3_imgu(画像処理ユニット)
    • ov5693 / ov8865 / ov7251(Surface Go 2 の実カメラセンサー)
    • dw9719(フォーカスドライバ)
    • videobuf2 系
    • v4l2_fwnode / v4l2_async
  • デバイスノードを確認.
$ ls /dev/video*🆑
/dev/video0  /dev/video10  /dev/video12  /dev/video2  /dev/video4  /dev/video6  /dev/video8
/dev/video1  /dev/video11  /dev/video13  /dev/video3  /dev/video5  /dev/video7  /dev/video9
$
  • Surface Go 2 なら通常:
    • /dev/video0(フロント)
    • /dev/video1(リア)

おまけ:linux-surfaceのリポジトリに何が入っているか確認

  • リポジトリを登録したので,何が入っているのか確認する.
$ apt-cache search linux-surface🆑
linux-headers-surface - Meta-package for linux-surface headers.
linux-image-surface - Meta-package for linux-surface kernel images.
linux-surface-secureboot-mok - Secure-boot machine owner key for linux-surface kernels
$ apt-cache search . | grep -i surface🆑
libwacom-bin-surface - Wacom model feature query library (utilities)
libwacom-common-surface - Wacom model feature query library (common data files)
libwacom-surface - Wacom model feature query library (metapackage for Surface devices)
libwacom2-dev-surface - Wacom model feature query library (development files)
libwacom2-surface - Wacom model feature query library (patched for Surface devices)
libwacom9-dev-surface - Wacom model feature query library (development files)
libwacom9-surface - Wacom model feature query library (patched for Surface devices)
linux-headers-6.10.10-surface-1 - Linux kernel headers for 6.10.10-surface-1 on amd64
linux-headers-6.10.3-surface-1 - Linux kernel headers for 6.10.3-surface-1 on amd64
linux-headers-6.10.5-surface-1 - Linux kernel headers for 6.10.5-surface-1 on amd64
linux-headers-6.12.3-surface-1 - Linux kernel headers for 6.12.3-surface-1 on amd64
linux-headers-6.12.3-surface-2 - Linux kernel headers for 6.12.3-surface-2 on amd64
linux-headers-6.13.6-surface-1 - Linux kernel headers for 6.13.6-surface-1 on amd64
linux-headers-6.14.2-surface-1 - Linux kernel headers for 6.14.2-surface-1 on amd64
linux-headers-6.15.1-surface-1 - Linux kernel headers for 6.15.1-surface-1 on amd64
linux-headers-6.15.1-surface-2 - Linux kernel headers for 6.15.1-surface-2 on amd64
linux-headers-6.16.9-surface-1 - Linux kernel headers for 6.16.9-surface-1 on amd64
linux-headers-6.17.1-surface-1 - Linux kernel headers for 6.17.1-surface-1 on amd64
linux-headers-6.17.1-surface-2 - Linux kernel headers for 6.17.1-surface-2 on amd64
linux-headers-6.17.13-surface-1 - Linux kernel headers for 6.17.13-surface-1 on amd64
linux-headers-6.17.13-surface-2 - Linux kernel headers for 6.17.13-surface-2 on amd64
linux-headers-6.18.2-surface-1 - Linux kernel headers for 6.18.2-surface-1 on amd64
linux-headers-6.18.3-surface-1 - Linux kernel headers for 6.18.3-surface-1 on amd64
linux-headers-6.18.3-surface-2 - Linux kernel headers for 6.18.3-surface-2 on amd64
linux-headers-6.18.4-surface-1 - Linux kernel headers for 6.18.4-surface-1 on amd64
linux-headers-6.18.5-surface-1 - Linux kernel headers for 6.18.5-surface-1 on amd64
linux-headers-6.18.7-surface-1 - Linux kernel headers for 6.18.7-surface-1 on amd64
linux-headers-surface - Meta-package for linux-surface headers.
linux-image-6.10.10-surface-1 - Linux kernel, version 6.10.10-surface-1
linux-image-6.10.3-surface-1 - Linux kernel, version 6.10.3-surface-1
linux-image-6.10.5-surface-1 - Linux kernel, version 6.10.5-surface-1
linux-image-6.12.3-surface-1 - Linux kernel, version 6.12.3-surface-1
linux-image-6.12.3-surface-2 - Linux kernel, version 6.12.3-surface-2
linux-image-6.13.6-surface-1 - Linux kernel, version 6.13.6-surface-1
linux-image-6.14.2-surface-1 - Linux kernel, version 6.14.2-surface-1
linux-image-6.15.1-surface-1 - Linux kernel, version 6.15.1-surface-1
linux-image-6.15.1-surface-2 - Linux kernel, version 6.15.1-surface-2
linux-image-6.16.9-surface-1 - Linux kernel, version 6.16.9-surface-1
linux-image-6.17.1-surface-1 - Linux kernel, version 6.17.1-surface-1
linux-image-6.17.1-surface-2 - Linux kernel, version 6.17.1-surface-2
linux-image-6.17.13-surface-1 - Linux kernel, version 6.17.13-surface-1
linux-image-6.17.13-surface-2 - Linux kernel, version 6.17.13-surface-2
linux-image-6.18.2-surface-1 - Linux kernel, version 6.18.2-surface-1
linux-image-6.18.3-surface-1 - Linux kernel, version 6.18.3-surface-1
linux-image-6.18.3-surface-2 - Linux kernel, version 6.18.3-surface-2
linux-image-6.18.4-surface-1 - Linux kernel, version 6.18.4-surface-1
linux-image-6.18.5-surface-1 - Linux kernel, version 6.18.5-surface-1
linux-image-6.18.7-surface-1 - Linux kernel, version 6.18.7-surface-1
linux-image-surface - Meta-package for linux-surface kernel images.
linux-surface-secureboot-mok - Secure-boot machine owner key for linux-surface kernels
surface-control - Control various aspects of Microsoft Surface devices on Linux from the Command-Line
surface-dtx-daemon - Surface Detachment System (DTX) Daemon
edtsurf - triangulated mesh surfaces for protein structures
freesasa - Solvent Accessible Surface Area of biomolecules
libgiftiio-dev - IO library for the GIFTI cortical surface data format - headers
libgiftiio0 - IO library for the GIFTI cortical surface data format
libgts-0.7-5t64 - library to deal with 3D computational surface meshes
libosd-dev - high performance subdivision surface (subdiv) library - development
libosd-doc - high performance subdivision surface (subdiv) library - documentation
libosdcpu3.5.0t64 - high performance subdivision surface (subdiv) library - CPU runtime
libosdgpu3.5.0t64 - high performance subdivision surface (subdiv) library - GPU runtime
libpcl-surface1.14 - Point Cloud Library - surface library
libpsurface-dbg - piecewise linear bijections between triangulated surfaces -- debug symbols
libpsurface-dev - piecewise linear bijections between triangulated surfaces -- development files
libpsurface0t64 - piecewise linear bijections between triangulated surfaces -- shared library
opensubdiv-tools - high performance subdivision surface (subdiv) library - tools
psurface - piecewise linear bijections between triangulated surfaces -- utilities
python3-isosurfaces - Compute isolines/isosurfaces of scalar fields
r-cran-geometry - GNU R mesh generation and surface tesselation
r-cran-misc3d - GNU R collection of 3d plot functions and rgl-based isosurfaces
$
  • このパッケージ一覧だと,surfaceという文字列が入っているものが出てくるので関係ないものが含まれてる.

surface-controlのインストール

  • 便利そうなので?入れてみた.
sudo apt install -y surface-control🆑
  • 使い方の表示.
$ surface --help🆑
Control various aspects of Microsoft Surface devices

Usage: surface [OPTIONS] <COMMAND>

Commands:
  dgpu     Control the discrete GPU
  dtx      Control the latch/dtx-system on the Surface Book 2
  profile  Control or query the current platform profile
  status   Show an overview of the current system status
  help     Print this message or the help of the given subcommand(s)

Options:
  -q, --quiet    Keep output quiet
  -h, --help     Print help
  -V, --version  Print version
$
  • ステータスを取得してみる.
$ surface status🆑
Error: No devices found
$
  • デバイスが見つからない.
  • カーネルログを確認.
$ sudo dmesg | grep -i surface 2>&1 | head -20🆑
[    0.000000] Linux version 6.18.7-surface-1 (root@e61ac5a62644) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP PREEMPT_DYNAMIC Mon Jan 26 00:16:20 UTC 2026
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.18.7-surface-1 root=/dev/mapper/ubuntu--vg-ubuntu--lv ro ro acpi_backlight=native consoleblank=0
[    0.000000] DMI: Microsoft Corporation Surface Go 2/Surface Go 2, BIOS 1.0.31 06/04/2024
[    0.034844] Kernel command line: BOOT_IMAGE=/vmlinuz-6.18.7-surface-1 root=/dev/mapper/ubuntu--vg-ubuntu--lv ro ro acpi_backlight=native consoleblank=0
[    0.866357] usb usb1: Manufacturer: Linux 6.18.7-surface-1 xhci-hcd
[    0.873446] usb usb2: Manufacturer: Linux 6.18.7-surface-1 xhci-hcd
[    1.499629] integrity: Loaded X.509 cert 'Default Company Ltd: linux-surface: 24ef5c444499ba0aa6f2a8bea4258f065fea4ec6'
[    3.744929] usb 1-7: Product: Surface Keyboard
[    3.776340] input: Microsoft Surface Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:045E:09B5.0004/input/input30
[    3.828371] hid-generic 0003:045E:09B5.0004: input,hidraw3: USB HID v1.11 Keyboard [Microsoft Surface Keyboard] on usb-0000:00:14.0-7/input0
[    3.834404] input: Microsoft Surface Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:09B5.0005/input/input31
[    3.887266] input: Microsoft Surface Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:09B5.0005/input/input32
[    3.891177] input: Microsoft Surface Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:09B5.0005/input/input33
[    3.894952] hid-generic 0003:045E:09B5.0005: input,hiddev0,hidraw4: USB HID v1.11 Device [Microsoft Surface Keyboard] on usb-0000:00:14.0-7/input1
[    3.900573] hid-generic 0003:045E:09B5.0006: hiddev1,hidraw5: USB HID v1.11 Device [Microsoft Surface Keyboard] on usb-0000:00:14.0-7/input2
[    3.910937] input: Microsoft Surface Keyboard Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:09B5.0007/input/input34
[    3.913896] input: Microsoft Surface Keyboard Touchpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:09B5.0007/input/input35
[    3.917963] hid-multitouch 0003:045E:09B5.0007: input,hiddev2,hidraw6: USB HID v1.11 Mouse [Microsoft Surface Keyboard] on usb-0000:00:14.0-7/input3
[    9.044648] surface_gpe: no compatible Microsoft Surface device found, exiting
$
  • 「Surface Go 2はSAM(Surface Aggregator Module)を使わないモデルのため、surface statusやsurface profileは使えません。」とのこと.
  • Surface Go 2では,このコマンドは,ほとんど何もできないらしい.

バッテリーの状態確認

  • 次のコマンドで確認可能.
$ upower -i /org/freedesktop/UPower/devices/battery_BAT1🆑
  native-path:          BAT1
  vendor:               SMP
  model:                Uhu
  serial:               0
  power supply:         yes
  updated:              Thu 30 Apr 2026 03:44:11 PM JST (16 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               pending-charge
    warning-level:       none
    energy:              13.2135 Wh
    energy-empty:        0 Wh
    energy-full:         26.1742 Wh
    energy-full-design:  26.81 Wh
    energy-rate:         0 W
    voltage:             7.693 V
    charge-cycles:       30
    percentage:          50%🈁
    capacity:            97.6286%
    technology:          lithium-ion
    icon-name:          'battery-good-charging-symbolic'

$
  • UEFIで50%充電にしているので,それが効果していることが確認できた.
  • ACアダプタを取り外してみた.
$ upower -i /org/freedesktop/UPower/devices/battery_BAT1🆑
  native-path:          BAT1
  vendor:               SMP
  model:                Uhu
  serial:               0
  power supply:         yes
  updated:              Thu 30 Apr 2026 03:50:50 PM JST (4 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              12.8458 Wh
    energy-empty:        0 Wh
    energy-full:         26.1742 Wh
    energy-full-design:  26.81 Wh
    energy-rate:         4.15938 W
    voltage:             7.538 V
    charge-cycles:       30
    time to empty:       3.1 hours🈁
    percentage:          49%🈁
    capacity:            97.6286%
    technology:          lithium-ion
    icon-name:          'battery-good-symbolic'
  History (charge):🈁
    1777531760    49.000    discharging
  History (rate):🈁
    1777531850    4.159    discharging
    1777531820    4.221    discharging
    1777531790    4.167    discharging
    1777531760    4.175    discharging
    1777531753    4.902    pending-charge

$
  • time to emptyという項目が増えて,残り時間が表示されている.
  • Historyというのが表示されて,Unix TimeスタンプとW数がロギングされている模様.
  • percentageを監視して,一定以下になったらシャットダウンかな.

温度・ファンの確認

  • Surface Go 2はファンレスだけど,温度センサーは使えるかも?
  • パッケージをインストール.
$ sudo apt install -y lm-sensors🆑

  • センサーを検出してみる.
$ sudo sensors-detect --auto🆑
# sensors-detect version 3.6.0
# System: Microsoft Corporation Surface Go 2 [1] (laptop)
# Kernel: 6.18.7-surface-1 x86_64
# Processor: Intel(R) Pentium(R) CPU 4425Y @ 1.70GHz (6/142/9)

Running in automatic mode, default answers to all questions
are assumed.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no):
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Hygon Family 18h thermal sensors...                         No
Intel digital thermal sensor...                             Success!🈁
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               Yes
Found unknown chip with ID 0x8987
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no):
Probing for `National Semiconductor LM78' at 0x290...       No
Probing for `National Semiconductor LM79' at 0x290...       No
Probing for `Winbond W83781D' at 0x290...                   No
Probing for `Winbond W83782D' at 0x290...                   No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no):
Sorry, no supported PCI bus adapters found.

Next adapter: Synopsys DesignWare I2C adapter (i2c-0)
Do you want to scan it? (YES/no/selectively):
Adapter doesn't support all probing functions.
Some addresses won't be probed.

Next adapter: Synopsys DesignWare I2C adapter (i2c-1)
Do you want to scan it? (YES/no/selectively):
Adapter doesn't support all probing functions.
Some addresses won't be probed.

Next adapter: Synopsys DesignWare I2C adapter (i2c-2)
Do you want to scan it? (YES/no/selectively):
Adapter doesn't support all probing functions.
Some addresses won't be probed.
Client at address 0x4d can not be probed - unload all client drivers first!

Next adapter: Synopsys DesignWare I2C adapter (i2c-3)
Do you want to scan it? (YES/no/selectively):
Adapter doesn't support all probing functions.
Some addresses won't be probed.

Next adapter: Synopsys DesignWare I2C adapter (i2c-4)
Do you want to scan it? (YES/no/selectively):
Adapter doesn't support all probing functions.
Some addresses won't be probed.

Next adapter: i915 gmbus dpc (i2c-5)
Do you want to scan it? (yes/NO/selectively):

Next adapter: i915 gmbus dpb (i2c-6)
Do you want to scan it? (yes/NO/selectively):

Next adapter: i915 gmbus dpd (i2c-7)
Do you want to scan it? (yes/NO/selectively):

Next adapter: AUX A/DDI A/PHY A (i2c-8)
Do you want to scan it? (yes/NO/selectively):

Next adapter: AUX B/DDI B/PHY B (i2c-9)
Do you want to scan it? (yes/NO/selectively):

Next adapter: AUX C/DDI C/PHY C (i2c-10)
Do you want to scan it? (yes/NO/selectively):


Now follows a summary of the probes I have just done.

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)

Unloading cpuid... OK

$
  • Intel digital thermal sensorが入っている.(認識できた)
  • sensorsコマンドでデータ取得.
$ sensors🆑
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +40.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:        +40.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:        +39.0°C  (high = +100.0°C, crit = +100.0°C)

pch_skylake-virtual-0🈁
Adapter: Virtual device
temp1:        +37.0°C

BAT1-acpi-0🈁
Adapter: ACPI interface
in0:           7.69 V
curr1:         0.00 A

iwlwifi_1-virtual-0🈁
Adapter: Virtual device
temp1:        +39.0°C

ucsi_source_psy_USBC000:001-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:         0.00 A  (max =  +0.00 A)

acpitz-acpi-0🈁
Adapter: ACPI interface
temp1:        +33.0°C

$
  • 次のようなデータとのこと.
    • coretemp-isa-0000
      • CPUコアそれぞれの温度.
      • Adapter: ISA adapter
        • Surface Go 2の場合は実際のISAバスではなく、CPUに内蔵されたハードウェアモニタリングチップへのアクセスに使われています
    • pch_skylake-virtual-0
      • PCH(Platform Controller Hub)の温度センサーです。CPUとは別チップで、USB・SATA・PCIeなどの入出力を管理するチップの温度です。Surface Go 2ではCPUに統合されています。
    • BAT1-acpi-0
      • バッテリーの温度センサーです。ACPIインターフェース経由でバッテリー自体の温度を取得しています。
    • iwlwifi_1-virtual-0
      • Wi-Fiチップの温度センサー
    • ucsi_source_psy_USBC000:001-isa-0000
      • USB-Cポートの電源管理チップの温度センサーです。充電中に発熱するUSB-Cコントローラーの温度を監視
    • ACPI interface
      • ACPI(電源管理)経由で取得するセンサーで、Surface Go 2の場合はCPUやバッテリーの温度がここに出ます
    • acpitz-acpi-0
      •  CPUやチップセット周辺のマザーボード全体の温度を大まかに監視しています。
      • coretempがCPUコアの精密な温度なのに対し、こちらはシステム全体の熱環境を把握するための値です。

CPUガバナー

  • CPUの動作周波数をどう制御するかのポリシーの確認.
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor🆑
powersave
$ echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor🆑
powersave
$ echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor🆑
performance
$
  • 設定値的にはこんな感じ.
ガバナー 動作 向いている用途
powersave 常に最低周波数で動作 省電力・発熱抑制
performance 常に最高周波数で動作 高負荷作業
schedutil 負荷に応じて自動調整(カーネル推奨) 通常使用
ondemand 負荷に応じて自動調整(旧来) 通常使用

  • 現在選択できるガバナーの一覧.
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors🆑
performance powersave
  • 現在のガバナー.
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor🆑
performance
$
  • ガバナーを変更するには.
# 全コアを一括で変更(例: powersave)
echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor🆑

# 確認
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor🆑
  • これだと再起動すると戻る.
  • 永続的に設定するには,以下のファイルを変更.
sudo apt install -y cpufrequtils🆑
sudo vi /etc/default/cpufrequtils🆑
  • 以下を追記.
GOVERNOR="powersave"
  • サービスのリスタート.
sudo systemctl restart cpufrequtils🆑
  • 現在設定を確認.
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governo
  • この部分はまた後で.

広告スペース
Google