Sunday, May 3, 2015

Canon MG-6250 Scanning in Kubuntu 14.04

Had to scan something today (first time in a long while), and wondered if I'd have to go through the process I needed to last time on Xubuntu 12.10.

Turns out the MG-6250 works out of the box with Skanlite on Kubuntu 14.04. No configuration required, it searched the network and found the printer, click Scan -- go.

Friday, April 3, 2015

Sorting a Bunch of Images by Resolution

I'd collected a heap of desktop wallpaper images over the years, and wanted to sort them by resolution.

This is the best way I found to do it, using the identify command from the ImageMagick tools. Of course I had to tweak it a little bit for my own purposes, namely to capture .jpeg files as well a .jpg, and to copy the files rather than move.

Script I ended up using:

#!/bin/bash for image in ./*.{jpg,jpeg} ; do res=$(identify -format %wx%h\\n $image); mkdir -p $res; cp -p $image $res; done

Monday, March 2, 2015

Setting up Asus RT-AC68U with Billion 7401VGP-R3

I'd been finding the wireless capability on my Billion 7401VGP-R3 was starting to degrade. Mainly that after a period of being on, it would occasionally start dropping devices and then not let any new ones connect until it was rebooted. Update to latest firmware didn't help.

The modem capabilities of the Billion were good, and I wanted to keep the VOIP capability to run the home phones. So I looked at AC wireless router options, and the Asus RT-AC68U got the nod as a good quality option.

There are a couple of possible ways to set up the AC68U so that it works with another modem/router like the Billion. One way is to turn off DHCP on the Asus and plug an ethernet cable into port 1 (rather than the WAN port) and likewise connect it to the Billion the same way. This allows the internet connection to get through, but takes up one of your ethernet ports.

The way I ended up running it (thanks to the tip from Pete at Whirlpool) was to turn on "Access Point (AP) mode", accessible Advanced Settings -> Administration tab in the router config.

Screenshot selecting Access Point mode

After changing to this setting, it will ask how you want to set up the IP address of the AC68U itself. You can let the DHPC-capable router on the network do it (which in this case I kept as the Billion), but since I'd already "lost" the AC68U once during the setup process by an automatic IP address change, I decided to keep it manually set:

(Incorrect) Manual IP settings for RT-AC68U

So far I haven't had any issues with this setup.

I had one issue, where the AC68U would occasionally drop one of the wireless connections and then seem to reboot. I think it was due to the Billion router allocating the same IP address to another device as the one I'd manually set on the AC68U. This was a bit silly by me, so I updated it to one well outside the Billion's DHCP range. For whatever reason it required a gateway address this time too. So far these settings have proven okay.

Updated settings below:

(Updated) Manual IP settings for RT-AC68U

Here's a colourful diagram of the entire network setup:

Sunday, March 1, 2015

PCT-MP4711 KVM: Nice experiment, not without problems

UPDATE 8/3/2015: The system exhibited similar (though far less pronounced) symptoms without the KVM being plugged in, so it may have been the mouse starting to fail that caused the dropped connections. I've tried a new mouse and it seems okay, but still need to set everything back up again with the KVM to clear its name.

While it looks like I was too hasty on the judgement, the frustrations with the device still stand. Post title updated to reflect the discovery.

A little over 12 months ago I bought a PCT-MP4711 4-port DVI/USB KVM to switch keyboard/mouse/monitor between two or more machines.

In the last week I started noticing some drop outs where the mouse/keyboard would lose "sync" for a few seconds. While working this is annoying, while gaming it's catastrophic. By coincidence I'd just installed a new router at the same time, so I initially thought it was a network issue, but have now proven it was the KVM.See above: perhaps not

Don't look at me!

I noted at the time that the 1 year warranty was a bit worrying, and it turns out I was right to be worried. It lasted essentially the 12 months and a few days before becoming unusable. You get what you pay for, etc, etc.

The thing always was a bit temperamental — particularly the key-based shortcuts to switch between settings. Sometimes you'd have to press the combo three, four, five times or more to get it to register. And sometimes it would stop working and require the USB connectors (which give the box its power) to be disconnected to reset the thing.

