linux-pinebook-pro issueshttps://gitlab.manjaro.org/tsys/linux-pinebook-pro/-/issues2020-11-25T17:21:07Zhttps://gitlab.manjaro.org/tsys/linux-pinebook-pro/-/issues/3Kernel still takes ~2 minutes to start on my machine2020-11-25T17:21:07ZDavide DepauKernel still takes ~2 minutes to start on my machineHi,
I see you added some workarounds for boot time. From the commit message it seems the problem does not occur any more to you, it does occur on my machine.
It takes around ~120 seconds for it to start userspace on my Pinebook Pro, I u...Hi,
I see you added some workarounds for boot time. From the commit message it seems the problem does not occur any more to you, it does occur on my machine.
It takes around ~120 seconds for it to start userspace on my Pinebook Pro, I usually just turn it on, leave it there, go do stuff and come back later to unlock LUKS.
So, questions:
- Am I the only one?
- Any hints on where to look at to debug and eventually try some patches?
- Anything I can send that would be helpful?https://gitlab.manjaro.org/tsys/linux-pinebook-pro/-/issues/7Attaching charger (either regular or USB-C) while machine is suspended, wakes...2020-05-31T15:56:50ZPriit LaesAttaching charger (either regular or USB-C) while machine is suspended, wakes up the machineIt's somewhat odd that attaching the charger wakes the machine up from suspend.
Installed packages:
```
$ pacman -Qe |grep pinebook
linux-pinebookpro 5.6.0-2
pinebookpro-audio 1-2
pinebookpro-post-install 20200322-1
uboot-pinebookpro 20...It's somewhat odd that attaching the charger wakes the machine up from suspend.
Installed packages:
```
$ pacman -Qe |grep pinebook
linux-pinebookpro 5.6.0-2
pinebookpro-audio 1-2
pinebookpro-post-install 20200322-1
uboot-pinebookpro 2020.01-7
```https://gitlab.manjaro.org/tsys/linux-pinebook-pro/-/issues/8Machine fails to suspend when charger is attached2020-06-01T10:26:29ZPriit LaesMachine fails to suspend when charger is attachedWhen attempting to suspend machine while charger (both barrel and USB-C) is connected, the machine fails to suspend.
Successful suspend dmesg:
```
PM: suspend entry (s2idle)
Filesystems sync: 0.040 seconds
dwmmc_rockchip fe310000.mmc: ...When attempting to suspend machine while charger (both barrel and USB-C) is connected, the machine fails to suspend.
Successful suspend dmesg:
```
PM: suspend entry (s2idle)
Filesystems sync: 0.040 seconds
dwmmc_rockchip fe310000.mmc: pre_suspend failed for non-removable host: -38
Freezing user space processes ... (elapsed 0.004 seconds) done.
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
printk: Suspending console(s) (use no_console_suspend to debug)
```
Failing suspend dmesg when charger is attached:
```
PM: suspend entry (s2idle)
Filesystems sync: 0.101 seconds
dwmmc_rockchip fe310000.mmc: pre_suspend failed for non-removable host: -38
Freezing user space processes ... (elapsed 0.005 seconds) done.
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
printk: Suspending console(s) (use no_console_suspend to debug)
PM: dpm_run_callback(): pm_runtime_force_suspend+0x0/0xd8 returns -16
PM: Device ff9a0000.gpu failed to suspend: error -16
PM: Some devices failed to suspend, or early wake event detected
OOM killer enabled.
Restarting tasks ... done.
PM: suspend exit
```https://gitlab.manjaro.org/tsys/linux-pinebook-pro/-/issues/9Add deprecated instruction flags to pinebookpro_defconfig2020-07-03T09:52:31ZWill SpringerAdd deprecated instruction flags to pinebookpro_defconfig[Certain instructions](https://www.kernel.org/doc/html/latest/arm64/legacy_instructions.html) are deprecated or obsoleted in ARMv8, but still crop up in certain programs compiled for ARMv6 or ARMv7 (e.g. binaries distributed for Android ...[Certain instructions](https://www.kernel.org/doc/html/latest/arm64/legacy_instructions.html) are deprecated or obsoleted in ARMv8, but still crop up in certain programs compiled for ARMv6 or ARMv7 (e.g. binaries distributed for Android or Raspberry Pi). The kernel can emulate these instructions, but requires some configs to be enabled to do so; otherwise, it fires a SIGILL when such an instruction is attempted.
I think enabling these flags would be beneficial to Pinebook Pro users wanting to run a wide variety of software, especially if it's proprietary and cannot be used otherwise. For instance, several Mono-based games can run on the PBP if their native dependencies are replaced with ARM ones. FMOD is one such dependency, and although it's proprietary it distributes libraries targeting ARMv6. However, these libraries use deprecated functionality, thus making them unusable unless the kernel's emulation is enabled. There are certainly other uses beyond that, such as using anbox, running software intended for old/varied Raspberry Pi boards, or even using Rust's ARMv6 toolchain.
These config flags also enable sysctl nodes to control their functionality (described in the above link), so users can disable emulation if desired.
The following configs would need to be added:
```
CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
```
Thanks!
Further reading:
[Handling ARM architecture changes [LWN.net]](https://lwn.net/Articles/606238/) (and [the mailing list post in question](https://lwn.net/Articles/606240/))https://gitlab.manjaro.org/tsys/linux-pinebook-pro/-/issues/10charge_now property missing from /sys/class/power_supply/cw2015_battery2020-08-09T13:55:13Zrsgowmancharge_now property missing from /sys/class/power_supply/cw2015_batteryThis prevents certain user space battery monitors (eg polybar) from operating correctly.
I don't know if it's possible to get this value from the battery or not, but looking at the implementation for current_now reveals a way to approxi...This prevents certain user space battery monitors (eg polybar) from operating correctly.
I don't know if it's possible to get this value from the battery or not, but looking at the implementation for current_now reveals a way to approximate it, i.e. just multiply max charge by current capacity. I've implemented this in the attached patch and it seems to work as expected.
[charge_now_cw2015_battery.patch](/uploads/ffbe473b3ac30420235c46c249ffd3b2/charge_now_cw2015_battery.patch)