ノートブック(Optimus / Bumblebeeを含む)でHDMIを有効にすることはできません。

ノートブック(Optimus / Bumblebeeを含む)でHDMIを有効にすることはできません。

Debian(ストレッチ)がインストールされているPC(HP ZBook)でHDMI出力を使用しようとしています。 Bumblebeeを設定しましたが、うまくいきます(glxinfoとoptirun glxinfoが予想情報を報告し、複雑なGLSLシェーダをテストしましたが、期待どおりに動作します)。

これで、HDMI経由でビデオプロジェクターを接続できるようにしたいです。ここで[1]で、HDMIがNVidiaボードに接続されている場合、intel-virtual-output(xrandrで動作可能な仮想出力を使用)を使って設定できることを読んでいます。しかし、Intel Virtual Outputは次のように言います。

 no VIRTUAL outputs on ":0"

これを行うと、xrandr -qダミー出力はリストされず、次のようになります。

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 345mm x 194mm
   1920x1080     60.02*+  59.93  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   ... other video modes ...
   400x300       60.32    56.34  
   320x240       60.05  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)

私がインストールしたxserver-xorg-video-intelのバージョンはxserver-xorg-video-intel_2.99.917+git20160706-1_amd64.debです。

更新済み(2016年12月9日土曜日)Debianをアップデートしましたが、特定のアプリケーション(xemacsなど)を起動したときに2番目のモニタがアクティブになると、Xがクラッシュします。土曜日。 2016年12月17日:はい、見つかりました! (更新された回答)。

更新済み(2017年9月27日水曜日)この方法は99%動作しますが、先週私は50Hzモードしか許可していませんでした。 50Hzモードを強制する方法を知っている人はいますか?

更新済み(2019年10月1日火曜日)ああ!再中断:XドライバとNVidiaドライバを更新した後、optirunはクラッシュします(/var/log/Xorg.8.logOsLookupColor + 0x139を使用してXorgでクラッシュを表示します)。更新済み(2019年10月7日)一時修正が見つかりました(更新された回答)。

[1]https://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup

ベストアンサー1

うん、見つけた! IntelドライバのVIRTUAL出力を有効にするには、20-intel.confXorg設定ディレクトリにファイルを作成する必要があります(/usr/share/X11/xorg.conf.dDebianstretchの下で読んで見つけます/var/log/Xorg.0.log)。

Section "Device"
    Identifier "intelgpu0"
    Driver "intel"
    Option "VirtualHeads" "2"
EndSection

私の/etc/bumblebee/xorg.conf.nvidiaは次のようになります:

Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "true"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"
    Option "ProbeAllGpus" "false"
    Option "NoLogo" "true"
    Option "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "DiscreteNVidia"
EndSection

いくつかの説明:「画面」セクションが必要です。それ以外の場合は、20-intel.confで宣言されたIntelデバイスを使用しようとします(以前に追加したばかりです...)。また、外部モニターが接続されていなくてもoptirunから起動できるようにするには、「AllowEmptyInitialConfiguration」が必要です。

これを設定して起動すると、intel-virtual-outputHDMIポートにアクセスできました。ヤハ! ! !

トラブルシューティング:optirunそれでもうまくいかない場合はintel-virtual-output見てください/var/log/Xorg.8.log(BumblebeeはXサーバーを作成し、内部的にはdisplay:8を使用します)。

ノートKeepUnusedXServerで にtrue設定しなければならないという内容をいくつか読みましたが、そうしませんでしたがうまく動作します。これはうまくいきますが、optirun-edアプリケーションを終了したり、intel-virtual-outputを終了した後でも、個々のGPUがオンになっていることを望みません。PMMethodnone/etc/bumblebee/bumblebee.conf

追加メモ私に頭痛を与えるもう一つのことは、Nouveauを無効にしてIntel Xサーバーを起動することです。これは、GRUBパラメーターで指定されたカーネルに渡されたフラグを介して行う必要があります。には/etc/defaults/grub次の行があります。

GRUB_CMDLINE_LINUX_DEFAULT="quiet blacklist.nouveau=1 i915.modeset=1 gfxpayload=640x480 acpi_backlight=vendor acpi_osi=! acpi_osi=\"Windows 2009\""

(引用符とエスケープされた引用符に注意してください。)

いくつかの説明:nouveau(Nvidia Xサーバーと互換性がない)のロードを防ぎ、Intelドライバに起動時にすぐにグラフィックモードに入るように指示します。そうしないと、Intel Xサーバーは起動せず、CPU側の3Dレンダリングを使用する従来の一般的なVESAサーバーに置き換えられます。これらのフラグは、acpi_xxx個々のGPUがオフになってグラフィックモードに入るとクラッシュするBIOSのバグを克服するために、この特定のシステムに必要です。これは特定のノートブック(HP ZBookポータブルワークステーション)に固有のものであり、他のノートブックでは不要または異なる場合があります。

更新済み(2017年12月6日)最新のDebianディストリビューション(Buster)では、「915.modeset = 1 gfxpayload = 640x480」は必要ありません。 nouveauを削除するには、/etc/modprobe.dに "blacklist nouveau"を含むnouveau.confファイルを作成し、 "update-initramfs -u"を使用してRAMディスクを再作成する必要があります。再起動して「lsmod |grep nouveau」を使用して、「nouveau」がロードされなくなったことを確認してください。

