Welcome, Guest |
You have to register before you can post on our site.
|
Latest Threads |
bookworm vs trixie discus...
Forum: Mobian on PinePhone
Last Post: biketool
4 hours ago
» Replies: 71
» Views: 31,226
|
Special keys stopped work...
Forum: General Discussion on PineNote
Last Post: j_s
09-19-2025, 04:04 PM
» Replies: 3
» Views: 9,201
|
Tips for accurate reading...
Forum: General
Last Post: jaydenlord07
09-18-2025, 12:55 AM
» Replies: 0
» Views: 2,596
|
Wifi 5Ghz Issue
Forum: PineNote Software
Last Post: nicolaos
09-17-2025, 06:36 PM
» Replies: 0
» Views: 2,707
|
the self built bl602_boot...
Forum: Getting Started
Last Post: pinecheng
09-16-2025, 02:15 PM
» Replies: 2
» Views: 3,757
|
Why projects like PinePho...
Forum: General Discussion on PinePhone
Last Post: Gary2003
09-16-2025, 01:13 PM
» Replies: 13
» Views: 12,610
|
Cannot flash the modem fi...
Forum: Mobian on PinePhone
Last Post: anonymous
09-16-2025, 12:18 PM
» Replies: 7
» Views: 5,149
|
Star64 Irradium (based on...
Forum: Getting Started
Last Post: mara
09-16-2025, 11:18 AM
» Replies: 8
» Views: 7,951
|
Mobian MMS/SMS text probl...
Forum: Mobian on PinePhone
Last Post: georgegohl888
09-15-2025, 02:42 AM
» Replies: 16
» Views: 23,910
|
Default password for KDE ...
Forum: General Discussion on PinePhone
Last Post: Toni
09-14-2025, 06:35 PM
» Replies: 0
» Views: 4,221
|
|
|
How to use dts or other setup to declare gpio pin Interrupt (e.g. a button)? |
Posted by: dkebler - 06-11-2019, 01:11 PM - Forum: Pi2, Euler and Exp GPIO Ports
- Replies (1)
|
 |
Using armbian bionic mainline kernel on A64-v1.1 board
Linux pine64 4.19.38-sunxi64 #5.83 SMP Fri May 3 21:02:31 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux
In RPI bionic could just set values in boot.txt. Is this possible in armbian bionic mainline?
I know that one can use device tree overlays but can't find any examples specific to the A64.
Anyone have a dts file or otherwise know how to declare a pin as an interruptible input? I've come across nothing in any A64 docs.
|
|
|
HDMI out not working on Pine64 11.6" XFCE |
Posted by: Fox7799 - 06-11-2019, 12:23 PM - Forum: Linux on Pinebook
- Replies (3)
|
 |
This is the software that came with my Pinebook 11.6" laptop but HDMI out doesn't work with XFCE or Plasma so I can't display on external screens. Everything else works well. Xubuntu is my preferred software so I don't want to install something else. How soon can this be fixed? Thanks
|
|
|
Display battery charge value with LXDE and lxpanel |
Posted by: wlad - 06-11-2019, 09:56 AM - Forum: Linux on Pinebook
- Replies (1)
|
 |
In my opinion, Armbian with LXDE as window manager is a good fitting combination for the limited power of the Pinebook. LXDE provides only few visual effects, so the system can be used with acceptable performance. Unfortunately, I had an issue with the battery plugin of the lxpanel (the bar where all current windows/processes are stacked into).
Indication: Battery plugin (batt) of lxpanel does not show the current "capacity" (charged value in percent) of Pinebook's battery. Instead, it displays "0% charged" and continuously fires the low-battery alarm.
Reason: The integrated functionality of the battery plugin calculates the charged value by using the coulomb-based counters "charge_now" and "charge_full" (or alternatively "energy_now" and "energy_full"). These counters are usually provided by the power management unit's Linux kernel module. The kernel module (axp20x) for the AXP803 power management unit of the Pinebook does not provide "charge_now" and "charge_full" information. Instead, a percentage value for the current charge is provided as "capacity" (try 'cat /sys/class/power_supply/axp20x-battery/capacity').
Solution: I have changed the source code for the batt plugin with respect to the above mentioned reasons. Now, the percentage value is directly read from the corresponding sysfs file and not longer calculated indirectly.
The original code (lxpanel version 0.10.0) that you can find in 'lxpanel-0.10.0/plugins/batt/batt_sys.c' looked like this:
Code: battery* battery_update(battery *b) {
gchar *gctmp; int promille;
/* [...] */
/* read from sysfs */
b->charge_now = get_gint_from_infofile(b, "charge_now");
b->energy_now = get_gint_from_infofile(b, "energy_now");
b->current_now = get_gint_from_infofile(b, "current_now");
b->power_now = get_gint_from_infofile(b, "power_now");
if (b->current_now < -1)
b->current_now = - b->current_now;
b->charge_full = get_gint_from_infofile(b, "charge_full");
b->energy_full = get_gint_from_infofile(b, "energy_full");
b->charge_full_design = get_gint_from_infofile(b, "charge_full_design");
b->energy_full_design = get_gint_from_infofile(b, "energy_full_design");
b->voltage_now = get_gint_from_infofile(b, "voltage_now");
gctmp = get_gchar_from_infofile(b, "type");
b->type_battery = gctmp ? (strcasecmp(gctmp, "battery") == 0) : TRUE;
g_free(gctmp);
g_free(b->state);
b->state = get_gchar_from_infofile(b, "status");
if (!b->state)
b->state = get_gchar_from_infofile(b, "state");
if (!b->state) {
if (b->charge_now != -1 || b->energy_now != -1
|| b->charge_full != -1 || b->energy_full != -1)
b->state = g_strdup("available");
else
b->state = g_strdup("unavailable");
}
if (b->charge_now != -1 && b->charge_full != -1)
promille = (b->charge_now * 1000) / b->charge_full;
else if (b->energy_full != -1 && b->energy_now != -1)
/* no charge data, let try energy instead */
promille = (b->energy_now * 1000) / b->energy_full;
else
promille = 0;
b->percentage = (promille + 5) / 10; /* round properly */
if (b->percentage > 100)
b->percentage = 100;
/* [...] */
return b;
}
This code has been changed to the following:
Code: battery* battery_update(battery *b) {
gchar *gctmp; int promille;
/* [...] */
/* read from sysfs */
b->charge_now = get_gint_from_infofile(b, "charge_now");
b->energy_now = get_gint_from_infofile(b, "energy_now");
b->current_now = get_gint_from_infofile(b, "current_now");
b->power_now = get_gint_from_infofile(b, "power_now");
if (b->current_now < -1)
b->current_now = - b->current_now;
b->charge_full = get_gint_from_infofile(b, "charge_full");
b->energy_full = get_gint_from_infofile(b, "energy_full");
b->charge_full_design = get_gint_from_infofile(b, "charge_full_design");
b->energy_full_design = get_gint_from_infofile(b, "energy_full_design");
b->voltage_now = get_gint_from_infofile(b, "voltage_now");
// changed to direct read of percentage value (supported by pinebook)
b->percentage = get_norm_gint_from_infofile(b, "capacity");
gctmp = get_gchar_from_infofile(b, "type");
b->type_battery = gctmp ? (strcasecmp(gctmp, "battery") == 0) : TRUE;
g_free(gctmp);
/* [...] */
if (b->charge_now != -1 && b->charge_full != -1)
promille = (b->charge_now * 1000) / b->charge_full;
else if (b->energy_full != -1 && b->energy_now != -1)
/* no charge data, let try energy instead */
promille = (b->energy_now * 1000) / b->energy_full;
else
promille = 0;
// percentage was indirectly calculated, this has changed to direct read of value
//b->percentage = (promille + 5) / 10; /* round properly */
if (b->percentage > 100)
b->percentage = 100;
/* [...] */
return b;
}
As this requires a new function for reading the numerical value as provided by '/sys/class/power_supply/axp20x-battery/capacity', I introduced the following function which was inserted below the existing function "static gint get_gint_from_infofile(battery *b, gchar *sys_file)" in the same source code file "batt_sys.c":
Code: /* get_norm_gint_from_infofile():
* If the sys_file exists, then its value is converted to an int,
* and returned.
* Failure is indicated by returning -1. */
static gint get_norm_gint_from_infofile(battery *b, gchar *sys_file) {
gchar *file_content = parse_info_file(b, sys_file);
gint value = -1;
if (file_content != NULL)
value = atoi(file_content);
g_free(file_content);
return value;
}
The most time consuming part of this change was building the plugin's shared library file 'batt.so' because of all the required dependencies. But finally, it worked and I could replace the original file in '/usr/lib/aarch64-linux-gnu/lxpanel/plugins/'. The charge indicator now works as it should (except that I see no practical way how to predict the remaining power-on time).
I provide to you my build of 'batt.so' here (together with the changed 'batt_sys.c'), so that you do not need to build it by yourself:
lxde-lxpanel_batt-plugin.zip (Size: 39.15 KB / Downloads: 612)
I use it on Armbian 5.86 Debian stretch with LXDE 9.9 and lxpanel version 0.9.3. It may also work with other versions of LXDE/lxpanel and in combination with different Armbian versions. Please post your message on whether it worked for you by mentioning your system configuration. Thanks!
|
|
|
Udev rule for gpios for non root access |
Posted by: dkebler - 06-11-2019, 09:06 AM - Forum: Pi2, Euler and Exp GPIO Ports
- Replies (2)
|
 |
Using armbian bionic mainline kernel on A64-v1.1 board
Linux pine64 4.19.38-sunxi64 #5.83 SMP Fri May 3 21:02:31 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux
Need to allow non-root access to gpio pins (i.e. gpio group with access to export and unexport etc) via udev. I've done this successfully before on an RPI but no matter what I try the gpio group and permissions are not set. Maybe it's something specific to Pine64 so asking here.
here is one version of rules I've tried. using udevadm I've confirmed the file is read and loaded but the changes are not made
Code: SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'find -L /sys/class/gpio/ -maxdepth 2 -exec chown root:gpio {} \; -exec chmod 770 {} \; || true'"
Any suggestions? Anyone have a successful udev rules for this board? If so please share
|
|
|
Failure in setting the display backlight with Armbian 5.86 [SOLVED] |
Posted by: wlad - 06-11-2019, 03:36 AM - Forum: Linux on Pinebook
- No Replies
|
 |
I tested both current Armbian mainline images (Armbian_5.86_Pinebook-a64_Ubuntu_bionic_next_4.19.38_desktop and Armbian_5.86_Pinebook-a64_Debian_stretch_next_4.19.38) with my Pinebook 11.6" shipped in May '19 and both images have issues with the display brightness settings.
Indication: After boot up, the backlight is set to maximum brightness and resetting it to other values in /sys/class/backlight/backlight/brightness (or via desktop power manager tool) shows no effect. The brightness level stays the same, although 'cat /sys/class/backlight/backlight/brightness' returns changed values.
Solution: I managed to work around the issue by modifying the sun50i-a64-pinebook.dtb in /boot/dtb/allwinner/ in the following way:
(You can convert the dtb file to human-readable dts-format with 'dtc -I dtb -O dts /boot/dtb/allwinner/sun50i-a64-pinebook.dtb > converted.dts')
Initial content was:
Code: [...]
backlight {
compatible = "pwm-backlight";
pwms = < 0x43 0x00 0xc350 0x01 >;
brightness-levels = < 0x0 0x5 0xa 0xf 0x14 0x1e 0x28 0x37 0x46 0x55 0x64 >;
default-brightness-level = < 0x2 >;
enable-gpios = < 0x22 0x03 0x17 0x00 >;
phandle = < 0x98 >;
};
[...]
After I removed the line with "phandle = < 0x98 >;", setting backlight brightness worked again. Unfortunately, the levels were reversed (1 meaning brightest, 9 meaning darkest, 0 and 10 turned off the backlight completely). Thus, I have changed the line with "brightness-levels" with inversed level values.
Overall, the final content of the dts file is:
Code: [...]
backlight {
compatible = "pwm-backlight";
pwms = < 0x43 0x00 0xc350 0x01 >;
brightness-levels = < 0x64 0x55 0x46 0x37 0x28 0x1e 0x14 0xf 0xa 0x5 0x0 >;
default-brightness-level = < 0x2 >;
enable-gpios = < 0x22 0x03 0x17 0x00 >;
};
[...]
In order to apply the changes, you have to compile the dts file back to dtb format and overwrite the original file in /boot/dtb/allwinner/. We will backup the original file before overwriting, in case after the reboot you end up with a dark display and need to boot from sd-card in order to undo the changes.
Code: sudo cp /boot/dtb/allwinner/sun50i-a64-pinebook.dtb /boot/dtb/allwinner/sun50i-a64-pinebook.dtb.bac
sudo dtc -I dts -O dtb converted.dts > /boot/dtb/allwinner/sun50i-a64-pinebook.dtb
Please note, that this is only a shallow workaround. I do not know, what the effect of the phandle line was and why it works to set brightness without it. All I can say is that until now, I saw no negative side effects of this "solution".
|
|
|
Pine hangs up on boot if I add my exFAT USB drive to /etc/fstab |
Posted by: pqueiro - 06-10-2019, 12:07 PM - Forum: Ubuntu
- No Replies
|
 |
I can mount it manually fine off the CLI but if I add it to /etc/fstab it hangs the entire system when booting. I've got it on fstab as
Code: /dev/sda2 /mnt/verbatim exfat defaults 0 1
Am I missing something in the options? Is it just checking something on boot and taking a long time? (it's a 2TB drive)
Given that it works if I mount it manually, I'm not sure what I'm doing wrong here 
EDIT: setting pass to 0 and changing defaults to rw,auto,user,gid=1000,uid=1000 seems to have fixed it. I'm not 100% sure but I suspect it may have been the pass going to 0 that did it (as noted earlier in my original post, it's a 2TB USB3.0 drive and checking that filesystem would certainly have taken a long time). This means I have to be more hands-on about checking and maintaining the file system, but at least it now boots and mounts it correctly.
|
|
|
how to upgrade? |
Posted by: skipper - 06-10-2019, 02:07 AM - Forum: Linux on Rock64
- No Replies
|
 |
I have several rock64 boards running bionic-containers-rock64-0.7.9-1067-arm64.img.xz
I now see there's a new pre-release/upgrade available bionic-containers-rock64-0.8.0rc14-1134-arm64.img.xz
My question is:
Is it enough to do
sudo apt-get update -y
sudo apt-get install linux-rock64 -y
..would that upgrade the 0.7.9 version to the 0.8.0 version? ..and how do I see that it's the 0.8.0 version?
..or do I need to take out the SD card, format it and install 0.8.0 from scratch?
I wouldn't like to re-format and re-install all the boards, as I have them all modified and fine-tuned with many features, settings and programs.
After having tried the install linux-rock64 command I now see this when logging in:
Welcome to Ubuntu 18.04.2 LTS (Gnu/Linux 4.4.167-1201-rockchip-ayufan-g74fa6c44ee39 aarch64)
Is that the 0.8.0 version linked above?
Krgds.
|
|
|
Unable to boot any armbian linux |
Posted by: vicsanca - 06-10-2019, 12:43 AM - Forum: Linux on Pine H64
- Replies (6)
|
 |
Using a SanDisk Extreme V30 128GB. Also tring with samsung Evo+
AOSC working without problems.
Each time I boot different errors, usually mounting /tmp, zram or other similar. Sometimes stack trace and automatic reboot.
Latest dev builds are broken?
Thanks
|
|
|
|