0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ubuntu 22.04 で Xbox Wireless Controller (Series X/S) をペアリングする方法

Posted at

1. はじめに

を参考にXbox Series X/S ワイヤレスコントローラー(モデル 1914) をUbuntu22.04にペアリングしようとしたのですが、初期状態ではBluetoothデバイス一覧に表示されず試行錯誤する羽目になりました。
最終的に無事ペアリングに成功したので、ペアリング方法を書き残しておきます。

2. 原因

Ubuntu 22.04 の標準BlueZ(5.64)と Bluetooth スタックは、Xbox Series X/S コントローラーの Bluetooth LE との互換性が不完全です。
対処方法として、xpadneoドライバが必要です。

というかxpadneoドライバそのものやインストール方法は参考にしたブログにも書いてあるのですが、これをインストールしないとBLEデバイスの認識すらしないとは知りませんでした)

3. 解決方法

3.1. 必要なパッケージのインストール

bash
sudo apt update
sudo apt install dkms linux-headers-$(uname -r) git

3.2. xpadneo ドライバのクローン

bash
cd ~
git clone https://github.com/atar-axis/xpadneo.git
cd xpadneo

3.3. 既存のインストールがある場合はアンインストール

bash
sudo ./uninstall.sh

3.4. xpadneo ドライバのインストール

bash
sudo ./install.sh

注意: "WARNING: kernel uhid module not found" という警告が表示される場合がありますが、実際には uhid モジュールは存在するため無視して問題ありません。

3.5. モジュールの読み込みと Bluetooth の再起動

bash
sudo modprobe uhid
sudo modprobe hid_xpadneo
sudo systemctl restart bluetooth

3.6. コントローラーのペアリング

  1. コントローラーの電源を入れる(Xbox ボタンを押す)

  2. ペアリングモードにする:上部の小さなペアリングボタン(USB-C ポートの横)を LED が高速点滅するまで 3 秒以上長押し

  3. Bluetooth スキャンを開始:

    bash
    bluetoothctl
    
  4. bluetoothctl プロンプトで:

    bash
    [bluetooth]# scan on
    
  5. Xbox Wireless Controller または MAC アドレス(例: A8:8C:3E:00:B9:FB)が表示されたら:

    bash
    [bluetooth]# pair XX:XX:XX:XX:XX:XX
    [bluetooth]# trust XX:XX:XX:XX:XX:XX
    [bluetooth]# connect XX:XX:XX:XX:XX:XX
    [bluetooth]# exit
    

4. ペアリング成功の確認

ペアリングが成功すると、以下のような情報が表示されます:

  • Device Name: Xbox Wireless Controller
  • Modalias: usb:v045Ep0B13d0523
  • UUIDs に HID サービス (00001812) が含まれる
  • Battery Service が利用可能

5. 自動接続の設定

trustコマンドを実行しておくと、次回からコントローラーの Xbox ボタンを押すだけで自動的に接続されます。

6. トラブルシューティング

6.1. モジュールが見つからない場合

bash
# カーネルヘッダーが正しくインストールされているか確認
dpkg -l | grep linux-headers-$(uname -r)

# なければインストール
sudo apt install linux-headers-$(uname -r)

# xpadneo を再インストール
cd ~/xpadneo
sudo ./uninstall.sh
sudo ./install.sh

6.2. Bluetooth サービスの状態確認

bash
sudo systemctl status bluetooth
bluetoothctl show

6.3. xpadneo モジュールが読み込まれているか確認

bash
lsmod | grep hid_xpadneo
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?