Tuesday 31 March 2020

Rolling back a Flatpak application to a previous version

Today on my main graphics editing PC, I decided to update Gimp from 2.10.16 to 2.10.18. Which should have been OK. Except that it wasn't. I have spent all day dealing with Gimp crashing during saves and trying to work around with ever smaller files to be saved. It did crash last night as well but crashes during saves like that are normally relatively infrequent, and in this case I observed that the system resources were almost completely exhausted, which hasn't been the case at any time today - one save was only half of the file, another was only 3%, and in neither case were the system resources anywhere near excluded.

As the evening approached I have decided enough is enough, let's try to roll back Gimp to the previous version. Well, as it turns out, provided a previous version is available on the server, this is certainly possible.

Flatpak can interrogate a repository for you to see what versions are available by using the following command:

flatpak remote-info --log flathub org.gimp.GIMP

Obviously the last parameter is the path to the repository which for Gimp is the one shown in the example above.

What will come out is a list of commits, for example here is some of the output from a command issued today:

Commit: 62578b6f3b1262ceab9fc5d8a93d1b034cda51636a88bce9de6036ae6c5f038c
   Subject: Release GIMP 2.10.18. (bbbf1b4e)
      Date: 2020-02-25 00:53:47 +0000

    Commit: 57036c515dd653f828b8c6574e4b56fca6c29b6ac04f5e84c328cc6fc5e7987f
   Subject: Release GIMP 2.10.16. (796cb329)
      Date: 2020-02-18 22:43:45 +0000

    Commit: 798d8cd8a6a2ccf1bf21c0f5e9749dd4d97ecd511a3af1922d6fedf6c26e3a7c
   Subject: Release GIMP 2.10.12! (1366fa63)
      Date: 2019-06-13 02:25:52 +0000

In this case I have decided to roll back to 2.10.12 because of being uncertain about whether I had 2.10.12 or 2.10.16 previously installed (there was no release for 2.10.14 for some reason).

To achieve this the following command is required:

flatpak update --commit=798d8cd8a6a2ccf1bf21c0f5e9749dd4d97ecd511a3af1922d6fedf6c26e3a7c 
  org.gimp.GIMP

Note the slightly erroneous command "update" even though you are downgrading in this instance.

One blessing at least is that flatpak, at least on Debian, will not automatically update when you use apt upgrade. So we can use apt to update everything else and flatpak applications will not be affected. I suppose Synaptic or KDE's software manager might one day try to update flatpaks itself - I have no idea if that is the plan the developers have in mind. Every time I see the message there are updates ready I just go to the command window and use apt to install the updates.

However, my other computer has 2.10.18 installed and hasn't been having crashes when I edited large Gimp projects on it so I am not sure what is going on with my graphics computer but I have wasted too much time in the last couple of days to want to continue with 2.10.18 at present. Both computers are fairly up to date with 15 new packages released, most of them being a new Qgis build, so it isn't really obvious right now why the systems appear to behave differently, unless it is this particular file.

Subsequent testing however has shown there is nothing wrong with Gimp and the issue is down to the particular characteristics of this file. Gimp does seem to have internal limits as to the amount of file data it can deal with and it is rare for me to be able to edit a project larger than about 30 GB because they tend to crash on save, probably due to the additional resources needed to compress the file before saving it. There doesn't seem to be any issue with canvas size as such - as one would expect a canvas does not require every pixel to be saved. The software simply needs to save the data in each layer along with its coordinates within the canvas. So I have been able to work with very large canvases of over 10 Gpx without difficulty - as long as they are sparsely populated with graphics layers.

As part of my testing I reinstalled the graphics pc completely which was very easy with only a few applications installed on this special purpose computer, but especially because of being able to reuse the previous home drive which saves a great deal on reinstallation because all of the user settings are kept. The reality is a new installation can be up and running in an hour. I also noted that Debian 10 ships with its own Gimp 2.10 package pre installed (2.10.8) but for some reason this version could not open anything so I have uninstalled it and only use the Flatpak version.

Stopping desktop notification popups on LXQt

