Steam runtime, disabling again

After re-enabling the Steam (ubuntu) runtime in package version 1.0.0.43-9, I’ve made some more tests with the runtime disabled on my systems.

The main driving factor for re-enabling the runtime was the introduction by Valve of the obsolete libudev.so.0 which has been replaced by libudev.so.1 library during the Fedora 18 release cycle.

I’ve now added back all libraries required for the client in the package prerequisites and disabled the runtime again. This time it has been disabled not through a profile script that is sourced at login time, but I’ve instead patched the main steam script in the package with a very simple patch:

--- steam.old/steam	2013-12-20 20:50:34.014610244 +0100
+++ steam/steam	2013-12-20 21:59:57.731725731 +0100
@@ -186,6 +186,17 @@
 # go to the install directory and run the client
 cp "$LAUNCHSTEAMBOOTSTRAPFILE" "$LAUNCHSTEAMDIR/bootstrap.tar.xz"
 cd "$LAUNCHSTEAMDIR"
+
+if [ ! -v STEAM_RUNTIME ]; then
+    if [ ! -h $LAUNCHSTEAMPLATFORM/libudev.so.0 ]; then
+        ln -sf /usr/lib/libudev.so.1 $LAUNCHSTEAMPLATFORM/libudev.so.0
+    fi
+    rm -fr $LAUNCHSTEAMPLATFORM/steam-runtime
+    export STEAM_RUNTIME=0
+else
+    rm -f $LAUNCHSTEAMPLATFORM/libudev.so.0
+fi
+
 if [ "`command -v tee`" != "" ]; then
 	mkdir -p --mode=777 /tmp/dumps
 	exec "$LAUNCHSTEAMDIR/$STEAMBOOTSTRAP" "$@" 2>&1 | tee "/tmp/dumps/${USER}_stdout.txt"

This checks if the STEAM_RUNTIME environment variable has been set and takes action accordingly. In the case it has not been set (the default), the script creates a symlink to the system libudev.so.1 library in the Steam folder and deletes the unpacked Ubuntu runtime. On the contrary, if you want the Ubuntu runtime enabled, by launching Steam with STEAM_RUNTIME=1 steam it will simply unpack again the runtime and restore the normal behaviour by deleting the symlink.

By using Steam’s internal variables, this also works in the following cases:

  • You’ve moved your Steam installation folder
  • You have played with the runtime enabled and are going to disable and viceversa
  • Saves me a lot of emails if I’m issuing an update to the Steam package that enables / disables the runtime; without the need for logging your user out, it works out of the box even after an update and a rerun in the same desktop session

I would say that here the “keep it simple stupid” principle applies perfectly.

The size of the Steam client has now become a little thinner again on the system on where it is installed. For comparison, here is today’s difference in size for a Steam beta client installation that uses the runtime and one that doesn’t (the SteamApps folder is the folder where applications/games are installed):

$ cd Steam
$ du -hs --exclude=SteamApps
1.4G .
$ du -hs --exclude=SteamApps --exclude=steam-runtime
1.1G .

Again, if we could run the client forcing it to avoid downloading the runtime archives as well; then the client would weigh nearly 500 mb less:

$ du -hs --exclude=SteamApps --exclude=steam-runtime*
906M

I’ve pushed this change only on the repository on this site, if it works fine and I see no objections I will push the change in RPMFusion’s repositories. The instructions in the repository page have been updated, including information on how to move your Steam installation around.

Any feedback is much appreciated!

Just in case you’re wondering, yes, I have a lot of games (~100), mostly bought off through the Humble Bundle bundles!

steam

New and updated repositories

In the past few days, I’ve updated most of the repositories:

  • The Flash plugin repository does now contain separate control center packages (so an x86_64 system can have both i686 and x86_64 plugins but one control center) and has been updated to version 11.2.202.332.
  • MakeMKV has finally been updated to version 1.8.7, solving all the bugs that have been introduced by upstream in version 1.8.6.
  • Steam has been updated to version 1.0.0.45.
  • All the repository pages now contain updated instructions and information.

As a latest addition, a repository for the Spotify client (upon a colleague request) and for the RAR archiver have been added.

MakeMKV beta registration key

MakeMKV has been updated to version 1.8.6; which requires FFMpeg version 2.x to compile succesfully. Unfortunately FFMpeg is available only in Fedora 20; so at the moment there’s no way to push MakeMKV 1.8.6 to the repositories.

If you are already running Fedora 20; you should receive MakeMKV version 1.8.6 along with the updates; otherwise please use the provided beta registration key published by the developers:

http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053

After starting MakeMKV just press the “Register” button and paste the provided code:

makemkv_register

I’ve added a note on the repository page with the registration details.

DKMS patches for ZFS On Linux merged

