If you have waded through my previous post about adding a larger drive to an lvm volume running on an mdadm RAID array, you'll have seen it's a bit of a fiddly, complex process. I have been fiddling around a bit with ZFS on Linux on my old desktop machine (Core 2 Quad Q9300, 8GB RAM). I had a couple of old 1TB drives, and added the 2TB drive that I removed from the home theatre PC, mentioned in the previous post. Actually, I had put the 3TB drive in this old box initially, intending it to replace the HTPC. But it's a bit power hungry, using around 90W at idle, and I am having some niggling playback issues with it. But that's another story. So the 3TB WD Red drive gets replaced with the old Samsung 2TB.
With the three drives, I tried creating a ZFS raidz array, basically equivalent to RAID 5. It runs pretty well. Swapping the drives over (from 3TB to 2TB) gave me an opportunity to do the ZFS version of a drive swap.
It was a bit of an anticlimax, really. There was one command, the syntax from the man page is below:
zpool replace [-f] pool device [new_device]
In my case it was something like
sudo zpool replace tank /dev/disk/by-id/scsi-SATA...(the drive removed) /dev/disk/by-id/scsi-SATA....(the 2TB drive)
That started off the resilvering process (resynchronising the data across the drives). If I then were to replace each other drive, one at a time, with the above process, it would resize the array to match the new drive sizes.
The beauty of ZFS is it simplifies things so much. It is the RAID management and file system all in one.
I would have liked to run it in the HTPC, but ZFS is quite resource-hungry, in terms of processing power and memory. Since my HTPC just has a little Atom 330 chip and is maxed out with 4GB of memory (of which only 3GB is visible), I would be staying with mdadm and lvm. There is virtually no noticeable performance penalty with it. Oh well, going through all those steps is not exactly a frequent task.
Making the user experience of Ubuntu Linux and MythTV just that little bit better.
Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts
Monday, November 26, 2012
Adding a larger drive to a software RAID array - mdadm and lvm
The MythTV box I have in the lounge previously had two storage hard drives, in a RAID 1 configuration to prevent data loss in case of a drive failure. The drives were a 3TB Hitachi and a 2TB Samsung. I figured the Samsung drive was getting on a bit now, and it was time a new drive was installed. Might as well make it a 3TB model as well, to take advantage of all the space available on the other one that was sitting unused.
A 3TB Western Digital Red drive was picked up. I chose this as it is designed for use in a NAS environment: always on. It also has low power consumption and a good warranty. I considered a Seagate Barracuda 3TB - they were cheap, performance would be better than the Red, but they are only designed for desktop use, around 8 hours a day powered on. Warranty was pretty short as well.
Removing and replacing the old drive
The drives were configured in a software RAID 1 array, using mdadm, with lvm on top of that. This makes the array portable, and not dependent on a particular hardware controller.
The commands here were adapted from the excellent instructions found here at howtoforge.com.
Fortunately I had enough space on another PC that I was able to back up the contents of the array before starting any of this.
To remove the old drive, which on this machine was /dev/sdc, the following command was issued to mark the drive as failed, in the array /dev/md0:
sudo mdadm --manage /dev/md0 --fail /dev/sdc
Next step is to remove the drive from the array:
sudo mdadm --manage /dev/md0 --remove /dev/sdc
Then, the system could be shut down and the drive removed and replaced with the new one. After powering the system back up, the following command adds the new drive to the array:
sudo mdadm --manage /dev/md0 --add /dev/sdc
The array will then start synchronising the data, copying it to the new drive, which could take a few hours. Note that no partitioning was done on the disk, as I am just using the whole drive in the array.
While the sync is in progress, you can check how it is progressing via:
cat /proc/mdstat
It will show a percentage of completion as well as an estimated time remaining. Once it is done, the array is ready for use! I left the array like this for a day or so, just to make sure everything was working alright.
Expanding the array to fill the space available - the mdadm part
Once the synchronisation has completed, the size of the array was still only 2TB, since that is the largest a RAID 1 array could go when it consists of a 3TB and a 2TB drive. We need to tell mdadm to expand the array to fill the available space. More information on this can be found here.
This is where things got complicated for me. It is to do with the superblock format version used in the array. More detail can be found at this page of the Linux RAID wiki.
To sum up, the array I had was created with the version 0.90 superblock. The version was found by entering
sudo mdadm --detail /dev/md0
The problem, potentially, was that if I grew the array to larger than 2TB it may not work. As quoted by the wiki link above:
Now, Mythbuntu 12.04 runs the 3.2 kernel, so according to that it should be OK supporting up to 4TB. But I wasn't 100% sure on that, and couldn't find any references elsewhere about it. I decided the safest way to go about this was to convert the array to a later version of the superblock, that didn't have that size limitation. Besides, it would save time in the future in case of trying to repeat this with a drive larger than 4TB.
Following the suggestion of the wiki, I decided to update to a version 1.0 superblock, as it would store the superblock information in the same place as the 0.90.
Note: if you are trying this yourself, and the array is already version 1.0 or later, then the command to grow it is just as below (may not want to do it with 0.90 superblock and larger than 2TB):
mdadm --grow /dev/md0 --size=max
Since I was going to change the superblock version, it involved stopping the array and recreating it with the later version.
Once again, to check the details of the array at the moment:
sudo mdadm --detail /dev/md0
Now, since the array is in use by MythTV, I thought it safest to stop the program:
sudo service mythtv-backend stop
Also, I unmounted where the array was mounted:
sudo umount /var/lib/mythtv
Since the data is in an LVM volume on top of the array, I deactivated that as well (the volume is named raid1 in this instance):
sudo lvchange -a n raid1
The array is now ready to be stopped:
sudo mdadm --stop /dev/md0
Now it can be re-created, specifying the metadata (superblock) version, the RAID level, and the number and names of the drives used:
sudo mdadm --create /dev/md0 --metadata=1.0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
The array will now start resynchronising. This took a number of hours for me, as there were around 770GB of recordings there. The RAID wiki link included --assume-clean in the above command, which would have skipped the resync. I elected to leave it out, for safety's sake.
Progress can be monitored with:
cat /proc/mdstat
The lvm volume can be restarted:
sudo lvchange -a y raid1
and the unmounted volumes can be re-mounted:
sudo mount -a
Check if they are all there with the
mount
command. The mythtv service can also be restarted:
sudo service mythtv-backend start
When the array is recreated, the UUID value of the array will be different. You can get the new value with:
sudo mdadm --detail /dev/md0
Edit the /etc/mdadm/mdadm.conf file, and change the UUID value in it to the new value. This will enable the array to be found on next boot.
Another thing to do before rebooting is to run
sudo update-initramfs -u
I didn't do this at first, and after rebooting, the array showed up named /dev/md127 rather than /dev/md0. Running the above command and rebooting again fixed it for me.
Expanding the array to fill the space available - the lvm part
Quite a long-winded process, isn't it? Using the lvm command to show the lvm physical volumes:
sudo pvdisplay
showed the array was still 1.82TiB (2TB). It needed to be extended. The following command will fill the volume to the available space:
sudo pvresize -v /dev/md0
To check the results, again run:
sudo pvdisplay
Now, running:
sudo vgdisplay
gave the following results for me:
--- Volume group ---
VG Name raid1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.73 TiB
PE Size 4.00 MiB
Total PE 715397
Alloc PE / Size 466125 / 1.78 TiB
Free PE / Size 249272 / 973.72 GiB
VG UUID gvfheX-ifvl-yW9h-v4L2-eyzs-95fe-sng2oN
A 3TB Western Digital Red drive was picked up. I chose this as it is designed for use in a NAS environment: always on. It also has low power consumption and a good warranty. I considered a Seagate Barracuda 3TB - they were cheap, performance would be better than the Red, but they are only designed for desktop use, around 8 hours a day powered on. Warranty was pretty short as well.
Removing and replacing the old drive
The drives were configured in a software RAID 1 array, using mdadm, with lvm on top of that. This makes the array portable, and not dependent on a particular hardware controller.
The commands here were adapted from the excellent instructions found here at howtoforge.com.
Fortunately I had enough space on another PC that I was able to back up the contents of the array before starting any of this.
To remove the old drive, which on this machine was /dev/sdc, the following command was issued to mark the drive as failed, in the array /dev/md0:
sudo mdadm --manage /dev/md0 --fail /dev/sdc
Next step is to remove the drive from the array:
sudo mdadm --manage /dev/md0 --remove /dev/sdc
Then, the system could be shut down and the drive removed and replaced with the new one. After powering the system back up, the following command adds the new drive to the array:
sudo mdadm --manage /dev/md0 --add /dev/sdc
The array will then start synchronising the data, copying it to the new drive, which could take a few hours. Note that no partitioning was done on the disk, as I am just using the whole drive in the array.
While the sync is in progress, you can check how it is progressing via:
cat /proc/mdstat
It will show a percentage of completion as well as an estimated time remaining. Once it is done, the array is ready for use! I left the array like this for a day or so, just to make sure everything was working alright.
Expanding the array to fill the space available - the mdadm part
Once the synchronisation has completed, the size of the array was still only 2TB, since that is the largest a RAID 1 array could go when it consists of a 3TB and a 2TB drive. We need to tell mdadm to expand the array to fill the available space. More information on this can be found here.
This is where things got complicated for me. It is to do with the superblock format version used in the array. More detail can be found at this page of the Linux RAID wiki.
To sum up, the array I had was created with the version 0.90 superblock. The version was found by entering
sudo mdadm --detail /dev/md0
The problem, potentially, was that if I grew the array to larger than 2TB it may not work. As quoted by the wiki link above:
The version-0.90 superblock limits the number of component devices within an array to 28, and limits each component device to a maximum size of 2TB on kernel version [earlier than] 3.1 and 4TB on kernel version 3.1 [or later].
Now, Mythbuntu 12.04 runs the 3.2 kernel, so according to that it should be OK supporting up to 4TB. But I wasn't 100% sure on that, and couldn't find any references elsewhere about it. I decided the safest way to go about this was to convert the array to a later version of the superblock, that didn't have that size limitation. Besides, it would save time in the future in case of trying to repeat this with a drive larger than 4TB.
Following the suggestion of the wiki, I decided to update to a version 1.0 superblock, as it would store the superblock information in the same place as the 0.90.
Note: if you are trying this yourself, and the array is already version 1.0 or later, then the command to grow it is just as below (may not want to do it with 0.90 superblock and larger than 2TB):
mdadm --grow /dev/md0 --size=max
Since I was going to change the superblock version, it involved stopping the array and recreating it with the later version.
Once again, to check the details of the array at the moment:
sudo mdadm --detail /dev/md0
Now, since the array is in use by MythTV, I thought it safest to stop the program:
sudo service mythtv-backend stop
Also, I unmounted where the array was mounted:
sudo umount /var/lib/mythtv
Since the data is in an LVM volume on top of the array, I deactivated that as well (the volume is named raid1 in this instance):
sudo lvchange -a n raid1
The array is now ready to be stopped:
sudo mdadm --stop /dev/md0
Now it can be re-created, specifying the metadata (superblock) version, the RAID level, and the number and names of the drives used:
sudo mdadm --create /dev/md0 --metadata=1.0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
The array will now start resynchronising. This took a number of hours for me, as there were around 770GB of recordings there. The RAID wiki link included --assume-clean in the above command, which would have skipped the resync. I elected to leave it out, for safety's sake.
Progress can be monitored with:
cat /proc/mdstat
The lvm volume can be restarted:
sudo lvchange -a y raid1
and the unmounted volumes can be re-mounted:
sudo mount -a
Check if they are all there with the
mount
command. The mythtv service can also be restarted:
sudo service mythtv-backend start
When the array is recreated, the UUID value of the array will be different. You can get the new value with:
sudo mdadm --detail /dev/md0
Edit the /etc/mdadm/mdadm.conf file, and change the UUID value in it to the new value. This will enable the array to be found on next boot.
Another thing to do before rebooting is to run
sudo update-initramfs -u
I didn't do this at first, and after rebooting, the array showed up named /dev/md127 rather than /dev/md0. Running the above command and rebooting again fixed it for me.
Expanding the array to fill the space available - the lvm part
Quite a long-winded process, isn't it? Using the lvm command to show the lvm physical volumes:
sudo pvdisplay
showed the array was still 1.82TiB (2TB). It needed to be extended. The following command will fill the volume to the available space:
sudo pvresize -v /dev/md0
To check the results, again run:
sudo pvdisplay
Now, running:
sudo vgdisplay
gave the following results for me:
--- Volume group ---
VG Name raid1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.73 TiB
PE Size 4.00 MiB
Total PE 715397
Alloc PE / Size 466125 / 1.78 TiB
Free PE / Size 249272 / 973.72 GiB
VG UUID gvfheX-ifvl-yW9h-v4L2-eyzs-95fe-sng2oN
Running:
sudo lvdisplay
gives the following result:
--- Logical volume ---
LV Name /dev/raid1/tv
VG Name raid1
LV UUID Dokbch-ZJkg-QmRW-d9vR-wfM8-BFxb-3Z0krs
LV Write Access read/write
LV Status available
# open 1
LV Size 1.70 TiB
Current LE 445645
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
I have a couple of smaller logical volumes also in this volume group, that I have not shown. That's why there's a bit of a difference between the Alloc PE value in the volume group, and the Current LE value in the logical volume. As you can see from the lines shown in bold text, the volume group raid1 has 249272 physical extents (PE) free, and the logical volume /dev/raid1/tv is currently sized 445645. To use all space, I made the size 249272+445645, which is 694917.
The command to resize a logical volume is lvresize. Logical.
sudo lvresize -l 694917 /dev/raid1/tv
Alternatively, if you want to avoid all the maths, an alternative command is
sudo lvresize -l +100%FREE /dev/raid1/tv
That command just tells lvm to use 100% of the free space. I didn't try it myself (I only found it after running the command before it).
Now, after that has been run, to check the results, enter:
sudo lvdisplay
The results:
--- Logical volume ---
LV Name /dev/raid1/tv
VG Name raid1
LV UUID Dokbch-ZJkg-QmRW-d9vR-wfM8-BFxb-3Z0krs
LV Write Access read/write
LV Status available
# open 1
LV Size 2.65 TiB
Current LE 694917
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
and
sudo vgdisplay
gives:
--- Volume group ---
VG Name raid1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.73 TiB
PE Size 4.00 MiB
Total PE 715397
Alloc PE / Size 715397 / 2.73 TiB
Free PE / Size 0 / 0
VG UUID gvfheX-ifvl-yW9h-v4L2-eyzs-95fe-sng2oN
No free space shown; the lvm volume group is using the whole mdadm array, which in turn is using the whole of the two disks.
The final step for me was to grow the partition that is on the logical volume. I had formatted it with XFS, as it is good with large video files. XFS allows increasing size on a mounted partition, so the command used was:
sudo xfs_growfs -d /var/lib/mythtv
Finally, it is complete!
Tuesday, August 21, 2012
Upgrading MythTV to Mythbuntu 12.04 64-bit
As described in the previous post, the time had come to upgrade my MythTV installation. It had been installed using Mythbuntu 10.10, 32-bit. I wanted to move to the most recent version, currently Mythbuntu 12.04. There were two options available to me: upgrading the current installation, or a new install of the latest version, and copying the previous MythTV database over to it. The first option was not too appealing. Doing a distribution upgrade is a fingers-crossed, hope-this-works process a good part of the time - although I have had pretty good fortune with it on my desktop PC. If I were to go this route, I couldn't just upgrade from 10.10 -> 12.04. It would have to be 10.10 -> 11.04 -> 11.10 -> 12.04. Three complete system upgrades in succession, which would likely leave a lot of cruft left over in the installation. Lots of points of failure. The final nail in the coffin was that I wanted to move to a 64-bit installation, to take advantage of the full 4GB of memory that was installed in the system.
So a clean install it was. To prepare, I copied a number of setup files to a safe place that wouldn't be overwritten during the install. Files like:
Not all the files would end up being needed, but I felt safer having them handy, just in case.
The installation process started from a USB stick loaded with the Mythbuntu 12.04 installer, since I don't have an optical drive in it. No room, with three drives already there. I also hooked up a monitor instead of a TV, because that needs extra setup to output to a component connection.
Since there was some left over free space on the SSD, I installed to that, leaving the 10.10 install intact for now. It went remarkably smoothly. One thing I noted was that at the beginning, there is an option to update the installer. I clicked that, and the system seemed to do nothing for quite a while. Opening up a terminal window and running "top" showed that it was in fact doing something, so I waited until it finished. Once done, the installation process could begin. It would have been nice for it to have some sort of indication that it was doing something, though.
Partway through the process, it prompted for what sort of remote control is being used. I selected "Windows Media Center remote", and the thing was set up automatically. Brilliant! Didn't need that LIRC setup file listed above.
To get the system outputting to my TV properly, I just copied the old xorg.conf file to the /etc/X11 directory (I renamed the existing file, in case I needed it again) and rebooted with a sense of hope and anxiety. A minute or so later, the screen came to life! It worked!
The big one, that I was dreading, was getting the RAID array to be seen by the new install. I still consider myself quite the mdadm novice, so I was pleasantly surprised to find that the RAID array was picked up by the new install quite easily - after installing mdadm and lvm2. This command:
sudo mdadm --assemble --scan
was all that was needed for it to scan for any drives, re-assemble the array, and write a new mdadm.conf file. Easy!
Next was seeing if LVM could find the volumes created. Running
sudo lvm pvscan
sudo lvm vgscan
sudo lvm lvscan
detected all the physical volumes, volume groups, and logical volumes, respectively. Mounting the logical volume that held the recordings was successful - I could see them all. Adding the device entry to /etc/fstab seemed to work, eventually. On the first reboot it came up with an error message, mentioning there were serious problems with the mount. Not sure what it was, but a reboot afterwards seemed to make it happy. I had installed xfsprogs, to manage and defragment XFS filesystems; maybe that helped.
Going through some of the MythTV screens brought up some error messages that it couldn't write to the drive - it turned out to be a permissions issue for the files and directories on the array. Entering
sudo chown -R mythtv:mythtv /var/lib/mythtv
changed the ownership back to the mythtv user, and it seemed happy again.
Bringing the previous database over was a painless process as well. I followed the instructions here and here and the new database came over without drama.
So far it all looks good. I may have a tweak of the VDPAU settings to see if playback can be improved any - it looks fine, but the settings have just been carried over from the previous 0.23 version. Things may have changed in the current 0.25 release.
Now that the system is updated to 12.04, which is a Long Term Support (LTS) release of Ubuntu, I won't be caught out with an obsolete version after 18 months like I was with 10.10.
As a side note, one of the main reasons for moving to 64-bit was because the Zotac IONITX-A-U motherboard, with an Atom 330, was only showing 3GB of RAM installed, even though I had two, 2GB sticks in there. I thought this was a 32 bit software issue. After installing the 64-bit OS, the free memory remained the same. Even in the BIOS, it only reported 3072MB. Strange. A bit of searching around revealed this thread on Zotac's supprt forums. As it turns out, if 4GB is installed, 512MB is reserved for system use, and then there is the amount used by the onboard Nvidia ION graphics - which I had set to the maximum allowed 512MB. So only 3GB visible. It's OK, it still runs fine, but it would have been nice to be able to use a little extra.
So a clean install it was. To prepare, I copied a number of setup files to a safe place that wouldn't be overwritten during the install. Files like:
- mdadm.conf, from /etc/mdadm, which had the RAID configuration information.
- xorg.conf, from /etc/X11, which had the custom modeline used to output to my (now ancient) CRT TV.
- ssmtp.conf, from /etc/ssmtp, for email notification in the case of errors.
- apcupsd.conf, from /etc/apcupsd, the setup of the APC UPS monitoring software.
- hardware.conf, from /etc/lirc, used by LIRC to set up the Media Centre remote control.
- the MythTV database password, from /etc/mythtv/config.xml
Not all the files would end up being needed, but I felt safer having them handy, just in case.
The installation process started from a USB stick loaded with the Mythbuntu 12.04 installer, since I don't have an optical drive in it. No room, with three drives already there. I also hooked up a monitor instead of a TV, because that needs extra setup to output to a component connection.
Since there was some left over free space on the SSD, I installed to that, leaving the 10.10 install intact for now. It went remarkably smoothly. One thing I noted was that at the beginning, there is an option to update the installer. I clicked that, and the system seemed to do nothing for quite a while. Opening up a terminal window and running "top" showed that it was in fact doing something, so I waited until it finished. Once done, the installation process could begin. It would have been nice for it to have some sort of indication that it was doing something, though.
Partway through the process, it prompted for what sort of remote control is being used. I selected "Windows Media Center remote", and the thing was set up automatically. Brilliant! Didn't need that LIRC setup file listed above.
To get the system outputting to my TV properly, I just copied the old xorg.conf file to the /etc/X11 directory (I renamed the existing file, in case I needed it again) and rebooted with a sense of hope and anxiety. A minute or so later, the screen came to life! It worked!
The big one, that I was dreading, was getting the RAID array to be seen by the new install. I still consider myself quite the mdadm novice, so I was pleasantly surprised to find that the RAID array was picked up by the new install quite easily - after installing mdadm and lvm2. This command:
sudo mdadm --assemble --scan
was all that was needed for it to scan for any drives, re-assemble the array, and write a new mdadm.conf file. Easy!
Next was seeing if LVM could find the volumes created. Running
sudo lvm pvscan
sudo lvm vgscan
sudo lvm lvscan
detected all the physical volumes, volume groups, and logical volumes, respectively. Mounting the logical volume that held the recordings was successful - I could see them all. Adding the device entry to /etc/fstab seemed to work, eventually. On the first reboot it came up with an error message, mentioning there were serious problems with the mount. Not sure what it was, but a reboot afterwards seemed to make it happy. I had installed xfsprogs, to manage and defragment XFS filesystems; maybe that helped.
Going through some of the MythTV screens brought up some error messages that it couldn't write to the drive - it turned out to be a permissions issue for the files and directories on the array. Entering
sudo chown -R mythtv:mythtv /var/lib/mythtv
changed the ownership back to the mythtv user, and it seemed happy again.
Bringing the previous database over was a painless process as well. I followed the instructions here and here and the new database came over without drama.
So far it all looks good. I may have a tweak of the VDPAU settings to see if playback can be improved any - it looks fine, but the settings have just been carried over from the previous 0.23 version. Things may have changed in the current 0.25 release.
Now that the system is updated to 12.04, which is a Long Term Support (LTS) release of Ubuntu, I won't be caught out with an obsolete version after 18 months like I was with 10.10.
As a side note, one of the main reasons for moving to 64-bit was because the Zotac IONITX-A-U motherboard, with an Atom 330, was only showing 3GB of RAM installed, even though I had two, 2GB sticks in there. I thought this was a 32 bit software issue. After installing the 64-bit OS, the free memory remained the same. Even in the BIOS, it only reported 3072MB. Strange. A bit of searching around revealed this thread on Zotac's supprt forums. As it turns out, if 4GB is installed, 512MB is reserved for system use, and then there is the amount used by the onboard Nvidia ION graphics - which I had set to the maximum allowed 512MB. So only 3GB visible. It's OK, it still runs fine, but it would have been nice to be able to use a little extra.
Labels:
Atom,
IONITX-A-U,
LIRC,
media center,
Mythbuntu,
MythTV,
ubuntu,
upgrade,
Zotac
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.
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.
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.
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.
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:
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.
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
- Quit Tomboy
- 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
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.
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.
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.
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, December 28, 2010
A MythTV box for the lounge room - Part 1: getting the display to work
The first hurdle:
After a number of years trying to get a picture on my extremely fussy lounge room TV from the computer, I finally bit the bullet and ordered a VGA to component transcoder - an Audio Authority 9A60A. This is because I am still using a Panasonic TX-76PW200A CRT TV, with only component inputs. Also, since it is not in the USA, the refresh rate is 50Hz,rather than the 60Hz that the nvidia drivers support out of the box. I mentioned in an earlier post that I was going to have a task getting a working resolution to the TV, but eventually something was found. Initially I used the program Powerstrip, with my desktop system set up in the lounge. A couple of settings worked, but with pretty bad overscan. Every time I tried tweaking it a little, the display just went out of range and I was greeted with a blank screen. Disheartened, I packed up the PC and contemplated putting the transcoder on ebay.
After a couple of days' break, i thought about trying again, this time with my laptop that runs linux and has a Mobility radeon graphics chipset. Using the xrandr command, I was able to feed it a modeline that I had found on another forum. An owner of the same TV I had, had managed to get a good picture up after a bit of experimenting. Lo and behold, I was able to get a picture up!
From memory, the xrandr commands used for the laptop were:
That created a new mode for the display to use.
This assigns the mode to the display device - in this case, it was to the VGA external output for the monitor.
And that final command sent the 1920x1080 resolution to the VGA output - where the ubuntu desktop came up on the TV, much to my relief!
Knowing that the TV was capable of accepting the resolution, and that the transcoder was able to output the correct timings to the TV, it was back to the main box to see how the output worked from an Nvidia card.
The Nvidia binary driver unfortunately does not accept the xrandr commands I had used with the radeon drivers on the laptop, so another method was going to have to be used. After some inital lack of success with manually editing the xorg.conf file, I had a go using nvidia's utility designed for adding things to the file, nvidia-xconfig. Using the command:
added a mode to the xorg.conf file. I opened that file up in a text editor and had a look where it turned up. When I found it, I added the following line straght below it:
I restarted the machine to let nvidia-settings find the modeline. From there, it was then selectable from the resolution dropdown box, where I could choose it. It worked again!
The final step was getting it to work when the TV was the only display hooked up. To summarise, the xorg.conf file needed to be edited to remove all references to the PC monitor I had connected as well, so the TV was the only device it detected. Have a look at the xorg.conf file here, for your reference.
One other thing I had to do was set the PC to log in automatically - since this is to be a Home Theatre PC, there will not be a keyboard connected to allow typing in a password. It's not what I was after anyway. This option can be found under System -> Administration -> Login Screen
In a later entry I'll go over the setup of the actual system, and what I've learned in its first week of use.
After a number of years trying to get a picture on my extremely fussy lounge room TV from the computer, I finally bit the bullet and ordered a VGA to component transcoder - an Audio Authority 9A60A. This is because I am still using a Panasonic TX-76PW200A CRT TV, with only component inputs. Also, since it is not in the USA, the refresh rate is 50Hz,rather than the 60Hz that the nvidia drivers support out of the box. I mentioned in an earlier post that I was going to have a task getting a working resolution to the TV, but eventually something was found. Initially I used the program Powerstrip, with my desktop system set up in the lounge. A couple of settings worked, but with pretty bad overscan. Every time I tried tweaking it a little, the display just went out of range and I was greeted with a blank screen. Disheartened, I packed up the PC and contemplated putting the transcoder on ebay.
After a couple of days' break, i thought about trying again, this time with my laptop that runs linux and has a Mobility radeon graphics chipset. Using the xrandr command, I was able to feed it a modeline that I had found on another forum. An owner of the same TV I had, had managed to get a good picture up after a bit of experimenting. Lo and behold, I was able to get a picture up!
From memory, the xrandr commands used for the laptop were:
xrandr --newmode "1920x1080i_50" 78.300 1920 2464 2520 2784 1080 1102 1117 1125 interlace +hsync +vsync
That created a new mode for the display to use.
xrandr --addmode VGA-0 1920x1080i_50
This assigns the mode to the display device - in this case, it was to the VGA external output for the monitor.
xrandr --output VGA-0 --mode 1920x1080i_50
And that final command sent the 1920x1080 resolution to the VGA output - where the ubuntu desktop came up on the TV, much to my relief!
Knowing that the TV was capable of accepting the resolution, and that the transcoder was able to output the correct timings to the TV, it was back to the main box to see how the output worked from an Nvidia card.
The Nvidia binary driver unfortunately does not accept the xrandr commands I had used with the radeon drivers on the laptop, so another method was going to have to be used. After some inital lack of success with manually editing the xorg.conf file, I had a go using nvidia's utility designed for adding things to the file, nvidia-xconfig. Using the command:
sudo nvidia-xconfig --mode=1920x1080i_50
added a mode to the xorg.conf file. I opened that file up in a text editor and had a look where it turned up. When I found it, I added the following line straght below it:
Modeline "1920x1080i_50" 78.300 1920 2464 2520 2784 1080 1102 1117 1125 interlace +hsync +vsync
I restarted the machine to let nvidia-settings find the modeline. From there, it was then selectable from the resolution dropdown box, where I could choose it. It worked again!
The final step was getting it to work when the TV was the only display hooked up. To summarise, the xorg.conf file needed to be edited to remove all references to the PC monitor I had connected as well, so the TV was the only device it detected. Have a look at the xorg.conf file here, for your reference.
One other thing I had to do was set the PC to log in automatically - since this is to be a Home Theatre PC, there will not be a keyboard connected to allow typing in a password. It's not what I was after anyway. This option can be found under System -> Administration -> Login Screen
In a later entry I'll go over the setup of the actual system, and what I've learned in its first week of use.
Saturday, December 18, 2010
New version 1.0.10 of Dropbox released
Just a couple of days ago, a new version of the online file sync and backup utility Dropbox was released. It now supports selective sync, allowing certain folders only to be synchronised across different PCs, instead of just everything. I've just installed it on two of my Linux machines, with no ill effects. I followed the instructions shown on the Dropbox forums here, with a slight modification as shown here. I'll describe it here as well, in a way that doesn't involve using the command line (if that isn't your bag, baby):
Step 1: Delete the .dropbox-dist directory, found in your home directory. You may have to hit control+h to show the hidden files and directories in Nautilus.
Step 2: Run Dropbox, from the Applications -> Internet -> Dropbox menu
Dropbox will then start, popping up a box asking whether you would like to download the proprietary daemon. Click Yes to that (else it won't work), and it should start up.
I'll be interested to see if it has overcome the problem it had with the previous version on my laptop, where it didn't seem to like the encrypted home directory, and would often crash on startup. I've tried one reboot so far, it came up OK, so I'll keep an eye on it.
Step 1: Delete the .dropbox-dist directory, found in your home directory. You may have to hit control+h to show the hidden files and directories in Nautilus.
Step 2: Run Dropbox, from the Applications -> Internet -> Dropbox menu
Dropbox will then start, popping up a box asking whether you would like to download the proprietary daemon. Click Yes to that (else it won't work), and it should start up.
I'll be interested to see if it has overcome the problem it had with the previous version on my laptop, where it didn't seem to like the encrypted home directory, and would often crash on startup. I've tried one reboot so far, it came up OK, so I'll keep an eye on it.
Sunday, November 28, 2010
Getting a media centre remote working with LIRC, in Ubuntu 10.10
Recently I bought a new remote control for my PC, to replace the one that came with my TV tuner card. I picked up a Hauppauge Media Center Remote Control Kit, model 335, which has more logically labelled buttons than what I had. It looks a bit nicer, too, an important consideration as I am attempting to finally build a Home Theatre PC to go in the lounge room.
While the previous Technisat remote worked fine in Ubuntu 10.10, I read of some other people having problems with getting remotes to work - namely the Media Centre-compatible versions. When I plugged in my new one, I also noticed the problem.
A bit of trawling around on the internet uncovered a thread at the ever-reliable Ubuntu forums. It turns out that the newer kernel includes a module for the media centre remote (mceusb), that clashes with the lirc_mceusb module you want to use, with LIRC. When the two modules are loaded, neither works.
What has to be done, is make sure only one of them gets loaded. The user uniden9 posted an excellent how-to in that thread linked above, describing two methods that are available - disabling the old lirc one, or disabling the newer, kernel built-in module. Based on other responses in the thread, most people had more luck with the second method - disabling the newer one. I guess the MythTV key bindings etc. would work better with the old version.
I have included the relevant quote from uniden9's post here, in case there is a problem accessing the forums:
I used this method as well, and now have the media centre remote working just fine on my system. I'm now just waiting on the arrival of a VGA to Component Transcoder, that will hopefully allow my PC to connect with my older-style TV that has only component inputs. As an aside, although I have a graphics card that has a component-out attachment, it only puts out a 1080i, 60Hz signal. My TV, being made for the Australian, PAL-based market, requires a 1080i, 50Hz input signal. Fingers are crossed that the transcoder will allow it to work - I'll be posting an update when it arrives and I can try it out.
While the previous Technisat remote worked fine in Ubuntu 10.10, I read of some other people having problems with getting remotes to work - namely the Media Centre-compatible versions. When I plugged in my new one, I also noticed the problem.
A bit of trawling around on the internet uncovered a thread at the ever-reliable Ubuntu forums. It turns out that the newer kernel includes a module for the media centre remote (mceusb), that clashes with the lirc_mceusb module you want to use, with LIRC. When the two modules are loaded, neither works.
What has to be done, is make sure only one of them gets loaded. The user uniden9 posted an excellent how-to in that thread linked above, describing two methods that are available - disabling the old lirc one, or disabling the newer, kernel built-in module. Based on other responses in the thread, most people had more luck with the second method - disabling the newer one. I guess the MythTV key bindings etc. would work better with the old version.
I have included the relevant quote from uniden9's post here, in case there is a problem accessing the forums:
2. Blacklist the kernel source drivers and use the old dkms built drivers.
-Well you already have lirc-sources-modules install and probably had this working on 10.04 or older version of ubuntu.
A. Edit /etc/modprobe.d/blacklist.conf , create it if it doesn't exist.
Add>
blacklist mceusb
line to the file and save it.
B. Update initramfs, #sudo update-initramfs -u -k all
C. reboot
D. Reconfigure lirc if its not already working.
#sudo dpkg-reconfigure lirc
On the Remote, Select "Windows Media Center Transceiver/Remote (All)
E. Thats it.
This is the method I chose after wrestling with button repeats on option 1. I use XBMC and could not figure out how to disable Ubuntu treating the remote as a keyboard device.
I used this method as well, and now have the media centre remote working just fine on my system. I'm now just waiting on the arrival of a VGA to Component Transcoder, that will hopefully allow my PC to connect with my older-style TV that has only component inputs. As an aside, although I have a graphics card that has a component-out attachment, it only puts out a 1080i, 60Hz signal. My TV, being made for the Australian, PAL-based market, requires a 1080i, 50Hz input signal. Fingers are crossed that the transcoder will allow it to work - I'll be posting an update when it arrives and I can try it out.
Thursday, November 11, 2010
Getting Ubuntu installed on a laptop
I had managed to score for free from work an old laptop that was past its use-by date, for business use at least. It's an LG S1 Express Dual, with a Core Duo (not Core 2) processor. Previously, to extend its life a little longer I had installed 2GB of memory in it and a faster hard drive - that made a remarkable difference.
Being from around 2006, it had come with Windows XP pre-installed. I wanted to try a newer operating system than that, so initially I put Windows 7 on it. Now for people saying Linux is hard to get driver support for, Windows 7 was an ordeal in itself. First of all, LG have basically stopped making laptops. Drivers for it were not available on their site for windows 7. Some Vista drivers were available, so I had some of those installed. The graphics chip in this machine is an ATI Mobility Radeon X1400. Going to ATI/AMD's site to find a current driver just sends you to a page saying that it's the laptop maker's responsibility - they don't support it any longer.
Even things like network drivers were unable to be found easily. I remember having to scrounge around looking for whatever I could find, on obscure and slightly dodgy driver sites. In the end, Most of it worked. The on-screen display didn't work, some of the special functions didn't work, and got no joy from the included remote control.
One other setback was the BIOS not recognising hard drives over 137GB/128GiB in size. A bit of a setback, since I'd like to make use of all of the 160GB drive that was installed in it. First up, I tried dual booting with Linux, using the space at the end of the drive that BIOS and Windows couldn't see, but was no problem for Linux. Ubuntu booted fine, but Windows would refuse to boot, until I shrank the partitions down to fit under the 137GB limit.
Finally, I decided to just run a complete install of Ubuntu. Taking advantage of the release of version 10.10, I put in the 32-bit install disc (the Core Duo T2400 does not support 64-bit OSes) and nearly everything seemed to work pretty well. Especially networking, which did not work under Win 7.
A bit of tweaking was needed though. Sound wouldn't work. A little digging through the forums revealed the module for the sound card wasn't installed, and the following had to be added to the end of the file /etc/modprobe.d/alsa-base.conf:
options snd-hda-intel model=lg
This loaded the correct module at boot time, and sound now works.
One other problem I had was with the suspend functionality. While the system would go into suspend mode correctly, upon resuming the wired networking would refuse to work. I haven't tested wireless, as I do not have a wireless router yet. A little research revealed it was due to this bug, and that by manually unloading and reloading the network module, it would come back to life again. The commands to do that are:
sudo modprobe -r et131x
sudo modprobe et131x
Thanks to the user P4Man at ubuntuforums.org, a short script has been created, as detailed in this post:
Create a script named /etc/pm/sleep.d/11ethernet, with the following contents:
#!/bin/bash
case $1 in
suspend)
rmmod et131x
;;
resume)
modprobe et131x
;;
esac
Changing the “et131x” value to whatever the network module is. That is what the module is on this LG laptop.
Save file and make it executable:
sudo chmod 755 /etc/pm/sleep.d/11ethernet
Now, when the laptop goes into suspend mode, the network module gets unloaded, and upon waking up, the module gets reloaded. Networking works!
Boot up time is nice and quick with 10.10 as well - quicker than windows 7 which itself was no slouch. A far cry from its original state, with a slow old hard drive, Windows XP and a bajillion little programs that started on boot. All in all, it's a nice machine. Now I just have to buy a battery for it that works...
Being from around 2006, it had come with Windows XP pre-installed. I wanted to try a newer operating system than that, so initially I put Windows 7 on it. Now for people saying Linux is hard to get driver support for, Windows 7 was an ordeal in itself. First of all, LG have basically stopped making laptops. Drivers for it were not available on their site for windows 7. Some Vista drivers were available, so I had some of those installed. The graphics chip in this machine is an ATI Mobility Radeon X1400. Going to ATI/AMD's site to find a current driver just sends you to a page saying that it's the laptop maker's responsibility - they don't support it any longer.
Even things like network drivers were unable to be found easily. I remember having to scrounge around looking for whatever I could find, on obscure and slightly dodgy driver sites. In the end, Most of it worked. The on-screen display didn't work, some of the special functions didn't work, and got no joy from the included remote control.
One other setback was the BIOS not recognising hard drives over 137GB/128GiB in size. A bit of a setback, since I'd like to make use of all of the 160GB drive that was installed in it. First up, I tried dual booting with Linux, using the space at the end of the drive that BIOS and Windows couldn't see, but was no problem for Linux. Ubuntu booted fine, but Windows would refuse to boot, until I shrank the partitions down to fit under the 137GB limit.
Finally, I decided to just run a complete install of Ubuntu. Taking advantage of the release of version 10.10, I put in the 32-bit install disc (the Core Duo T2400 does not support 64-bit OSes) and nearly everything seemed to work pretty well. Especially networking, which did not work under Win 7.
A bit of tweaking was needed though. Sound wouldn't work. A little digging through the forums revealed the module for the sound card wasn't installed, and the following had to be added to the end of the file /etc/modprobe.d/alsa-base.conf:
options snd-hda-intel model=lg
This loaded the correct module at boot time, and sound now works.
One other problem I had was with the suspend functionality. While the system would go into suspend mode correctly, upon resuming the wired networking would refuse to work. I haven't tested wireless, as I do not have a wireless router yet. A little research revealed it was due to this bug, and that by manually unloading and reloading the network module, it would come back to life again. The commands to do that are:
sudo modprobe -r et131x
sudo modprobe et131x
Thanks to the user P4Man at ubuntuforums.org, a short script has been created, as detailed in this post:
Create a script named /etc/pm/sleep.d/11ethernet, with the following contents:
#!/bin/bash
case $1 in
suspend)
rmmod et131x
;;
resume)
modprobe et131x
;;
esac
Changing the “et131x” value to whatever the network module is. That is what the module is on this LG laptop.
Save file and make it executable:
sudo chmod 755 /etc/pm/sleep.d/11ethernet
Now, when the laptop goes into suspend mode, the network module gets unloaded, and upon waking up, the module gets reloaded. Networking works!
Boot up time is nice and quick with 10.10 as well - quicker than windows 7 which itself was no slouch. A far cry from its original state, with a slow old hard drive, Windows XP and a bajillion little programs that started on boot. All in all, it's a nice machine. Now I just have to buy a battery for it that works...
Tuesday, October 26, 2010
Latest Ubuntu conkyForecast update fix
(Updated 27 October, added recommended ln command, see below)
Today's update to conkyForecast, the program that enables the current weather conditions and a four-day forecast to be displayed on the screen, came with an unexpected downside. It stopped working. A bit of searching around for others with similar problems prompted me to look at the .xsession-errors file, in my home directory. From there, the message:
/usr/bin/conkyForecast: 3: /usr/bin/python2: not found
kept repeating. Having a look for the file /usr/bin/python2 showed that yes, that file was indeed non-existent. This was puzzling. I opened up the file /usr/bin/conkyForecast, to see where it was mentioned. It is only a short file of a couple of lines, but one of them did call python2. This is a link in the /usr/bin directory, pointing to python2.6.
There are two fixes to this. One, I edited the file /usr/bin/conkyForecast and changed python2 to python. This fixed it - the forecast was displaying on screen again, but further updates to the script would overwrite this, meaning you'd have to do it again. Therefore, I'd recommend the following method.
The other, recommended, way to fix it is to re-create the python2 link in /usr/bin: I just restored it from a backup made a few days ago (Yay for backintime!), but you could just create a link to python2.6 with the ln command, as below:
sudo ln -s /usr/bin/python2.6 /usr/bin/python2
As an update, a little further searching revealed this post on the Ubuntu forums. This is a known issue with Ubuntu 10.10, where there is no link to python2. ConkyForecast was updated to point to python2, in preparation for later versions of Python.
Today's update to conkyForecast, the program that enables the current weather conditions and a four-day forecast to be displayed on the screen, came with an unexpected downside. It stopped working. A bit of searching around for others with similar problems prompted me to look at the .xsession-errors file, in my home directory. From there, the message:
/usr/bin/conkyForecast: 3: /usr/bin/python2: not found
kept repeating. Having a look for the file /usr/bin/python2 showed that yes, that file was indeed non-existent. This was puzzling. I opened up the file /usr/bin/conkyForecast, to see where it was mentioned. It is only a short file of a couple of lines, but one of them did call python2. This is a link in the /usr/bin directory, pointing to python2.6.
There are two fixes to this. One, I edited the file /usr/bin/conkyForecast and changed python2 to python. This fixed it - the forecast was displaying on screen again, but further updates to the script would overwrite this, meaning you'd have to do it again. Therefore, I'd recommend the following method.
The other, recommended, way to fix it is to re-create the python2 link in /usr/bin: I just restored it from a backup made a few days ago (Yay for backintime!), but you could just create a link to python2.6 with the ln command, as below:
sudo ln -s /usr/bin/python2.6 /usr/bin/python2
As an update, a little further searching revealed this post on the Ubuntu forums. This is a known issue with Ubuntu 10.10, where there is no link to python2. ConkyForecast was updated to point to python2, in preparation for later versions of Python.
Saturday, October 16, 2010
Upgrade to Maverick Meerkat - version 10.10 worked!
I am writing this from my newly-upgraded Ubuntu 10.10 system! This has been the second time I upgraded the installation, rather than start afresh. I was a little nervous, to be honest, but backups were made before the upgrade so there was an escape plan.
There were only a few issues that were pretty easily fixed, and I may, just may, have fixed the hanging on boot problem I had with version 10.04.
One problem I had was the Hard drive temperature reporting in Conky - it stopped displaying a temperature. This was because the hddtemp command could only be run as root - Conky doesn't run with those privileges, and I didn't want to start doing so. A quick search revealed a single line command to allow hddtemp to be run as a regular user:
After doing that, the disk temperature re-appeared and all was good.
Fixing the boot screen
This was a problem that I had in the previous version, 10.04, as well as in 10.10. It is to do with running the Nvidia proprietary drivers, and switching to different video modes. Basically, there are some steps to try at this site, which I did. It involves setting some video modes in the boot loader. I initially tried 1680x1050 (about the best that was supported by my card, even though it runs at 1920x1080 once at the desktop) and got a comically large ubuntu logo during boot. A later change to 1280x1024 yielded a much better result.
So far, the boot and shutdown screens look much better, and I haven't yet had it hang on me. I am hesitant to call it truly fixed until a few more weeks have passed.
Edit January 7, 2011: If you do these changes and then switch back to the open source driver (nouveau), you have to undo the changes to be able to set the proper resolution for your screen(s).
There were only a few issues that were pretty easily fixed, and I may, just may, have fixed the hanging on boot problem I had with version 10.04.
One problem I had was the Hard drive temperature reporting in Conky - it stopped displaying a temperature. This was because the hddtemp command could only be run as root - Conky doesn't run with those privileges, and I didn't want to start doing so. A quick search revealed a single line command to allow hddtemp to be run as a regular user:
sudo chmod u+s /usr/sbin/hddtemp
After doing that, the disk temperature re-appeared and all was good.
Fixing the boot screen
This was a problem that I had in the previous version, 10.04, as well as in 10.10. It is to do with running the Nvidia proprietary drivers, and switching to different video modes. Basically, there are some steps to try at this site, which I did. It involves setting some video modes in the boot loader. I initially tried 1680x1050 (about the best that was supported by my card, even though it runs at 1920x1080 once at the desktop) and got a comically large ubuntu logo during boot. A later change to 1280x1024 yielded a much better result.
So far, the boot and shutdown screens look much better, and I haven't yet had it hang on me. I am hesitant to call it truly fixed until a few more weeks have passed.
Edit January 7, 2011: If you do these changes and then switch back to the open source driver (nouveau), you have to undo the changes to be able to set the proper resolution for your screen(s).
Friday, October 8, 2010
My list of tweaks - what I change and add after a fresh install
With the release of version 10.10 in a few days, this post partly serves as a reminder to myself what I have installed on my machine, and how it is set up. It will probably also make pause and reconsider doing a clean installation, when I look at the amount of configuration I would have ahead of me!
Programs not in Ubuntu repositories:
Crashplan - for backing up user data such as documents, music, photos. Not so much for system data - I use backintime for that.
Dropbox - for syncing some of my data between computers - e.g. between home and work PC.
A whole bunch of Google programs - Google Earth, Chrome, Picasa and Desktop. They probably now know more about me than I do...
conkyforecast - a part of Conky that supplies weather forecast info on the desktop, along with a bunch of other system stats that allow me to keep tabs on what's happening on the PC. One of the programs I consider essential. Working without it is like driving a car with no dashboard.
Photography/Image editing:
Flickr Uploader - I initially downloaded this because I stopped using F-Spot, as it was too damn buggy. When I was trying other programs, none of them had a way to upload photos to my flickr account. This utility is pretty handy, letting you tag photos individually or as a group.
DigiKam - I thought for a while before installing this, as it is a KDE program. Choosing to install this requires also installing a bunch of the KDE framework. If you are interested in keepiing a lean system, maybe this isn't for you. However, I was looking at some sort of photo management and editing software. Bibble and Adobe Lightroom are the main contenders. Bibble is a paid app, as is Lightroom, which has the downside of being Mac and Windows only. I thought, what the hell, digiKam is free, so I'll try this one first. So far, it has worked pretty well. It isn't quite as polished as the other two, but my wallet says it is just fine.
Music:
Rubyripper - an open-source equivalent of Exact Audio Copy for windows.
Other:
Bleachbit - does a similar job to what CCleaner does in Windows.
Virtualbox - for running virtual machines, testing other operating system installs. Good to tinker and learn things.
Deluge Bittorrent client. I prefer it to Transmission (which is installed by default).
HDParm: a later version, which includes a copy of the wiper script that performs garbage collection on solid state hard drives, marking sectors as deleted. The new version of Ubuntu should have this included by default (as well as the 2.6.35 kernel, that supports the TRIM command).
Tweaks:
Since I have a solid state hard drive in my system (and I highly recommend them for anyone looking to upgrade their PC) there are a few SSD-specific tweaks you can do to get the best out of them. This site has an excellent guide. I didn't do all of them, just enabled the noop disk scheduler and mounted filesystems with the noatime flag.
There are a number of things to be done with regards to MythTV, one of which is setting up LIRC for the remote control to work. One thing I noticed with a bit of early tinkering with a later kernel was that the remote ceased to work with that kernel - that's a concern I have with moving to the new version.
Enabling the medibuntu repositories to allow MP3 playback, DVDs and a few other restricted formats. Version 10.10 apparently has an option to enable all of these at install time, which is welcome.
That's just a few things I've changed, no doubt I'll think of many more, especially if I do a reinstall from scratch. I'll let you know how I go: if I do an upgrade (quick, convenient, chance of hosing the system), fresh install (time consuming with all the re-configuring and reinstalling, but will be a nice fresh system), or staying with 10.04 (quickest of all, but missing out on new toys). I might hold out for a little while, but I'm sure I'll succumb to the allure of new and shiny...
Programs not in Ubuntu repositories:
Crashplan - for backing up user data such as documents, music, photos. Not so much for system data - I use backintime for that.
Dropbox - for syncing some of my data between computers - e.g. between home and work PC.
A whole bunch of Google programs - Google Earth, Chrome, Picasa and Desktop. They probably now know more about me than I do...
conkyforecast - a part of Conky that supplies weather forecast info on the desktop, along with a bunch of other system stats that allow me to keep tabs on what's happening on the PC. One of the programs I consider essential. Working without it is like driving a car with no dashboard.
Photography/Image editing:
Flickr Uploader - I initially downloaded this because I stopped using F-Spot, as it was too damn buggy. When I was trying other programs, none of them had a way to upload photos to my flickr account. This utility is pretty handy, letting you tag photos individually or as a group.
DigiKam - I thought for a while before installing this, as it is a KDE program. Choosing to install this requires also installing a bunch of the KDE framework. If you are interested in keepiing a lean system, maybe this isn't for you. However, I was looking at some sort of photo management and editing software. Bibble and Adobe Lightroom are the main contenders. Bibble is a paid app, as is Lightroom, which has the downside of being Mac and Windows only. I thought, what the hell, digiKam is free, so I'll try this one first. So far, it has worked pretty well. It isn't quite as polished as the other two, but my wallet says it is just fine.
Music:
Rubyripper - an open-source equivalent of Exact Audio Copy for windows.
Other:
Bleachbit - does a similar job to what CCleaner does in Windows.
Virtualbox - for running virtual machines, testing other operating system installs. Good to tinker and learn things.
Deluge Bittorrent client. I prefer it to Transmission (which is installed by default).
HDParm: a later version, which includes a copy of the wiper script that performs garbage collection on solid state hard drives, marking sectors as deleted. The new version of Ubuntu should have this included by default (as well as the 2.6.35 kernel, that supports the TRIM command).
Tweaks:
Since I have a solid state hard drive in my system (and I highly recommend them for anyone looking to upgrade their PC) there are a few SSD-specific tweaks you can do to get the best out of them. This site has an excellent guide. I didn't do all of them, just enabled the noop disk scheduler and mounted filesystems with the noatime flag.
There are a number of things to be done with regards to MythTV, one of which is setting up LIRC for the remote control to work. One thing I noticed with a bit of early tinkering with a later kernel was that the remote ceased to work with that kernel - that's a concern I have with moving to the new version.
Enabling the medibuntu repositories to allow MP3 playback, DVDs and a few other restricted formats. Version 10.10 apparently has an option to enable all of these at install time, which is welcome.
That's just a few things I've changed, no doubt I'll think of many more, especially if I do a reinstall from scratch. I'll let you know how I go: if I do an upgrade (quick, convenient, chance of hosing the system), fresh install (time consuming with all the re-configuring and reinstalling, but will be a nice fresh system), or staying with 10.04 (quickest of all, but missing out on new toys). I might hold out for a little while, but I'm sure I'll succumb to the allure of new and shiny...
Tuesday, September 28, 2010
Don't forget to update Grub on new kernel updates
Today there was a new kernel update - to version 2.6.32-25. I ran the update manager and the updates installed fine, and let it reboot. Upon restarting, I went to a terminal and checked what kernel was running: the previous one still. For some reason, after performing a kernel update, my system does not update the Grub menu to load the new version. Whether this is by design or it's just a quirk of my installation, I don't know. But let this just be a heads-up for other users. The security fixes in the new kernel won't be of any use if you are still running the old one!
Fortunately, it is easily fixed by entering "sudo update-grub" at a command prompt. It will look through your system and add the new kernel to the startup menu. After a while, when the new kernel appears to be working OK, you can uninstall the previous version to save some space.
Fortunately, it is easily fixed by entering "sudo update-grub" at a command prompt. It will look through your system and add the new kernel to the startup menu. After a while, when the new kernel appears to be working OK, you can uninstall the previous version to save some space.
Monday, September 27, 2010
Fix for Gnome Window List not updating
Over the last couple of months, I had been running the bottom Gnome taskbar panel with the "Expand" option not enabled. This meant that when no windows were open, the taskbar reduced in size, centred along bottom edge of the screen. As more programs are opened, it would expand to fit, eventually stretching across the screen. I did this to give a little more screen real estate to the Conky system monitor display down the right hand edge of the screen.
I ran it like that for a while, but started noticing the window list was acting a bit strangely. When I switched tabs in a web browser, the window title down at the bottom of the screen would not update: it was stuck on a previous page. At first I thought it was a Google Chrome issue, but the same thing happened in Firefox. I started working things out - it would update if I opened or closed another program. The extra window title being added to or removed from the taskbar would update all the others as it expanded or shrank. But this was a workaround - something was wrong.
With the new release of Ubuntu mere weeks away now, I didn't look too hard into fixes. Hopefully the new version would rectify it. Today, though, a thought just struck me - what if I turned on the "Expand" option again? I did it, and it all seems to be working fine. I can switch from tab to tab in the web browsers and the window list updates instantly.
So really, it isn't a fix, more a bug in Gnome's window list application. If you haven't purposely gone into the options to disable expand, you won't be affected - it's enabled by default in Ubuntu. Hopefully it will save some head scratching in the future.
Now my only ongoing Ubuntu issue is the occasional hang at boot or shutdown, on the Ubuntu splash screen. Still no fix for that that I have found, but I'll let you all know if I find something.
I ran it like that for a while, but started noticing the window list was acting a bit strangely. When I switched tabs in a web browser, the window title down at the bottom of the screen would not update: it was stuck on a previous page. At first I thought it was a Google Chrome issue, but the same thing happened in Firefox. I started working things out - it would update if I opened or closed another program. The extra window title being added to or removed from the taskbar would update all the others as it expanded or shrank. But this was a workaround - something was wrong.
With the new release of Ubuntu mere weeks away now, I didn't look too hard into fixes. Hopefully the new version would rectify it. Today, though, a thought just struck me - what if I turned on the "Expand" option again? I did it, and it all seems to be working fine. I can switch from tab to tab in the web browsers and the window list updates instantly.
So really, it isn't a fix, more a bug in Gnome's window list application. If you haven't purposely gone into the options to disable expand, you won't be affected - it's enabled by default in Ubuntu. Hopefully it will save some head scratching in the future.
Now my only ongoing Ubuntu issue is the occasional hang at boot or shutdown, on the Ubuntu splash screen. Still no fix for that that I have found, but I'll let you all know if I find something.
Thursday, July 1, 2010
Should you use the XFS file system?
One of the good things, and also one of the confusing things about Linux, is the amount of choice you have. Even down to what sort of file system you want to use for storing your data. By default, the Ubuntu installer will use ext4, a good, general purpose file system that will suit most people's needs just fine.
There are other options though, depending on your usage patterns. If you have a lot of large files stored, such as lots of video or movies, maybe even if you record TV with MythTV like I do, a good alternative is XFS. Its design means it is particularly good at handling large files, such as High Definition TV recording, giving good performance in reading and writing them.
You can specify a partition to be in XFS format at the time of installation, or later on by using GParted. Once it is created, there are some further tweaks you can do to make its performance better, and also to maintain its performance over time.
1. Add the following options to the fstab entry for the partition (located in /etc/fstab):
UUID=xxxx /var/lib/mythtv xfs defaults,noatime,allocsize=512m,logbufs=8 0 2
noatime refers to stopping the file system logging each time the file is accessed. Normally it is not needed, and this option reduces the number of writes done to disk, speeding things up.
allocsize=512m lets XFS set aside 512 megabytes of space at a time when it writes. This reduces the chance of the file being split up into many small chunks, or fragmenting. Especially good for recording TV.
logbufs=8 refers to the log buffers held in RAM. Values can be from 2 to 8 buffers, which are 32K in size. Since most PCs have RAM to spare these days, there is no problem maxing this out.
Sometimes a bit of periodic maintenance is needed with XFS, and this can make people used to NTFS on Windows feel a little more at home. You sometime have to defragment the file system, and there is a utility that can do it. It isn't installed by default - you have to install the xfsdump package to get the folllowing commands.
To check the fragmentation level of a drive, for example located at /dev/sda6:
sudo xfs_db -c frag -r /dev/sda6
The result will look something like so:
actual 51270, ideal 174, fragmentation factor 99.66%
That is an actual result I got from the first time I installed these utilities, previously having no knowledge of XFS maintenance. Pretty nasty. Basically, the 174 files on the partition were spread over 51270 separate pieces. To defragment, run the following command:
sudo xfs_fsr -v /dev/sda6
Let it run for a while. the -v option lets it show the progress. After it finishes, try checking the fragmentation level again:
sudo xfs_db -c frag -r /dev/sda6
actual 176, ideal 174, fragmentation factor 1.14%
Much better! I have the xfs_fsr command scheduled to run daily with a cron job, at a time when it is unlikely to be recording, to keep things in good shape.
More in depth information on XFS can be found at the MythTV wiki. Some more detailed performance optimisation info can be found here and here.
There are other options though, depending on your usage patterns. If you have a lot of large files stored, such as lots of video or movies, maybe even if you record TV with MythTV like I do, a good alternative is XFS. Its design means it is particularly good at handling large files, such as High Definition TV recording, giving good performance in reading and writing them.
You can specify a partition to be in XFS format at the time of installation, or later on by using GParted. Once it is created, there are some further tweaks you can do to make its performance better, and also to maintain its performance over time.
1. Add the following options to the fstab entry for the partition (located in /etc/fstab):
UUID=xxxx /var/lib/mythtv xfs defaults,noatime,allocsize=512m,logbufs=8 0 2
noatime refers to stopping the file system logging each time the file is accessed. Normally it is not needed, and this option reduces the number of writes done to disk, speeding things up.
allocsize=512m lets XFS set aside 512 megabytes of space at a time when it writes. This reduces the chance of the file being split up into many small chunks, or fragmenting. Especially good for recording TV.
logbufs=8 refers to the log buffers held in RAM. Values can be from 2 to 8 buffers, which are 32K in size. Since most PCs have RAM to spare these days, there is no problem maxing this out.
Sometimes a bit of periodic maintenance is needed with XFS, and this can make people used to NTFS on Windows feel a little more at home. You sometime have to defragment the file system, and there is a utility that can do it. It isn't installed by default - you have to install the xfsdump package to get the folllowing commands.
To check the fragmentation level of a drive, for example located at /dev/sda6:
sudo xfs_db -c frag -r /dev/sda6
The result will look something like so:
actual 51270, ideal 174, fragmentation factor 99.66%
That is an actual result I got from the first time I installed these utilities, previously having no knowledge of XFS maintenance. Pretty nasty. Basically, the 174 files on the partition were spread over 51270 separate pieces. To defragment, run the following command:
sudo xfs_fsr -v /dev/sda6
Let it run for a while. the -v option lets it show the progress. After it finishes, try checking the fragmentation level again:
sudo xfs_db -c frag -r /dev/sda6
actual 176, ideal 174, fragmentation factor 1.14%
Much better! I have the xfs_fsr command scheduled to run daily with a cron job, at a time when it is unlikely to be recording, to keep things in good shape.
More in depth information on XFS can be found at the MythTV wiki. Some more detailed performance optimisation info can be found here and here.
Tuesday, June 29, 2010
Where to go for help with Ubuntu
OK. So you've downloaded the latest version of Ubuntu, or even scored yourself an installer CD. Something doesn't go quite right with the install - where do you go next?
You may be able to still use Ubuntu as a live CD, meaning you could use it to access the internet. Or, if you were thinking of trying a dual-boot installation, you could still get on to the net from your existing install.
The first place I look is the Ubuntu forums. They are quite popular, with loads of visitors. Whatever problem you're having, someone is bound to have had something similar. These things are invaluable. As a matter of fact, even though I've visited them for years, and found heaps of solutions, I'm still yet to make a post myself. I just haven't needed to. The same thing happened with the Gentoo Linux forums, back when I used to run that.
As a matter of fact, if you can't find an answer in the Ubuntu forums, try some different ones - like the Debian User Forums. Since Ubuntu is based on Debian, there is a lot of similarity.
Another community I've been a long-time member of is Overclockers Australia. Their forums also provide a wealth of information - the Other Operating Systems forum in particular comes in quite handy.
Back on the Ubuntu site, you could try the Official Ubuntu Documentation. Sometimes though, it can be a bit lacking in detail, or it can be a little dated. This is why I suggest visiting the forums first.
Then there's always Google. Which could be how you found this page...
Another option is to download the free ebook, Getting Started with Ubuntu 10.04, by the Ubuntu Manual Project. Lots of info there in setting it up.
You may be able to still use Ubuntu as a live CD, meaning you could use it to access the internet. Or, if you were thinking of trying a dual-boot installation, you could still get on to the net from your existing install.
The first place I look is the Ubuntu forums. They are quite popular, with loads of visitors. Whatever problem you're having, someone is bound to have had something similar. These things are invaluable. As a matter of fact, even though I've visited them for years, and found heaps of solutions, I'm still yet to make a post myself. I just haven't needed to. The same thing happened with the Gentoo Linux forums, back when I used to run that.
As a matter of fact, if you can't find an answer in the Ubuntu forums, try some different ones - like the Debian User Forums. Since Ubuntu is based on Debian, there is a lot of similarity.
Another community I've been a long-time member of is Overclockers Australia. Their forums also provide a wealth of information - the Other Operating Systems forum in particular comes in quite handy.
Back on the Ubuntu site, you could try the Official Ubuntu Documentation. Sometimes though, it can be a bit lacking in detail, or it can be a little dated. This is why I suggest visiting the forums first.
Then there's always Google. Which could be how you found this page...
Another option is to download the free ebook, Getting Started with Ubuntu 10.04, by the Ubuntu Manual Project. Lots of info there in setting it up.
Subscribe to:
Posts (Atom)