更新済み(2016年12月17日)最新のxorg-server(1.19)で使用すると、Gammaを管理するRandR機能に問題があるようですintel-virtual-output。 Xserverをパッチして動作させるプロセスは次のとおりです。

sudo apt-get build-dep xserver-xorg-core
apt-get source xorg-server

hw/xfree86/modes/xg86RandR12.c 1260行を編集して「return」を挿入します(関数はxf86RandR12CrtcComputeGamma()何もしません)

dpkg-buildpackage -rfakeroot -us -uc
cd ..
sudo dpkg -i xserver-xorg-core_n.nn.n-n_amd64.deb

n.nn.n-n正しいバージョンに交換)再起動してヤハ! !再び動作します!(しかしこれは速くて汚い修正です)

修正する送信されたバグレポート(既知で修正されたばかり): https://bugs.freedesktop.org/show_bug.cgi?id=99129

私が見つけた方法:別のコンピュータからSSH経由でインストールし、xserver-xorg-core-dbg完了しました。gdb /usr/lib/xorg/Xorg <xorg pid>

更新済み(2017年1月11日)このバグは現在、最新のDebianパッケージで修正されているようです。

アップデート(18年1月24日)プレゼンテーション用にプロジェクタを接続して起動する前に、すべて(インテル - 仮想 - 出力+ xrandr)を設定する必要がある場合、これはストレスになる可能性があります。以下は、作業を実行する小さなスクリプトです(免責事項:スタイルなどについて改善する余地がたくさんあります...)。

# beamer.sh: sets Linux display for doing a presentation, 
#  for bumblebee configured on a laptop that has the HDMI
#  plugged on the NVidia board.
#
# Bruno Levy, Wed Jan 24 08:45:45 CET 2018
#
# Usage: 
#    beamer.sh widthxheight
#    (default is 1024x768)


# Note: output1 and output2 are hardcoded below,
#  change according to your configuration.
output1=eDP1
output2=VIRTUAL1

# Note: I think that the following command should have done
# the job, but it does not work. 
#    xrandr --output eDP1 --size 1024x768 --output VIRTUAL1 --size 1024x768 --same-as eDP1
# My guess: --size is not implemented with VIRTUAL devices.
# Thus I try to find a --mode that fits my needs in the list of supported modes.

wxh=$1

if [ -z "$wxh" ]; then
  wxh=1024x768
fi

# Test whether intel-virtual-output is running and start it.
ivo_process=`ps axu |grep 'intel-virtual-output' |egrep -v 'grep'`
if [ -z "$ivo_process" ]; then
   intel-virtual-output
   sleep 3
fi

# Mode names on the primary output are simply wxh (at least on
#  my configuration...)
output1_mode=$wxh

echo Using mode for $output1: $output1_mode

# Mode names on the virtual output are like: VIRTUAL1.ID-wxh
# Try to find one in the list that matches what we want.
output2_mode=`xrandr |grep $output2\\\. |grep $wxh |awk '{print $1}'`
# There can be several modes, take the first one.
output2_mode=`echo $output2_mode |awk '{print $1}'` 

echo Using mode for $output2: $output2_mode

# Showtime !
xrandr --output $output1 --mode $output1_mode --output $output2 --mode $output2_mode --same-as $output1

アップデート(2019年10月7日)

新しい競合の「修正」:スクリプトに次のように書き込みます(bumblebee-startx.sh例:呼び出し)。

optirun ls # to load kernel driver
/usr/lib/xorg/Xorg :8 -config /etc/bumblebee/xorg.conf.nvidia \
 -configdir /etc/bumblebee/xorg.conf.d -sharevts \
 -nolisten -verbose 3 -isolateDevice PCI:01:00:0 \
 -modulepath /usr/lib/nvidia/nvidia,/usr/lib/xorg/modules/

(PCI:nn:nn:nをlspciで取得したNVidiaカードのアドレスに置き換えます)

ターミナルウィンドウでroot()でこのスクリプトを実行し、ターミナルを開いてから期待どおりsudo bumblebee-startx.shoptirun機能します(注:時にはスクリーン/ビデオプロジェクターを検出するためにintel-virtual-output実行する必要があるかもしれません)。xrandrこれで、同じコマンドがBumblebeeと競合し始めた理由を理解できません。これには多くの謎があります...(しかし、少なくとも一時的な修正は提供します)。

私が見つけた方法:xserverを起動するための「ラッパー」スクリプトを作成し、bumblebee.confでXorgBinaryとして宣言し、コマンドライン($ *)をファイルに保存し、競合のosLookupColorを修正するためにXserverのLD_PRELOADに関連するいくつかのパッチを試してみました(動作しません)、しかし、同じコマンドラインを手動で起動しようとすると、それはうまくいき、パッチなしで動作し続けます(しかしまだ理由を理解していません)。

2019年11月15日更新 アップデート後、ちらつきが激しく、システムが使用できなくなりました。カーネルパラメータi915.enable_psr=0/etc/defaults/grub、その後)を追加することでsudo update-grub修正されました。 PSRは、Intel GPUの省電力機能(画面のちらつきを引き起こす可能性がある)である「パネル自体の更新」を意味します。

おすすめ記事