Thursday 31 August 2017

Linux is still miles better than Windows any day

My Windows PC doesn't even get turned on that much now. It is only for a few holdout applications like the cameras and IrfanView that I really need it for. At the moment I am using it to author some of the maps, but that isn't happening all of the time. It can cope with aerial images coming over the network and is quite quick compared to the virtual machine I was using, but Linux can process them a lot faster in a VM, so probably better still in a real PC.

Now that I have been reassured that the Qgis issue with a lot of files open isn't a bad design decision of the Linux platform then I can go back to a Linux VM to do the map design and it is faster than the Windows VM I have used up until now. The main problem is that for Linux we don't get to choose which edition of the master can be installed. Hence a need for an older master can be a problem, and explains why I use a VM running Xubuntu 16.04 as it will always pull the 313ec55 build if you choose not to use the ubuntugis repository. There is an option that I could pull 313ec55 from the repository and build it from source on 17.04 or even mainpc and therefore have it running reliably and doing all the things I need to.

Now here is a great piece of software to analyse free disk space: Baobab

This does a great job of analysing disk space usage graphically on a PC. As you can see I have an issue that my home folder is using 1.5 TB on a system with at most 2 TB of disk. Sooner or later I will have to clean out some stuff like all those aerial photos I have downloaded to draw maps, and some of the virtual machines I have installed under Vbox.

Fix for Qgis unable to open lots of aerial images on Linux editions

After some forethought the lovely Qgis people have come up with the issue being a limit on the number of open files. This is a deliberate security feature designed into Linux. Fortunately it is not, as was first alleged, an architectural limitation of Linux.

I have used the prlimit command with --nofile to increase the limit from the default 1024 to 10000 which deals with the problem most effectively. In order to make this limit increase permanent I changed the setting in /etc/security/limits.conf

This means I can go back to using a Linux virtual machine instead of a Windows one to work on NZ Rail Maps projects. Specifically I will be using a VM running Xubuntu 16.04 and Qgis version 2.99 build 313ec55 which has the fewest issues of Qgis 2.99 builds for Linux. This is actually the last master build available for Xubuntu 16.04 due to architectural changes. With testing the Linux VM running a project with a large number of aerial images open, Qgis handles the images much faster in Linux than Windows.

I just can't remember right now if there were other issues in Linux that made me switch to Windows, I think off memory it was mainly to do with being able to run different builds on the same computer (which was a physical computer for a while). This is much harder to do in Linux as the packages are not specifically configured for this option; when you update to a new version it always installs over the old. However running different VMs is one way of getting around it. Windows editions don't auto update as Linux does (when you run apt upgrade) which is handy. EDIT: There was one issue and that is to do with the rendering of distances on station labels, with 21.2 being commonly rendered as 21.1999999 for example. This means I need another VM running a different edition of Qgis to produce the outputs. 

Coincidentally this fix came the same day as another longstanding problem was resolved at home; this one concerned the power supply to my house which has been unreliable, with significant drops in voltage being experienced on two previous occasions. The last one in February or March this year resulted in a call to Orion, who subsequently claimed that as no other customer had experienced the fault, it must be inside the house, and therefore outside their responsibility.

The problem started to occur again this week and had been observed on three days up until yesterday but as usual being an intermittent fault made it difficult to diagnose. But in this case I was helped when I discovered my next door neighbour, who is in the other flat within this property, which means our flats have separate phase wires and a common neutral wire from the power pole, reported the same issues. When we managed to get Orion to come out they said the most likely scenario was a faulty neutral connection. After two separate visits in the same evening they have replaced all three neutral joints: the one on the outside of the house, the one on the pole directly outside the house, and the one on the pole on the other side of the road where our power is actually tapped off from the lines network. And in spite of all the time lost in the evening, the power supply has been rock solid since, although we had to call them back when only replacing one of the joints didn't fix the issue. The furtherest away joint was found to be loose and corroded so that was most likely the cause.

Thursday 24 August 2017

Artful release date set for 19 October

So the date for the Artful release (17.10) of Xubuntu has been set for 19 October, about eight weeks away. I have been running it on all three of my Linux computers for several months and have noticed only a few minor issues. 

Mainly the issues boiled down to:
  • In a number of cases I have had to configure third party repositories to use zesty as the release as few of these seem to have considered that they should be making a version available for artful, even development versions like Qgis.
  • Kodi not being available from the official Kodi repositories in a compatible version. Solved by using the version from the Debian repository
  • There has been an issue on the mediapc with Kodi constantly freezing after restoring from hibernation.
  • VirtualBox did not update to the latest version automatically from the zesty repository, but the version downloaded from the website manually did update. The manual update was necessary because the installed version of virtualbox stopped working after a major package upgrade.
In each case when there is a software freeze or some other challenge I try updating to the latest release. Almost every time I check for new packages there have been hundreds of updates. It is not particularly unusual to have three hundred new packages each month and it can take easily half an hour or more to install them all. However all these updates have gone smoothly.

The mainpc has been a lot more reliable hibernating since I got rid of the Nvidia 4 head card and used the cheap two head card that is supported out of the box by the Nouveau drivers. If I should want to have more than two displays in the future I could put a second two head card alongside the existing one as the Gigabyte H97-D3H mainboard has two PCIe x16 slots installed, although I think the second slot will only do 4x but for a cheap card that may well be fast enough. Alternatively using the onboard graphics would also be an option as Intel graphics is well supported in Xubuntu and the hardware supports three displays out of the box. However apart from map drawing there has been no ongoing call for three displays and the maps project is scaling down a lot at the end of this year so there is probably no real urgency to go to three displays and in fact there is a much simpler solution, now that each PC on the desk has its own keyboard and mouse then simply use, for example, the windows pc's display as a third display of something.

