26/10/2019

IcyBox IB-RD3621U3 RAID1 with Ubuntu 16.04

RAID is not backup, yeah, yeah, yeah…
Still, my laptop is bursting its 512GB SSD and anything is better than my current backup method of randomly distributing copies of important data on external USB drives in various states of health.

I settled on a mid price solution, two 4TB Seagate Barracuda and an IcyBox  IB-RD3621U3 RAID enclosure, for about 250€ in total.  Rsynced to a 4TB WD mobile drive I keep in daily use.
Setup procedure:
  1. S.M.A.R.T. self test. Note: the IcyBox board is not Smart capable. To do a full initial self test on the drives, plug them into a desktop SATA. (smartctl -d sat provides output, but the test will fail)
  2. Disk installation in the drive: note - there are handy stickers 'HDD1' and 'HDD2' in the box. Label your disks to correspond with the HDD1 and 2 labels on the front of the IcyBox.
  3. RAID mode:
    Switch the box off (1). Set the pins under MODE (2) to RAID1. Hold OK (3) pressed, switch the box on (1) and keep holding OK until the LED band at the front has stopped blinking in red (should take about 10 seconds)
     
  4. Connect to a computer. The box should now register as a single drive in GParted, which you can format at will.
  5. Note: GParted via the Dell XPS USB-C dongle hell didn't work too well, failed at creating the partition table.


11/06/2019

KCM Wacom settings on (K)ubuntu 16.04

There's a handy KDE System Settings module for configuring Wacom tablets - calibration, screen areas, you name it. I was rather keen to have it handle my old Graphire4 on a multi screen setup on my work desktop (Ubuntu 16.05).
Sadly, the wacomtablet package (https://github.com/KDE/wacomtablet) seems to have been dropped from the repos between 14.04 and 19.04 due to ongoing bugfixes in dependencies. They do offer instructions for manual compiling - with dire warnings that there'd there be no easy uninstall. 'make uninstall' worked nicely, though.
However, I kept running into missing headers etc., until I found the one version that worked, 2.9.82.

Command line log:
wget https://github.com/KDE/wacomtablet/archive/v2.9.82.zip 
unzip v2.9.82.zip 
cd wacomtablet-2.9.82 
mkdir build 
cd build  
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_USE_QT_SYS_PATHS=ON 
make 
sudo make install

Et voilĂ !

23/04/2019

XPS13 webcam doesn't wake up (BIOS fix)

The XPS13 9370 (summer 2018's model) webcam is horrible anyway (still stuck at the bottom of the display). However, it didn't help that it stopped working when the laptop resumed after suspend (all Kubuntu versions I used from 18.04 upwards).
According to this Dell support discussion, it was a BIOS problem that was fixed in BIOS 1.5.0 - I had 1.3.3. Updating seems to have fixed the problem.
Steps:
Get the current BIOS installer from here.
Put it on a flash drive (unless you've got a USB-C one, the Dell dongle works. MicroSDs don't)
Plug in your power supply.
Press F12 during re-boot, select BIOS Flash Update. There should be a drop-down menu top left on the next screen that lets you select and browse the flash drive. Pick the EXE installer. Install. Reboot.

do-release-upgrade or don't

I couldn't resist the lure of the Dingo, but it took me some time to get there. Long story short: do-release-upgrade is a picky bitch. It kept and kept and kept coming up with a "Your python3 install is corrupted. Please fix the '/usr/bin/python3' symlink." message. That message is produced by a script downloaded into /tmp during the installation process and IMO *should* just make sure that the /usr/bin/python3 symlink points to a correct python binary (might have to be 3.6). After all, the update scripts have a "#!/usr/bin/python3" header.
However, over the years, people have had to resort to the weirdest workarounds:
  • Make sure /usr/bin/python and /usr/bin/python3 point to python3.6
  • Reinstall default python3 
  • Purge anything done by update-alternatives (sudo update-alternatives --remove-all python)
  • Purge python2.x
Reader, I tried all of them.
update-alternatives --display python
sudo update-alternatives --remove-all python
sudo apt install --reinstall ubuntu-release-upgrader-core
sudo apt install --reinstall python3
sudo ln -sf /usr/bin/python3.6 /usr/bin/python
sudo ln -sf /usr/bin/python3.6 /usr/bin/python3
sudo apt-get remove --purge python2.7-minimal
In the end, purging python2.7 did the trick. That involved uninstalling inkscape and bits of TeXlive, but it was a small list of dependencies that could be reinstalled after the update. Still, a mess. Serves me right for not bothering to do a clean reinstall.

11/04/2019

articletitle, article-title, gnah!

Joseph Wright is an awesome person who provides handy biblatex styles for numerous journals.
Some of those require article titles in the submission reference list which are later removed for publication, so it makes sense to put in a switch when you load the package:
\usepackage[style=science,articletitle=true]{biblatex}
(the switch is defined in the science.bbx file, btw.) All hunky dory,  except for the fact that the most recent texlive shipping with ubuntu (TeXLive 2018.20180824) still provides biblatex-science from 2016, where the switch is called article-title. I hope the newest versions get into TexLive soon, apparently he's done quite a bit of cleanup.
https://github.com/josephwright/biblatex-science/issues/1
Update: Fixed in the TeXlive 2018.20190227 that came with the Dingo upgrade. Gnah. Now my work desktop and laptop have different versions of the script.

25/03/2019

Help! Kile is stuck!

"The file x.kilepr cannot be opened as it does not appear to be a project file." Which didn't stop Kile from "scanning project files", which in turn blocked the entire interface. All in vain, I might add, since the project file had moved anyway, so there was nothing to scan in a folder that didn't exist any more. An existential crisis ensued: it is almost midnight, after all, and I'm in mid deadline panic.
Ah well, let's find kilerc, which happens to be in ~/.config/ (if there is a method to KDE's config folder organisation's madness I haven't found it yet). The culprit was in the FilesOpenOnStart section:

[FilesOpenOnStart]
DocsOpenOnStart0[$e]=/path/to/file1.tex
DocsOpenOnStart1[$e]=/path/to/file2.tex
EncodingsOfDocsOpenOnStart0[$e]=UTF-8
EncodingsOfDocsOpenOnStart1[$e]=UTF-8
NoDOOS=2
NoPOOS=1
ProjectsOpenOnStart0[$e]=/this/path/is/invalid.kilepr

I just had to adapt the numbers and paths of docs and projects open on start after all.