「DisplayLink」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎トラブルシューティング: USB 2.0 DisplayLink が動作しないを翻訳して追加)
150行目: 150行目:
 
==トラブルシューティング==
 
==トラブルシューティング==
   
=== Not working configuration ===
+
=== 動作しない設定 ===
   
  +
これらは、表示設定 (XFCE4 パッケージに含まれています) と外部ツール - {{pkg|arandr}} を使用して [[Xfce]] でテストされています。XFCE4 の表示設定はクラッシュする可能性が高いため、ARandR が役立つ可能性があります。
These are tested on [[Xfce]] using Display settings (included in XFCE4 package) and external tool - {{pkg|arandr}}. XFCE4 Display settings are likely to crash, so ARandR might help.
 
   
  +
USB 経由で DisplayLink デバイスをコンピュータに接続すると、コンピュータのディスプレイ設定にモニタが表示されるはずです。試してみるべきトラブルシューティング手順がいくつかあります:
When you connect display link device via USB to your computer, the computer should show monitors in Display settings. There are few troubleshooting steps that you should try:
 
   
 
* [[#X ディスプレイの設定|X ディスプレイの設定]]をチェックしてください。外部モニターが認識されている場合、以下のコマンドを試してみてください:
 
* [[#X ディスプレイの設定|X ディスプレイの設定]]をチェックしてください。外部モニターが認識されている場合、以下のコマンドを試してみてください:

2024年1月29日 (月) 05:59時点における版

Linux における DisplayLink デバイスのサポートはまだ実験的です。使用するのに成功している人もいますが、簡単に使えるわけではなく動作するという保証もありません。このページに記載しているのは DisplayLink で外付けモニターを使用する方法の中でも最も成功率が高いとされる方法です。

USB 3.0 で接続しても、DisplayLink で接続されたモニターには DisplayPort などで接続されたモニターよりも大きな遅延が発生する可能性があることに注意してください。

インストール

USB 2.0 DL-1x5, DL-1x0 デバイス

DisplayLink のカーネル DRM ドライバーは udl です。初期の udlfb ドライバーを書き直したドライバーになります。udl を利用すれば Xrandr を使って DisplayLink モニターを設定することができます。

linux 4.14.9-1 以上であれば特に設定をしなくても機能するはずです。古いバージョンのパッケージを使っている場合やカーネルコンフィグで CONFIG_FB_UDL=m と設定している場合、旧式のカーネルモジュールである udlfbブラックリストに追加する必要があります。

USB 3.0 DL-6xxx, DL-5xxx, DL-41xx, DL-3xxx デバイス

  1. AUR から displaylinkAUR ドライバーをインストールしてください。udl ドライバーと同じように Xrandr を使って DisplayLink モニターを設定できます。
  2. systemctl を使って displaylink.service有効化してください。
  3. AccelMethod "none" かつ MatchDriver "evdi" というオプションで "modesetting" ドライバーを使用するように設定します。

以下の内容でファイルを作成します:

/usr/share/X11/xorg.conf.d/20-evdidevice.conf
Section "OutputClass"
	Identifier "DisplayLink"
	MatchDriver "evdi"
	Driver "modesetting"
	Option  "AccelMethod" "none"
EndSection

設定を反映するには再起動が必要です。evdi-gitAUR パッケージのインストールが必要かもしれません。

X ディスプレイの設定

ドライバーのインストール後、以下を実行:

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x49 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 8 associated providers: 0 name:Intel
Provider 1: id: 0x13c cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting

上記の出力で、Provider 0 がシステムの標準のグラフィックプロバイダ (Intel) であること、そして Provider 1 (modesetting) が DisplayLink プロバイダであることが確認できます。DisplayLink デバイスを使うには、Provider 1 を Provider 0 に接続します:

$ xrandr --setprovideroutputsource 1 0

xrandr によって DVI 出力が追加されるので、これで通常通り xrandr で使用することができます。実験的ですがホットプラグもサポートしているので、ちゃんと動作すれば非常に簡単にセットアップできたことになります。上手く動作しない場合、以下の設定が必要になります。

設定

以下の設定手順は X サーバーを既に立ち上げる準備が整っているのが前提で、後は既存のセットアップにモニターを追加するだけという状態になっている必要があります。

フレームバッファデバイスのロード

DisplayLink デバイスがシステムに認識される前に、udl カーネルモジュールをロードしなくてはなりません。ロードするには、次を実行:

# modprobe udl

DisplayLink デバイスを接続すると、表示に何らかの変化が現れるはずです。緑色の画面が出るのが普通ですが、他の表示がされることもよくあるので気にする必要はありません。最も大事なのは、dmesg の出力で以下のように DisplayLink デバイスが認識されたのを確認できることです:

usb 2-1.1: new high-speed USB device number 7 using ehci-pci
usb 2-1.1: New USB device found, idVendor=17e9, idProduct=03e0
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.1: Product: Lenovo LT1421 wide
usb 2-1.1: Manufacturer: DisplayLink
usb 2-1.1: SerialNumber: 6V9BBRM1
[drm] vendor descriptor length:17 data:17 5f 01 00 15 05 00 01 03 00 04
udl 2-1.1:1.0: fb1: udldrmfb frame buffer device
[drm] Initialized udl 0.0.1 20120220 on minor 1

さらに、プライマリディスプレイに既にフレームバッファが存在する場合、/dev/dev/fb1 のような新しい fb デバイスが作られます。

起動時に自動的に udl をロードするには、以下の内容で /etc/modules-load.d/udl.conf ファイルを作成してください:

/etc/modules-load.d/udl.conf
udl

カーネルモジュールのロードに関してはカーネルモジュール#ロードを参照。

X サーバーの設定

xrandr やデスクトップ環境のディスプレイ設定 UI を使って udldisplaylink ドライバーを使用する USB モニターを設定してください。

xrandr

ドライバーをロードすると、DisplayLink モニターがプロバイダの出力に表示されます:

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x43 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 1 name:Intel
Provider 1: id: 0xcb cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 1 name:modesetting

上記の例では、Provider 1 が DisplayLink デバイスで、Provider 0 がデフォルトディスプレイです。xrandr --current を実行すると利用可能なスクリーンのリストが表示されます:

$ xrandr --current
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 8192 x 8192
LVDS1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1600x900       60.0*+   40.0  
   1440x900       59.9  
   1360x768       59.8     60.0  
   1152x864       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
DVI-1-0 connected (normal left inverted right x axis y axis)
   1366x768       60.0 +
   1368x768_59.90   59.9  
  1368x768_59.90 (0xd0)   85.7MHz
        h: width  1368 start 1440 end 1584 total 1800 skew    0 clock   47.6KHz
        v: height  768 start  769 end  772 total  795           clock   59.9Hz

上記のコマンドで DisplayLink のスクリーンが表示されない場合、DisplayLink をメイン GPU にオフロードする必要があります:

$ xrandr --setprovideroutputsource 1 0

スクリーンが使えるようになったら、Xrandr を参照して設定してください。自動で設定する方法は displaylink.sh を参照。

起動時に DVI 出力を有効化

大抵の場合 DisplayLink プロバイダはメインのプロバイダに自動的に接続されません。そのため起動時に DVI 出力デバイスが使えません。X が起動したときに自動的にコマンドを実行するようにすることでウィンドウマネージャで自動的にディスプレイを設定できます。

デスクトップマネージャのスタートアップ設定を編集して以下のようなコマンドを追加してください:

$(xrandr --listproviders | grep -q "modesetting") && xrandr --setprovideroutputsource 1 0

例えば、SDDM のスタートアップ設定ファイルは /usr/share/sddm/scripts/Xsetup です。

~/.xprofile に上記のコマンドを記述すると一部のウィンドウマネージャでディスプレイの設定が破壊されるので注意してください。何かディスプレイに出力されるまえにコマンドを実行する必要があります。

ノート: 別のプロバイダが存在する場合、インデックスの代わりにプロバイダの名前を指定してください。DisplayLink デバイスの名前は modesetting になります。

displaylink と nvidia/nouveau ドライバーの切り替え

displaylink バージョン 1.3.54-1 現在、optimus ノートパソコンで displaylink デバイスと nvidia/nouveau ドライバーを同時に切り替えることは不可能です。intel GPU で displaylink デバイスを使えるようにするには、設定ファイルを作成する必要があります。しかしながら、設定ファイルを作成した場合、primusrun を使うことができなくなります。Bumblebee サービスを実行しても、機能しません。また、ノートパソコンのファンが音を立てて温度が急激に上昇します。nvidia ドライバーに戻したい場合、ファイルの記述をコメントアウトして再起動してください。

dl-switchAUR パッケージをインストールして displaylink を有効化するメニューエントリをブートローダーに追加することで切り替えを楽にすることができます。例えば rEFInd ブートローダーの場合:

/boot/EFI/refind/refind.conf
...
submenuentry "Boot with DisplayLink workaround" {
    add_options "systemd.unit=displaylink.target"
}
...

起動時に、普通に起動するか displaylink を使うように起動するか選択できます。

ディスクリートのビデオカードでどちらのドライバーが使われているか確認するには lspci -nnk -s xx:xx.x を実行してください (xx:xx.x は nvidia gpu の pci id に置き換えてください)。

トラブルシューティング

動作しない設定

これらは、表示設定 (XFCE4 パッケージに含まれています) と外部ツール - arandr を使用して Xfce でテストされています。XFCE4 の表示設定はクラッシュする可能性が高いため、ARandR が役立つ可能性があります。

USB 経由で DisplayLink デバイスをコンピュータに接続すると、コンピュータのディスプレイ設定にモニタが表示されるはずです。試してみるべきトラブルシューティング手順がいくつかあります:

  • X ディスプレイの設定をチェックしてください。外部モニターが認識されている場合、以下のコマンドを試してみてください:
xrandr --setprovideroutputsource 1 0
xrandr --setprovideroutputsource 2 0
xrandr --setprovideroutputsource 3 0
...
  • displaylink.service を再起動してみてください。
  • USB ケーブルを再接続してみてください。
  • udl ドライバーがロードされていること、モニターが接続されていることを確認してください。

画面の再描画が壊れている

カーネルドライバーとして udl を使用するとモニターが機能しなくなり、マウスを移動したりウィンドウを変形したときだけしか画面が更新されない場合、スクリーンの modeline の設定が間違っています。以下のようなコマンドで適切な modeline を取得できます:

gtf 1366 768 59.9

1366768 はモニターの横・縦の解像度に、59.9 はリフレッシュレートに置き換えてください。modeline を使うには、以下のように xrandr で新しいモードを作成:

xrandr --newmode "1368x768_59.90"  85.72  1368 1440 1584 1800  768 769 772 795  -HSync +Vsync

そして Xrandr に追加:

xrandr --addmode DVI-0 1368x768_59.90

それから DisplayLink モニターで上記のモードを使うようにモニターを設定することで、再描画問題は解決するはずです。別のモードを使用する方法は Xrandr のページを見てください。

問題が解決しない場合、コンポジタを使うことで解決する場合があります。xcompmgrpicom を使うことで問題を低減できます。

Ghosting

If you experience ghosting caused by moving the cursor around, it might happen that your compositor configuration is causing the problem. Changing settings may give you a working setup.

GNOME 3 で DisplayLink のリフレッシュレートが異常に低い

DisplayLink を設定したとたんにデスクトップが遅くなる場合、背景画像をシンプルに、例えば真っ黒にするなど設定してみてください。

All displays' are capped to 1 FPS when disabling builtin screen

Applying the patch from https://gitlab.freedesktop.org/xorg/xserver/-/issues/1028#note_504826 to xorg-server seems to fix the problem.

Google Chrome や Webkit2 ベースのアプリケーションで再描画が遅くなったり反応しなくなる

ハードウェアアクセラレーションのバグが関係しています。displaylink の画面で glxgears を実行したときに 1fps となることがあります。いまのところ完全な解決方法はありませんが、ハードウェアアクセラレーションをオフにすることで一時的な対応になります。

ハードウェアアクセラレーションのオプションが存在しないアプリケーションの場合、LIBGL_ALWAYS_SOFTWARE=1 環境変数を使うことで同じく回避できます。

displaylink の画面を有効化できない

DisplayLink デバイスに接続されたモニターが認識されるのに、設定を適用すると無効になってしまう場合、nouveau モジュールをブラックリストに追加して再起動してみてください:

/etc/modprobe.d/nouveau.conf
blacklist nouveau
options nouveau modeset=0

サスペンドの問題

Displaylink はサスペンド後は機能しません。一度 displaylink の usb ケーブルを抜いてから再度接続してください。

DisplayLink is not working when usb hot plugged

To be able to use DisplayLink monitors, its usb cable should be attached to laptop during boot time. Otherwise it can behave like they are available and mouse can be moved there, but its picture is frozen, even with correct configuration (see workaround 1). If it was not attached at boot time, attach it and reboot.

X をアップグレードした後に Intel GPU で DisplayLink ドライバーが機能しなくなる

こちらのページ に書かれているように、X ウィンドウサーバーを 1.18.3 以上に更新するとデフォルトで DisplayLink が使えなくなります。内蔵の Intel GPU を使っている環境、あるいは内蔵の Intel GPU とディスクリートの GPU を使っている環境で発生する問題です。以下の解決方法が存在します。

フォールバックとして古い intel ドライバーを使用する

デフォルトの "modesetting" の代わりに内蔵 GPU で "intel" ドライバーを使用してください。

以下の内容でファイルを作成します:

/usr/share/X11/xorg.conf.d/20-displaylink.conf
Section "Device" 
  Identifier "Intel Graphics"
  Driver "intel"
EndSection

設定を反映するには再起動が必要です。

evdi-gitAUR パッケージのインストールが必要かもしれません。

modesetting で一時的に PageFlip を無効化する

"modesetting" ドライバーを使用したい場合、ページフリップを無効化することで解決します。以下の内容でファイルを作成してください:

/usr/share/X11/xorg.conf.d/20-displaylink.conf
Section "Device"
  Driver "modesetting"
  Option "PageFlip" "false"
EndSection 

Displays disconnect at random intervals when using the Dell D6000 docking station

User's have reported that when using the Dell D6000 docking station, their display(s) may disconnect at random intervals during usage. This will require physically reconnecting the dock in order to reinitialise the displays.

This issue appears to be caused by PulseAudio's module-suspend-on-idle module, which automatically suspends sinks/sources on idle.

To disable loading of the module-suspend-on-idle module, comment out the following line in the configuration file in use (~/.config/pulse/default.pa or /etc/pulse/default.pa):

/etc/pulse/default.pa
### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

Only 1 Display is recognized after boot

In case multiple displays are connected to a DisplayLink Docking station, but only 1 is recognized after bootup, a possible fix is to force evdi to search for multiple displays at boot by adding the evdi module to /etc/modules-load.d/evdi.conf and "options evdi initial_device_count=2" to /etc/modprobe.d/dkms.conf

DisplayLink and NVIDIA dGPU on X11 (Optimus+DL)

If a laptop using NVIDIA Optimus is in a more permanent setting (using X11), it is nice to permanently set video outputs to use the dGPU. nvidia-xconfig might produce the following:

/etc/X11/xorg.conf
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

# ...
# Keyboard0
# Mouse0
# ...

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Even after installing both evdiAUR and displaylinkAUR packages, the DisplayLink connected displays still might not appear. Manually, we can instruct Xorg to use the modesetting plugin with the video interface given by the displaylinkAUR driver.

1. Identify which DRI device

The easiest way to identify which device is to run ls -al /dev/dri/by-path

$ ls -al /dev/dri/by-path
total 0
drwxr-xr-x 2 root root 160 May 11 19:10 .
drwxr-xr-x 3 root root 180 May 10 16:03 ..
lrwxrwxrwx 1 root root   8 May 10 16:03 pci-0000:00:02.0-card -> ../card0
lrwxrwxrwx 1 root root  13 May 10 16:03 pci-0000:00:02.0-render -> ../renderD128
lrwxrwxrwx 1 root root   8 May 11 19:10 pci-0000:01:00.0-card -> ../card1
lrwxrwxrwx 1 root root  13 May 10 16:03 pci-0000:01:00.0-render -> ../renderD129
lrwxrwxrwx 1 root root   8 May 10 16:03 platform-evdi.0-card -> ../card2
lrwxrwxrwx 1 root root   8 May 10 16:03 platform-evdi.1-card -> ../card3

As you can see, the first evdiAUR device is /dev/dri/card2

2. Add the following to the Xorg config:

/etc/X11/xorg.conf
# Add the following to the ServerLayout section after Screen0
# ...
    Screen      1  "Screen1"
# ...
# ... at the end, add:
Section "Device"
    Identifier    "usbdev"
    Driver        "modesetting"
    Option        "kmsdev" "/dev/dri/card2"
EndSection


Section "Screen"
    Identifier    "Screen1"
    Device        "usbdev"
EndSection

3. Restart the X server to see changes.

4. The DL displays should appear. Configure using Xrandr as necessary.

USB 2.0 DisplayLink が動作しない

udl は非常に扱いにくく、USB 2 デバイスには、動作するものと動作しないものがあります。例として、HP NL571AA は動作することがテストされています。USB 2.0 デバイスが udl (EVGA "UV PLUS+16" など) で動作しない場合、journal に次のエラーが表示されます:

[drm] vendor descriptor length:e0 data:00 00 00 00 00 00 00 00 00 00 00
[drm:udl_init [udl]] *ERROR* Unrecognized vendor firmware descriptor
[drm] Initialized udl 0.0.1 20120220 for 1-1.3:1.0 on minor 1
[drm] Initialized udl on minor 1
udl 1-1.3:1.0: [drm] fb1: udldrmfb frame buffer device
usbcore: registered new interface driver udl

参照

  • DisplayLink Open Source: 公式の DisplayLink オープンソースサポートフォーラム
  • Plugable: DisplayLink の Linux サポートについてのメーカーブログまとめ