A Mind Lost

Anything and everything.

Linux Mint 13

Haven’t really had much to say lately.  Windows 7 has been surprisingly obedient, and without any issues I haven’t had much to complain about.  I even finally managed to get Service Pack 1 to behave, after every previous attempt ended in inexplicable bluescreens!

As for Windows 8, I’ll be giving that a pass.  The new UI doesn’t appeal to me at all, and with a smooth-sailing 7 x64 installation I see no reason to upgrade.

What this post is really about, as the title indicates, is Linux Mint.  I tried Mint 12 way back in January, and was not particularly impressed.  Well, a few weeks back I decided to scrap the Slackware install on my notebook, an aging ASUS F8Sn-B1.  Within is an Intel Core 2 Duo T8100 clocked at 2.1GHz, 3GB of memory, an Nvidia Geforce 9500M GS with 512MB of dedicated memory, and the only upgrade I’ve made to it, a 640GB Western Digital Scorpio Blue drive.  Originally I had upgraded to a 500GB Scorpio Black from the stock 250GB Toshiba drive, but after just a few hours of power-on the BIOS started reporting S.M.A.R.T. errors.  RMA’ing the drive required jumping through a few hoops as the drive’s serial number didn’t match where I had purchased the drive from (I’m in Canada).  Western Digital eventually sorted it out with no problems, and I did get an RMA, but in the meantime I had picked up the 640GB drive.

As with my previous try with Mint, the installer went smooth as butter, this time without stalls.  I selected the Xfce version of Mint as I wanted something light yet functional.  After a month of use, I really had no complaints whatsoever, and while I missed Slackware due to my familiarity with it, the ease of software installation and dependency resolution assuaged both my yearning and my guilt.

Unfortunately, I am ever the tinkerer.  The replacement Scorpio Black drive, which had seen infrequent use as an external drive, was taunting me to swap it into the notebook for its better performance.  Don’t get me wrong, the Blue drive has worked great (I also put a desktop Scorpio Blue in the desktop I gave my Dad), but I just couldn’t resist.

This time I decided to give a different flavour of Mint a try.  I started with the KDE version, which is my preference over Gnome and its relatives.  After installing and updating, I set about to tweaking.  One of the features I love about KDE is its customizability.  One of the things I don’t like, however, is its apparent performance.  KDE 4 has always felt “laggy” to me.  Opening windows, moving them, closing them, the interface just feels sluggish.  I don’t remember KDE 3, which I loved, suffering from this.  While it’s not a deal breaker, it is an annoyance.

Then I came across a problem with fonts.  No matter how hard I tried, I couldn’t get the fonts in KDE’s application launcher to look right.  Everything else was fine, desktop, taskbar, tray, and application fonts all looked ok.  Even GTK applications looked great!  Being near-sighted, I find I am sensitive to fonts that don’t look right (and bits of dust and hair on the screen, my laptop’s screen is like a magnet to such), and blurry/fuzzy fonts are just unacceptable.

So with the fonts driving me nuts, something inside me broke for a minute and I decided that since the GTK app fonts looked great, I’d give the Cinnamon version of Mint a try.  Download, wipe, install and update again.

Yes, I realize I could have just grabbed everything via Synaptic and done an in-place change to Cinnamon, but I reasoned that if I was switching to Cinnamon I wouldn’t need the bulk of the KDE stuff, and that it was just easier to grab a different .ISO, rather than tediously going through all the installed packages and removing the unneeded ones.

So, Cinnamon.  The Mint guys have done a great job making Gnome 3 usable, so much “props” to them for that, but it’s still Gnome and I really just don’t like it.  I haven’t used Unity, and probably never will as I don’t like the direction they’ve taken with it as a user interface (much the same as I don’t like Windows 8’s Metro).  But no matter the work they put in to Cinnamon, it’s still Gnome, and I find there’s just not enough options to make me feel comfortable with it.  And the application launcher is horrible!