I see a fair bit of LXQt, whether it is on my one desktop that is running it on top of a Debian install, or my preference for laptops and virtual machines which is to install Lubuntu for fast pain-free installations, especially with non-free firmware and low resource use. Debian remains my preference for my desktops due to its versatility and feature set being more oriented to hard core geeks like me. Hence the one desktop that is running Debian/LXQt rather than Lubuntu, which is annoying in having disabled hibernation, among other things.

One thing that itself is a nuisance on a computer for screen recording is the popup desktop notifications in LXQt, which for example take over the browser message popups, or the on screen feedback to up and down volume buttons being pressed on the keyboard, and as far as I can tell, always appear on screen 1. There is only one way to get rid of these, but you can't configure them by application as you can on some desktop environments. Nor is there much control over them in the LXQt config center. So it is just easier to turn them off altogether.

Just go to LXQt configuration center, open Session Settings then on the first screen "Basic Settings" in the "LXQt Modules" window, find "Notification Daemon" and stop it, then untick its entry as well.

You will still have to look at browser notifications - I recommend turning them completely off as well.

Sunday 29 March 2020

Wireless broadband [2]

So in my last post I wrote about Skinny 4G wireless broadband. I have had this for about 10 days and it's been really good. I have two computers connected to it, one in each main room of the house, and using a proper computer with it instead of a limited Raspberry Pi is really the key to getting the most out of it. But just as relevant is the observation that it is way better than the Vodem that I used to plug into one of my PCs via the USB port. There were plenty of times when that wouldn't connect reliably and it was often very slow especially in daytime. I was half expecting the same sort of challenges with Skinny but like my earlier evaluation of the new Spark wireless broadband for a relative, I was left pleasantly surprised by the performance and reliability of Skinny Wiress Broadband.

It so happens the same product is available as Skinny Jump at a much cheaper cost for people who have various forms of economic or social constraints that make it difficult for them to pay for a full wireless product, and certainly paying $10 for 60 GB is quite a lot cheaper than my $39 plan for the same volume. However although I can qualify for the Jump product and would not have to pay upfront for a modem as I have, I will continue with what I have purchased as I believe I am able to afford it and therefore the Jump funding subsidy can be directed to those most in need of it.

I don't have the modem running the whole time, it gets turned on and off with the computer - and it comes on and connects itself up pretty quickly without any issues at all. It took very little effort to get it in a position where it gets 3 bars of signal (maximum strength) and the speeds it is giving me are really good, easily comparable with Jetstream (ADSL) and way better than the throttled speeds I have been getting on my free connection from the school. The Huawei B618 modem is not quite as full featured as the Nanobridge that connects to the school - the B618 can issue DHCP addresses for example but can't handle address reservations and some of the other bells and whistles that the Nanobridge manages. But it is quite satisfactory for home use. I have turned off its WLAN because I don't as yet need to be able to connect to it wirelessly and also to avoid interfering with the existing wireless network in the house from the Unifi AP Pro. 

At the moment Skinny have granted us extra free data because of the COVID-19 lockdown but I will still have to pay $39 at the end of the month whether I use the extra data or not but at least I don't have to worry about going over cap for the next month or two. But so far usage is going well and I don't have to worry about going over cap in any case because most days would average less than 2 GB.

Overall therefore Skinny 4G Wireless Broadband is highly recommended.

Using a Raspberry Pi as a livestream player [3]

Well since I last wrote about this I have had more time to test, the outcome of which is that the Pi's CPU still runs very hot even with the lid removed off the top of the case. This undoubtedly continues to be relevant to display performance which generally is still challenging. I have also found that Firefox ESR tends to crash quite often. Chromium is more reliable but unable to share the Firefox profile.

It looks like a $20 case from PBTech that has a heatsink to go on top of the chip, and a fan to pull air through the case, will be a necessary enhancement to ensure the chip is able to give its best performance. Right now, it runs quite poorly with videos, but does well when just playing music. With the current COVID-19 lockdown, I won't be able to buy a case for quite a while yet, so I will just have to wait until an opportune time to get this implemented.

Sunday 15 March 2020

Using a Raspberry Pi as a livestream player [2]

