Showing posts with label xubuntu. Show all posts
Showing posts with label xubuntu. Show all posts

Wednesday, October 21, 2015

Goat Simulator and GoatZ on Xubuntu

A family member had been running Goat Simulator on an old Q6600 + HD7770 machine, but found that the GoatZ DLC add-on just wouldn't work. It continually crashed with the dreaded "goatgame-win32-shipping.exe" error.

None of the suggested fixes I could find (verify cache; update graphics drivers; reinstall; tweak some shader settings) had any effect. Although Vista is still officially supported, it may have been something to do with that. Since the machine was dual-booting with Linux, and Goat Sim now has a Linux target, I just installed it on there.

Ran fine using the current AMD fglrx drivers in Xubuntu 14.04. Bit of glitchiness in the water rendering, but nothing that couldn't be ignored.

Really the only issue was the mouse sensitivity in-game. I've found this with other games based on the Unreal Engine, the mouse speed goes way down. I fixed this by tweaking the mouse speed in the desktop using xset:

$ xset m 4/1 0

(Basically, followed the advice from this thread).

Sunday, September 28, 2014

Dungeon Defenders on 64-bit Ubuntu Variants

A while back I found using the ia32-libs package was a way to get Dungeon Defenders going on 64-bit Linux, but that package went away. Here's the process I went through to get Dungeon Defenders working on Xubuntu 14.04.

Graphics Setup

First in general: install graphics drivers. For nVidia this is basically:

apt-get install nvidia-current
nvidia-xconfig

For AMD the process is a little more fraught with danger, I found this process works well with 14.04 though:

apt-get install fglrx-updates fglrx-amdcccle-updates
aticonfig --initial

Then reboot. After, if using AMD, run amdcccle and set the "tear free" option to enabled.

Game Setup

Since ia32-libs is deprecated, I went through and manually found all the packages. Here's the summary that should hopefully include everything needed to run the game:

apt-get install libglu1-mesa:i386 lib32stdc++6 \       libxext6:i386 libasound2:i386 libpulse0:i386 \       libxcursor1:i386 libxinerama1:i386 libxi6:i386 \       libxrandr2:i386 libxss1:i386 libxxf86vm1:i386

Then, before you run DD for the first time, edit the file DefaultDunDef.ini in UDKGame/Config/ and remove "_Valentines2013" from the GameplayLevel parameters, so that they only say "LobbyLevel.UDK". This will prevent the bug when you start the game it goes straight back to the menu.