There were other little things that bothered me, such as the Alt+F2 launcher not offering suggestions, but the final straw came when X crashed in the midst of opening a window and dumped me back to the login manager, a problem I did not experience in either Xfce or KDE.

I didn’t try the Debian edition of Linux Mint, because after KDE, then Cinnamon, I was frustrated and had had enough.  So, I’ve come full circle and reinstall Linux Mint Xfce.  My notebook feels snappy and the interface offers enough customization to make me happy (though to be honest I like Xfce’s out-of-box experience).

The TL;DR is Linux Mint 13 Xfce gets a definite two thumbs up from me.

Something else I want to mention here regarding the Western Digital Scorpio Black drive.  As with many drives from WD, it seemed particularly aggressive about parking the head.  Every 8 seconds without activity the drive would emit a loud clunk as it moved the head into the landing zone.

I also experienced this with the Scorpio Blue, and worked around the issue by adding a call to hdparm within the local rc startup script (/etc/rc.d/rc.local in Slackware, and /etc/rc.local in Mint):

hdparm -B 255 /dev/sda

This completely shuts off power-management for the drive.  I did the same with the Black drive, but this had no apparent effect!  After Googling, I came across the WDIDLE3 utility on Western Digital’s website.  This software cannot be run under anything but DOS; fortunately, I happen to have a bootable USB drive with a copy of FreeDOS on it.  Keeping a bootable FreeDOS USB stick has been incredibly useful, as I also used it to flash the firmware for my motherboard’s Asmedia USB 3 hardware.  Also, I nostalgia’d hard upon seeing a fullscreen bare C:\ prompt.  Oh the memories.

However, even after using the software to completely disable the idle timer, the drive was still merrily clicking away as it parked the head.  After another reboot in to FreeDOS, I decided to set the timer to its maximim value of 300 (that’s 5 minutes).  Since the drive is touched in some way in much smaller intervals than 5 minutes, this has effectively worked to eliminate the head parking.

Note that the head parking is, in general, a good thing.  However, for my usage scenario it’s not necessary.  I don’t carry the notebook around while it’s running, or often move or jostle it.  I’m fairly delicate with my computers.

Also note that although the drive (I don’t have the exact model available atm) wasn’t listed on the WDIDLE3 page, the program did work just fine.  YMMV, just be aware that messing with low-level stuff like this can render your hardware useless.

Advertisements

MinGW windres.exe “can’t popen” error

I’m not sure what causes it, but the windres.exe from MinGW’s binutils (2.22) package doesn’t work properly, claiming an error of No error.

c:\msys\mingw32\bin\windres.exe: can't popen `c:\msys\mingw32\bin\gcc -E -xc
-DRC_INVOKED  -': No error

Note that this is when running in the MSYS bash shell; I didn’t receive this error when running it from a CMD.EXE compatible console (TCCLE).  I also did not encounter this problem with the MSYS windres.exe (binutils 2.19.51.20090704).

To fix this, I use a script that I place in ${HOME}/bin/windres.  Since ${HOME}/bin comes before /mingw/bin in my PATH, the shell picks up the script rather than the binary.

#! /bin/sh
/mingw/bin/windres --use-temp-file `echo "$*" | sed 's/\\\\//g'`

The –use-temp-file flag fixes the popen problem.  The text replacement is just an added bonus.  I’ve noticed that when configuring software with autoconf in MinGW, quite often it adds more escaped characters than are necessary to the command-line.  The call to sed removes these unnecessary escape sequences.

Yasm Crashing

While messing about attempting to build a plethora of software with MinGW, I came across an oddity with Yasm.  When building software for personal use, I generally pass gcc the “-march=native” option, which instructs gcc to figure out which features are available on the host system, and to tweak instruction scheduling to match it.

When building Yasm (an assembler) with this option, the resultant binary would immediately crash.

Compiling with -march set to “corei7” produced a program that ran just fine, but using “corei7-avx” again resulted in a crash.

