![如何使用 nvidia-optimus 笔记本电脑玩 Steam 游戏?](https://linux22.com/image/1040587/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20nvidia-optimus%20%E7%AC%94%E8%AE%B0%E6%9C%AC%E7%94%B5%E8%84%91%E7%8E%A9%20Steam%20%E6%B8%B8%E6%88%8F%EF%BC%9F.png)
在安装了 Ubuntu 12.04 和最新版本的 bumblebee 的 NVIDIA Optimus 笔记本电脑上启动 Steam 游戏的最佳方法是什么?
如果我调用 Steamoptirun steam
然后选择我想要玩的游戏,我会收到以下错误:
The program 'hl2_linux' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
(Details: serial 125 error_code 9 request_code 14 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Missing shutdown function for DevShotGenerator_Init() : DevShotGenerator_Shutdown()
Missing shutdown function for MapReslistGenerator_Init() : MapReslistGenerator_Shutdown()
Missing shutdown function for COM_InitFilesystem( m_StartupInfo.m_pInitialMod ) : COM_ShutdownFileSystem()
Missing shutdown function for Steam3Client().Activate() : Steam3Client().Shutdown()
/home/user/.local/share/Steam/SteamApps/user/Team Fortress 2/hl2.sh: line 72: 20567 Segmentation fault (core dumped) ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
Game removed: AppID 440 "Team Fortress 2", ProcID 20567
saving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully
^C[68042.116376] [WARN]Received Interrupt signal.
如果我steam
不使用这个optirun
选项,我可以继续运行游戏,在黑屏上听到开始音乐,但在之后的过程中仍然会失败。
我是否应该用特殊命令来调用我想玩的游戏optirun
而不是optirun steam
?
答案1
检查这些链接 - 您需要更改游戏属性,如下所示
- 在你的库中右键单击 TF2
- 单击“属性”
- 单击“设置启动选项”
- 如果你只有 optirun,请输入:
optirun %command%
上述方法对我来说不起作用,我必须将启动选项设置为
LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 optirun %command%
查看这些讨论:
- http://steamcommunity.com/groups/LinuxOptimus/discussions/0/846944052733804503/
- http://steamcommunity.com/groups/LinuxOptimus/discussions/1/864951657810665792/
如果这不起作用,请下载hl2-optirun.sh
到以下位置并运行它。
/home/user/Steam/SteamApps/'account_name'/Team Fortress 2/
答案2
Valve 建议使用 primusrun 在 NVIDIA GPU 上运行 Steam 游戏。
请参阅以下指南以获取帮助:
https://support.steampowered.com/kb_article.php?ref=6316-GJKC-7437