Bananian

BananaPI freezing on me

6 2441
lmsilva  
...actually, its not a BananaPI, its a BPI-R1, but I'm fairly sure most of you use the BananaPI and Pro models so...I just wanted to catch your attention P

Anyway, my SoC started crashing on me, out of the blue...
I suspect the problem started after I installed hostapd and turned my device into an access point BUT, I'm having trouble pinpointing the problem...

I couldn't find anything in the logfiles AND, when this happened, the terminal would freeze and I couldn't even take a look at the screen because the "terminal screen saver" would turn off my screen...

So far, here's what I tried:
- I made rsyslog log all kern.* messages to /dev/tty6
  1. root@appliance:~# cat /etc/rsyslog.conf  | grep kern
  2. $ModLoad imklog   # provides kernel logging support
  3. kern.*                          -/var/log/kern.log
  4. kern.*                          /dev/tty6
  5. root@appliance:~#
Copy the Code
- and I turned off the terminal's screen saver:
  1. root@appliance:~# grep BLANK_TIME /etc/kbd/config
  2. BLANK_TIME=0
  3. root@appliance:~#
Copy the Code
This allows me to see kernel messages on tty6 and keeps the screen from turning blank BUT, I just experienced another crash and could NOT find anything in the screen...

Does anybody have any thoughts on how I can further debug this? Can I, maybe, recompile the kernel with some more debugging features, so I can see kernel panic outputs or something?

Its the first time I've seen a Linux system crash without throwing out a kernel panic of some sort...

Thank you,
Luis
tkaiser  
You won't see anything in any log and obviously not on the screen in this case when the system's PMU (AXP209) does an emergency shutdown due to overheating or undervoltage. You should check both (available via sysfs/I2C -- have a look at the top threads in the 'network and servers' subforum).

lmsilva  
Thanks for the tip! It certainly makes sense that I would have some issues due to undervoltage when I started using the wifi...

Do you know if it is safe to buy a power adapter with more than 2A? The BPI-R1 manual says "plug in a regulated power supply that is rated at 5V +/- 2% and at a least 2A".

Does this mean it can handle more than 2 amps? Can you point me to a good, reliable adapter?

lmsilva  
I manage to catch an error dump during a crash! (not sure its the same problem or not but...I caught something)!

Thoughts?

Crash picture!

Crash picture!

lmsilva  
...I did make a change to my rc.local to tweak a few kernel parameters:
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 336000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1008000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 200000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# set cpu affinity
echo 2 >/proc/irq/$(awk -F":" '/eth0/ {print $1}' </proc/interrupts)/smp_affinity

(I added the smp_affinity one about 10 minutes before it happened...)

tkaiser  
Edited by tkaiser at Wed Feb 4, 2015 03:40
lmsilva replied at Wed Feb 4, 2015 01:12
Do you know if it is safe to buy a power adapter with more than 2A


The problem is that the Micro-USB-Connector the Bananas use is always crap when you want something to be powered with more than 1.5A due to the tiny contacts (the USB3 Micro connector is different -- this problem has been adressed there). I would have a look at voltage/current available to the PMU (since bad cables might drop voltage easily by 0.5V or even more):
  1. awk '{printf ("%0.1f",$1/1000); }' </sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now
  2. awk '{printf ("%0.2f",$1/1000000); }' </sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/voltage_now
Copy the Code
Regarding the BPi-R1 and power issues... many experienced people discussed this in the otherwise useless forum from SinoVoip: http://bananapi.com/index.php/forum/recent (I don't understand anything about electronics but according to a few people there the BPi-R1 has several design flaws -- Lion Wang, SinoVoip's CEO, recommends using a PSU that is capable of even 5.5V to workaround these issues)

lmsilva  
Hmm, I don't know much about electronics either so I thought that could fry the device )
Do you know if we can safely push more amps too?

Is the fix then to get a better PSU? Is there anything we can do to the actual device (like lowering the cpu's clock speed / scheduler).

You have to log in before you can reply Login | Sign Up

Points Rules