$ gdb yasm.exe
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from <...>\yasm-1.2.0\build.corei7-avx\yasm.exe...done.
(gdb) run
Starting program: <...>\yasm-1.2.0\build.corei7-avx\yasm.exe
[New Thread 2292.0x7b8]

Program received signal SIGILL, Illegal instruction.
0x00409fe2 in BitVector_Boot ()
(gdb)

Since I have no idea what BitVector_Boot is or does, and I really doubt that an assembler will have much of a noticeable improvement with AVX, the simplest solution is to just use “-march=corei7”.

I really don’t know why it wouldn’t work anyway. I have a Corei5-2500K processor, which supports AVX. I found but a single reference to someone else encountering this, so it doesn’t appear to be a common problem.

Back to World of Warcraft

A while back my brother sent me a Scroll of Resurrection for World of Warcraft, which gives a week of free gameplay in an effort to lure back players.  I’ve had my account since February of ’05, a few months after launch, though I’ve taken intermittent breaks here and there.  My last, and longest, break began shortly after Cataclysm’s launch, around March of 2011.  Before cancelling, did I manage to get two of my characters to 85, and a few to 81/82.

I’ve never really had good luck with finding guilds.  I’m not a hopper, I try to stay fairly loyal.  But I’m also the kind of person who tries to help out whenever I can, and in the end I usually get crapped on.

During The Burning Crusade, when Karazhan was the raid to do, I watched as the guild I’d been in for a year and a half swelled with new members.  Gradually, these new members pushed me out of my raiding position, even those raids I had explicitly signed up for and was expecting to do.  Needless to say, it happened once too many times and I /gquit.  I found out a month later that three of the people who “got geared” via those Kara runs jumped ship to another guild as soon as their gear was good enough.

With Mists of Pandaria’s launch drawing ever closer, the pre-expansion lull is definitely noticeable.  While I’ll probably be one of the many people who line up outside the local Future Shop for the midnight launch with the intention of scoring a Collector’s Edition, I can’t really say that I’m all that excited.  My biggest complaint with WoW, and this has been true for the last four years, is that the “endgame” experience is lacking.  It’s a never ending cycle that goes like this:

1. Collect gear to do more difficult content.
2. Collect gear from difficult content.
3. Wait for new content, while doing increasingly less-difficult content.
4. Go to 2.

For me, there’s no longer much satisfaction in the endless gear upgrade circle.  I want more than just replacing blue items with purple items while waiting for the next expansion.  I want to continue to develop my character when the maximum level has been reached, rather than just changing his clothing!

EverQuest addressed this with its Alternate Advancement system.  Introduced with the Shadows of Luclin expansion, AA (as it was shortened to) allowed the player to allocate a portion of their earned experience to a separate leveling mechanic upon reaching level 51.  If I remember right, it required the same amount of experience to go from 50 to 51 to gain an AA “level”.  Gaining AA levels granted the character points that could be allocated to Generic, Archetypical and Class-specific abilities.

The basic bonuses one could assign AA points to included increasing base stats, protection stats, movement speed, and regeneration.  Archetypical AA abilities fell in to four categories: Fighter, Priest, Caster and Hybrid.  They included increasing damage done, reducing damage taken (avoidance and mitigation), spell effectiveness and a host of other abilities.  Finally, the Class-specific abilities included, as one might well guess, a variety of class-specific buffs such as improved dual-wielding hit chance, mass group buffing, transformations (into an elemental, for example), cooldown reductions, and far too many other abilities to mention.

This gave the player much more customization, and in my opinion was an amazing addition.  It also allowed a lot of differentiation between two characters of the same class.  Two tanking type characters could spend their AA points in different ways.  One could be a soak tank, with a larger HP pool, while the other might instead opt for a mitigation tank, reducing damage taken.

