我以前能够在 nvidia 卡上运行 Sam 3。现在他们添加了 CS 1.6,但他们更改了路径。我修改了用于 sam3 的原始命令,但它不起作用。
cd ~/.steam/steam/SteamApps/common/Half-Life/ &&
export LD_LIBRARY_PATH=~/.steam/steam/ubuntu12_32 &&
primusrun ./hl_linux -game cstrike -console -dev -numericping -noipx
它给了我这个错误:
错误:libsteam_api.so:无法打开共享对象文件:没有此文件或目录无法加载 hw.so。
答案1
几个小时后我找到了它。您需要将游戏根路径添加到 LD_LIBRARY_PATH:
cd ~/.steam/steam/SteamApps/common/Half-Life/ &&
export LD_LIBRARY_PATH=~/.steam/steam/ubuntu12_32:~/.steam/steam/SteamApps/common/Half-Life/ &&
primusrun ./hl_linux -game cstrike -console -dev -numericping -noipx
您还需要在运行游戏之前运行 Steam。
另外,如果你想禁用垂直同步,你需要运行
export vblank_mode=0
在运行游戏之前。这是完整的 bash 脚本:
#!/bin/bash
export vblank_mode=0
cd ~/.steam/steam/SteamApps/common/Half-Life/ && export LD_LIBRARY_PATH=~/.steam/steam/ubuntu12_32:~/.steam/steam/SteamApps/common/Half-Life/ && primusrun ./hl_linux -game cstrike -nosync