Ubuntu on Lenovo Thinkpad T450s

Lenovo’s T450s is another piece of high-production-volume hardware from a vendor with a fairly good reputation for Linux support … but a host of serious problems under Ubuntu’s flagship “Long-term-support” operating system.  I’d love to be in touch with others running this machine, to know whether these are all common symptoms for you:

Hardware-ish Problems as of June 2016:

Beyond that, there are various software problems with Ubuntu 16.04. I have filed bugs about apt-mark hold, banshee, biber [update: fix released], etc. But these are not particular to my hardware.

Also, for some bizarre reason, although I more or less maxed out the specs on this machine, the keyboard backlight does not work, which apparently means I bought one without! Careful not to do that.


Posted in GNU/linux, hardware, Product review, Ubuntu, Uncategorized | 2 Comments

GNU/Linux at McGill: Calling all users! Please join a support discussion board

A theme among my posts since 2011 has been the challenges of being a GNU/Linux desktop user at McGill University  but outside the departments (Math, Physics, Computer Science?) which support the OS.  I believe those departments have eschewed the central university’s services and support and run their own.

leaf graphicMcGill ICS (IT services) staff are always very friendly in trying to help, but that fact is that unless the University  breaks out of its full-body embrace with Microsoft software, a self-fulfilling prophecy is that there are not many of us open-source OS users who rely on central university services (email and printing and VPN) or support. Because it’s really frustrating.

There are some things they could very easily do better, though. Forcing us to rely on their online “knowledge base” for help with these services is cruel, when they have the ability to marshal community knowledge and support by hosting and advertising a bulletin board / discussion group.  This could accumulate correct information and up-to-date experience.

After the nth iteration of suddenly not being able to print anything, thanks to the Uprint system’s frequent changes and problems with its CUPS service, I need a different approach. I not only literally have to ask colleagues and assistants to print things for me, but waste time ascertaining that the problem must really be with McGill’s system rather than anything on my end.  Yesterday/today ICS was still coy or slow to acknowledge a problem. Only one other user (eventually) reported the same problem. They then took my complaint seriously and restarted their CUPS printer server (but without being transparent about it) and a week’s worth of my print jobs popped up in the print queue.

I would have rather been in touch with that other user from the beginning. Please, if you are a GNU/Linux user on campus, join this Google discussion group using your McGill email address, or with a message to help identify yourself as real faculty/student/staff:


Please spread the word, and recruit your other  Linux friends on campus too.

Posted in Uncategorized | Leave a comment

Composing and typesetting a funding proposal using LyX (SSHRC/ NSERC /CIHR)

This is one of the geekier posts I’ve written, in the sense that the number of people for whom this might be useful is… small and they are not likely to search for it.

In Canada, submitting an application to the government “Tri-Councils” for  funding of  research costs  involves one of a couple of horrid/laborious (soul-crushing) interfaces for entering one’s C.V. information. However, I have nothing useful to say about that task.

On the other hand, the core of the rest of the proposal (for several types of funding) consists of the following:

  • Some parts which are simply small form entry, online
  • Some parts which consist of unformatted text pasted into a textbox, online. The text size is limited in terms of characters,
  • Some parts which are uploaded as PDF files; their length is limited in terms of number of pages.

For instance, for the 2015 SSHRC Insight Grant there are two of the big text-entry boxes and seven separate PDF sections to upload.  One of those is a list of references. I would like to use a citation manager to make citations across the various PDF sections, and to have the reference list coordinated across them. I would like to have a count of how many characters are in drafts of the character-limited sections. I would like to have appropriate headers and footers which indicate the current page and total number of pages within each PDF section. I would like to prepare everything in one file when I’m writing or sharing drafts for comments.

I imagine I could do most of this in LibreOffice or another office suite pretty straightforwardly, but I want to do it in LyX because that has a nice interface to my BibTeX databases, and because of all the other advantages of LaTeX; I think the output from LaTeX still looks vastly nicer than what everyone not using it seems to produce.

So, I made a short Python script which

  • exports my LyX file to LaTeX;
  • counts the characters in each named text box, and display this in red above the box;
  • exports the text contents of each textbox into a separate, named, paste-ready (ie most newlines removed, etc) file;
  • compiles the LaTeX and BibTeX source into one big PDF file; and
  • extracts the appropriate PDF page ranges into named PDF files ready for upload.

Here it is (it makes command line calls for a POSIX system, of course):

Compose your funding application in LyX; use this to create the web-ready components.

NSERC, CIHR, SSHRC funding agencies in Canada have funding applications on the WWW that require some text entry (text boxes, with limits by number of characters) and some PDF inclusions (with limits by number of pages). It's nice to draft the whole thing in one document, making use of bibliographic citation and reference automation, etc, so this is for doing that.

Put "\usepackage{color}" in the preamble of your LyX document.
Put, for example,
"begin{countbox}{summary}{3800 characters}" inside an ERT box (ie source code insert)
to note the start of a character-count section, and "end{countbox}" at its end.

Then run this python file on your lyx doc. It will count the characters of each text box region and display them in the compiled pdf.

It will export the text of your text boxes in paste-friendly (removing carriage returns) format.

It will separate out the various PDF submissions which must be separated (some customization needed for this last part).

import sys
infile=sys.argv[1] # '/home/meuser/funding/SSHRC-2015/SSHRCapp.lyx
import os
SP='./tmp/' # Scratch path
pp,ff=os.path.split(infile) # pathname and filename
os.system("lyx --export-to pdflatex "+SP+ff+".tex "+pp+ff+'.lyx')

# Now parse .tex file; find "boxes" with length limits:

import re
boxes=re.findall('begin{countbox}{(.*?)}{(.*?)}(.*?)end{countbox}',tex, re.DOTALL)
for onebox in boxes:
 LL=len(thetext.replace('\n',' '))
 replacement=' {\\LARGE\\color{red} [%d characters/%s]}\n\n'%(LL,onebox[1])+thetext+'\n{\\LARGE\\color{red} END:BOX} \n'
 # Also save the text, with newlines removed!
 detexed=thetext.replace('\n\n','|||').replace('\n',' ').replace(' ',' ').replace('|||','\n')
 with open('tmp-'+onebox[0]+'-box.txt','wt') as fout:

with open(SP+ff+".tex",'wt') as fout:

# Now compile and display the PDF:
syscmd='latexmk -pdf -pv -aux-directory='+SP+' -output-directory='+SP+' '+SP+ff+' && cp -a '+SP+ff+'.pdf '+pp

# And now explode out the PDF files. This requires hard-coding the page ranges and section names, below (just once, before submission)
 [4,9,'details',], # Detailed description
 [11,11,'knowledge',], # KB
 [13,16,'team'], # Team
from cpblUtilities import fileOlderThan
for sss,ttt,nn in explodePages:
 if fileOlderThan('tmp-pp-%s.pdf'%nn,pp+ff+'.pdf'):
 syscmd=' pdftk '+pp+ff+'.pdf cat %d-%d output tmp-pp-%s.pdf '%(sss,ttt,nn) 

Posted in Academia, GNU/linux, LaTeX, LyX | Leave a comment

Solving collective action problems is what society does

I taught an introductory undergraduate course in environment, society, and sustainability this past term.  We look at big-picture environmental problems from a mostly-social-science perspective.

Early on, we started to compile a list of collective action problems of all kinds which society has already solved.  I  hope in subsequent years to develop this into a useful online site communicating and animating them: Stay tuned!

As can also happen in the McGill School of Environment’s first natural science course on global environmental problems, some students found the course depressing. The goal of education is empowerment and inspiration to think and act, so hearing that our articulation of the problems we face and the future we have in store had left some feeling helpless was not good news.  Next year we will include a day on the evidence for the power of activism and leadership, but this year I responded rather late simply by writing the following (on behalf of me and my coinstructor):

Neither Kevin nor I are pessimistic about the world!

Many people would rather not understand how things work and how they are working, and your taking the step of doing so is already a positive step for the world.

Please go back to our early exercise on MyCourses to see how many collective action problems our society has solved, simply because we came to understand them. That understanding in each case led to taking the appropriate action. There is actually nothing better (more satisfying individually or more beautiful, socially) than people coming together for collective problem solving!
In countless ways, the world is better now than it ever has been. It is true that many things are likely to change — both good and some bad — in our life times. But that just means that life is full of opportunity to make improvements in whatever that trajectory is. From that I gain comfort.

Personally, I also gain comfort from how endlessly beautiful the natural world is. Even as things change, the cycle of life, the cycle of seasons, the landscape, wildlife, the complexity and unity of it all, being and moving outdoors — all those things I know
are always going to take my breath away with their beauty. They are not going away! The natural world is, in many many ways, very robust. The human world has been, in many many ways, only darker in its past than it is now, when knowledge, rights, and justice are pervasive and there is a growing (and necessary!) sense of global unity that is like the coming of age for our species.

environmentI also know that in such a large world, I cannot make a big difference. So we should not expect that of ourselves. We should try, though, to be part of all the solutions we see — and in effective ways only. There are many people doing that, and there are countless ways to contribute, including through every discipline.

If you are ever feeling down about our prospects as a society or community of species, or your role in helping them, please visit http://www.mcgill.ca/counselling/home which has some great upcoming activities (especially during exams) for de-stressing, as well as more detailed support for keeping one’s perspective bright.

We did not mean to paint an unhappy picture of the world. Rather, our aim is to show that by putting our heads together, we can solve very complex problems! We knew that from science and engineering and space exploration, etc, though human-mediated problems can be another level of tricky.

Keep to your studies, and pursue the work in life that you are going to enjoy day-to-day, in its details. Then you can find a way, within that discipline, to be doing good.

Posted in Academia, McGill University | Tagged , , , , , , | Leave a comment

Review: System76 and their “Sable Touch” desktop computer

It’s still hard to buy a turn-key or supported GNU/Linux computer. I keep trying, and I especially prefer to avoid paying what’s called the Microsoft Tax, i.e. the hardware-bundled cost of Microsoft software, which is how they have built and enforced their monopoly and, from what I can tell, thereby reduced the productivity of billions of people for decades, who have become stuck with software designed to enforce lock-in rather than designed to work well.

But by digressing before having even started, I am avoiding what is also not overall a happy blog post.  In May 2014 I scanned the desktop computer options from the main competition of Zareason and System76, who nowadays look very similar, and found that System76 shipped to Canada.  I thus ordered their Sable Touch: an integrated desktop monitor/computer with a solid state drive, 16GB of RAM, and Ubuntu-ready components.

What follows is an outline of what happened next, along with a review of the machine.  I don’t like spreading bad news, but when a company under-performs yet feels no obligation to compensate for not fulfilling their end of the bargain, it sends a signal that they were not so surprised by their own failure, or that failures happen too often for them to be able to afford to compensate customers each time. For me, putting something on the line is a reassurance that their own expectations of themselves are high.

Hardware and software review


Besides the minor hardware problem recounted below, the computer seems nice:

Speed: It powers on from cold to log-in screen in 13 seconds. After typing in my password, I’m fully logged in in another two seconds. I like that.

In addition, launching applications is blazingly fast. I do no know why my comparably configured  Lenovo X230T is ten times slower launching, Libreoffice, for instance.

Configuration:  An important feature of ordering from an Ubuntu supplier is that they support the operating system (or at least kernel) I’m going to use. System76 machines all come with Ubuntu preloaded. This includes their own packages which provide any necessary tweaks to leverage the hardware they sell. (On the other hand, from what I can see, there is nothing actually in this package in the case of the Sable Touch; in that case, it’s a placeholder for their own custom updates.)

Unlike in the past when I ordered from Zareason, however, they do not allow any customization on the installation.  Sadly, like many places, they install their operating system (root directory) on the same partition as all the data (/home), so that if you ever want to reinstall the system, you would be overwriting your data. I cannot understand this habit, and they declined my request to make two partitions. In any case, it takes only 10 minutes, after receiving the machine, to erase everything and reinstall Ubuntu from scratch with the partitions as I like them, including adding System76’s own support repositories.

Ergonomics: The computer comes with a short stand, which does not allow adjustment of the height of the machine, nor its pitch angle.  The computer is heavy enough that you’d need care if shopping for one of the nice desk-mounted mobile display arms. It would be nice if System76 offered more options for the mount, even if just to allow height adjustment.

The screen is also very reflective.

Service: It’s great that System76 makes it straightforward to ship to Canada.  You will pay full duties, which amount to GST and provincial tax, as a C.O.D. cost on delivery.  However,  it took nine weeks for me to get my final machine, as I recount below. Moreover,  they seemed to me very confused about how to deal with, or even to comprehend, what should have been a small problem, and the delays and mistakes on their part only accumulated further as the fiasco continued.

The fiasco

Below the history that follows, I include, for transparency, the order log and the issue log, which contain all our interactions except for some phone calls.


I ordered on May 9 and received a Sable Touch on June 4, considerably later than they estimated (but I don’t remember precisely what they promised). There are assembly instructions online, but they hadn’t given a copy in the package, nor mentioned that I should look online. Never mind, the assembly was pretty obvious. There’s a desk platform mount which screws onto the back of the computer.


But it didn’t. The hole drilled in the mounting plate was misaligned with the hole in the back of the computer. A simple error, but very poor style for them to ship something so shoddily made. In any case, no problem with the computer, so they could just send me a new piece for the stand, or even the whole stand.

Confusion at System76

Next followed a bizarre set of communication in which System76 seemed to be asking how to assemble their own computer, and in which, when I got them on the phone, they had difficulty understanding the simple geometry of what was wrong, even though they ostensibly had a Sable Touch in front of them and even though I had sent them photos detailing the problem.

Strange resolution

Eventually, they chose to send me a new computer rather than any of the obvious things — accept my offer to file or drill out the hole in the plate, or to send me a replacement plate or stand. With dread, I agreed to wait for a new computer and to send back the entire original. They assured me the replacement would arrive without C.O.D. charges, and that they would provide me with a free shipping return label.

Second blunder by System76

But what arrived was a UPS delivery demanding another $300 of tax duties. System76 had messed up the arrangement for sending the computer as a duty-free replacement. The computer was taken away again for another eleven days while System76 tried to fix their mistake, but it took regular prodding from me to get them to give me any update and likely to take action. I even passed on information from UPS to them, since they seemed to have the story wrong at one point.

On July 14, I finally got a working computer, packaged up the old one, and sent it back. During this whole interaction I also found a bug on System76’s support site, so that I had to share the photos they wanted through my own web site, and they also sent me an incorrectly scanned document without checking it.  Overall, there was much to be desired in every aspect of their service and support — except the most important one: they remained positive and helpful when we were interacting.


Now, I have a quite-nice desktop on my hands, and the belief that its hardware will be well supported for my operating system. Unfortunately, it took over two months for me to get my order, which was meant for use by a summer student leaving at the end of July.  System76  refused any compensation for the whole ordeal. This signals to me that they have a low volume and a high error rate, which is a shame, since having good hardware running snappy open source operating systems is rather nice! and I wish it was more easily accessible to the masses.


Below is the account of the written portion of our rather frustrating communication over those months.

order1 order2 issue1 issue2 issue3 issue4 issue5

Posted in GNU/linux, hardware, Product review, Ubuntu | Tagged , , , | 3 Comments

