PPKB certain keys not working after kernel update
#1
I recently did a kernel update and ever since I can't find a way to use the keys next to f1-f10, like +,=,-,_, etc.
  Reply
#2
Same here.  Previously using the "Fn" key would allow access to the symbols like - = etc but now the "Fn" key activates the F1-F10 keys with no apparent way to access the symbols.  I gather from documentation that the Fn key activating the F1-F10 keys is correct and that the pine key is mean to access the symbols but the pine key doesn't appear to do anything when not bound to an action as with the default sway config.  And I haven't found any other combinations that access the symbols.

Have you tried the user space driver?  I attempted to use it but ran into problems so will give it another go when I have some time.  For now I just bring up the on screen keyboard in sway when I need a symbol.
  Reply
#3
(04-20-2022, 02:49 AM)mr_growl Wrote: Same here.  Previously using the "Fn" key would allow access to the symbols like - = etc but now the "Fn" key activates the F1-F10 keys with no apparent way to access the symbols.  I gather from documentation that the Fn key activating the F1-F10 keys is correct and that the pine key is mean to access the symbols but the pine key doesn't appear to do anything when not bound to an action as with the default sway config.  And I haven't found any other combinations that access the symbols.

Have you tried the user space driver?  I attempted to use it but ran into problems so will give it another go when I have some time.  For now I just bring up the on screen keyboard in sway when I need a symbol.

I haven't because I don't think you can use both? Maybe I'm wrong on that. I essentially just downgraded my kernel because it ruined the use of the keyboard for me. I read in Megis blog that you can just make a keymap but I tried and couldn't make any progress towards it. I also tried asking in the Matrix chats and didn't get any response from anyone, so I'll probably stay on this kernel version until I can figure that out, or someone can help with it.
  Reply
#4
Have a read through this thread: https://forum.pine64.org/showthread.php?tid=16156 it talks about using the userland driver and how to disable the kernel driver.  It didn't work for me but I think I may not have disabled the kernel driver correctly.  Again, I'll give it another go soon and report back if it works.
  Reply
#5
I've had another go at it with no success.

I originally tried adding the "kb151.disable_input" boot argument but found that did nothing (keyboard still worked).  Then discovered this comment which explains that it has changed to "pinephone-keyboard.disable_input".  And I can confirm that it does indeed disable the keyboard input.

I then compiled the pinephone-keyboard code and tried both starting it with "sudo ppkb-i2c-inputd" as well as starting it via systemd.  Both had no effect (the program would run but no keyboard input).

I then tried installing ppkb-tools via pacman and again tried both starting it on the command line and via systemd with no effect.  It would run (previously, when using kb151.disable_input, it would throw an error) but no output from the keyboard.

Just for future reference here's the steps I tried which I gather should have worked:

  1. Disable the kernel driver by adding "pinephone-keyboard.disable_input" to the end of the line starting with "setenv bootargs" in /boot/boot.txt
  2. Apply the change by running "sudo ./mkscr" from the "/boot" folder
  3. install ppkb-tools vi pacman:  "sudo pacman -S ppkb-tools"
  4. enable the systemd service: "sudo systemctl enable ppkb-i2c-inputd.service"
  5. reboot

The effect this had was to disable input from the pinephone keyboard completely.  Checking with ps -ef I can see that ppkb-i2c-inputd is running.
  Reply
#6
Had a look at Megi's development log and it says exactly what's happened Smile


Quote:2022–04–12: Pinephone keyboard keymaps
I've merged latest keyboard driver from Samuel to my 5.17 and 5.18 kernel branches. That driver has function keys F1-F10 mapped to Fn+1-Fn+0. There's no way to type alternate symbols printed on those keys, without loading a keymap into a kernel.
For use with Linux kernel virtual console, you can load the following keymap via
Code:
loadkeys -d ppkb.map
:
strings as usual
compose as usual for "iso-8859-1"
keymaps 0-63

plain keycode 125 = ShiftR
ShiftR keycode 125 = ShiftR
ShiftR keycode 0x02 = bar
ShiftR keycode 0x03 = backslash
ShiftR keycode 0x06 = asciitilde
ShiftR keycode 0x07 = grave
ShiftR keycode 0x08 = minus
ShiftR keycode 0x09 = equal
ShiftR keycode 0x0a = underscore
ShiftR keycode 0x0b = plus
Afterwards you'll be able to type Pine+1 to type |, Pine+2 to type \, and so on. Of course you are not limited to this simple keymap, you can read
Code:
man keymaps
, and implement any kind of key mapping you want. You can override arrow keys to make them active by default, you can make use of AltG or Pine key for more things, etc.
You can create similar keymaps for XKB, for use with Xorg server or wayland compositors.
You should not be modifying keymaps inside the kernel or device tree.

I had actually tried that last weekend and then completely forgot about it.  I still think it would be nice to get the userspace driver going, just to see what it does vs the kernel driver.
  Reply
#7
(04-21-2022, 05:06 AM)mr_growl Wrote: Had a look at Megi's development log and it says exactly what's happened Smile


Quote:2022–04–12: Pinephone keyboard keymaps
I've merged latest keyboard driver from Samuel to my 5.17 and 5.18 kernel branches. That driver has function keys F1-F10 mapped to Fn+1-Fn+0. There's no way to type alternate symbols printed on those keys, without loading a keymap into a kernel.
For use with Linux kernel virtual console, you can load the following keymap via
Code:
loadkeys -d ppkb.map
:
strings as usual
compose as usual for "iso-8859-1"
keymaps 0-63

