Sunday, May 27, 2018

Librem 13: A few problems

I bought my old Lenovo Thinkpad X1 Carbon (1st gen.) when I entered grad school for my Master's program, in 2012. And after six years, the Thinkpad still ran well, but it was getting old, so I figured it was time for a change. I went back and forth about what kind of system should replace my laptop. I don't travel that much, so I figured a desktop would be better. And I could get a bigger screen.

After going back and forth on the decision, I decided to get a laptop. I don't often travel with a laptop, but when I do, I prefer to use my primary system so I don't have to keep things synced. Of course, I wanted my system to run Linux. Purism is aimed at the Linux laptop market, and I wanted to support that. So I bought a Librem 13.

I've had it now for about a week, and I love it now. But I'll be honest, I didn't love it right out of the box. I'd like to note two issues for folks who are thinking about getting a Librem laptop, so you aren't surprised like I was.

1. The backslash key sends the wrong key code

The Purism laptop uses a keyboard that sends the wrong key code for the backslash key (\). The "shift" on this key is the pipe symbol (|). So you know, you need these. Try running any commands at the Linux command line, and you'll quickly run into a problem where you can't send the output of one program into another program. You need the pipe for that. Or try escaping a character at the command line, or in program code. You need the backslash for that.

This is a known issue on the Librem. Every other keyboard known to man gets this right, but I guess Purism used a different keyboard.

To fix, you need to set setkeycodes 56 43 to reset the correct key codes for that key system-wide. To make the fix permanent, create a new /etc/rc.d/rc.local file that is mode 750 and has these lines:

#!/bin/bash
setkeycodes 56 43
exit 0

Here's the file entry:

-rwxr-x---. 1 root root 37 May 22 18:50 /etc/rc.d/rc.local

This fixes the problem each time the system boots. You don't need to do anything at the user level. Note that I have my Librem connected to an external display, and I'm using an external keyboard and mouse. This key code fix doesn't impact backslash or pipe on my external keyboard, so I'm good there.

2. The Intel video card gives serious video flicker

When I first booted the Librem, it was using the pre-installed PureOS Linux distribution. I played with it for a while, then decided I'd rather run the Fedora Linux distribution that I'm used to. But after I'd re-installed, I quickly realized I had a problem. The laptop screen would flicker at random times.

Ah well, I figured. This is a driver issue, just do an update. Except that every time I ran an update, the laptop display went to sleep. Very annoying. In the end, I had to boot into run level 3, and run the update from text mode. The screen still flickered once in a while, but not as badly, and the display didn't go to sleep.

It turns out that this is also a known issue. Some users reported that using i915.enable_rc6=0 as a kernel option will prevent or reduce the issue. Or you can try i915.enable_psr=0. But on my Librem, neither seemed to completely fix the problem. I still get flicker on the laptop display. I'm not sure what kernel settings Purism used in the pre-installed PureOS Linux, since I wiped that when I re-installed with Fedora Linux.

The problem is likely caused in the Intel i915 power management driver. Also reported as Constant display flicker after i915 is initialised. For the Librem suggested fix, see Troubleshooting > Screen Flickering.

Interestingly, I don't get this problem when I'm using only the external display. I mentioned that I have my Librem connected to an external display, and I'm using an external keyboard and mouse. I set GNOME to only use the external display. I can still see the laptop's screen flicker at the graphical login screen (on the laptop display), but once GNOME switches to the external display, the laptop's display turns off so the problem doesn't seem to get triggered.
With those two fixes in place (rc.local, and using an external display) I'm very happy with my Librem 13. I'm effectively using it as a desktop computer. I'm hoping there's a fix for the i915 video by the time I take my next trip in October, or I'll be very unhappy.

If you know of a better solution for the i915 display flicker problem, please let me know in the comments.

Update (6/6/18): I'm still having the screen flicker problem. I reached out to Purism via Twitter, and they asked that I open a support case, which I have. They've seen this on some machines.

Update (6/9/18): I shipped back my Librem 13 today. I feel better knowing this is a hardware issue that others have seen, and that it's fixable.

4 comments:

  1. Battery life is excellent! The website says Roughly 7 to 9 hours and that seems about right. Charging back to full takes almost 4 hours.

    I'm writing up something about how I manage the battery, which I'll post next week.

    ReplyDelete
  2. Which kernel version are you running, on which Fedora version? That would be nice to know. In more recent versions some of those parameters are no longer present in the i915 driver. I suggest you try the "rawhide-kernel-nodebug" repo to see if it's any different on the latest kernel too.

    If the problem persists, it could also be a hardware bug. Contact Purism and have them replace or refund the laptop.

    ReplyDelete
  3. >Which kernel version are you running, on which Fedora version?

    I'm running Fedora 28. I just did an update on my kernel today (June 3). Here's the technical info:

    $ uname -a
    Linux localhost.localdomain 4.16.13-300.fc28.x86_64 #1 SMP Wed May 30 14:31:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


    With the new kernel update, the problem isn't as bad but the problem is still there.

    ReplyDelete