Showing posts with label Steam. Show all posts
Showing posts with label Steam. Show all posts

Tuesday, January 24, 2017

Install Steam Controller on Ubuntu 16.04

I have a Steam controller that I use every now and then and wanted to try it on Ubuntu 16.04. However, the operating system did not recognize the controller automatically, as of 22.01.2017 on a fresh install of Ubuntu 16.04. Luckily, it can be added quickly without any extensive troubleshooting.


Detecting the steam controller in ubuntu
Ubuntu 16.04 detecting the Steam controller for the first time.

Add a Controller

Referring to an earlier post from November 2016 on AskUbuntu.com the solution is quite straightforward and applies to a fresh 16.04 install.

  1. To install the controller we have to add a new device manually with udev,
    sudo gedit /lib/udev/rules.d/99-steam-controller-perms.rules
  2. There is no such file by default, so the above command will create it. Simply copy the following into it,
    # This rule is needed for basic functionality of the controller in Steam and keyboard/mouse emulation
    SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"

    # This rule is necessary for gamepad emulation; make sure you replace 'GROUP' with a group that the user that runs Steam belongs to
    KERNEL=="uinput", MODE="0660", GROUP="GROUP", OPTIONS+="static_node=uinput"

    # Valve HID devices over USB hidraw
    KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"

    # Valve HID devices over bluetooth hidraw
    KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"

    # DualShock 4 over USB hidraw
    KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"

    # DualShock 4 wireless adapter over USB hidraw
    KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"

    # DualShock 4 Slim over USB hidraw
    KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"

    # DualShock 4 over bluetooth hidraw
    KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"

    # DualShock 4 Slim over bluetooth hidraw
    KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"
    Make sure to replace GROUP with the user's group that will run Steam. In most installations your username and group will be username:username, hence your username will suffice. If in doubt, you can check what groups you belong to simply by,
    groups username
  3. Unplug the controller adapter if it was plugged in.
  4. Re-plug the controller adapter. 
That should be it. Enjoy gaming.

Monday, December 29, 2014

Fixing Left 4 Dead 2 Mouse Lag in Ubuntu 14.04

Issue

I have noticed a slight lag-like thing while playing Left 4 Dead 2 recently, mainly when turning with the character. It wasn't too obvious, but I felt something was wrong. I couldn't aim properly with the weapons and therefore I often missed shots. It seemed too much of a coincidence. I have tried tweaking some mouse sensitivity, acceleration etc. however the issue persisted.

Solution

Long story short, others have experienced the same problem while gaming on Linux. Luckily, def075 mentioned [1] that this may be a mouse polling issue. I did a quick search and found the solution [2]. Do the following,

  1.     gksudo gedit /etc/modules
  2.     And add the following 2 lines to the end of the file,
        -r usbhid
      usbhid mousepoll=1
  3.     And finally reboot.

Where the "mousepoll" tells the operating system how often to query (read data from) the mouse. The faster it does it, the less lag there is in the input. For reference [3],

1=1000 Hz (1ms)
2=500Hz (2ms)
4=250Hz (4ms)
8=125Hz (8ms)
10=100Hz (default, 10ms)

I have set mine to "mousepoll=1" and it works just fine. Some other posts say to set it to 2, I personally just went for the maximum to be on the safe side. Feel free to experiment with this, however I personally don't think that this would cause a great decrease in CPU time/performance on overall.

References


[1] - http://forums.steampowered.com/forums/showthread.php?t=3147537
[2] - http://ubuntuforums.org/showthread.php?t=392494
[3] - https://wiki.archlinux.org/index.php/Mouse_Polling_Rate

Thursday, December 25, 2014

First Video in Steam Not Playable - Ubuntu 14.04 64bit

After upgrading to Ubuntu 14.04 64bit I noticed that Steam was misbehaving and some features were unavailable. The first video of any game on the store was appearing as a single picture and couldn't be played and any other video wouldn't play normally on full screen.

Issue

  1. The first video of any game from the store in Steam under Ubuntu 14.04 64bit is not playable. This is also mentioned by other members of the community.[1]
    First Video in Steam is Not Playable "0:00/NaN/NaN"
  2. (Possibly) Full screen videos in Steam have a glitch where the top part of the screen is flashing and doesn't display video. Also the sides of the screen might develop the same glitch.

Solution

Flash layer is the issue and causes all the problems. The solution is to  download a 32bit version of libflashplayer.so and add it to a local Steam directory. [2] Do as the following,
  • Close Steam
  • In your browser go to http://get.adobe.com/flashplayer/otherversions/
  • Download a tar.gz of the 32bit flash player for Linux.
    32 bit Flash player in tar.gz
  • tar xzvf install_flash_player_11_linux.i386.tar.gz
  • mkdir ~/.local/share/Steam/ubuntu12_32/plugins/
  • cp libflashplayer.so ~/.local/share/Steam/ubuntu12_32/plugins/libflashplayer.so
  • Start Steam
The first videos should be playable now and the screen glitch should also be gone. Worked as a charm for me.

Note:
By default the Steam directory is ~/.local/share/Steam however if you have changed this, please change it in the above commands.

You can remove the extra "junk" files that were unpacked from the tar.gz file. Untaring creates a "usr" directory in the download location that can be removed with rm -rf usr and the readme.txt with rm readme.txt.

Refrences


[1] - http://www.reddit.com/r/Steam/comments/2lrbp3/steam_linux_first_video_in_store_page_never/
[2] - http://wiki.gentoo.org/wiki/Steam#Flashplayer_on_amd64