World of Warcraft, on the other hand, has given us a seven year and counting endless gear grind.  Really, they haven’t innovated very much at all.  The Glyph system, while a nice addition, doesn’t offer much in the way of variety.  For each class and spec combination, the number crunchers have long advised the players on which glyphs to use and which to avoid.

With the redesigned (or excised, if you prefer) talent system of MoP, World of Warcraft is losing the only real feeling of customization it had.  Sure, there has always been the cookie-cutter specs that one had to use if they wanted to remain competetive, but at least there was the illusion of choice.  And by max-level, there was usually a few talent points left that could be allocated where the player wanted after all the core requirements were met.

After playing the recently released Diablo III (and being sadly underwhelmed by the game as a whole), I can only say that I wish the D3 and MoP developers worked on different continents from one another, with no communications between them.  World of Warcraft is shaping up to be Diablo III, only on a different world and with a monthly subscription fee.

I continue to hope that Blizzard will add some sort of secondary leveling system that will allow players to customize their characters beyond just the “gotta get the new ilvl 9000 item from that raid” we’ve had for so long, but I shall not be holding my breath for it.  They continue to dumb the game down to appeal to more subscribers, and it seems like ample choices in character customization are #1 on the chopping block.

Oh, and then there’s the Transmogrification system.  Compared to Lord of the Rings: Online, Warcraft’s implementation is a joke.  In LotRO, one can opt to display a costume rather than their equipped gear, and it’s no more difficult to use than equipping the costume item to the appropriate slot and clicking a “Show This Outfit” button.  In true Blizzard fashion, the Transmog system is little more than another gold sink, where each wardrobe change requires spending in-game money to change the appearance of a worn item.  Disappointing, to say the least.  Every time a piece of gear is upgraded, the player must pull the piece they want their gear to look like out of the bank (or the other new gold sink, Void Storage), and again pay to apply the appearance transformation to the new item.

I really don’t know why I keep going back to WoW.  I have missed out on about 95% of the raiding content over the course of the game’s lifetime, have only made two lasting friends who no longer play very much anyway, and on the whole don’t find the game to be very compelling any more.  Sure, leveling characters is fun for me, and I do enjoy a lot of the quests and their dialog, and the story as a whole is interesting enough.  Yet once I reach the level cap, I just move on to the next character and plow through it all again.  Every expansion leaves me feeling less satisfied than the previous, and I know this feeling is going to reach critical mass eventually.

YouTube Service Scam

Seems the scam artists of the Internet are trying a new trick.  After seeing mail from Blizzard, Runescape, and a bunch of other MMO’s, as well as various banking sites, it looks like they’re trying to use the YouTube name now.

YouTube Service has sent you a message:

Your video has been approved
To:*****@*******.com

http:// http://www.youtube.com/watch?v=zK1qRu97Wx&feature=topvideos_mp
You can reply to this message by visiting your inbox.

Don’t click on the fake YouTube links, they lead to “http://russ.vndv.com/impeccable.html&#8221;.  I didn’t actually open it, so I’ve no idea what kind of scam they’re running.  Neither did I bother looking up the domain to try to determine which asshole of the Internet this one is.

*Edit* I just checked my junk mail, and found nearly 20 more of these with minor variations in the subject, and some linking to other sites.

Edit with GIMP Context Menu

I’ll keep this one short and to the point.

After installing GIMP 2.6.12 for Windows, I noticed the “Edit with GIMP” entry in the context menu for image files was missing (that’s the menu that pops up when right-clicking on a file).

One Google later and I was reading a blog post on “Thoughtful Code” that pointed me to the correct registry key.  A few minor changes to Mr. Reiter’s solution and I was good to go.

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\edit]
@=&Edit with GIMP

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\edit\command]
@="C:\Program Files (x86)\GIMP-2.0\bin\gimp-2.6.exe" "%1"

The “@” refers to the “(Default)” value in a key.  I opted to set GIMP as the default edit action rather than creating a separate menu item, and set the shortcut key to “E” (that’s what the ampersand in “&Edit with GIMP” does).  I also had to change the path, as I use a 32-bit GIMP on Windows 7 x64.

