Google+

Translate

08 January 2016

Blackmagic / Decklink capture drivers Arch Linux

The Drivers are a 538mb .tar.gz file, Simple Steps:

1. Download the latest drivers from the blackmagic website (10.5.4 at the time of this post), put these in a folder in your home directory, say called "blackmagic".

2. Download the PKGBUILD from the AUR (Download Snapshot on the AUR page for decklink). Extract "PKGBUILD" and "decklink.install" to the folder you made in step 1.

https://aur.archlinux.org/packages/decklink/

3. Get the sha256 checksum of the driver package you downloaded.
In a terminal within the same directory as the downloaded file type:

sha256sum Blackmagic_Desktop_Video_Linux_10.5.4.tar.gz

This will then print out the sha256sum we'll need to put in the PKGBUILD file next:

5. Edit the PKGBUILD file you extracted from the snapshot with your favourite text editor, it's just a normal text file, change the "sha256sum=('checksumhere')" to the new one you got from step 3.

Also change the "source=("/path/to/Black_Magic_blahblah.tar.gz")" to the path to the file you downloaded in step 1.

You'll also need to change the "_dvver=" line to "_dvver=10.5.4a4" and the "_mever=" line to "_mever=3.5a9"

6. ... FINALLY it's time to install the PKGBUILD: Open a terminal in the directory you've been working in and type "makepkg -sri" - this should make an installable arch package and install it.

Or you can then manually install it whenever you like with the command "sudo pacman -U decklink-10.5.4a4-1-x86_64.pkg.tar.xz" obviously changing the command to whatever the generated file name is you just made.

Provided everything was done right it should now be installed.

06 January 2016

Quake IV Linux PC Gaming 2016 (Quake 4)




Quake IV... Yes it's an older game(2005), and it has aged, but still a very enjoyable experience and a decent single player campaign, with some perhaps not so subtle references to classic Sci-Fi movies and culture very evident inspiration for the developers(Raven Software, who have put out many other quality titles), and the nods to some of my favourite films including 1986's Aliens, and 1997's Starship Troopers in the opening cinematic are very much noted and appreciated.




A direct sequel to Quake II, and taking place during the same conflict as Enemy Territory: Quake Wars, The game is single player focused, but does have multi player similar to Quake 3 Arena. The game engine has been open sourced under GPL license but the game assets are not.

Now, Down to Business, getting the damn thing working on a modern and up to date Linux system, some of the settings will also apply to windows, but this post will focus on Linux, for some reason i wasn't able to get the game to run without crashing under windows I'm pretty sure it's a rogue setting somewhere messing things up though.
So, What I'll cover here:
  • Installation
  • Sound
  • Graphics
  • Multi-Monitor issues
  • Multicore CPU / SMP support
For anything else there are many great guides and forum posts out there already.

Getting Started:

Firstly you'll need either a retail (CD/DVD) or digital (Steam) version of the game to get the required game content in the form of .PK4 files, works just the same with both the steam and retail CDs / DVD, I have both the Steam version and the Retail DVD I purchased way back on release, There may be other options in regards to acquiring the files but that's up to you :D

You will also need a valid CD key to play the game.

The files needed:

You can copy over all of the .pk4 files(although some will be created by the Linux installer anyway) also make sure you get the language files which are the zpak_english.pk4 or whatever language you prefer, make sure you get em all.

How to install:

As with many of the other idtech games there are linux patches and installers available going back to the original doom / quake / hexen / heretic games. But how we go about installing is down to which Linux Distro you use.

Arch / Arch based:

The latest version of the installer can be found in the AUR with the Demo installer also there, so installation if pretty easy here, install same as any AUR package, Currently I'm using Manjaro KDE, so to installed I'd simply enter the following command:

yaourt quake4

This brings up Quake 4 1.4.2-3 which is the full game installer(minus in game content, see above) quake4-demo 1.0-5, and quake4-multiplayer-demo 1.4.2-1.

The one we want is the full game, which is option 1.

Install as normal, the default installation path is "/opt/quake4" and also the config files / save games / quake4key file will be located in "/home/username/.quake4/"

Copying the game content files:

