SSH -Yを介して接続されたリモートサーバーで実行可能ファイルを実行しようとしています。実行可能ファイルがOpenGLを使用しているようです。
サーバーはUbuntuを実行し、ローカルシステムはOSXを実行します。
ssh -Yは通常X11を介して自分のローカルコンピュータのディスプレイを開きます。これは他のアプリケーション(firefox、matlabなど)でもうまく機能します。
今回は次のようなメッセージをいただきました。
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 35
Current serial number in output stream: 34
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 34
Current serial number in output stream: 35
私もglxinfoを実行し(フォーラムで見つけたことを試みていました)、これを得ました。
name of display: localhost:11.0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 23
Current serial number in output stream: 22
この問題を解決するのに役立つ人はいますか?
ありがとうございます!
ベストアンサー1
2021年5月5日に修正:XQuartz 2.8.0がリリースされると、設定パスorg.macosforge.xquartz.X11
がから変更されているようですorg.xquartz.X11
。同じ指示がまだ適用されます。将来から来た場合は、既存のパスを新しいパスに置き換えます。
ここにある回答は修正されましたが、職場から隔年でこの質問が出たときに今後の参考として使用できる別の回答を提出します。 :)
これは、Xが(SSH、Dockerなどを介して)渡されると頻繁に発生します。多くのX11サーバー(XQuartsやUbuntuの標準X11サーバーなど)でデフォルトで無効になっているOpenGL描画(iglx)を許可する必要があります。これに関して見ることができる他のログは次のとおりです。
XRequest.155: GLXBadContext 0x500003a
XRequest.155: BadValue (integer parameter out of range for operation) 0x0
XRequest.155: GLXBadContext 0x500003b
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
../../src/xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
修正はiglxを有効にすることです。まず、使用しているXQuartsのバージョンがこの機能をサポートしていることを確認してください。この記事を書く時点の最新バージョンはこれですが、もはや使用されていないので、将来的にはそうではないかもしれません。私のバージョンはですXQuartz 2.7.11 (xorg-server 1.18.4)
。
次に、実行して設定さdefaults write org.macosforge.xquartz.X11 enable_iglx -bool true
れていることを確認できます。
$ defaults read org.macosforge.xquartz.X11
{
"app_to_run" = "/opt/X11/bin/xterm";
"cache_fonts" = 1;
"done_xinit_check" = 1;
"enable_iglx" = 1; ####### this should be truthy
"login_shell" = "/bin/sh";
"no_auth" = 0;
"nolisten_tcp" = 0;
"startx_script" = "/opt/X11/bin/startx -- /opt/X11/bin/Xquartz";
}
最後に、xquartz(またはマシン全体)を再起動してください。セキュリティと認証を無効にして再実行する必要があるかもしれませんxhost +
(分離されたコンピュータには適していますが、インターネットにさらされているコンピュータには危険です)。これで、期待どおりにGUIアプリケーションを実行できます。役に立ったことを願っています!