For the quick ‘n easy, copy and paste the following to a text file with the .reg extension (such as Edit_with_GIMP.reg), and run it.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\edit]
@="&Edit with GIMP"

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\edit\command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
  00,46,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\
  47,00,49,00,4d,00,50,00,2d,00,32,00,2e,00,30,00,5c,00,62,00,69,00,6e,00,5c,\
  00,67,00,69,00,6d,00,70,00,2d,00,32,00,2e,00,36,00,2e,00,65,00,78,00,65,00,\
  22,00,20,00,22,00,25,00,31,00,22,00,00,00

Media Playback Problems Part 2

I wrote up a long post about my media playback problems, thought I’d fixed it, played two files without a problem, hit post and went to watch a few videos.  The problem returned, my frustration trebled.

I thought I had fixed it by installing ffdshow-tryouts and Haali’s splitter.  I was mistaken.

In the end, unplugging the television and running the single LED display has completely eliminated all sync and frame dropping problems.  I just played back a 22 minute video with not a single dropped frame and Sync Offsets of 0 throughout according to MPC-HC’s statistics.

I don’t know if the videocard just cannot handle both displays, or if there’s some trickery I need to try to make it perform better, but needless to say it is bloody frustrating.

Media Playback Problems

One of the things I really dislike about reinstalling Windows, whether from need or just masochism, is that I run in to all sorts of problems that I’ve never seen before.  For example, my D-Link DWA-552’s poor performance.  That’s half the reason I bother with this blog.  I’ve a terrible memory, so keeping track of the issues and my attempts at fixing them just seems like a Good Idea.  And if I can point someone else in the right direction, even better.

After fixing my audio problems I had hoped that my media playback difficulties would be resolved as well, but this was not to be.

I run a dual display setup off of my single EVGA nVidia GeForce 460 GTX.  DVI-1 connects to a 24″ Samsung SyncMaster BX2431 LED display via a DVI-to-HDMI cable, while the HDMI connection is plugged in to a 40″ Samsung LN40D630 LCD television.  The TV’s audio is plugged in to my desktop’s 2.1 speaker setup via a 3.5mm TRS plug for those moments when I need a bit more boom.

Aside from the obvious hardware changes of a new processor, motherboard (and the differences in onboard hardware), and the recently upgraded wireless card, the only other big change is upgrading Windows 7 x64 to Service Pack 1.

My preferred media player, Media Player Classic – Home Cinema has suffered terribly from dropped video frames and the audio has refused to stay in sync, growing progressively worse as the video plays on.  VLC media player fares a little better, but while playing it averages 35-50% dropped frames according to its playback statistics.  Sometimes it’s not quite as noticeable, but being near sighted has made me annoyingly sensitive to things like frame skipping and tearing (and dead/stuck pixels in a display, to my everlasting irritation).

I’ve tried everything I can think of, upgrading/downgrading/upgrading my audio drivers for my motherboard’s built-in Realtek HDAudio hardware, using the latest beta nVidia driver, and disabling Aero in favour of the Windows Classic appearance.  I’ve twiddled services, changed audio output settings, all to no avail.

The last step I tried, and the one that seems to have finally prevailed, was to install Haali Media Splitter and a recent SVN build of ffdshow-tryouts by clsid.  I set the splitter to handle everything it could, and set ffdshow to only allow whitelisted programs due to incompatibilities with certain games that I happen to play (such as Fallout 3).

MPC-HC needed a bit more tweaking to make it use ffdshow and mkvsplitter.

I think I’ve got it right, although I’m pretty clueless when it comes to the gory details of media playback on Windows.  Either way, this appears to work and MPC-HC claims it’s using ffdshow, with the notification area icons backing it up.

