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

Sunday, March 10, 2013

Asus GTX 650TI on Linux

So after suffering through the (self-inflicted) pain of trying to run an AMD GPU under Linux, I bought an nVidia-based GTX 650ti to try out next.

Asus GTX 650ti

The 650ti doesn't have the best reputation for value (with performance that is similar if not worse than the much cheaper HD7770), but it seemed to go okay in reviews and is realistically already overkill for anything I'm going to use it for.

In box

I narrowed the choices down to an Asus version versus the MSI Power Edition. While I'd heard goods things about the MSI PE cards, in the end it came down to:

  • DVI-D ports (compared to DVI-I).
  • HDMI ports (compared to mini-HDMI. I have plenty of HDMI cables, but no mini ones).
  • Low noise level and temperatures in reviews (though the MSI is similar here anyway).

Ports

Installation

Compared to the troubles I had with the AMD, getting the nVidia card up and running is a breeze. Admittedly, I cheated this time and went straight to the proprietary driver. The open-source driver (nouveau) worked fine straight after installing the card, and I'll probably keep an eye on it (it's apparently made some recent advances in capability). But, I was tired, and just wanted something to work, so I cheated.

Plugged in to motherboard

To see which drivers are installed, you can use:

$ sudo lspci -v

For more (or heaps more) information, you can use -vv or -vvv to the above command. Running with sudo gives you a bit of extra output as well.

Initially you'll see a line something like this in the VGA controller section:

Kernal modules: nouveau, nvidiafb

These are the open-source drivers installed automatically in recent kernels.

To install the proprietary drivers, you can use aptitude to look up the possible targets:

$ aptitude search nvidia

To get going, all you need is to do the following:

$ sudo apt-get install nvidia-current nvidia-settings
$ sudo nvidia-xconfig
$ sudo <reboot>

The xconfig command above writes a default file to /etc/X11/xorg.conf. If all installs correctly, repeating the lspci command above will now output something like:

Kernel modules: nvidia_current, nouveau, nvidiafb

Results

Everything worked without a hitch. Running nvidia-settings lets you set up dual monitors. After rebooting, for the first time the login screen was actually two separate screens, rather than mirrored.

There was no obvious increase in noise levels with the Asus card, which is nice.

It's definitely far from perfect though. There are some noticeable artifacts when watching HD video, for example, and some minor tearing while running the game Dungeon Defenders. But at the moment I'm going to take "everything's working and it was easy to set up" over "pixel perfect display". Maybe if it annoys me enough I'll investigate some more, but I'm happy to run as is for the time being.

Update 15/6/2013:

Some months later, I've still been unable to resolve the tearing issue. It also occurs when scrolling up or down in web pages as well as in games/video, and is frustrating beyond belief that such a trivial action causes screen tearing with vendor-provided drivers.

The issue occurs on multiple computers I've used, all with different hardware and distros, so I can only conclude that nVidia's driver is broken.

Update 3/7/2013:

Forgot to link to it, but I ended up fixing the tearing issue. Unfortunately, I found it only worked with Mint/Cinnamon rather than Xubuntu.

Splitting Large MP4 Files

Flash drive formatted with FAT32 has a ~4.3GB maximum file size. I wanted to use the USB to watch the movie on my TV, but it wouldn't fit. To split a large mp4 file into more manageable chunks, I found this forum post on MP4Box. It works great.
$ sudo apt-get install gpac
$ MP4Box -split 3600 <filename>.mp4
The above splits the file into one hour chunks.