plain keycode 125 = ShiftR
ShiftR keycode 125 = ShiftR
ShiftR keycode 0x02 = bar
ShiftR keycode 0x03 = backslash
ShiftR keycode 0x06 = asciitilde
ShiftR keycode 0x07 = grave
ShiftR keycode 0x08 = minus
ShiftR keycode 0x09 = equal
ShiftR keycode 0x0a = underscore
ShiftR keycode 0x0b = plus
Afterwards you'll be able to type Pine+1 to type |, Pine+2 to type \, and so on. Of course you are not limited to this simple keymap, you can read
Code:
man keymaps
, and implement any kind of key mapping you want. You can override arrow keys to make them active by default, you can make use of AltG or Pine key for more things, etc.
You can create similar keymaps for XKB, for use with Xorg server or wayland compositors.
You should not be modifying keymaps inside the kernel or device tree.

I had actually tried that last weekend and then completely forgot about it.  I still think it would be nice to get the userspace driver going, just to see what it does vs the kernel driver.

Sorry for the delayed response. I tried using the loadkeys command but it didn't work. Something like "Couldn't get file descriptor referring to the console". Did you get it to work? If so, would you mind explaining how? I think personally I would rather use the function key instead of the PINE64 key just because I already had keybinding in Emacs for the PINE64 key.
  Reply
#8
I also was not able to get the loadkeys thing working.  I'm not familiar with writing keymaps so for now what I've done (this is only useful for sway/sxmo) is I've bound alt + number keys to wtype commands using bindsym.  Here's what it looks like in my sway config:

bindsym Mod1+1 exec wtype '|'
bindsym Mod1+2 exec wtype '\\'
bindsym Mod1+5 exec wtype '~'
bindsym Mod1+6 exec wtype '`'
bindsym Mod1+7 exec wtype -k "Minus"
bindsym Mod1+8 exec wtype '='
bindsym Mod1+9 exec wtype '_'
bindsym Mod1+0 exec wtype '+'

This is not ideal but it does work and has effectively solved the problem for me for the moment.  Since the Fn key now causes the numbers to act as F1-F10 you could probaly just change those bindings to bind F1-F10 to the symbols you want.  I do think the userspace driver is the way forward if the symbols are not going to be mapped in the kernel driver, though.  So I'm going to try to get that working.
  Reply
#9
The wtype config equivalent for Phosh would be:

1. Check existing custom keybindings:

Code:
$ gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings
['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
2. Declare new keybindings (offset by the existing keybindings index, "custom0" in this case)
Code:
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ name 'wtype1'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ command 'wtype "|"'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ binding '<Super>1'

gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ name 'wtype2'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ command 'wtype "\\"'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ binding '<Super>2'

gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/ name 'wtype5'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/ command 'wtype "~"'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/ binding '<Super>5'

gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/ name 'wtype6'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/ command 'wtype "`"'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/ binding '<Super>6'

gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/ name 'wtype7'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/ command 'wtype -k "Minus"'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/ binding '<Super>7'

gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/ name 'wtype8'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/ command 'wtype "="'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/ binding '<Super>8'

gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/ name 'wtype9'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/ command 'wtype "_"'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/ binding '<Super>9'

gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/ name 'wtype0'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/ command 'wtype "+"'
gsettings set  org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/ binding '<Super>0'
3. Update custom keybindings list
Code:
gsettings set  org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/']"

It's laggy, but better than nothing.



Quote:Couldn't get file descriptor referring to the console
Loadkeys is for console (not Wayland)
  Reply
#10
Quote:You can create similar keymaps for XKB, for use with Xorg server


I know this is what is in the megi post. Has anyone actually done this... and maybe they have a keymap for xkb for the pinephone keyboard I could get a copy of?

I too couldn't get megi's loadkeys example to work in console. I could live without it in console if I could get my under-number-keys characters back in X.

I've been reading and reading the arch documentation on xkb, but not making any serious progress. (Is it me, or is that page much more opaque than usual for Arch documentation?)
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Disappearing arroe keys ionmich 1 647 09-03-2023, 07:41 AM
Last Post: _radv_
  satellite doesn't work after update shulamy 1 815 05-17-2023, 10:34 PM
Last Post: Kevin Kofler
  FDE installer not working user641 0 736 03-04-2023, 02:55 AM
Last Post: user641
  Latest update broke my install user641 8 3,469 02-22-2023, 05:54 AM
Last Post: gregb49
  Ringtone not working through external speaker... tk1107 2 2,003 03-13-2022, 11:34 PM
Last Post: tk1107
  Keyboard function keys vgnmnky 4 3,323 02-25-2022, 07:04 AM
Last Post: vgnmnky
  Can't update or install software P3TER 31 22,935 02-12-2022, 05:07 PM
Last Post: IHaveALinuxPhone
  Last update bricked my pine phone :( lacriz 6 3,942 01-25-2022, 07:52 AM
Last Post: kqlnut
  Latest update broke my cellular 112113101098101077 1 2,167 05-05-2021, 06:41 AM
Last Post: 112113101098101077
  Issue: nf modules not found in kernel? theD0ctor 5 5,625 03-15-2021, 07:41 AM
Last Post: Danct12

Forum Jump:


Users browsing this thread: 1 Guest(s)