I add to this FAQ when I see a recurring question in the pine chatrooms. You can also send me a message to x@xnux.eu if you have questions. Back to the main page
ip5xxx-charger
and ip5xxx-boost
in /sys/class/power_supply
For use with Linux kernel virtual console, you can load the following keymap via 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.
Other resources: HazardChem/PinePhone_Keyboard
Symptom | Cause | Solution |
---|---|---|
Keyboard doesn't react to any key presses | Keyboard is not connected to the phone properly | Try re-seating the phone in the chasis. |
POGO pins may be dirty from either side (they are not soldered to the PCB) or they may not be making a good contact with the pads in the keyboard chasis for other reasons. | Clean the POGO pins. If that doesn't work: POGO pads on the keyboard are on a plastic covered PCB that is glued to the keyboard's case. That PCB can be carefully pulled away from the keyboard case (from the top), and padded a bit from the backside (using some non-conductive material, eg. folded paper) so that POGO pads are sticking out more from the case, and make better contact with POGO pins of the keyboard. | |
A small tab near the POGO pins did not click in | Push on the keyboard case near the POGO pins to make it click in. It should not take that much force. | |
Some people also reported that contact reliablity is affected by how much the screws in the inner frame of the phone are tightened. | Check the screws. Make sure they are screwed tight. | |
Your distro doesn't have the keyboard driver. | You can run the ppkb-i2c-inputd command from the keyboard utilities package on any Linux distribution, to get the keyboard to work.
| |
You built the kernel yourself and forgot to update the DTB file. | When doing a custom kernel build, you need to install both kernel Image and the Pinephone DTB files. See my guide on how to build the kernel for Pinephone manually. | |
Keyboard works but top row of keys is less responsive | Keyboard membrane does not have the perfectly correct shape. | Fixing this is a NP-hard problem, apparently. There were already 4-5 membrane revisions by the vendor. It's still not perfect. Anyway, I'm sure it will be solved in polynomial time. It's possible to fix at home by removing the keycaps from the top row and by padding the key caps from the bottom so that the membrane's rubber ring is pressed deeper with less key travel. Model for 3D printed washers that can be placed under the keycaps to fix the issue is also available. Other method is using enameled copper wire cut from a coil that was wound on a M5 screw. Any kind of padding ~0.3-0.5mm in height will do. It just has to be outside of the inner ring of the keycap. |
Some key combinations don't work as expected | Electrical matrix in the keyboard has limitations | See more in-depth explanation in this article |
Phone is not charging from the keyboard | The keyboard power output is not enabled | The charger may be sleeping. You can wake it up by pressing the button on the side of the keyboard once. |
Keyboard battery is too discharged | You can verify keyboard battery charge level by using the ppkb-i2c-charger-ctl info command from the keyboard utilities package. If the reported voltage is very low (< 3 V) the keyboard battery is completely discharged.
| |
Phone is charging slowly from the keyboard battery | Input current limit on the phone side is set to 500mA by default. Automatic limit setting only works when connecting power supply via the phone's Type-C port without the kyeboard present. Keyboard is connected differently. | If you're using the keyboard, you'll have to manage the input current limit manually via sysfs (echo 1500000 > /sys/class/power_supply/axp20x-usb/input_current_limit or if you have Pinephone Pro, substitute rk818-usb for axp20x-usb). This will be automated by yet to be written power management daemon in the future.
Typical maximum that can be provided by the keyboard power controller is 5V/2.4A. (Don't put anything into the Pinephone's Type-C port while the keyboard is connected! You may damage your phone or keyboard.)
|
ppkb-i2c-charger-ctl info prints some 0xff error
| Sadly, charger chip sometimes goes to sleep and doesn't respond to I2C communication in this state. Wake it up by pressing the keyboard power button, or by inserting a power supply to the keyboard's Type-C port. This is a HW limitation. | |
Keyboard battery is charging slowly or not at all | new keyboard batch has a HW issue | Protection diode was placed incorrectly in one of the last KB batches on keyboard's USB input, and this prevents or significantly limits keyboard power sourcing with most USB power supplies. Keyboard charger chip limits power input, when input voltage drops below 4.5V. The additional diode introduces 0.4-0.6V voltage drop by itself, even without taking into account the USB cable voltage drop, and softness of the USB power supply itself. Fix is to short the diode D1 on the PCB. This was fixed in the factory for the most of the units in the April batch, but some units were sent out broken. |
Phone is not charging from the keyboard battery at all and keyboard power button does nothing | Keyboard battery is discharged or the charger chip is damaged | When the keyboard battery is discharged, you may not be able to read keyboard battery status from cat /sys/class/power_supply/ip5xxx-battery/uevent , because the charger chip may not have enough power to work just from the keyboard battery alone.
Connect the keyboard to the USB power supply and the above mentioned file should become readable, and should contain information about battery voltage and charging current.
If it doesn't, try pressing the keyboard's power button while the keyboard is connected to the power supply.
You should check the the voltage_now property, to see if it's not close to 2600000 (uV) which is the minimum the charger chip can measure and would indicate the battery is possibly shorted by the charger chip.
In that case, the charger chip is damaged. Otherwise you just need to wait a bit for the keyboard battery to charge.
|
Charger is damaged | If /sys/class/power_supply/ip5xxx-battery/uevent does not become available, even when connecting the USB power supply to the keyboard, and is empty, that means that the charger chip is not responding, even when powered up. That means the chip is most likely damaged.
| |
Some 3 key combinations produce 4 key presses (eg. Alt+Fn+F2 => Alt+Fn+F2+F3) | This is natural to the keyboard matrix | See explanation on my blog |
power_supply ip5xxx-battery: driver failed to report `voltage_now' property: -5 in dmesg
| When the charger chip is sleeping, it stops responding on the I2C bus | This is normal and harmless. You can wake the chip up by pressing the keyboard's power button, or by plugging in the USB power supply to the keyboard. It only shows up in dmesg when some app tries to read the ip5xxx power supply files in sysfs. |