In the end it was an okay experiment, but I don't recommend anyone buy PCT equipment based on my experience. Unfortunately other equivalent options are much much more expensive, so while it was an okay stop-gap, the lack of longevity is a major let down.

Monday, February 9, 2015

Raspberry Pi B: HDMI Resolution and Localisation Fixes

Following up from yesterday's post on the Raspberry Pi B, I've played around with it a little more and noticed under Raspbian the screen resolution was running at 1776x952 rather than 1920x1080, and that the keyboard was set up for British layouts.

Resolution Fix

To fix the resolution I got into the /boot/config.txt and made a few changes as per various suggestions from the web. First of all you need to run tvservice -m CEA to find the preferred monitor settings. Mine was 16, but replace the text below with the appropriate number. (May also need to run tvservice -m DMT depending on your screen type. DMT is hdmi_group=2 for the settings. See: difference between CEA and DMT.

The summary of changes to /boot/config.txt:

disable_overscan=1
hdmi_drive=2

#overscan_left 24
#overscan_right 24
#overscan_top 16
#overscan_bottom 16
#disable_overscan=0

hdmi_group=1
hdmi_mode=16

The first two lines were already in the file, and just needed to be uncommented. The commented out lines about were in the NOOBS generated section at the bottom. NOOBS default seemed overly aggressive, so I took them all out. The last two lines are the results of the CEA output from above for the preferred setting.

Keyboard Localisation Fix

Default to British keyboard layout causes problems here in Aust because the # key is turned into £ and the @ and " keys are transposed. To update, run the following:

dpkg-reconfigure locales
dpkg-reconfigure keyboard-configuration

Both bring up little text-based wizards. For locales, select en_AU.UTF-8 or similar. For the keyboard config, I selected a generic match for the keyboard I was using, but I think the main thing is to change the "GB" setting to "US" keyboard layout.

Saturday, February 7, 2015

Raspberry Pi 2B Installation

Having played with a BeagleBone Black a while back, I thought I'd try out the newly released Raspberry Pi 2. Quad core CPU with 1GB of RAM sounds like it should be plenty grunty for SoC computer.

The Raspberry Pi 2B

Here's the process I used to set it up. I tried both Snappy Ubuntu and Raspbian. Since Snappy has no desktop at the moment, and that's the main thing I wanted to try out to start with, I basically satisfied myself it was working and then jumped over to Raspbian.

In addition to the Pi itself, you also need the following:

  • A micro-USB power supply — basically, a phone charger. I got a 2A one from Element14 with the Pi.
  • A microSD flash card. I got a 16GB Patriot that came with a USB adapter to make it easier to copy files to/from. You could also use a card reader if your computer has one.
  • Keyboard/mouse/monitor.

2A microUSB power adapter

Installing Snappy Ubuntu on the Pi

This install is using a Linux desktop computer to set up the Flash card. I'm sure there are guides out there for Windows/OSX if that's how you roll. OSX may be similar enough that the command-line options will work too, I'm not sure.

  • Download Snappy Ubuntu Core from http://www.raspberrypi.org/downloads/
  • Unzip the downloaded zip file to get at the pi-snappy.img.
  • Insert the flash drive into your computer.
  • Find out the device name using something like df if it automounts or fdisk -l if not. It will be called something like "/dev/sdc1". Drop the number at the end for the commands below — you need to flash the entire drive, whereas sdc1 is the first partition on the drive.
  • Unmount the flash drive if you need to.
  • From the command-line, run the following (replacing "sdc" with your device):
      $ sudo dd bs=4M if=pi-snappy.img of=/dev/sdc
    
  • It might take a while to flash the img. Play a game or something while you're waiting.
  • Run sync to flush the drive. (I forgot to do this and it still worked...)
  • Take out the flash drive and put it in the Pi. Connect up keyboard/mouse/monitor, then plug in power.
  • MicroSD flash card installed into the Pi

  • For me a "rainbow screen" popped up, then an image of 4 raspberries. Then it cycled around again and finally got to a login prompt. It took a long time, so I'm not sure whether something went wrong and it rebooted itself, or if that was normal.
  • Default login for Snappy is ubuntu/ubuntu.

Installing Raspbian via NOOBS on the Pi

NOOBS is a helper you can put on the flash drive to more easily install other distros. To setup the flash drive for NOOBS, reformat it as FAT32. I used gparted to do this. The drive had a bunch of existing partitions already on there from the Snappy install. Delete them all and create one single FAT32 partition, then Apply. Once complete, it should look something like this:

gparted after reformatting flash drive as FAT32

Unzip the NOOBS zip file, and copy the content onto the SD card. Once done, the file system should look something like this:

NOOBS unzipped onto flash drive

Put the SD Card back in the Pi. When it boots it will come up with an installation screen. Select Raspbian and optionally the Data Partition if you want it. It will then blat the drive with the Raspbian install, which will take a while.

Once complete, it should reboot and bring up another menu. I selected [1 Expand Filesystem] to make the rest of the SD card storage available, but it told me NOOBS had already done this. Then I selected Finish and it went to the console, selecting 3 (or 4?) to boot to desktop might have been a better option in general because that menu no longer appears on subsequent reboots.

Logging in to the console (username: pi, password: raspberry) you can start the desktop by running startx anyway.

Interestingly, I plugged in my Netgear WNA3100M (cheapy USB wireless adapter), and it connected right away. With the BeagleBone in comparison I got stymied trying to find firmware for that device. Score +1 for Raspbian right there.

Initial play with the Pi 2 shows the desktop to be pretty snappy, feels quite usable. There are few glitches in the rendering and occasionally you see artifacts if you, say, scroll the browser too fast for it to keep up, but overall the "feel" wasn't too bad. Will have to give it a bit more of a go to see what it can do.

Raspberry Pi 2B desktop screenshot (click to enlarge)

Sunday, January 18, 2015

Gigabyte Z97X-UD5H Stock Voltage Issue

As mentioned in the build log post back a bit, when combined with an i7 4790K the Gigabyte Z97X-UD5H has an issue at stock settings where (it appears) to auto-overclock to CPU, bumps the voltage way too high, and causes an immediate power shutdown.

Manually overclocking the board should fix this problem, but I found (with a bit of help) there are three other ways you can fix it by changing some settings in the BIOS:

  • Disable the Turbo Boost in the BIOS (as per this superuser answer). The setting can be found in M.I.T => Advanced Frequency Settings => Advanced CPU Core Settings => Intel Turbo Boost.
  • Turn off the "K OC" setting in Advanced CPU Core Settings.
  • Reset the CMOS (using the "clear CMOS" button on the board is okay), then start the machine and choose "Load Optimised Defaults" from the menu that pops up.

This thread at Intel's forum has information from many 4790K users on problems and test results they've found: https://communities.intel.com/thread/54032.

Saturday, January 10, 2015

Yet Another Canon Printer Linux Driver Install

After going round the loop with my Canon MF-4140 time or two before, I had to print something today and found I needed a slightly different process this time on Kubuntu 14.04.

There now appears to be a 64-bit driver for the MF-4100 series on Linux, which I downloaded from here.

After installing the two .deb files (cups-common and the cndrvcups-ufr2), the printer driver was available in the Add Printer dialog. It still didn't work though, despite appearing to install, accept and complete jobs. The trick was revealed by the answer in this askubuntu question, to search for missing dependencies for the .so libraries in the driver source tree. I installed lib32stdc++6, but as Dan Menes also discovered, it was the 32-bit version of libxml2 (sudo apt-get install libxml2:i386) that finally gets the thing to work.

Sunday, November 30, 2014

Getting Rid of 4-Pin Molex Connectors

As noted when installing a system in the Fractal Arc XL, the fan controller requires a 4-pin molex power connector. As it was the only one required in the system, I needed to plug in an extra cable on the modular PSU purely for the fan controller.

To remove that dependence (and reduce one of the cables floating around inside the case), all that is needed is a SATA-to-Molex power adapter. My local PC shop had one for $6.

SATA in one end

4-pin Molex in the other

Works a treat

Saturday, November 22, 2014

Build Log Followup: Another Gigabyte G1 Gaming

Continuing on from last week's post, while I wanted to track down an MSI GTX970 to try it out, local suppliers were completely out of stock of that card. And then MSY had a 10% off Gigabyte products sale, so...long story short I got a Gigabyte GTX970 G1 Gaming.

The GTX970 G1 Gaming

Couple of points of note for anyone thinking of getting one:

  • The specs say the length is 312mm, but I think this includes both the frame and perhaps a little leeway. I measured 298mm from the inside of the frame to the end, so it might fit in cases where the specs say it shouldn't. Viewer discretion advised.
  • Requires 1x8-pin and 1x6-pin power connectors.
  • I've run it with the Power-Mate Lite for over a week — on the i7-4790K (stock) system the maximum power draw was 316W while gaming.

On the Windows side there were no issues of note compared to the last one I installed, but on Linux it was a different story.

I had a Kubuntu 14.04 install on the same machine with Windows 8.1, which was working perfectly with Intel graphics. After plugging in the GTX970, the Linux install refused to boot. Using "text" or "text nomodeset" override options in grub showed it was hanging at random places during the boot process. Even a live distro off USB failed to get a display. While running off onboard I installed the nvidia-current drivers, which didn't help.

The solution turned out to be installing the latest xorg-edger drivers. The process is described in this forum post by Kade7596, but the brief summary is:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-346

Normally I would run "nvidia-xconfig" after installing the drivers, but the 346 drivers don't seem to include this application any more. Since I'd already run it using the older drivers from the Ubuntu nvidia-current target, I had a default xorg.conf written. Not sure if it was necessary.

After installing nvidia-346 the GTX970 now works.

In closing, the G1 Gaming also glows in the dark...

Saturday, November 15, 2014

Build Log: Intel i7-4790K + Gigabyte Z97X-UD5H

Put together a new rig to form a core gaming and test machine.

CPU: Intel i7 4790K Motherboard: Gigabyte Z97X-UD5H RAM: G-Skill Ripjaws 2x8GB 2133MHz SSD: Plextor M5-Pro 256GB (already owned) HDD: Old one ODD: Old one Case: Fractal Design Arc XL PSU: EVGA SuperNova G2 750W

Fractal Design Arc XL

First up is the impression of the case, the Fractal Arc XL, big-brother to the Arc Midi I used last month.

It's a big spacious case, looking very similar to the Midi. The top panel has a couple of extra USB ports.

Also comes with a bucket load of screws and a few cable ties. A few notes on the XL from during and after the build:

  • Just like the Midi, the XL is great to build in. Spacious, good quality all round.
  • The feet on the case come with stoppers that don't slide very well. My machines sit under a desk, and when sliding it in place one of the stoppers came off.
  • The built-in fan controller requires a 4-pin molex power connector. I had to connect a dedicated cable to the PSU purely for the fan controller.
  • The HDD caused the front panel to buzz/vibrate. I had used the rubber anti-vibration rings to install the HDD, but had them done too tight. After loosening them off, the noise went away.
  • The PSU is mounted on rubber stands &emdash; haven't seen that before.
EVGA SuperNova G2 750W

Made by OEM SuperFlower, I got this guy on the back of some really strong reviews at JonnyGuru and TechPowerup.

SuperNova G2 in box, loads of cables

Comes with a lot of cables and velcro cable ties. The modular cabling is nice, but as above with the fan controller, sometimes you need to use "just one more" for that extra little thing you need to connect.

Out of box

Mounting it was painless. As noted above the XL has rubber mounts for the PSU to sit up on.

I can only assume this is for a little extra airflow to the PSU fan.

SuperNova G2 mounted. Mind the gap

Gigabyte Z97X-UD5H

I kinda knew that while this was a solid board, it had a potential issue at stock speeds with an unlocked chip like the 4790K. Thought I'd give it a go anyway.

Gigabyte Z97X-UD5H

It's a nice looking board with lots of features. Only thing of note really is that it was somewhat thinner than I expected. It felt no different to other cheaper boards like the H97 line, whereas I've heard it claimed in the past that the PCB on expensive Z boards is thicker. Didn't seem to be the case, but then I didn't pull out any of my older (cheap) boards to do a direct comparison. The board is plenty strong enough though.

Update 21/11/2014:Should note there is an issue with the UD5H and the 4790K at stock settings — details at this thread.

Initial Build/Setup

Putting it together, it was a nice case to use with plenty of cable routing options. Finished product looks fairly neat even without tying any of the cables down.

Obviously there are two big omissions from this initial setup:

  • It's using the stock cooler. I've got an aftermarket cooler to put on, but my plan was to test out the stock cooler with the 4790K and UD5H. Will document later.
  • There's no GPU. That's still to come. I was trying to track down an MSI GTX970, but they're pretty difficult to come by. Instead will probably get my hands on the Gigabyte G1 Gaming. :)

Monday, October 27, 2014

White-on-blue Theme for Vim

If you want to make vim look like the old white-on-blue of WordPerfect (and frankly, who doesn't?), you can apply these changes to a colour file.

I started with desert.vim (usually in a directory like /usr/share/vim/vim74/colors), copied to ~/.vim/colors and made the following changes:

26,27c24 < ""hi Normal guifg=White guibg=grey20 < hi Normal guifg=grey90 guibg=#061c34 --- > hi Normal guifg=White guibg=grey20 48,49c45 < ""hi SpecialKey guifg=yellowgreen < hi SpecialKey guifg=darkblue --- > hi SpecialKey guifg=yellowgreen 73d68 < hi SpellBad guisp=darkred

There are probably more changes that could (should?) be made, but that gets the primary effect.

Saturday, October 25, 2014

Updated Conky Config

Made a few little tinkering updates to the previous conky config (thanks for the CPU graph tip JB).

Rather than try and paste the .conkyrc file in here (which is difficult to copy/paste and doesn't fit properly in this blogger template), I'll just link to it in my repo: https://bitbucket.org/ashonit/config/src/2c99ecffce6140874d3408b8eb413c377da86abb/.conkyrc?at=default

Install lm-sensors and run sensors-detect in order to get CPU temps to show.

The most difficult thing I've found is getting fan readings, since hwmon was removed from the Ubuntu repos, there doesn't seem to be a replacement. I haven't been able to find a reliable way to query the file-system for current RPM values either -- if anyone knows, please let me know!

Screenshot of the latest setup:

Monday, October 20, 2014

nVidia Tearing Fix in Kubuntu 14.04

Finally got around to revisiting this issue. Last time I tried I black screened the system, but with the TTY consoles successfully in operation that isn't so much of a risk.

Seems the following fix from AskUbuntu (thanks Barafu!) solves the problem. The solution is almost identical to the fix I used for 13.04, but adds an extra line to /etc/profile:

export __GL_YIELD="USLEEP" export __GL_THREADED_OPTIMIZATIONS=1

Not sure why I got the black screen, it may have been something unrelated, as this worked perfectly on two differed Kubuntu+nVidia systems.

Saturday, October 11, 2014

Build Log Addendum: Gigabyte GTX970 G1 Gaming

Update on last week's build log: managed to pick up a Gigabyte GTX970 G1 Gaming for the machine.

The Gigabyte GTX970 G1 Gaming

Installing the card went without issue. It proved to be a nice, quiet card after installing the nVidia drivers (fans were noisy at first boot -- probably as expected -- until the proper driver was installed).

Interestingly, despite the Fractal Design Arc Midi R2 specs saying it only has 290mm clearance for GPUs with the HDD cage installed, the Gigabyte GTX970 just fit (was a squeeze, but I could get it in). So obviously there is some leeway in Fractal Design's specs for this case.

Completed build. This is without the HDD cage -- I left it out in the end for better airflow

To test it out I ran through Unigine Heaven again. At 1920x1080 Ultra 0xAA, it scored 2627 (average FPS: 104.3, min FPS: 29.3, max FPS: 205.3). At Ultra 8xAA, it scored 1786 (average FPS: 70.9, min FPS: 8.8, max FPS: 137.6). A little better than the 10 FPS average of the onboard graphics.

Running through Hitman: Absolution in-game benchmark (random game I had available on Steam) it scored Average FPS: 60.2, Min FPS: 50.5, Max FPS: 72.0.