Jump to content

Freezing problems with BPi-R1


badrianiulian

Recommended Posts

Hello

I have a BPi-R1 with Igor's 3.2 image (http://www.igorpecovnik.com/2014/09/07/banana-pi-debian-sd-image/) that runs as a router (with pppoe) and nginx/php5/mysql config for my wife's blog and also with ez-ipupdate for dynamic dns

I have a nasty issue... once every 2 or 3 days, my board freezes for no aparent reason

It does this even if root is on SD card (only sd card connected) or HDD (I have a modified mSATA adapter to get power from 3,3V SATA power connector... I removed the 3,3V regulator and added a thick wire from the 3,3V provided by the board through the SATA connector)

Also I moved from this configuration:

post-267-0-36425500-1439363511_thumb.jpg

post-267-0-79331200-1439363637_thumb.jpg

to this fan gpio controlled (witch was very noisy):

post-267-0-92747100-1439363575_thumb.jpg

ending up with this one (no fan control):

post-267-0-21186000-1439363595_thumb.jpg

So the system is cooled by the 12v fan powered at 5v, with soctemp reporting 34,7 degrees, and pmutemp reporting 41 degrees

Also the power source is stable (I had a script that monitored the voltage before it freezed... it never dropped below 5,09V)

I already tested with wireless power management disabled by command (added in rc.local too)

echo 0 > /sys/module/8192cu/parameters/rtw_power_mgnt

since adding this line to a file named /etc/modprobe.d/8192cu.conf doesn't work

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
Even with the power management for the wireless disabled it happened once again.
Also, looking at the ethernet leds on the BPi-R1, every time the freeze happenes these leds are flashing like there is activity.
I took a look at the logs and I found something that could be the cause for this:
In cron i have a line set for php
[ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean

I found for the last few freeze times that in syslog this was the last event. Earlier events had DHCP event on last lines before freeze
I read about some Out Of Memory issues with this script.
Could it be that this is what is actually happening to my system?

For now I removed the comment for swap in /etc/fstab

/var/swap       none    swap    sw      0       0

and I added in /etc/sysctl.conf

vm.swappiness=0 (this was the last line in the file)
vm.overcommit_memory = 2
vm.overcommit_ratio = 100

I'm stabbing things in the dark here so if anybody could help please do...

 

 

 

Link to comment
Share on other sites

There is a known stability issue with image 3.1, more precisely with u-boot ... but if you started freshly with 3.2 this is out of question.

 

Which OS, u-boot & kernel are you using. With build dates for kernel / u-boot.

 

ps

nice work. :thumbup:

Link to comment
Share on other sites

What I did is this: I installed 3.1 at first and after that I upgraded to 3.2 by installing

linux-firmware-image-3.4.108-lamobo-r1_3.2_armhf.deb
linux-image-3.4.108-lamobo-r1_3.2_armhf.deb
linux-u-boot-3.4.108-lamobo-r1_3.2_armhf.deb
linux-headers-3.4.108-lamobo-r1_3.2_armhf.deb
linux-libc-dev_3.2_armhf.deb

also removing the 3.1 versions

Later I installed the 3.2 image to a 4gb(new) sdcard and modified the boot like in your nand-sata-install script to point to the ssd that was already upgraded to 3.2 like mentioned

Link to comment
Share on other sites

This looks good. Do apt-get update / upgrade + restart on the top. Check uboot build date @boot. This is essential ... my packing script is not perfect yet and somehow I could pack an older / failed boot loader.

 

Huh. Huh.

 

I made 3 weeks burn in tests with this build on Cubietruck and Banana Pi. I'll start with R1 today.

 

I am also running a web / nas / everything server + mirror server with mainline kernel. Zero problems & months of uptime - kernel 3.4106 / 4.0.5.

Link to comment
Share on other sites

I'm not at home right now to check the build date from the screen but here's what I did: I connected to the server to do an apt-get update/upgrade

I did hold back linux-libc-dev (to the one I installed from your 3.2 archive)

Also I compared

diff /media/mmc/usr/lib/linux-u-boot-3.4.108-lamobo-r1_3.2_armhf/u-boot-sunxi-with-spl.bin /usr/lib/linux-u-boot-3.4.108-lamobo-r1_3.2_armhf/u-boot-sunxi-with-spl.bin

and found no differences (remember that on the mmc there is the uboot included in the 3.2 image)

 

Also viewing the file and searching for the build date here is what I found

U-Boot 2015.04-dirty (Jul 12 2015 - 07:39:31) Allwinner Technology
Link to comment
Share on other sites

Thank you... I will try as soon as it freezes again. Eitherway, during the day I can't do anything that may upset my wife (she may not like this situation... but I'm doing the best I can).  :)

Also last night I had to add an extension to the power button for when it freezes ... a more user friendly button than a long knife through the powered down fan blades to get to the power button

Link to comment
Share on other sites

OK. Mine R1 is now more than one day up, too little to say anything. I have different tactics - I don't use wireless much but my wife does ... I disabled router AP and she is testing without knowing ;)

 

I got only one complain today that the overall internet quality is worsen and if I can do something about :rolleyes:  :D

 

My router AP range is obviously better, speed downgrade is apparently not so obviously.

