Tuesday, October 18, 2011

Ubuntu 11.10 - Getting KeePass2 working with Chrome again

Rather rashly this time around, I updated my system to the latest version of Ubuntu, 11.10, the day it came out. The upgrade itself went fairly smoothly, although I was disappointed to find that the plugin that links my password manager of choice, Keepass2 with my browser of choice, Google Chrome, stopped working. It just popped up an error box saying it didn't recognise the plugin any more. KeePass still worked, it just was no longer able to communicate with Chrome.

After a bit of searching I couldn't find anyone else with the same issue, and I stumbled upon this answer almost by accident. The secret is that the KeePassHttp.plgx plugin, which is what used to work with Ubuntu 11.04, is not what you want any more. What you do want are two .dll files instead. I went through the following steps to get it working again:

1. From the KeePassHttp website, I downloaded the whole package (it gives a choice of a .zip or tar.gz), click either button. Ignore that the page says "Sorry, there aren't any downloads for this repository." There are!

2. Open the package file you just downloaded - double-clicking it will open it in Archive Manager.

3. Open some of the subdirectories in that folder until you find the two files called "KeePassHttp.dll" and "Newtonsoft.Json.dll". Select those two files and drag them to the Desktop. This will extract those two files, making them ready for the next step.

4. Open up a terminal window. Assuming the files are on your desktop, you can use the following command to copy them to the /usr/lib/keepass2 directory:

sudo cp ~/Desktop/*.dll /usr/lib/keepass2

While you are in a terminal window, rename the KeePassHttp.plgx file so KeePass doesn't throw that error up when you open it:

sudo mv /usr/lib/keepass2/KeePassHttp.plgx \ /usr/lib/keepass2/KeePassHttp.plgx.temp

5. If you now open KeePass2, it shouldn't throw up the error box, and if you go to Tools -> Plugins... the plugin should now appear!

One other thing I did was re-install KeePass2. With the latest release, there is no need to use the separate PPA repository as you did in previous versions of Ubuntu. It is now in the main Universe repository. What I did was uninstall KeePass2, remove the jtaylor PPA repository under software sources (either in update manager or synaptic, if you have that installed), and re-install it from the default Ubuntu repository.

I'm not sure if this is needed for the above solution to work, but I did it just to tidy things up a bit. With less repositories to check, updates go a bit quicker too. With any luck it will also install the correct packages required, that may have changed since 11.04.

Monday, July 11, 2011

Follow-up on 11.04

Well, it's been quite some time now using Ubuntu 11.04. What are my thoughts of using the Unity interface?

Let's put it this way - I've switched back to Ubuntu Classic and have almost forgotten about Unity. Just didn't enjoy it. It was especially clunky when running two screens, with the icon bar down the left side of the screen. That icon bar had a name, didn't it? I've forgotten, it's been pushed out of my memory.

In recent weeks, I've tried out CrunchBang Linux on the laptop. It's a minimal, stripped-down distro based on Debian. It's nice and quick on that, and I'm quite warming to the way the Openbox window manager does things. Being a lightweight distro, there are things that aren't in an Ubuntu install, like a suspend function. I have to do some research into enabling that - whether something has to be installed or not.

Not sure on whether I would put it on the desktop yet. For one, it is based on a fairly old 2.6.32 kernel, that doesn't fully support the solid-state drives' TRIM command. There is an experimental kernel that is an option that comes up when you first install - the "cb-welcome" script is excellent, asking whether to install various commonly-used programs.

One other thing is whether DigiKam would install properly. I have it installed, grudgingly, on this Ubuntu system because it's the next best thing to forking out big bucks on Bibble or Adobe Lightroom. Grudgingly, because it's a KDE program, a buttload of extra KDE-related cruft is installed along with it. I don't want to clog up a nice, fast Crunchbang install with that.

We'll see.

Thursday, May 12, 2011

Thoughts on Ubuntu 11.04 and Unity

After waiting for a few weeks until the commotion died down somewhat, I thought I would have a look at the latest version of Ubuntu, version 11.04, codenamed Natty Narwhal. A major feature of this release is the new desktop environment/interface, known as Unity. This has created a lot of controversy on the internet, which initially made me hesitant to upgrade. Lots of people have complained that it removes a lot of functionality, that things are not where they once were, and so on. I thought that rather than just stick with the old version stubbornly, or switch to the KDE environment, I would actually install it and use it for a week or two, before passing judgement.

First of all, I used my laptop as a guinea pig. There is nothing of importance on it that isn’t backed up elsewhere, so if everything got hosed it would not be too much of a drama to do a clean install. Bringing up the update manager, I clicked the “Upgrade Now” button that has been teasing me for the last few weeks. The upgrade process started, and I left it to its own devices to scan the system, download, install and configure the latest versions of everything.

Much to my pleasure, when it was finished and after rebooting, the system actually started and loaded up the shiny new Unity desktop. All the effects were running, and this is machine had a fairly old ATI card and runs the open-source radeon drivers. It’s a bit of a departure from previous versions of Ubuntu, so I can see the concern other users have. A bit of experimental clicking around brought up my first problem - how do I launch more than one instance of a program, such as the terminal window? Clicking the terminal button on the side pane (which was there because it was configured as a button on the task bar on the previous install, along with Chrome) again just brought the existing terminal window to focus.

What?

That’s not going to be much use, I thought - so a consultation of the Google was called for. Turns out, giving the icon a click with the middle mouse button is the secret to opening additional instances.

I recommend searching around for some Unity guides or tutorials  - a good selection is at this site to get an idea on how to use it. Some sort of guide or walkthrough should have been included with the default install - a link on the desktop or something, as this is a pretty big step. There’s a bit of a learning curve, but I think it has a lot of promise. Another little gem I found out was the use of the Windows key (or Super key) - a quick press brings up the dash where you can type in a program’s name, similar to the functionality in Windows 7; a longer press bring up the launcher, holding it down longer puts numbers on the icons that you can then use as shortcut keys to launch the programs.

Also check out this page of things to do/tweak after installing.

After one afternoon’s usage, I get the feeling that it’s not a massive backward step as people are saying, but a different way of doing things. It’s like the step from Windows XP to Vista or Windows 7 - things are in different places now, there’s some adjustment required, but after using the new features it’s difficult going back to the old way.

After mucking about with the laptop for a bit, I thought I would do a trial install on my main system. Still not willing to risk the main install, I grabbed an old hard drive, put that in my system and unplugged my existing drives. I then started the install process from CD, from scratch.

One of the concerns I had was that Unity is a part of Compiz - the desktop effects package that does not run on the open-source nouveau drivers for Nvidia cards. I have been running those on my desktop since they allowed the suspend functionality to work - the binary nvidia drivers did not do that. So this was going to be the big test - if suspend didn’t work on the new version, I would probably give the upgrade a miss or try KDE perhaps.

After quite a while of downloading updates and various components during the install (the default mirror must have had a really slow connection), the install completed and I rebooted. First impression - the loading screen actually worked properly. The nvidia drivers might finally be playing nice! Login screen came up, followed by the desktop. Going to the nvidia-settings program confirmed that the binary drivers are in use, so it was time to see if suspend worked or not. Clicking the suspend option in the main menu, the system actually powered down. No blank screen with blinking cursor in the corner, like in previous versions. I was impressed. I’d be even more impressed if the system came back up again. Hitting the power switch, the drive span back up, up came the password prompt to unlock the system. Entering the password brought the desktop back up, with a minor bit of graphical glitchiness on the side pane, but once I moved the mouse over it, it all came good. Success!

One thing I noticed was the behaviour of the launcher with a multi-monitor configuration. the way I have my screens set up, the second screen is off to the left of the main screen. So if I move the mouse to the left edge of the main screen, to bring up the launcher, if I move any further left onto the second screen, the launcher disappears again. Might have to look into that, whether I can move it to the right edge or something.

So far, that is my experience with 11.04. Further discoveries, from a longer period of use, will be posted in the future.

Thursday, March 17, 2011

Using a solid state drive in a MythTV box - does it make a difference?

The other day I finally got around to installing a solid-state hard drive (a 40GB Intel X25-V) into my MythTV box, to see what sort of difference it would make in day-to-day running. Of course, I only have the root partition on it, no recordings. I still have the 2TB drive for them. What prompted the move was the occasional sluggishness to respond when going through menus, and the odd pause or stutter when hitting the "i" or Info button on the remote. It would also sometimes get a brief pause when it popped up the notice that a commercial break was about to start.

I figured that it was down to too much being asked of the main storage drive - asking it to respond snappily when it is recording four or five episodes and playing back another is just too much.  What if there was a second drive that could take care of the actual running of the machine, just leaving the big drive as a bit bucket to store media on?

Taking the Intel SSD from my main desktop (I had bought a 60GB OCZ Vertex to replace it), there was a spot ready for it in the Lian Li PC-Q07 case - right under the main drive. It wouldn't get a whole lot of air, so I'm glad it's a cool-running SSD. I copied the root partition from the 2TB drive onto it, as well as creating a swap partition. Partition sizes were kept down - 16GB for the root partition, 3GB for swap, leaving more than half free for the drive to use for wear-levelling. Overkill, but Mythbuntu doesn't need much room for its base installation. Eventually I got it working and booting from the ssd (after much swearing - how I did it may be covered in a future post) and I could check out the results.

And has it made a difference? A small one, but it's noticeable. Going through menu screens is a little quicker, more responsive. During playback, hitting the info button brings up the playback time without any stutters. Ending playback brings you back to the menu quicker. It's made the interface seem that little more polished. I'd say that it's not the fact there's a solid-state drive that has made the difference, more the fact that there is a second disk that's able to take some of the load off the storage one. I am not able to test it with another type of drive (frankly I can't be stuffed), but there are advantages in power consumption in going for an SSD.

Saturday, February 19, 2011

Potential problem syncing Tomboy Notes

A problem I had the other day was getting the Tomboy Notes application to sync correctly with my other PCs and the Ubuntu One service. The thing that triggered it was editing a note using the Ubuntu One web interface - basically editing the note  stored on Ubuntu's servers. When I later tried to sync my notes on the PC, the application said the sync failed, please check below for error messages. When I checked the messages below, there weren't any. Rather frustrating.

Looking on the troubleshooting section of the Ubuntu wiki, towards the bottom of the page, it mentions the commands required to start Tomboy with debug messages. As follows below:

Getting debug info

  1. Quit Tomboy
  2. Applications->Accessories->Terminal, and run:
    • tomboy --debug > ~/tomboy_debug.log

One thing to note: to quit Tomboy, I had to right-click on the Tomboy icon on the panel and select "remove from panel". Check in the System Monitor (System -> Administration -> System Monitor) that the tomboy process is no longer running.

When I ran the above command, tried to sync (unsuccessfully) and checked the log file, it came up with an error of:


[ERROR 19:51:49.776] Synchronization failed with the following exception: String was not recognized as a valid DateTime.
  at System.DateTime.Parse (System.String s, IFormatProvider provider, DateTimeStyles styles) [0x00000] in :0 


Doing a search on this message revealed a couple of other people who had the same issue. One such user was here, and one of the answers pointed to this bug report here.

The solution required for me wasn't quite as drastic as what they tried - backing up all notes, deleting them from the Ubuntu One web interface and locally on the machine, syncing, then re-creating all notes. I just deleted the one note I edited from the web interface and on my local machine, and sync worked again. I recreated the note, tried re-syncing, and it all worked fine.

The moral to the story is, don't use the web interface to edit your notes. It could cause problems.

Saturday, January 29, 2011

Observations on using the Nouveau driver

A few weeks back I made a post about switching back to the open-source nouveau drivers for my Nvidia graphics card. The main upside was that the suspend and hibernate functionality now worked - something that did not happen with the binary drivers from Nvidia. This is a concern for me, since I now have a Home Theatre PC running continuously and I would like to make some power savings with my main computer.

After running for a few weeks, here are some things I have noticed:

Artifacts on screen after coming out of suspend. They usually take the form of a vertical line of red pixels, spaced apart. They disappear after a reboot, so it is not permanent, but it is mildly annoying.

OpenGL performance much reduced. I was able to bring some of it back by installing libgl1-mesa-dri-experimental, found in the Ubuntu repositories. They bring a few extra modules for using OpenGL, and allows programs like Google Earth to run again (more about this next). The modules in the repository are a fairly early build - people have had more success using current-build versions of the Gallium3D driver. I haven't tried them yet, not sure if I will.

Google Earth problems. In linux, Google Earth makes use of OpenGL to draw its graphics on screen. The implementation in the binary Nvidia drivers is quite good, in the open-source drivers it is lagging behind somewhat. Before installing libgl1-mesa-dri-experimental, Google Earth would not run at all, simply putting up a message box asking you to update your drivers. After installing, it now runs, albeit slowly.

I'm still in two minds about whether to keep these drivers or go back to the binary versions. I'll probably see how things go for a while - how much I make use of suspend (which is sooo much quicker to resume from than booting from scratch - the AHCI manager takes forever to read the drives in the BIOS) will probably determine things. It might even be worth trying an ATI card to see how the drivers are with that. I'm quite impressed by the open source radeon drivers in my laptop. I don't really use my desktop now for MythTV since building the HTPC, so VDPAU performance isn't so much a priority.

I'll update in time, whenever a decision is made.

Tuesday, January 11, 2011

A MythTV box for the lounge room: Part 3: The build

In part 2 of this series, I went over the decision process for choosing the hardware used in the MythTV box. To sum up, I went with a Zotac IONITX-A, due to the low-power Intel Atom/Nvidia ION CPU/graphics combination, inbuilt wireless, and an included laptop-style power supply. I could also use some of the DDR2 RAM sticks that I already had.

Other items bought for the box included two more ASUS U3100 mini USB TV tuners. These supplemented the one I already had (sadly I couldn't use the PCI tuner card I had in my main PC, due to the board not having any PCI slots). I picked up a 2 terabyte Samsung ecogreen hard drive as the system and storage disk. These have had good reports of being low noise, low power consumption items.

The remote control chosen was a Hauppauge unit, as described in an earlier post.

The choice of case was driven by stock availability more than anything - initially I had chosen a Mini-ITX case from Aywun (known as Apex in some countries) but none would be arriving in stock until mid January - so I still would have been waiting. Since I wanted this to be completed as a Christmas holiday project, I looked elsewhere and found the Lian Li PC-Q07 - a rather minimal-looking aluminium case. It was a tad larger than the spot I had originally planned to put the box, but I was able to do some re-arranging inside the cabinet (like removing the video recorder - won't be needing that relic any more!) and it fits nicely.

Observations from assembly
One thing noticed when putting the various parts together is that the TV tuners would not fit together when pugged into adjacent USB slots at the back of the motherboard. Their chunky plastic bodies meant you could not plug much into a neighbouring slot. This was solved by picking up some USB extension cables and hanging the tuners off those. Using the cables also meant that I could run the tuners out the back of the cabinet into free air, rather than let them warm up the inside of the cabinet. They do get surprisingly warm during use.

To connect them to the aerial, I purchased a three-way digital TV splitter. I was concerned about losing too much signal with three plugged in, but in use the strength has been around 66-70%, enough to give trouble-free viewing.

The PC-Q07 case has nowhere inside it to allow for additional fan mounting, but it was designed to take full-sized PC components, like normal ATX power supplies, full-sized DVD drives and the like. Since there was no need for a PSU to be put in it (the motherboard I chose had its own laptop-style power brick that could sit out behind the cabinet), I rigged up a 92 mm fan in the gap where a power supply would normally go. It is set up so it is drawing in air from behind the case, supplying a stream of fresh air to the other, smaller fan on the CPU/GPU, as well as the hard drive. I just used one of the power supply mounting holes  - it seems to be holding in place just fine. To stop air short-circuiting too much straight out the back, I cut up a small piece of cardboard and used that to blank off the remainder of the gap in the power supply hole.

To get a better supply of air to the box, I borrowed a holesaw, attached it to my drill, and cut a couple of extra air holes in the back of the TV cabinet. This also provided some extra paths to lead cables from.

The infrared sensor from the remote was on a fairly long cable, so I was able to lead that out the back of the cabinet to a spot that is higher up, easier for the remote to reach.

Finally, I've left the wireless receiver for the keyboard and mouse plugged into the back for convenience - I can just bring them down from the other room if some typing or clicking is needed.

Findings from the first weeks of use
First of all, and the biggest relief, is that the Wife Acceptance Factor (WAF) is very high - she loves it. We both love having the power to watch what we want, when we want, being able to skip the ads if we've recorded a show earlier. Playback is flawless - any glitches we have aren't any worse than what we previously encountered with our HD set top box. It can handle 1080i playback perfectly smoothly. The only stutters are related to the hard drive when it is working particularly hard, like the other night when we found ourselves in the situation of recording four shows simultaneously (two were on different sub-channels on the same network, so one tuner could record them both) while watching a recording of a previous program. You could see the hard drive light blinking away pretty furiously. Oh yes, it would have also been flagging commercials at the same time. All these things can be tweaked and tuned, I've set it to only run one job at a time to give the little atom CPU some breathing room. Commercial flagging has been set to begin as soon as recording starts - I changed that from the default of waiting until a show has finished recording. So far, it hasn't slowed things down noticeably.

For the playback settings in MythTV, I have chosen the VDPAU Normal profile. I haven't tried the High Quality setting yet, the GPU may struggle with that, and Normal looks just fine to me.

Mythbuntu:
I decided to used the MythTV-oriented version of Ubuntu for this project, Mythbuntu. This runs the XFCE desktop, using less resources than Gnome would. Setup was quite simple, and I was pleased to find that Mythweb was installed by default - something I had never bothered with before on my previous desktop PC Myth install.

I would recommend this to anyone else considering a dedicated HTPC build. It is quite stripped back, however, so it is not much use for other purposes (although there is a facility to enable it to be reconfigured as a regular desktop through the Mythbuntu control panel).

CPU Use:
One CPU-hungry process I have noted is upconverting the audio stream to 5.1 Dolby Digital. Remotely logging in and checking CPU use during playback shows that with regular stereo passthrough to the optical output, usage is around 12-14%. With upconversion enabled at best quality, CPU use shoots up to around 63%.

Memory:
Memory-wise, I have followed recommendations posted elsewhere on the web and run two sticks of RAM, enabling dual-channel operation. This provides better bandwidth for the GPU in particular, improving playback performance.

I have two, one-gigabyte sticks of DDR2-800 ram installed, with the graphics set in BIOS to use the maximum 512MB. This has been quite sufficient, and I dare say that 1 GB would be enough if it weren't for the onboard graphics using some of the memory.

Power consumption:
I have a power meter (discussed in an earlier post on my other blog) connected to the wall outlet, measuring the power use of the PC, as well as the VGA-component transcoder. When idle, the unit consumes 44 Watts. Watching live TV, it uses 47 Watts. When 5.1 upconversion was enabled, it used 49 Watts, reflecting the extra CPU usage.

These figures are quite a bit higher than what I've seen elsewhere on the web - I saw a picture of a system playing a blu-ray disc using 30W. And this machine doesn't have an optical drive installed. All I can think of is the extra power draw of the TV tuners, the fan, and the fact that linux may not make the best use of power saving features of the CPU compared with windows 7. The other factor could be the power meter being out, something I'm finding quite likely. It does give pretty high voltage readings, which would as a result give an inflated Watt reading.

Final thoughts:
I'm glad the system build went off without a hitch. Performance is fine, although had I gone with a core i3 system it could have handled many more concurrent jobs like commercial flagging without breaking a sweat. Power use would have been higher, too, as too the cost.

The wireless signal is not the best, with the antenna located at the back of the motherboard hidden away at the back of the TV unit. I may try an external antenna, to let it get a better signal than the 40-ish percent it now gets. It makes copying movie files pretty slow, the way it is at the moment.

I'm wondering whether to put in a solid-state hard drive to have the operating system partition located on, to free up the workload of the storage drive. There is sometimes a delay of a few seconds when starting playback of a show. This isn't a major priority - it will probably inherit the Intel X25-V from my main system whenever I upgrade that.

Friday, January 7, 2011

Switched back to nouveau graphics driver - suspend now works!

As part of the process of building the separate MythTV box (as seen in my last few posts), I no longer needed the VDPAU acceleration for TV playback on my main PC. I also wanted to see if the suspend and hibernate functionality worked with the open source nvidia drivers (nouveau), as opposed to the proprietary binary ones. Booting the system with an Ubuntu live CD, which uses the nouveau drivers by default, let me suspend the computer and resume correctly - something it did not do with nvidia's binary drivers.

So under System -> Administration -> Additional Drivers, I disabled the proprietary drivers, which re-installed the nouveau driver. Rebooting, the screen came back up, but only one of them (I have two), and at the wrong resolution. The cause of this was a fix I had applied earlier to make the boot screen look right with the Nvidia drivers, as described at the end of this earlier post. Once I removed the extra text from the grub boot command, everything worked fine. Suspend and hibernate both worked, although I found hibernate to be a little pointless - it took about the same length of time as a normal boot.

The only downside was the compiz desktop effects no longer worked, although I believe if you use a more current version of the nouveau drivers it may do so. 3D performance is nowhere near what the binary drivers provide either, but that isn't so much of an issue since I dual boot with windows. Games can be played there.

Tuesday, January 4, 2011

A MythTV box for the lounge room: Part 2: Choosing the box to build

Making sure that I could get something displaying on my TV was the main stumbling block with the build of the MythTV PC. Since it was overcome in my last post, I was now free to get on with speccing up a machine. The major requirements for this were:
  • It had to use a minimal amount of power, as it would likely be running 24/7 (the nvidia binary driver means suspend doesn't usually work).
  • It had to be able to handle 1080i playback of recorded or live TV, flawlessly
  • It needed to have an S/PDIF output, either optical or coaxial to connect to my existing receiver
  • It needed a wireless network connection, as it was at the opposite end of the house to where my router was.
  • The overall cost had to be similar to the price of buying a DVR + IceTV subscription
This meant I had a few different options, which are detailed below.

Option 1 - Mini-ITX, using an Intel Atom/Nvidia ION board
Motherboard: Zotac IONITX-A
CPU: Intel Atom 330 Dual core 1.6GHz
Graphics: Onboard Nvidia 9400
DDR2 ram slots
Onboard Wireless-N adapter
90W Power supply included (laptop-style)
Case: Lian Li PC-Q07

Pros:
Lowest power usage of all options
Everything integerated on the board
Power supply included, and can be located away from PC case - less heat
Small size will fit into TV cabinet
Can use existing DDR2 RAM I already have

Cons:
Not useful for much else if this project doesn't work out
Not the cheapest option

Option 2 - Separate CPU/Motherboard, budget option
Motherboard: Gigabyte G41M-combo
CPU: Intel Pentium E5400 2.7GHz
Graphics: Nvidia GT210
DDR2 ram slots
Case: Antec NSK3480 (with PSU)

Pros:
Better performance than Atom CPU
Can be used as general purpose PC later
Cheaper than option 1
Can use existing DDR2 RAM I already have

Cons:
More power use than option 1
Will need an S/PDIF bracket for optical out
Takes up more room with full-size case
Need separate Wifi card

Option 3 - Separate CPU/Motherboard - higher end
Motherboard: Gigabyte GA-H55N-USB3 Mini-ITX
CPU: Intel Core i3-540
Graphics: Nvidia GT210
DDR3 RAM slots
Case: Lian Li PC-Q07
PSU: Corsair VX450

Pros:
Best performance of all, no problems handling all jobs, even concurrent ones
Good power efficiency
Same small form factor as ION

Cons:
More power use than option 1 (maybe not much more)
Need separate Wifi card
Lots more expensive than other options
Newer CPUS now out (Sandy Bridge)

Of all these options, I went with Option 1 - the Atom/ION combination. It had the best compromise of the three, with the lowest power usage. That is important to me, as I wanted to reduce the ongoing costs as much as possible. That's what eliminated option 2 as well, along with the fact that a larger case would have to sit behind the TV cabinet, in amongst the already messy tangle of cables. Option 3 was the most attractive performance-wise, but was really getting quite expensive compared to the others, and getting a little hard to justify the price for something that is just for watching TV, after all.

In the next part, I will go over the build of the box, setting it up and what my experiences have been with it.