(After using it as a test application for a fresh machine, I want to go back and play the game from a clean start. After the débâcle that is Dungeon Defenders Eternity, the original game feels much more...fun :(. )

Monday, June 17, 2013

Fixing nVidia Graphics Tearing on LinuxMint Cinnamon

So, after installing an nVidia GTX 650TI a while back, I put up with tearing in pretty much all applications because it was easy to install and get going.

But eventually I got sick of it and tried to fix it. After trying about every fix I could find, I jumped to a different distro (from Xubuntu 12.10 to Mint 15) in the hope that might have some effect. It didn't, but I re-tried a fix I thought I'd already tried, and found it eliminated the tearing 100%.

The fix is to add this to the /etc/environment file:

CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True

This is using the nVidia proprietary driver 304.88. Hope to confirm on other Xubuntu systems whether this fix also works.

Update 20 June 2013:

Unfortunately, the fix only seems to work in Mint/Cinnamon. Title updated to reflect this.

Monday, June 10, 2013

Fix broken xfce4 desktop after uninstalling compiz

So, to test a theory on how to fix graphical tearing on a Xubuntu 12.04.1 install, I tried installing compiz.

Not only did it not help, but it also broke the desktop environment. So I uninstalled (followed the reverse of the compiz installation steps I did). Uninstalling though doesn't clean up everything, and the desktop was still broken.

Fortunately, I found this post which suggested removing ~/.config and ~/.cache.

You don't need to zap those entire directories though. Inside each one there is a subdirectory that starts with "compiz". Those are the directories that need deleting. After that, I rebooted and the regular xfce4 desktop was working again.

Saturday, May 18, 2013

NFS Mount Hangs on Network Between Two Linux Machines

I was trying to set up NFS on my local network to transfer some stuff between two machines. I thought this would be pretty easy, but there seem to be a lot of guides out there that are either out of date or more complicated than they need to be (maybe they include some advanced features, not sure).

The main problem I had was that the mount command would hang when I tried to connect the client to the server. I tried everything I could think of, and in desperation tried reversing the client<-->server direction. At that point, it worked without a hitch. Still don't know exactly what the issue was (some conflict in the setup or configuration of my server machine?), but I was ecstatic at that point it worked at all.

Here are the steps (use ifconfig on each machine to find out their IP address, or use hostnames if you've set up hostnames):

On the nominated "server" machine

  • $ sudo apt-get install nfs-common nfs-kernel-server
  • Edit /etc/exports and add the following line (assuming here that the client IP address is 192.168.1.1 and the directory to be made available is /tmp):
        /tmp	192.168.1.1(rw,sync,no_subtree_check)
    
  • $ sudo exportfs -ra
  • Check that the entry just added to the exports file is okay with: $ sudo exportfs
  • $ sudo service nfs-kernel-server restart

NFS server daemon processes should now be running.

On the nominated "client" machine

Assuming the server IP address is 192.168.1.7 and /files/remote is the directory which we will be mounting to:

  • $ sudo apt-get install nfs-common
  • $ mkdir <local-directory-to-be-mount-point>
  • $ sudo mount -t nfs 192.168.1.7:/tmp /files/remote

An entry to automatically mount can be put in /etc/fstab, but since I will only be using the NFS connection on an ad-hoc basis, I haven't done that at this stage.

Sunday, April 21, 2013

Canon MG6250 Scanning on Xubuntu 12.10

The other day a friend of mine challenged me asked me if I'd got scanning going on the Canon MG6250.

I had never tried it, and some research showed other people were having some issues as well.

Here were the steps I took to get it going:

  • Install xsane (sudo apt-get install xsane)
  • The sane man pages refer to "backendname" a lot. The project's documentation gives the backend name for the 6250 as "pixma"
  • man sane-pixma (seems to be a man entry for each backend) tells you to that network scanners should normally be detected, but if not, add them directly to /etc/sane.d/pixma.conf
  • Edit that file and add a line of the format:
    bjnp://<ip_address>
    IP address can be retrieved from the printer settings dialog, or from the options in the printer itself.
  • After adding an entry for the printer, save pixma.conf
  • If the sane daemon isn't running (some have reported that it is running, but I had to start it manually as per the next two steps):
    • Edit /etc/default/saned and set RUN=yes.
    • Then start the sane service: service saned start
  • Run xsane

Now xsane should discover the scanner, and instead of saying "no devices found" and dying, it should run up (brings up about 4 windows). All the default settings seem to work — just press "Scan".

Monday, April 1, 2013

Script to initialise Wacom Intuos 5

To round out the setup for my Wacom Intuos 5 tablet, this is the script I run to initialise it for left-handed use with an nVidia graphics card in Xubuntu 12.10:

#!/bin/bash if [ -x /usr/bin/xsetwacom ]; then xsetwacom set "Wacom Intuos5 M Pen stylus" Rotate half xsetwacom set "Wacom Intuos5 M Pen eraser" Rotate half xsetwacom set "Wacom Intuos5 M Pen cursor" Rotate half xsetwacom set "Wacom Intuos5 M Pen pad" Rotate half # HEAD-0, HEAD-1 identify screens when using nVidia graphics. # Use xrandr output for AMD, Intel, etc. xsetwacom set "Wacom Intuos5 M Pen stylus" MapToOutput HEAD-0 fi

Saturday, March 23, 2013

Configure Mouse Speed in Xubuntu

I found the default mouse acceleration to be way too fast (particularly when trying to click on the single-pixel window borders in xfce).

To slow it down, I followed Patrick Mylund's instructions. These are the results specific to the Logitech G400.

$ xinput --list --short

This shows the names/IDs of input devices. In my case, "Logitech Gaming Mouse G400".

Now create a file ~/.xinput-mouse.sh, chmod it +x to make it executable, and add edit to include the following command:

xinput --set-prop "Logitech Gaming Mouse G400" "Device Accel Constant Deceleration" 4

Add a file xinput-mouse.desktop to ~/.config/autostart with the following contents:

[Desktop Entry] Encoding=UTF-8 Version=0.9.4 Type=Application Name=xinput-mouse Comment=Slow the mouse acceleration Exec=/home/<username>/.xinput-mouse.sh OnlyShowIn=XFCE; StartupNotify=false Terminal=false Hidden=false

Monday, February 11, 2013

Linux SSD Setup

A solid state drive (SSD) is often the cheapest way to improve all-round performance in a computer.

There are many guides for setting up an SSD for each operating system. When I did a recent reinstall of Xubuntu, I looked through a few of the guides and picked what I felt were the most important things. To my mind, these are the two biggest things:

  • Ensure that the drive controller is running in ACHI mode. This is an option in the BIOS. (Note: With Windows, you need to change this mode before installing. I haven't tried changing it with a Linux install, but it will trash a Windows install).
  • Edit /etc/fstab to add "noatime,nodiratime,discard" options for the SSD partitions.

Since SSDs have a lifetime measured in "number of writes", much of the tuning advice is aimed at reducing the number of unnecessary writes.

Here's a few other things I did.

WARNING: I based doing this on the principle of "OS/applications on SSD, data/media on HDD", and "reduce unnecessary writes". Whether or not they are good things to do (particularly, mapping /tmp to a different drive while the system was running), I have no idea. It worked for me, but I didn't base this activity on any existing guide.

System Setup

I have one SSD (Samsung 830 128GB) and one HDD (Seagate Barracuda 2TB). During installation, I partitioned the SSD into ~80GB for the "primary" OS and the remainder for "experimental" OS installs.

I allocated the swap space to the HDD, since this could case a lot of writes if the system ever needs to swap out (probably rare, given the RAM available). I mounted the HDD as "/files".

Mapping Files in User Home Directory

By default /home contains all the user's files. When I was using Mint, it automatically created "Documents", "Downloads", "Pictures", "Videos" etc. in the user home directory. I maintained this with Xubuntu (can't remember if Ubuntu variants do this by default), but replaced the true directories with symbolic links to the equivalent directories in the HDD (in the /files partition).

For example:

    $ rmdir Documents
    $ ln -s /files/ashley/Documents Documents

This means that all these files are stored on the HDD, keeping the SSD free from associated writes.

Mapping Email and Browser Data

The user's home directory also contains email and browser data. So I symbolic linked my thunderbird mailbox to the HDD as well. This Firefox support post explains how to move the Firefox cache to another drive. In hindsight, I probably should have just linked the entire Firefox folder as well.

Remapping /tmp

I remapped /tmp from the SSD to the HDD. This one was a bit of an experiment. It could have killed my system, I suppose, but everything seemed okay, so I'll explain what I did.

The system uses the directory /tmp to store random runtime stuff as needed. It's a special directory in that anyone can write to it. You need to set the "sticky" flag for this. If you do an "ls -l" on it, you'll see something like this:

    drwxrwxrwt  2 user user 4096 Nov 19 20:13 tmp

The "t" character at the end of the first column indicates the sticky bit is set. This is what I did to move my /tmp directory:

    $ sudo mkdir /files/tmp
    $ sudo chmod 777 /files/tmp
    $ sudo chmod +t /files/tmp
    $ sudo rm -rf /tmp
    $ sudo ln -s /files/tmp /tmp

The reason I noticed I needed to set the sticky flag (the "chmod +t"), is that without it, filename completion in the terminal stopped working. I imagine a whole heap of other stuff would have to.

Also, when I look at my tmp folder now, the "t" flag no longer appears. Not sure why, but everything still seems to work.

So, there it is: cowboy setup for reducing SSD writes.

Sunday, November 4, 2012

Wacom Intuos 5 Rotation

To rotate the Intuos 5 for sinister left-handed people:

$ xsetwacom set "Wacom Intuos5 M Pen stylus" Rotate half
$ xsetwacom set "Wacom Intuos5 M Pen eraser" Rotate half
$ xsetwacom set "Wacom Intuos5 M Pen cursor" Rotate half
$ xsetwacom set "Wacom Intuos5 M Pen pad" Rotate half

To get these commands to run at startup, I added them to $HOME/.profile (after trying .bashrc and .Xsession, neither of which worked [running Xubuntu]).

Adapted from notes at linuxwacom sourceforge site.

Dual-screen Setup

(Updated 24 Feb 2013)

After getting an nVidia GPU, I had much more luck getting dual-monitors to work than with either AMD or Intel graphics. By default though the tablet will span across all monitors. If you want to reduce this to a single monitor, do this:

$ xsetwacom set "Wacom Intuos5 M Pen stylus" MapToOutput HEAD-0

Note: if you're not using nVidia drivers, the output of xrandr will give you the names of your screens, rather than HEAD-0, HEAD-1, etc. as shown above.