The files need to go into the "/opt/quake4/q4base" directory, you'll need root access to copy files into this directory, I have noticed that there is also a q4base directory within "/home/username/.quake4/" but I'm unsure if the files can also be placed there(in which case root access wouldn't be needed).

Steam Version: Simply copy the .pk4 files listed above into the "/opt/quake4/q4base/" directory, but you'll also need to copy your "quake4key" file into the "/home/username/.quake4/q4base/" directory

Note: You may need to run the game once before the .quake4 directory is created, I Didn't check if this is required.

Overwrite any files if necessary.

For the Retail version, the .pk4 files will all be on the DVD/CDs, simply copy them fron the DVD/CDs, and when you run the game enter your valid CD Key when prompted.

For other Linux Distributions you can check if the installer is held in the repositories, or simple download the installer and run it manually:

It can be downloaded from many sources including the id software FTP server:

ftp://ftp.idsoftware.com/idstuff/quake4/linux/

It's a binary file so simple make it executable and then run
chmod +x and ./quake4-linux-1.4.2.x86.run

Follow the instructions / agree to licenses etc.

Note: Before doing anything else, try to launch the game and set the in game settings, eg controls, resolution and graphic options, this means less to set in the config file later and you'll know the game actually runs before messing with anything else.

NOW! for the Issues I personally encountered:

Sound:

Sound was crackling and missing channels and well just not right, easy fix, all you need to do is set the following options in the Quake4Config.cfg file:

seta s_numberOfSpeakers "2"  <<< Set your speakers Stereo for me so 2.

Note: For some reason the game kept setting this back to surround "6" speakers each time on start-up of the game, so I just set the config file to read only which solved the issue.

seta s_dsp "/dev/dsp"
seta s_driver "alsa"                   <<< Change from "best".

Note: There may be other acceptable options here such as OpenAL or OSS, and I didn't try "pulse" or "pulseaudio" so feel free to experiment here alsa worked for me. 

seta s_alsa_lib "libasound.so.2"
seta s_alsa_pcm "plughw:1"      <<< Change to whatever your soundcard ID is.

Now to find out what your sound card ID is (systems these days normally have multiple sound devices, eg USB DACs, onboard sound, USB headsets, HDMI sound from GPUs etc) so this needs to be set correctly, I use a USB sound card, if you type "aplay -l" this will list all your alsa sound devices and also their IDs

Example output from my system:

[*****@syndesktop ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0


So what we take from that is the alsa device ID for my usb sound card is hw1:0
or "plughw:1" which is what I put in the Quake4Config.cfg file for "seta s_alsa_pcm"

BOOM! sound issues sorted.

Graphics:

Quake IV has an annoying bug where it incorrectly detects system resources and locks the settings to low making textures look like a terrible N64 style blurry mess, even if you set the in game settings to ultra. Luckily there's a fix for this too and it just means going back into the Quake4Config.cfg file and making some changes, there's a lot you can tweak in here so be careful what you mess with.



Note: The game will initially default to 640x480 4:3 Low settings, but does support 16:9 and 1920x1080 (custom resolutions can also be set in the config file)

Settings that need setting!

seta image_ignoreHighQuality "0"  << Set this to 0 default is 1
seta image_downSizeBump "0"       << Set this to 0
seta image_downSizeSpecular "0"  << Set this to 0
seta image_cacheMegs "100"          << can be set larger if needed
seta image_cacheMinK "30"            << can be set larger but shouldn't need to
seta image_downSize "0"                 << Set to 0
seta image_anisotropy "8"               << Can you guess what these are?
seta r_multiSamples "16"                 << ..

seta sys_videoRam "8192"               << Set your GPU's VRAM in MB mine is 8GB

Once these are set, you may want to set the Quake4Config.cfg file to read only, which will stop the game from making any changes to your configuration. So you'll probably want to have your controls and everything else set as you like it before setting to read only.

All of these settings can also be set via console command within quake 4(make sure you enable the console) and also as command line / launcher options if need be / you prefer doing that, although I find the config file a more tidy way.

Muliple Monitors:

Now I run 2 monitors of different sizes and resolutions, and when set to full screen and ran at 1920x1080 the game likes to run in the middle of the two screens spanned across them, which isn't ideal, ideally I'd like to have the game run on my main 1920x1080 monitor, a lot of SDL / OpenGL games can have this issue, but depending on your desktop environment it's an easy fix.

As mentioned before I'm using Manjaro KDE plasma, one of the nice things about KDE is that you can set specific per-application / per-window rules and force them / remember them. So this fix / workaround can be applied to any game or application, there may be similar options available in other Desktop Environments / window managers.

Fix: Set the game to windowed mode, right click on the window title bar, and click "Special Application Settings" here you will be able to set rules for the application window including default start up position(by pixel) and location (eg top left) you'll also be able to set it to borderless and to have no title bar, and to be full screen, Another important rule to set is the focus stealing provention, this will prevent mouse movement roaming outside the game window and key presses from running system shortcuts. If you are getting screen tearing you can also try the "block compositing" option, which can also be set globally somewhere(cant remember where right now).

Multicore CPU support: The game does support multicore cpus so if you do want better performance you can run the quake4-smp executable instead of the default executable, there is an option to enable smp in the config file, although I am not sure if this is required if running the smp executable, I've not played around with this much.

And that should be all folks! Enjoy the game, It still looks pretty decent to this day, considering how old it is now, being initially released in October 2005, that's over 10 years ago now.