The usage of VirtualBox running Qgis in a Windows 7 VM has worked out very well for completing the major part of map development running an older version of the Qgis development master because of major problems with later versions. The best thing about the Windows versions of Qgis apart from being able to handle more resources such as 250 or more Geojpegs loaded simultaneously is that they don't automatically update like ones in Linux do (if you have specified the repositories in your sources.list file or imported an update list into /etc/apt/sources.list.d) so I don't have to worry about breaking Qgis with an update. I won't be updating that VM with any newer Windows release of Qgis before the end of this year and don't know if I will bother with any of the newer versions on Linux as the later development releases with a lot of challenges and project file corruption issues among other things is not something I can be bothered with wasting time on at present. This VM has been allocated 12 GB of RAM and it is surprising to see how much this drains mainpc's resources, I guess the browsers are sucking up all the RAM in the computer, absolutely typical as they are major resource hogs, even Firefox Developer with e10s.

The bedroom pc is going to be updated with a new motherboard I am being given which is a Asrock Q1900 Mini-ITX. The advantage of this is the use of an Intel BayTrail CPU instead of the AMD E350 in the current incarnation of this computer as the AMD graphics are now deprecated officially by AMD so this computer has with the latest release of Xubuntu been having a lot of problems with graphics stuttering. The Bay Trail in the Asrock board means Intel graphics which are much better supported under Linux. I also have the option with the mini-PCIe slot on board this computer to put in a wireless card which would enable it to have wireless on board, again as long as I stick to an Intel card it will be supported out of the box. It is interesting Asrock have anticipated a few different uses for their series of board and have a Q1900DC model which instead of the ATX 24 pin power connector has a DC jack that can accept 9-19 volts DC from a laptop power adapter. If I was starting from scratch with an enclosure that didn't have its own power supply (the Antec I bought has a separate laptop style adapter and a small internal board to produce the standard voltages) then this board would be well worth taking a look at. 

Saturday 5 August 2017

The joys of running development software

Obviously I'm having a bit of fun with a GNU/Hurd VM and the Free BSD one was to see if I could get Qgis running on a different platform other than Linux. This ultimately has failed because I could not map the network share from MainPC. The Win98 VM is not running Windows 98 because I don't have an ISO I can install from. ReactOS is another bit of fun although it does work. And then there are seven VMs running Qgis. There are four stable versions with some apparent duplication at 2.18, and then three different development versions.

Qgis map development

So as announced on my maps blog I am working to wind the maps project up by the end of this year and I am writing a series of articles that will be published in this timeframe. They will cover the Otago Central Railway but I am working concurrently on updating several different sections of the maps.

As far as general map editing goes with aerial photos I have to use a Windows based edition of Qgis because of there being problems with the Linux edition not being able to load all the aerial photos at once. The Qgis team claims this is a Linux limitation, which I doubt. It may be a limitation of whatever cross platform development system they are using.

I have been using my Windows 10 PC to do this but it has been very slow work and unfortunately I have come to the conclusion this is because the computer's screens are off to one side and I have to work sideways and this slows me down. I can't afford to have this time loss when drawing maps so I am updating a Windows 7 VirtualBox on my main computer so that I can do the maps on this one, it can be given the same 8 GB of memory that the physical computer has. 

The version of Qgis installed on this computer will be 2.99.0-9 (the Windows version number for an earlier development master that doesn't have the major issues that some of the more recent development masters have). There are quite a few advantages to using a VM on my mainpc as all of the other resources needed to do the maps are local to it and they can all be loaded on the mainpc while the Win7 VM is running in just another application window. This is how I do some work already with other VMs running older or different versions of Qgis on different Xubuntu releases.

One issue of both VMs and a physical Windows 10 computer is accessing the map data over the network from MainPC. I helped speed things up on the Win10 computer by putting all the aerial photos into a local drive instead of having them loaded over the network as well. I will set up the Win7 VM with a separate virtual disk for this specific purpose. Of course MainPC's disk space is all being used up with the demands of this project. It has 2 TB of disk space and scary as it would seem that is three quarters used up as of now. Once this project is completed I expect I can recover space by deleting some of the resources like aerial photos as it will be a major expense to add bigger disks as not only would the two disks in the computer have to be replaced but also the two removable backup disks as well. The other option is to move all the music and videos to the mediapc as they are essentially being duplicated on this computer.

The Win7 vbox took a bit of work to set up and make work with two virtual screens and copying the aerial photos across and loading them. It took quite a lot longer to load them than I expected but once it was up and running it has been very easy to do the maps on this computer so it is working well.

Wednesday 2 August 2017

Download managers for Linux

Well the day arrived when I needed a download manager to handle tricky downloads so here we are. After some trial and error uget which is in the standard repositories turns out to be a good gui based download manager. It can be integrated into Firefox with the FlashGot extension.

I also had to install Archive Manager (file-roller) to extract the downloads.

I have been busy again downloading truckloads of aerial photos from Koordinates to use with maps and the download manager has been needed as the downloads kept stalling and timing out. It seems this is an issue with the new Koordinates website although they are trying to blame Linz for the issue. When I looked at uget it took 5 retries to complete some of the 10 downloads I have done in the last day. They varied in size from 1 to 5.5 GB.