badrianiulian Posted August 12, 2015 Posted August 12, 2015 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: to this fan gpio controlled (witch was very noisy): ending up with this one (no fan control): 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... 1
Igor Posted August 12, 2015 Posted August 12, 2015 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.
badrianiulian Posted August 12, 2015 Author Posted August 12, 2015 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
Igor Posted August 12, 2015 Posted August 12, 2015 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. 1
badrianiulian Posted August 12, 2015 Author Posted August 12, 2015 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
Igor Posted August 12, 2015 Posted August 12, 2015 It looks good. No more ideas. I'll try to recreate the problem. Gimme few days. P.S. You can try to use this u-boot: linux-u-boot-lamobo-r1_3.3_armhf.zip 1
badrianiulian Posted August 12, 2015 Author Posted August 12, 2015 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
badrianiulian Posted August 13, 2015 Author Posted August 13, 2015 Today it froze again so I installed the u-boot you provided yesterday... Now ... new testing period began 30 minutes ago... Thank you for your work
Igor Posted August 13, 2015 Posted August 13, 2015 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 My router AP range is obviously better, speed downgrade is apparently not so obviously.
badrianiulian Posted August 13, 2015 Author Posted August 13, 2015 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
badrianiulian Posted August 16, 2015 Author Posted August 16, 2015 Mine's uptime says 3 days and one hour How's yours?
badrianiulian Posted August 19, 2015 Author Posted August 19, 2015 Well mine's uptime reports that it is up for 5 days, 21 hours I think we're in the clear with this (so glad about it)
badrianiulian Posted August 26, 2015 Author Posted August 26, 2015 Hy uptime report:13 days, 2 hoursToday 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
Igor Posted August 26, 2015 Posted August 26, 2015 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.
badrianiulian Posted August 27, 2015 Author Posted August 27, 2015 Disabling these might be a problem with my wi-fi clients so I think for now I'll just add a cron job to restart hostapd service at least once a week (maybe it gets clogged with events) I'll test and come back (after the vacation) 2
badrianiulian Posted September 8, 2015 Author Posted September 8, 2015 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
Yuri666 Posted September 10, 2015 Posted September 10, 2015 I had same freezing problems with wireless clients. I changed hostapd and hostapd-cli to compilled from github: https://github.com/jenssegers/RTL8188-hostapd and freezing gone. 2
badrianiulian Posted September 11, 2015 Author Posted September 11, 2015 I had same freezing problems with wireless clients. I changed hostapd and hostapd-cli to compilled from github: https://github.com/jenssegers/RTL8188-hostapd and freezing gone. I followed your advice but I compiled both hostapd and wpasupplicant and now I'm on wifi only... no eth clients... testing for now Will be back with feedback
badrianiulian Posted September 24, 2015 Author Posted September 24, 2015 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/)? 1
Igor Posted September 24, 2015 Posted September 24, 2015 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/ 1
badrianiulian Posted September 25, 2015 Author Posted September 25, 2015 Well with the new changes the freeze happened again today so I rolled back to the older versions of 3.2 and u-boot 3.3 provided earlier
Igor Posted September 26, 2015 Posted September 26, 2015 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
Igor Posted September 28, 2015 Posted September 28, 2015 New kernel (3.4.109 - available soon) is coming with some fixes for wifi driver. This could also be the reason.
pschasch Posted September 29, 2015 Posted September 29, 2015 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
Igor Posted September 29, 2015 Posted September 29, 2015 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.
pschasch Posted September 29, 2015 Posted September 29, 2015 OK, thanks. I will try to build your toolchain and images for R1 and test.
badrianiulian Posted October 12, 2015 Author Posted October 12, 2015 Hello again I would like to try the latest 4.4 versions but I uninstalled the hostapd included in armbian to use the https://github.com/jenssegers/RTL8188-hostapd version Where can I get the hostapd deb package from since it isn't in armbian's repo? Or should I just use the default debian version?
Igor Posted October 12, 2015 Posted October 12, 2015 It's part of the board support package. It's on apt.armbian.com linux-DISTRO-root-DEVICE_NAME
Recommended Posts