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. 

23/08/2018

Zenbook data rescue

RIP, Medusa (2013 Zenbook). I believe her power socket is finally dead.

Which was a bit of a bummer because I'm not too regular in my backups and the old Zenbooks feature non-standard 18pin-connectors instead of the more recent M.2/NGFFs. Ah well. There are adaptors for everything.
There were exactly 2 drive types with this form factor, SanDisk's SASA5JK and ADATA's XM11 and I got a board that transfers to a standard SATA and can then be stuck in a USB drive case like the one pictured above (I got the adaptor from here, but there are other suppliers as well).

16/05/2018

KDE freezes on Special Window/Application Settings menu

I wanted to disable Global Shortcuts for Blender and happened on a nasty bug on Kubuntu 16.04 (applies to all windows).

The standard method is to go via right click on the title bar, 'More Actions' and 'Special Application (Window) Settings', clicking which completely froze my desktop. It wasn't reproducible on my laptop running 18.04, so I just note the workaround: don't ever click on those menu entries. Save your work more often. Change Window Rules via System Settings -> Window Management -> Window Rules.

26/03/2018

Spyder 3.2.8, pip3 and and PyQt5

I recently ran into segfaults on all my computers after upgrading spyder via pip3. Lots of Qt5 error messages. The trouble seems to be PyQt5-5.10.1; spyder 3.2.8 requires at least 5.10.0 (which happens to work). Thus pip3 install --upgrade PyQt5==5.10.0 spyder 
solved my issue.
Note to self: pip3 install PyQt5== is a handy way to list available versions. Sadly, it's deprecated (--use-deprecated=legacy-resolver).
Second note to self: There's also spyder==4.0.0b1 which seems to work with newer PyQts. Good thing I switched to virtual environments.

23/03/2018

Moving your thunderbird data to a custom location

Thunderbird's profile data is stored in ~/.thunderbird by default.
If that's inconvenient, i.e. due to disk quota limits, here's is how to move the profile folder. It will have some random name, we'll call it pr0f1le.default, and ~/.thunderbird contains a file profiles.ini and a folder named pr0f1le.default.
Here, I've moved the profile folder to e.g. /media/data/thunderbird/pr0f1le.default and changed profiles.ini to (changes in bold):
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=0
Path=/media/data/thunderbird/pr0f1le.default

Default=1

IsRelative has to be 0 because I've given Thunderbird an absolute path to the new location.