So far so good.  I’ve watched two videos that were horrendous, exhibiting the sync and frame dropping issues as soon as playback began.  Using the external filters appears to have cleared up my issues completely.  I haven’t looked in to enabling DXVA in ffdshow for acceleration yet, I’m just happy I can watch videos flawlessly now.

 

Well, it looks like I spoke too soon, the sync problems are back with a vengeance.

 

This is bloody annoying.

 

Oh, and happy 36th birthday to me.

Pausing and Buzzing Sound

A few weeks back I went through a round of upgrades and handing-down, where my father received my first-gen Core i5-750 and I upgraded to an i5-2500K.  The old computer has performed exceptionally since I put it together, with hardly a problem, and the old man doesn’t need the horsepower of a slightly more modern system.

The new machine has the aforementioned “unlocked” Core i5 2500K, stock clocked at 3.3GHz (with SpeedStep enabled), with 8GB of Kingston DDR3 1600 RAM at 1333, which is what the BIOS first set it to; I’ve not been arsed to bump it manually since the performance improvements would be so negligible as to be unnoticeable.  The motherboard is an ASUS P8P67 Rev3.1, featuring onboard sound, gigabit ethernet, and bluetooth.  Graphics are handled by a GeForce 460 GTX, and wireless connectivity by a D-Link DWA-552 wireless N adapter.  The graphics and wireless card previously inhabited the i5-750 machine, and worked without problems for over a year.

When watching a video, be it in Media Player Classic, VideoLan or YouTube, or listening to music with foobar2000, the interface will become unresponsive and the audio will buzz for about a second.  This happens frequently but inconsistently.

Searching for other folks with this problem, and hopefully a solution, didn’t turn up much until I came across a link leading to “the Sycon’s DPC Latency Checker“.  This program measures the latency of Deferred Procedure Calls (the link describes the concept in detail), where a problem free computer should produce output that looks somewhat like this (I am using the samples from Sycon’s site, I didn’t screencap my own use):

When there’s a problem, it looks more like:

While I wasn’t quite seeing such predictable spikes, I was getting high latency at intermittent intervals.  Determining the cause of the high latency, a poorly performing device driver, is to go through every non-essential device in Device Manager, and disable it.  After going through the first few that came to mind (the nVidia audio driver, Realtek audio driver, and Intel gigabit LAN), I finally disabled the D-Link wireless adapter and watched as the red spikes disappeared.

The suggested solution is to update the driver for the offending device and hope that the problem is fixed.  Unfortunately, the driver for this adapter hasn’t been updated since late August of 2010!

Instead I took a quick trip to a local computer shop and picked up an ASUS PCE-N15 wireless adapter (which uses a Realtek chip).  It took just a few minutes to swap adapters and plug everything back in.

So far I’ve watched an x264 720p video with DTS audio while writing this and maxing out my network bandwidth for about 45 minutes, keeping the DPC Latency checker in the background.  While it’s peaked at 721µs, it has remained in the green and the whole video played without a single stutter.

It’s odd that I never saw this behaviour previously with (almost) exactly the same hardware.  The D-Link never caused problems before (except for an issue when I was dual-booting to Linux).

The replacement adapter “only” cost just a bit less than $40 CDN.  I’ve read many accounts of people who recommend one stay clear of ASUS hardware, but after four motherboards, a DVD and BluRay burner, as well as an ASUS notebook, I’ve yet to encounter a significant problem.  Well, okay, they did ship the notebook with Windows Vista.  But aside from that, I’ve not had an issue with their products.

VirtualBox HostAudioNotResponding

Starting a VirtualBox virtual machine results in a warning popup:

This is because Windows/the audio driver has disconnected the devices due to nothing being plugged in to the relevant ports.  Modern audio hardware has a feature called jack sensing, and can disable the respective devices when there’s nothing to receive input from or send input to.

Plugging my headset/mic combo into the front-panel audio connectors results in the microphone recording source being enabled.

If you want these sources to be available to your VM, ensure they’re plugged in before starting it.