Link to comment
Share on other sites

For me the wireless part is just for the tablet and the phones ... the laptop seats near the router so I use a cable and the ps3 is near so I use a cable for it also

I'm not expecting too much from the wifi even if I bought 5dB antenas.

On my old router the wifi was of 150mbps so right now the BPi-R1 is definitely an upgrade... also the old one's ethernet was of 100mbps

I love to use debian (maybe becouse I got too used to it when I was working as a network admin ages ago)... so going from your armbian to another OS is really not an option for me (someone suggested to install openwrt)

Right now i just hope the bug will be gone by the end of the month when we leave for a vacation ... since there will be no one left at home to reset the router

Link to comment
Share on other sites

Hy

uptime report:
13 days,  2 hours
Today I had to restart hostapd since the phone was not authenticating (android 4.4.2)

here is my hostapd.conf-rt

### Wireless network name ###
interface=wlan0
### Set your bridge name ###
bridge=br0

#driver=rtl871xdrv
#driver=8192cu

# This advertises the country_code and the set of allowed channels and transmit                                                                                         power
# country_code=DE
# ieee80211d=1

# Maximum data rate 54Mbps in 802.11g and 300Mbps in 802.11n
# The RTL8192CU provides simple legacy and 20MHz/40MHz co-existence mechanisms t                                                                                        o ensure backward and network compatibility. Maximum PHY data rate up to 144.4Mb                                                                                        ps using 20MHz bandwidth, 300Mbps using 40MHz bandwidth
# if you donΓÇÖt have a wireless N capable device = 0
# 802.11n related stuff
ieee80211n=1
noscan=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40]
#ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
#ht_capab=[SHORT-GI-40][HT40+][HT40-][DSSS_CCK-40]

# 2,4GHz bandwidth
channel=8
hw_mode=g
wmm_enabled=1

# connections and pid

beacon_int=100
max_num_sta=8
ctrl_interface=/var/run/hostapd

# Identification and Login
ssid=XXXXXXXX
auth_algs=1
wpa=2
wpa_passphrase=XXXXXXXX
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
rsn_pairwise=CCMP
wme_enabled=1
ignore_broadcast_ssid=0

#macaddr_acl=1
#accept_mac_file=/etc/hostapd/accept
#macaddr_acl=0
#deny_mac_file=/etc/hostapd/deny
Link to comment
Share on other sites

You can try with a bit more conservative settings:

ieee80211n=1
noscan=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40]

with disabling all this.

 

Fast and stable Realtek wireless in AP mode is perhaps expecting too much.  :D  :P

Link to comment
Share on other sites

I'm back with some more testing that I've done

If the configuration stays as it is, the system stay stable

However if I disconnect the laptop network cable and connect the laptop through the wireless connection and no other eth clients, the system freezes. Also the laptop connects wirelessly only using AES and not TKIP.

All I need to try now is connecting the PS3 through cable (so at least one eth stays occupied) and test the wireless connection of the laptop again...

I'll be back with some more testing

Link to comment
Share on other sites

I'm back to say that I've been testing the R1 with the same configuration in WiFi mode only and so far everything works just fine.

The only bug that's occuring every now and then is an authentification loop but it's not that bad since eventually it does connect.

The system freeze is gone.

Off-topic: Where are the packages updates (linux-firmware-image-3.4.108-lamobo-r1_4.3_armhf.deb ....gone from the new page ( http://www.armbian.com/lamobo-r1/)?

Link to comment
Share on other sites

Off-topic: Where are the packages updates (linux-firmware-image-3.4.108-lamobo-r1_4.3_armhf.deb ....gone from the new page ( http://www.armbian.com/lamobo-r1/)?

 

Things has been changed. Everything is now inside repository apt.armbian.com and upgrade is done via apt-get ... lamobo shares legacy kernel with banana, orange, ...

 

More info:

http://forum.armbian.com/index.php/topic/211-kernel-update-procedure-has-been-changed/

Link to comment
Share on other sites

Hmm, damn.

 

I switch U-boot version where I made a config for R1 because it's not existing. Config is virtually the same as Banana with only changes to NIC delay to gain better speed and SATA powering.

 

Than there are some minor changes to kernel which should be o.k., except if the bug is within compiler.

 

Testing, again ;)

Link to comment
Share on other sites

hello Igor,

thanks for your work!

 

i am also interested in those fixes.

 

I cloned and compiled on R1  (19 days ago) your "git clone https://github.com/pvaret/rtl8192cu-fixes"

and just did a "git status" but can't see any difference for the "coming fixes for wifi driver".

Or do you want to say in the kernel?

Could you tell or show the fixes?

 

regards

Link to comment
Share on other sites

Yes, that's for internal / default driver. Let's try and see.

 

https://github.com/igorpecovnik/lib/blob/bde4a3ffb0db339457913c623dfd64d24f50e4bb/patch/kernel/rt8192cu-missing-case.patch

 

Kernel 3.4.109 + this patch. Testing version. For banana, R1, Orange only.

http://mirror.igorpecovnik.com/test/linux-image-banana_4.4_armhf.deb

 

Regarding stability. I created few different u-boot / kernel combinations and will run burn-in test ... until failed ;) on 5 different A20 boards.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines