Keyboard layout unable to recognize pipe

@dmgarland I found that the rc.local fix only works when used by itself. Try again without altering the *.hwdb and simply restarting after rc.local is created and granted proper permissions.

I’m curious why this is “more permanent” than editing rc.local @ewout as I and some others suggested. Can you explain? Is it because rc.local is considred legacy on Debian / PureOS?

Yep. systemd’s hwdb is what most (if not all) distro’s use for working around buggy/faulty input devices. The Purism keyboard fix has been upstreamed to systemd’s hwdb quite a while ago. Simply updating the system should be enough to fix the backslash key.

It seems, that the fix is just for the UK and US layout, the DE layout is still affected (me)

1 Like

On my laptop, that was delivered this week, there is, in fact, a
KEYBOARD_KEY_56=backslash
entry in /lib/udev/hwdb.d/60-keyboard.hwdb for pnLibrem13v3.
Unfortunately, the pipe/backslash key on my keyboard sends less-than and greater-than symbols (even after a full apt update and reboot).

I am guessing that the keyboard or laptop model may have changed again … like to 13v4?? I see no documentation on how to discover these modalias keys required in the hwdb config files.

So I’ll be trying the setkeycodes fix instead.

I did find my laptop has a “v4” sticker on the bottom. I did not attempt to change the modalias key to use v4 instead of v3 because the setkeycodes fix is working so far.

The hwinfo command shows the modalias for the keyboard:

    $ sudo hwinfo |grep svnPuri
      E: MODALIAS=dmi:bvncoreboot:bvr4.8.1-Purism-4:bd01/16/2019:svnPurism:pnLibrem13v4:pvr4.0:rvnPurism:rnLibrem13v4:rvr4.0:cvnPurism:ct9:cvr:

So Purism has a bug in /lib/udev/hwdb.d/60-keyboard.hwdb. They updated the model key to rnLibrem13v4 but failed to add an entry to /lib/udev/hwdb.d/60-keyboard.hwdb.

1 Like

This was right on the money. As a complete noob to Linux and qubes, I figure I’d go into a little more detail with the instructions so others like me don’t have to experience the same emotional roller coaster. I was able to create that file “/etc/udev/hwdb.d/90-purism-pipe-symbol-fix.hwdb” by using the command “sudo thunar” in the dom0 terminal emulator. Then I typed “sudo nano /etc/udev/hwdb.d/90-purism-pipe-symbol-fix.hwdb” into the terminal. It launches a cli text editor. I typed in the two lines ewout advised making sure there was a space before KEYBOARD_KEY_56=backslash. I have a Librem13v3 and I had to modify the line “evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism:pnLibrem13v2*” with “evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism:pnLibrem13v3*”. I hit enter, and ctrl+O to write the two lines in nano, then ctrl+X to exit. I typed the remaining two sudo commands in the terminal, and the | key started working immediately. Thanks to ewout and quban. :smile:

2 Likes

I’ve had a similar problem, but with the librem v4 of course. I’m wondering if we should just make that wildcard pnLibrem13v* instead of pnLibrem13v3*

i have to test and see if that actually works, still.

well, I can pretty much guarantee that the 13v5 won’t have this issue :slight_smile:

1 Like

weeeell… we’re already two revisions later, so allow me to doubt you a little here. :stuck_out_tongue:

I think the last two revision were rather minor. Possibly the component in question was never updated.

no, we’re still using the exact same board/EC (which is where the problem is). We won’t be for v5

where do i sign up and can i swap that into my v4? :slight_smile:

I expect it will be a completely different chassis/board design, and so not retrofittable into an existing v2/v3/v4 chassis.

2 Likes

Updating the system does not fix it - FYI. Clean install about a month back - still using my fix. @ewout

Hi,
I can’t seem to get the fix to work an a new installation of manjaro linux. The commands below ilustrate what i’ve done

$ cat /etc/udev/hwdb.d/90-purism-pipe-symbol-fix.hwdb
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism:pnLibrem13v2*
 KEYBOARD_KEY_56=backslash
$ sudo systemd-hwdb update
$ sudo udevadm trigger

Yet when i press the backslash key it still comes up as a # and pipe is ~
I’m using a Purism Librem 13v2 UK edition

Sorry as this has probably already been asked but i’ve probably missed something simply anyone know where i went?

p.s

$ cat /sys/class/dmi/id/modalias
dmi:bvncoreboot:bvr4.7-Purism-4:bd03/20/2018:svnPurism:pnLibrem13v2:pvr2.0:rvnPurism:rnLibrem13v2:rvr2.0:cvnPurism:ct9:cvr:

@tasty,

I have had exactly the same issue as you (Librem 13v2 UK edition). I remember running into this problem when I originally installed Arch Linux on my machine and I found a solution but forgot what I did. I just switched to Manjaro [*] and had to figure it out again.

It’s all flooding back to me as I type this so sorry for the ramble. Basically the ‘fixes’ that Purism have pushed to upstream Systemd are actually the problem. I now recall that I previously believed this was due to them being a fix for the US layout keyboard which has the knock-on effect of breaking the UK layout one. I can’t remember how I arrived at that conclusion but it seems possible.

  • If you look in /lib/udev/hwdb.d/60-keyboard.hwdb (around line 1140) you can see the Purism keyboard settings. Comment those out.

  • Delete the /etc/udev/hwdb.d/90-purism-pipe-symbol-fix.hwdb file you added, reboot, everything works.

  • If you now run showkey and press the backslash key it will show up as keycode 86. (You might need to e.g. Ctrl+Alt+F2 to get to a new virtual terminal if you’re in a graphical environment and showkey doesn’t work. Ctrl-Alt-F7 or Ctrl-Alt-F8 will probably get you back to your graphical environment depending on your setup.)

When I first made the change to the file under /lib, I thought it would be overwritten during an update and wouldn’t be a permanent solution but that never happened. Maybe Pacman doesn’t overwrite user-edited files or maybe there just wasn’t an update to Systemd in that time which changed that file. Either way, there’s probably a better method but I’m not invested in finding it since it now works and will become future me’s problem if it ever breaks. [**]

Also I found out today that you can type \ by holding Alt Gr and pressing -. Similarly, you can type | by holding Alt Gr and pressing `. I don’t know if that’s common knowledge.


[*] Apparently at random, sometimes (often) when I wake the machine from sleep the damn fans crank up to full speed and the CPU throttles down to 400MHz. This isn’t even fixed with a reboot, you have to fully shut down the machine then start it up again. Never found a fix. I assumed it was something to do with my Arch system being incorrectly configured but the problems seems to exist on Manjaro too… It’s probably time to contact support.

[**] TODO: does setting KEYBOARD_KEY_56=86 in /etc/udev/hwdb.d/90-purism-pipe-symbol-fix.hwdb work?

I just received a warranty replacement for my 13v4.
And the keyboard has changed again.
New /sys/class/dmi/id/modalias

dmi:bvncoreboot:bvrPureBoot-Release-15.1:bd01/01/1970:svnPurism:pnlibrem_13v4:pvr4.0:rvnPurism:rnlibrem_13v4:rvr4.0:cvnPurism:ct9:cvr:

Note the “_” after rnlibrem
I changed my /sys/class/dmi/id/modalias to

evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism:pnlibrem_13v4*
KEYBOARD_KEY_56=backslash

the keyboard didn’t change, just the workaround/remapping was based on something more fragile than expected (the hardware board name)

1 Like