Thanks to the awesome help of the ZFS On Linux team (Darik Horn, Brian Behlendorf and Richard Yao) now all the ZFS On Linux patches required for DKMS functionality are now integrated into the EPEL 6 and Fedora DKMS packages. This means that in a future ZFS On Linux release a custom DKMS package will not be required for those platforms.

Please leave some feedback for version 2.2.0.3-20 if it works for you!

Nvidia driver repository updated

I’ve updated the Nvidia driver repository to the latest 331.20 release. Since this release has been promoted by Nvidia to a long lived branch release; also the CentOS/RHEL 6 repository has been updated to this version. This means all currently supported Fedora releases have the same driver version as in CentOS/RHEL.

This driver release brings the usual assortment of fixes and features; but the most important things are the additions of the Unified Video Memory kernel module, the “private” Nvidia OpenGL Framebuffer Compression libraries and the packaging introduction of the multiple kernel modules as an alternative to the single module; as specified by the driver documentation.

Starting from the less important things, the Nvidia OpenGL Framebuffer Compression libraries have been packaged into a separate package as their usage is very specific and according to the documentation their usage is documented only with specific approved Nvidia partners. I’m pretty sure we will not miss these libraries on our systems.

Kernel module packages now contain/generate also the nvidia-uvm.ko kernel module and the multiple nvidia.ko modules that can be used to assign separate kernel module instances to separate GPU devices.

The resulting install of the kernel module packages ends up like this:

$ ls -laghs
total 127M
4.0K drwxr-xr-x. 2 root 4.0K Nov  7 20:20 .
4.0K drwxr-xr-x. 6 root 4.0K Nov  7 20:20 ..
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia0.ko
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia1.ko
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia2.ko
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia3.ko
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia4.ko
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia5.ko
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia6.ko
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia7.ko
 12K -rw-r--r--. 1 root  11K Nov  7 20:20 nvidia-frontend.ko
 15M -rw-r--r--. 1 root  15M Nov  7 20:20 nvidia.ko
 48K -rw-r--r--. 1 root  48K Nov  7 20:20 nvidia-uvm.ko
$ du -hs .
127M    .

As you can see, the space used by these modules is huge; and they are only used in specific setups. I’m planning to make the multiple kernel modules in an optional package that can be installed separately from the main nvidia.ko and nvidia-uvm.ko modules.

Currently DKMS and AKMODs packages have these modules enabled; but the binary kMOD package for CentOS/RHEL 6 does not contain them. If I try to integrate them into the package, the kABI list of symbols is not exported correctly and I don’t know why. All the numbered modules are very similar (each one contains the 12 mb binary object that is included in the normal module) and for some reason this screws up the package assembly. In detail, this is the binary kMOD package that does not contain the numbered modules:

$ rpm -qp --requires kmod-nvidia-331.20-1.el6.x86_64.rpm
rpmlib(VersionedDependencies) <= 3.0.3-1
nvidia-driver = 2:331.20
/sbin/depmod
/sbin/depmod
/bin/sh
/bin/sh
/bin/sh
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
kernel(__free_pages) = 0xffd35acd
kernel(__init_rwsem) = 0xa2b8a2ba
kernel(__list_add) = 0x0343a1a8
kernel(__lock_page) = 0xda778235
kernel(__stack_chk_fail) = 0xf0fdf6cb
kernel(_cond_resched) = 0xa1c76e0a
kernel(alloc_chrdev_region) = 0x29537c9e
kernel(alloc_pages_current) = 0x4f3bf785
kernel(cdev_add) = 0xa6d1bdca
kernel(cdev_del) = 0x42e80c19
kernel(cdev_init) = 0xc45a9f63
kernel(copy_from_user) = 0x3302b500
kernel(copy_to_user) = 0x85f8a266
kernel(down_read) = 0xb4b0ee4e
kernel(down_write) = 0x45d55543
kernel(find_vma) = 0x38e4e189
kernel(get_page) = 0xe46d84e9
kernel(kmem_cache_alloc) = 0xee065ced
kernel(kmem_cache_create) = 0xe4a639f8
kernel(kmem_cache_destroy) = 0x806e575f
kernel(kmem_cache_free) = 0x7329e40d
kernel(list_del) = 0x0521445b
kernel(mcount) = 0xb4390f9a
kernel(memset) = 0xde0bdcff
kernel(module_layout) = 0x14522340
kernel(per_cpu__current_task) = 0x4f1939c7
kernel(printk) = 0xea147363
kernel(unmap_mapping_range) = 0x310b6f21
kernel(unregister_chrdev_region) = 0x7485e15e
kernel(up_read) = 0xe23d7acb
kernel(up_write) = 0xd851af78
kernel(vfree) = 0x999e8297
kernel(vm_insert_page) = 0x44986362
kernel(vmalloc) = 0xd6ee688f
kernel(warn_slowpath_null) = 0x16305289
ksym(nvUvmInterfaceDeRegisterUvmOps) = 0x2103c3ad
ksym(nvUvmInterfaceRegisterUvmOps) = 0x9b2a1db7
rpmlib(PayloadIsXz) <= 5.2-1