Last time when I wrote this column I was looking at updating the Model 3B Pi that I have to the latest version because the RPi3B seemed to be a little slow for playing live video streams off Youtube. Well a new RPi would cost around $120 including the case and a new power supply because it needs more power and uses a USB-C connector. It happens that I have yet to get around to replacing it due to struggling to have a spare $120 at the moment. Plus it uses micro HDMI which means adapter cables or because I generally use a 5 metre cable to the TV, the RPi would have to be mounted behind the TV to use a short cable and whilst that isn't a major issue it does mean a bit of mucking around rigging up different cables for power and sound etc.

Fortunately I was reading through some of the documentation and discovered that RPis can actually have heat issues and unsurprisingly the standard case is not designed with heat dissipation in mind and being enclosed with no ventilation slots, it can cause the RPi to get quite warm. So whilst my RPi was freezing and locking up, I checked the temperature of the case and it was very warm, and a short time before it had been showing temperatures of 70 degrees on the chip which is uncomfortably close to the limit of 85 degrees that it will automatically self protect at.

Fortunately these official cases have a lid that you can just take off to open up the case and when I did that, the heat level overall dropped and the chip started behaving itself. When I first got this thing it was open air, it was actually secured with a little hook onto a piece of wood and had no case at all. It just hadn't clicked that the case might be causing the problems as I often see it lock up which has been very frustrating. From here the course open to me is to either get a piece of fine plastic mesh to stick over the top of the case, or find some other kind of case that has vents or a heat sink built into it. So now I can put it back to work playing live streams that I can watch in bed, and whilst that might sound a bit decadent, I have the RPi set up to work headless, so that I can turn the screen off and just fall asleep listening to the soundtrack, and with the position of the screen at the foot of the bed it is a lot more convenient if I decide to watch it than turning my head to watch on a computer screen. Well with the RPi cooled down it was able to play 720p video stream off Youtube although a little jerky so I expect 360p as I usually use will be quite OK.

To make it more useful it needs a pen drive attached to be able to play videos or else a bigger SD card in the slot but probably the pen drive is easier and 128 GB is the best value at around $60. For now I will use a 16 GB one just for music playback, with GRSync to synchronise with the computer that has the music library stored on it.

Thursday 12 March 2020

Wireless broadband [1]

For the past four years I have had the privilege of a free internet connection shared from a corporate site next door to me where I used to work. It has been and in fact still is good and I intend to keep using it. However in order to supplement it and work around some of its limitations I am now planning to sign up for Skinny Wireless 4G Broadband. This has only recently become available in my area and appears to be limited to the Spark network (not Vodafone).

Skinny have a few plans starting with $39 for 60 GB of data with a downlink speed around 36Mbps and uplink 10Mbps. This is slow by fibre standards but a lot faster than my throttled 1Mbps Wifi connection from next door. According to a current deal they will give the first month free but you have to pay for the modem which costs $99, however their overall rates are the cheapest - Vodafone where available starts at $53 (albeit for 120GB which Skinny charges $49 for) whilst Spark starts at $65 for 60 GB but they don't charge you for the modem. So the first month would cost $99 and each month thereafter $39.

Up until now when I have needed an independent connection I have used either a laptop or a Raspberry Pi tethered to my mobile phone. The problem is that these mobile data connections are throttled quite severely during busy times (i.e. daytime) and the Pi is too slow to manage very much without grinding to a halt. Under the new arrangement I will have a regular computer that gets its internet exclusively from the wireless modem but will still be connected to the internal network as well except that it will have a different default gateway from the rest so that it won't connect to the corporate internet. Its internal network connection will generally be used just for file transfers and remote access.

Of course now there is the question of do I need my relatively expensive mobile plan with its large amount of data, and in reality I don't. However incorporated into that plan is two free tablet shares that let me use my tablet and second phone on the same data connection without an additional cost. So that is the reason I will probably stick with my current mobile plan but it is tempting to think I could switch to a cheaper prepay plan if I was willing to drop the tablet shares. One day perhaps Vodafone will stop letting me use my current plan but they are probably doing alright on it for now as it is pretty rare for me to use anything like my full data allocation and it will be even less likely with the wireless broadband installed. This is a backup to the corporate connection which is still going to be used for the rest of my needs.