Steam (简体中文)
引自 维基百科:
- Steam是美国维尔福于2003年9月12日推出的电子软件分发、数字版权管理及社交系统,它用于数字软件及游戏的发布销售与后续更新,支持Windows、Mac OS和Linux等操作系统,目前是全球最大的数字游戏平台。
Steam is best known as the platform needed to play Source Engine games (e.g. Half-Life 2, Counter-Strike). Today it offers many games from many other developers.
Contents
- 1 安装
-
2 疑难问题
- 2.1 鼠标主题不一致
- 2.2 The close button only minimizes the window
- 2.3 Flash not working on 64-bit systems
- 2.4 Text is corrupt or missing
- 2.5 SetLocale('en_US.UTF-8') fails at game startup
- 2.6 The game crashes immediately after start
- 2.7 OpenGL not using direct rendering
- 2.8 libGL error when running certain games
- 2.9 OpenGL GLX context is not using direct rendering, which may cause performance problems.
- 2.10 No audio in certain games
- 2.11 You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1
- 2.12 Games do not launch on older intel hardware
- 2.13 X crashes when Steam starts (Radeon open source driver)
- 3 Launching games with custom commands, such as Bumblebee/Primus
- 4 Using native runtime
- 5 Skins for Steam
- 6 See also
安装
现在,可直接从 官方仓库 中安装 steam 。如果你使用64位系统,请先启用 multilib 仓库。
Steam 目前在 Arch Linux 上并不被官方支持,因此需要用户做一些调整以使程序顺利运行:
- Steam中大量使用 Arial 字体。你可以通过安装 ttf-liberation 或 ttf-microsoft-arialAUR[broken link: archived in aur-mirror] 或 ttf-ms-fontsAUR 或 Steam提供的字体 来让它看起来漂亮点儿。亚洲语言建议使用wqy-zenhei。
- 如果你使用64位系统,你还需要安装 32位版本的显卡驱动 (位于表格中“Multilib 软件包 ”这一列) 以运行32位游戏。
- 如果你使用64位系统,你还需要安装 lib32-alsa-plugins 为32位游戏提供声音支持。
- 有些游戏可能需要附加依赖。如果游戏不能正常启动 (一般没有任何错误提示),请确保安装了 Steam/Game-specific troubleshooting 中列出的依赖。
疑难问题
鼠标主题不一致
Steam启动时会覆盖掉 鼠标主题。这个问题出现在没有设置鼠标主题的Gnome 和其他 WMs/DMs。 对于Gnome,可以通过设置鼠标主题来修正。
为了解决问题,首先获得root权限,然后按照下面提示创建文件 /usr/share/icons/default/index.theme
(如果没有目录 /usr/share/icons/default
请自行创建):
/usr/share/icons/default/index.theme
[Icon Theme] Inherits=Adwaita
注意: 请用你自己的鼠标主题替代 "Adwaita"。 或者,你可以从 AUR 中安装 gnome-cursors-fixAUR[broken link: archived in aur-mirror]。
或者还可以创建指向鼠标主题的软链接 ~/.icons/default
, 比如:
mkdir -p ~/.icons ln -sT /usr/share/icons/Neutral_Plus ~/.icons/default
If the cursor gets stuck pointing in the wrong direction after exiting Steam, a workaround is to run xsetroot -cursor_name left_ptr
(From the awesomewm wiki).
The close button only minimizes the window
- Valve GitHub issue 1025
To close the Steam window (and remove it from the taskbar) when you press x, but keep Steam running in the tray, set the environment variable STEAM_FRAME_FORCE_CLOSE
to 1
. You can do this by launching Steam using the following command.
$ STEAM_FRAME_FORCE_CLOSE=1 steam
If you start steam with the .desktop file, you need to replace the Exec
with following line:
Exec=sh -c 'STEAM_FRAME_FORCE_CLOSE=1 steam' %U
Flash not working on 64-bit systems
- Steam Support article
First ensure lib32-flashplugin is installed. It should be working at this point, if not create a local Steam Flash plugin folder:
$ mkdir ~/.steam/bin32/plugins/
and set a symbolic link to the global lib32 flash plugin file in your upper new folder
$ ln -s /usr/lib32/mozilla/plugins/libflashplayer.so ~/.steam/bin32/plugins/
Text is corrupt or missing
The Steam Support instructions for Windows seem to work on Linux also: Simply download SteamFonts.zip and install them (copying to /usr/share/fonts/
or ~/.fonts/
works at least).
SetLocale('en_US.UTF-8') fails at game startup
Uncomment en_US.UTF-8 UTF-8
in /etc/locale.gen
and then run locale-gen
as root.
The game crashes immediately after start
If your game crashes immediately, try disabling: "Enable the Steam Overlay while in-game" in game Properties.
OpenGL not using direct rendering
- Steam Support article
You have probably not installed your 32-bit graphics driver correctly. See Xorg#Driver installation for which packages to install.
You can check/test if it is installed correctly by installing lib32-mesa-demos and running the following command:
$ glxinfo32 | grep OpenGL.
libGL error when running certain games
If you receive an error like the following Failed to load libGL: undefined symbol: xcb_send_fd
, it could be due to an outdated steam runtime library. Deleting ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libxcb.so.1
will force Steam to load the library version installed by pacman.
OpenGL GLX context is not using direct rendering, which may cause performance problems.
Steam ships its own versions of some libraries, and they sometimes are too old to work with archlinux system libraries. Removing the library supplied by Steam means Steam has to use the newer arch-specific version. Forum thread.
rm ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6 rm ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1
No audio in certain games
If there is no audio in certain games, and the suggestions provided in Steam/Game-specific troubleshooting do not fix the problem, #Using native runtime may provide a successful workaround.
You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1
You may encounter this error when you launch Steam at first time. Make sure you have installed lib32-version of all your video driver. For example, if you have installed catalyst-utils-pxp[broken link: package not found], xf86-video-dri[broken link: package not found], intel-dri[broken link: replaced by mesa], mesa-libgl for AMD and Intel double card, then you should install lib32-catalyst-utils-pxp[broken link: package not found], lib32-intel-dri[broken link: replaced by lib32-mesa], lib32-mesa-libgl.
Games do not launch on older intel hardware
On older Intel hardware, if the game immediately crashes when run, it may be because your hardware doesn't directly support the latest OpenGL. It appears as a gameoverlayrenderer.so error in /var/dumps/mobile_stdout.txt, but looking in /tmp/gameoverlayrenderer.log it shows a GLXBadFBConfig error.
This can be fixed, however, by forcing the game to use a later version of OpenGL than it wants. Right click on the game, select Properties. Then, click "Set Launch Options" in the "General" tab and paste the following:
MESA_GL_VERSION_OVERRIDE=3.1 MESA_GLSL_VERSION_OVERRIDE=140 %command%
This will force the game to use the latest version of OpenGL.
X crashes when Steam starts (Radeon open source driver)
There is a bug in glamor-egl 0.6.0 (used by the open source Radeon driver) which causes X to crash when trying to start Steam. Installing the unofficial glamor-egl-gitAUR[broken link: archived in aur-mirror] from AUR is a workaround until a new glamour version is released.
Launching games with custom commands, such as Bumblebee/Primus
Steam has fortunately added support for launching games using your own custom command. To do so, navigate to the Library page, right click on the selected game, click Properties, and Set Launch Options. Steam replaces the tag %command%
with the command it actually wishes to run. For example, to launch Team Fortress 2 with primusrun and at resolution 1920x1080, you would enter:
primusrun %command% -w 1920 -h 1080
If you are running the Linux-ck kernel, you may have some success in reducing overall latencies and improving performance by launching the game in SCHED_ISO (low latency, avoid choking CPU) via schedtool
# schedtool -I -e %command% other arguments
Killing standalone compositors when launching games
Further to this, utilising the %command%
switch, you can kill standalone compositors (such as Xcompmgr or Compton) - which can cause lag and tearing in some games on some systems - and relaunch them after the game ends by adding the following to your game's launch options.
killall compton && %command%; nohup compton &
Replace compton
in the above command with whatever your compositor is. You can also add -options to %command%
or compton
, of course.
Steam will latch on to any processes launched after %command%
and your Steam status will show as in game. So in this example, we run the compositor through nohup
so it is not attached to Steam (it will keep running if you close Steam) and follow it with an ampersand so that the line of commands ends, clearing your Steam status.
Using native runtime
Steam, by default, ships with a copy of every library it uses, packaged within itself, so that games can launch without issue. This can be a resource hog, and the slightly out-of-date libraries they package may be missing important features (Notably, the OpenAL version they ship lacks HRTF and surround71 support). To use your own system libraries, you can run Steam with:
$ STEAM_RUNTIME=0 steam
However, if you're missing any libraries Steam makes use of, this will fail to launch properly. An easy way to find the missing libraries is to run the following commands:
$ cd ~/.local/share/Steam/ubuntu12_32 $ LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ldd $(file *|sed '/ELF/!d;s/:.*//g')|grep 'not found'|sort|uniq
Once you've done this, run steam again with STEAM_RUNTIME=0 steam
and verify it's not loading anything outside of the handful of steam support libraries:
$ cat /proc/$(pidof steam)/maps|sed '/\.local/!d;s/.* //g'|sort|uniq
Skins for Steam
The Steam interface can be fully customized by copying its various interface files in its skins directory and modifying them.
Steam skin manager
The process of applying a skin to Steam can be greatly simplified using steam-skin-managerAUR[broken link: archived in aur-mirror] from the AUR. The package also comes with a hacked version of the Steam launcher which allows the window manager to draw its borders on the Steam window.
As a result, skins for Steam will come in two flavors, one with and one without window buttons. The skin manager will prompt you whether you use the hacked version or not, and will automatically apply the theme corresponding to your GTK+ theme if it is found. You can of course still apply another skin if you want.
The package ships with two themes for the default Ubuntu themes, Ambiance and Radiance.