And this is the binary kMOD package that does contain them. As you can see the symbols are missing. This happens independently of the fact that the base module and  / or the UVM module are included in the same package.

$ rpm -qp --requires kmod-nvidia-331.20-1.el6.x86_64.rpm
rpmlib(VersionedDependencies) <= 3.0.3-1
nvidia-driver = 2:331.20
/sbin/depmod
/sbin/depmod
/bin/sh
/bin/sh
/bin/sh
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
kernel(__per_cpu_offset) = 0x32047ad5
kernel(__register_chrdev) = 0xfa0d49c7
kernel(__tracepoint_module_get) = 0xacdeb154
kernel(__unregister_chrdev) = 0x6bc3fbc0
kernel(create_proc_entry) = 0x6d6b15ff
kernel(down) = 0x748caf40
kernel(mcount) = 0xb4390f9a
kernel(module_layout) = 0x14522340
kernel(module_put) = 0xcbd81171
kernel(per_cpu__cpu_number) = 0x9629486a
kernel(printk) = 0xea147363
kernel(remove_proc_entry) = 0x1a6d6e4f
kernel(up) = 0x3f1899f1
rpmlib(PayloadIsXz) <= 5.2-1

RPM spec files are in the same place, so if you have any hint on how to fix it, please drop me a note.

Re-enabling Steam Runtime in the Steam package

Due to some issues with libraries in an upcoming Steam client update, I’m forced to re-enable the Steam runtime (Ubuntu libraries) in Fedora’s Steam package. This means that all dependencies are no longer needed but the size of the Steam client can get ridiculously high on the system on where it is installed. For comparison, see the difference in size for an installation that uses the Steam runtime and one that doesn’t (the SteamApps folder is the folder where applications/games are installed):

$ du -hs --exclude=SteamApps
1.3G
$ du -hs --exclude=SteamApps --exclude=steam-runtime
992M

If we could run it without the Steam runtime enabled and also avoid downloading the runtime archives; then the client would weight nearly 500 mb less:

$ du -hs --exclude=SteamApps --exclude=steam-runtime*
805M

Let’s hope that in the future Valve will not mandate the use of Ubuntu libraries for long and will standardize on a specific set of common libraries.

I’ve updated the repository page with updated instruction and pushed updated packages both to the repository and in RPMFusion. Starting from package steam-1.0.0.43-9 the Steam runtime is left at the default value (enabled).

Steam is now in RPMFusion!

steamThe Steam package is now available in the RPMFusion repositories. It is currently in the updates-testing repository, but it can be installed anyway directly if you have the RPMFusion repositories enabled.

http://download1.rpmfusion.org/nonfree/fedora/updates/testing/19/i386/

The package is currently 32 bit only, but it can be installed easily also on a 64 bit system. In fact, I’m currently running nearly 70 games on my 64 bit system. For details on the package, look at my now-obsolete Steam repository page.

To perform the installation today, make sure to have both RPMFusion free and non free repositories enabled and perform the following command as root:

yum -y --enablerepo=rpmfusion-nonfree-updates-testing install steam

The Steam package has some profiles enabled to avoid using the Ubuntu Steam Runtime, which produces graphical artifacts and sound issues when run in Fedora. To avoid any problems, please log out and login again or reboot the system prior to using Steam for the first time!

Steam games require the S3 Texture compression library for running on Open Source drivers, and the package already takes care of installing it for you.

Steam and Oculus Rift

oculus

I’ve just updated the Steam package to the latest release (1.0.0.43) and in addition to the Steam controller support there are now udev rules for the Oculus Rift! This is the changelog content:

$ cat /usr/share/doc/steam-1.0.0.43/changelog | head -5
steam (1.0.0.43) precise; urgency=low

  * Update udev rules to support front panel and Oculus Rift
  * Demote jockey-common dependency to Recommends

And this is the content of the UDEV rules’ file:

$ cat /usr/lib/udev/rules.d/99-steam-controller-perms.rules
#USB devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2202", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="2202", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1101", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1051", MODE="0666"
# Oculus HID Sensor naming and permissioning
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2833", MODE="0666"

Would you consider buying an Oculus if Steam games start to support it?

Some updates to repositories

I’ve pushed some updates for the repositories.

Cdrtools now ship with shared libraries enabled and a fix for Kernel Capabilities on RHEL/CentOS 6 and Fedora distributions. There was a regression introduced in the packaging of version 3.01a17 which was disabling capabilities on the binaries. Along with this the SPEC file was simplified and compile options were aligned with current policies.

Skype has been updated with some rpmlint fix and now introduce the PULSE_LATENCY_MSEC=30 environment setting for Fedora 20 systems and Purple Skype plugin is now available for both i686 and x86_64.