Inline plots in ipython under Ubuntu (14.04)

This may be my shortest blog post ever, but I’ve been wondering (even with Google’s help) for years why I cannot get my matplotlib graphics to display inline in ipython. This is not always desirable, since they’re not editable/zoomable like they are as pop-up windows, but it is often very nice.

It seems that all I needed was to install one more package, “pysides”. Strange. In any case, with:

sudo apt-get install ipython-qtconsole pysides

does the trick. For convenience I put the following alias in my .bashrc file

alias pyqt='ipython qtconsole --pylab=inline  &'

and then running pyqt gets me all I want.  Using “show()” from the pylab package makes plots appear in the flow of commands and output, as follows:


You may also like the ipython-notebook package for making web-ready python demonstrations.

Posted in GNU/linux, software, Ubuntu | Tagged , , , | Leave a comment

My feather crock pot (how we will cook in the future)

This is an interlude from my normal blog themes.  Just a little bit of physics tells you, I think, how we will cook in a future in which energy is electric and a bit more precious. It seems in North America “retained heat cooking” and induction cookers are both exotic, but they are less so in some other places.

First, my stove, which looks normal, is not so normal in these parts. It’s an induction stove, in which electric energy is transferred directly to the metal of a steel or iron pot through electromagnetic induction, rather than inefficient conduction (most electric stoves) or convection (gas stoves).   This allows both for high power and high efficiency,  has all the tuneability and responsiveness that would otherwise make gas attractive, is fueled by renewable electric power, and is surely the only sensible way to cook.

However, this post is not about how much I love my induction stove in general.

It’s about how ridiculous another aspect of cooking equipment is for most tasks: we cook with thin-walled pots which lose heat nearly as fast as you can put it in. It turns out that “heat” is not a magic substance which you must continually add to make something cook (i.e., much of cooking does not involve endothermic chemical reactions). Rather, it is a state variable (temperature) which for many purposes must merely be maintained for cooking to happen.

Consider the cooking of beans and beany soups, for which it is now de rigeur to buy an electric crock pot.  Here’s my improvised version using just an induction stove.

Step 1: add beans and water to pot


Step 2: bring to boil (just)


With a 2.5kW induction stove, that takes just a few minutes even with a big pot.

Step 3: insulate bottom and top of pot

med_DSC02574.JPG med_DSC02575.JPG

Step 4: add a vapour barrier to protect your fancier insulation


Step 5: Pile on the down / sleeping bags etc


Step 6: Leave overnight ….

Presto! Here’s the result next morning:


The beans stay hot, so the beans stay cooking. It’s that simple.

That’s all. Yummy beans ready to eat with a total of 6 minutes of power use.

One more thing… Now here’s where the induction stove comes in. For most purposes, there is nothing special about the boiling point for the cooking process, so that 90°C is about as good as 100°C (if you don’t need violent convection, like for keeping pasta from sticking to itself).

But if I want to keep it right near boiling, I can. If I take out one (or both) of the cork pads underneath the pot, I can actually leave the stove on (the lowest setting is sufficient, clearly!). The electromagnetic energy passes through the cork without losses (heating), and no heat is coming through the glass, so the only hot thing is the pot itself.
And it stays very close to the water temperature, which is no more than 100°C, a safe temperature for cotton and even nylon.


For cooking which needs more monitoring, our pots of the future could still be heavily insulated around their sides. Using modern electronic cooking technology, this would not pose any trouble such as fire risk.

“Safety second” liability clause: don’t really leave it on unattended for 8 hours. And if you do, take out both cork pads, so that the induction stove’s safety sensor can tell if the pot gets dry and hot.

And a reality check: none of this matters in the big-picture energy scene at the moment — we just need to stop our driving and flying and leaky buildings — but such “hot box” cooking is probably a part of our all-electrical future, and already very useful in less affluent societies.

Posted in Cooking, crock pot, Energy | Tagged , , , | 2 Comments