piknew

Members
  • Content Count

    85
  • Joined

  • Last visited

About piknew

  • Rank
    Advanced Member

Recent Profile Visitors

451 profile views
  1. Could you please point out how to achieve this? All my H3 (also H2+) devices suffer from the issue as described. Even with newest kernel. So, after reading I decided to test stability with "constant cpu frequency". EDIT: I've done it by: [root@PKTEST ~]# cat /etc/default/cpufrequtils # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=408000 MAX_SPEED=1296000 #GOVERNOR=ondemand GOVERNOR=performance [root@PKTEST ~]# Question: would it be possible not to overwrite cpufrequtils file once support package is installed/upgraded?
  2. piknew

    RTC 1307 / 3232

    SUCCESS Story: I have used armbian-config to check Hardware (if my I2C bus is enabled). I have noticed very strange behavior of function: grep was outputted in "usage" mode. I revieved all the scripts and it appeared that line which is searching for "overlays=" is throwing this error. My /boot/armbianEnv.txt didn't have any overlay, especially for I2C, enabled. So, I have added as following (+ overlay prefix): [root@PKTEST ~]# cat /boot/armbianEnv.txt rootdev=UUID=f8301761-6756-4f97-aa80-12c05ea037cf extraargs=pty.legacy_count=2 overlays=i2c0 i2c1 i2c2 user_overlays=ds1307 overlay_prefix=sun8i-h3 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u,0x1058:0x10b8:u [root@PKTEST ~]# Then I have modified my user overlay file to be as following: [root@PKTEST ~]# cat /boot/overlay-user/ds1307.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; /* * Aliases can be used to set the external RTC as rtc0 * Needs supplying the correct path to the I2C controller RTC is connected to, * this example is for I2C1 on H3 * NOTE: setting time at boot by the kernel * may not work in some cases if the external RTC module is loaded too late */ fragment@0 { target-path = "/aliases"; __overlay__ { rtc0 = "/soc/i2c@1c2ac00/ds1307@68"; }; }; fragment@1 { target = <&i2c0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; ds1307@68 { compatible = "dallas,ds1307"; reg = <0x68>; status = "okay"; }; }; }; }; [root@PKTEST ~]# The address in fragment@0 is determined by looking where system placed i2c0 bus (I am sure that my RTC is connected to bus 0). It is giving /dev/rtc1,m which I have verified as following: [root@PKTEST ~]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 crw------- 1 root root 253, 1 May 22 2016 /dev/rtc1 [root@PKTEST ~]# hwclock -r -f /dev/rtc0 Sun 22 May 2016 12:38:25 AM CEST -1.593015 seconds [root@PKTEST ~]# hwclock -r -f /dev/rtc1 Fri 05 Oct 2018 11:57:03 AM CEST -0.927469 seconds [root@PKTEST ~]# Unfortunately it seems that line frogment@0 is not making this device available as rtc0 (it is assigning rtc1): [root@PKTEST ~]# dmesg | grep -i rtc [ 3.636229] [drm] Cannot find any crtc or sizes [ 3.756932] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0 [ 3.756939] sun6i-rtc 1f00000.rtc: RTC enabled [ 4.641465] [drm] Cannot find any crtc or sizes [ 9.740172] rtc-ds1307 0-0068: /aliases ID 0 not available [ 9.741555] rtc-ds1307 0-0068: registered as rtc1 [root@PKTEST ~]# Can anybody help and answer if it is possible somehow "override" the device? Of course I have my own systemd script to use it and set correct date at boot time. If "overriding" is not possible then I will use it.
  3. piknew

    RTC 1307 / 3232

    Definitely not (PKTEST is Orange Pi PC) - I also checked on OPI+2 with the same results (FAILED on "dev"). But I will try to downgrade to "next" on OPiPC (PKTEST). I will give an update in matter of minutes. Update: "next" is the same. But then I have downgraded to "Default" and: [root@PKTEST ~]# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST ~]# cd /sys/class/i2c-adapter/i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# echo ds1307 0x68 >new_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll /dev/rtc* crw------- 1 root root 254, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 crw------- 1 root root 254, 1 Oct 4 18:36 /dev/rtc1 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# hwclock -r -f /dev/rtc1 Thu 04 Oct 2018 06:36:46 PM CEST -0.853544 seconds [root@PKTEST /sys/class/i2c-adapter/i2c-0]#
  4. piknew

    RTC 1307 / 3232

    I am not sure if the path is correct - I used the one from dts file (in post above). It seems that "something" is there. However, I2C detect does not see any device under address 0x68. I am also not sure if aliases section of dts file will somehow override visibility of standard rtc0 device from SOC? Below are a few commands. [root@PKTEST /proc/device-tree/soc/i2c@1c2b000]# ll total 0 -r--r--r-- 1 root root 24 Oct 4 17:32 compatible -r--r--r-- 1 root root 8 Oct 4 17:32 clocks -r--r--r-- 1 root root 8 Oct 4 17:32 resets -r--r--r-- 1 root root 9 Oct 4 17:32 status -r--r--r-- 1 root root 4 Oct 4 17:32 #address-cells -r--r--r-- 1 root root 12 Oct 4 17:32 interrupts -r--r--r-- 1 root root 4 Oct 4 17:32 #size-cells drwxr-xr-x 2 root root 0 Oct 4 17:32 ds1307@68 -r--r--r-- 1 root root 4 Oct 4 17:32 phandle -r--r--r-- 1 root root 8 Oct 4 17:32 reg -r--r--r-- 1 root root 4 Oct 4 17:32 pinctrl-0 -r--r--r-- 1 root root 4 Oct 4 17:32 name -r--r--r-- 1 root root 8 Oct 4 17:32 pinctrl-names [root@PKTEST /proc/device-tree/soc/i2c@1c2b000]# cd ds1307@68/ [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# ll total 0 -r--r--r-- 1 root root 14 Oct 4 17:32 compatible -r--r--r-- 1 root root 5 Oct 4 17:32 status -r--r--r-- 1 root root 4 Oct 4 17:32 reg -r--r--r-- 1 root root 7 Oct 4 17:32 name [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# dmesg | grep -i ds1307 [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# dmesg | grep -i rtc [ 3.625735] [drm] Cannot find any crtc or sizes [ 3.746859] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0 [ 3.746865] sun6i-rtc 1f00000.rtc: RTC enabled [ 4.640512] [drm] Cannot find any crtc or sizes [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: 30 -- 32 33 34 35 36 37 -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]#
  5. piknew

    RTC 1307 / 3232

    Thanks, I have updated device-tree-compiler to "buster" version and I have created symbolic link from modules/... to dtc binary. Script armbian-add-overlay is working. But after compiling new dts - rtc is still not working (not registered as rtc device).
  6. piknew

    RTC 1307 / 3232

    Additionally I have noticed that example file is different slightly than mine: https://github.com/armbian/sunxi-DT-overlays/blob/master/examples/i2c-ds1307.dts Unfortunately I cannot compile new dts file: [root@PKTEST ~]# uname -r 4.18.8-sunxi [root@PKTEST ~]# cd /lib/modules/4.18.8-sunxi/build/scripts/dtc [root@PKTEST /lib/modules/4.18.8-sunxi/build/scripts/dtc]# ll total 304 drwxr-xr-x 2 root root 4096 Oct 2 20:32 libfdt drwxr-xr-x 2 root root 4096 Oct 2 20:32 include-prefixes -rw-r--r-- 1 root root 42 Oct 2 20:32 version_gen.h -rw-r--r-- 1 root root 7888 Oct 2 20:32 util.h -rw-r--r-- 1 root root 9622 Oct 2 20:32 util.c -rwxr-xr-x 1 root root 2552 Oct 2 20:32 update-dtc-source.sh -rw-r--r-- 1 root root 6158 Oct 2 20:32 treesource.c -rw-r--r-- 1 root root 3624 Oct 2 20:32 srcpos.h -rw-r--r-- 1 root root 6859 Oct 2 20:32 srcpos.c -rw-r--r-- 1 root root 372 Oct 2 20:32 Makefile.dtc -rw-r--r-- 1 root root 956 Oct 2 20:32 Makefile -rw-r--r-- 1 root root 21011 Oct 2 20:32 livetree.c -rw-r--r-- 1 root root 4 Oct 2 20:32 .gitignore -rw-r--r-- 1 root root 2283 Oct 2 20:32 fstree.c -rw-r--r-- 1 root root 22682 Oct 2 20:32 flattree.c -rw-r--r-- 1 root root 8546 Oct 2 20:32 fdtput.c -rw-r--r-- 1 root root 8781 Oct 2 20:32 fdtget.c -rw-r--r-- 1 root root 3756 Oct 2 20:32 fdtdump.c -rwxr-xr-x 1 root root 8755 Oct 2 20:32 dtx_diff -rwxr-xr-x 1 root root 41838 Oct 2 20:32 dt_to_config -rw-r--r-- 1 root root 10590 Oct 2 20:32 dtc-parser.y -rw-r--r-- 1 root root 7043 Oct 2 20:32 dtc-lexer.l -rw-r--r-- 1 root root 8736 Oct 2 20:32 dtc.h -rw-r--r-- 1 root root 9477 Oct 2 20:32 dtc.c -rw-r--r-- 1 root root 5253 Oct 2 20:32 data.c -rw-r--r-- 1 root root 45534 Oct 2 20:32 checks.c [root@PKTEST /lib/modules/4.18.8-sunxi/build/scripts/dtc]# cd /boot/overlay-user/ [root@PKTEST /boot/overlay-user]# ll total 8 -rw-r--r-- 1 root root 401 May 13 18:11 ds1307.dtbo -rw-r--r-- 1 root root 770 Oct 4 12:29 ds1307.dts [root@PKTEST /boot/overlay-user]# rm ds1307.dtbo [root@PKTEST /boot/overlay-user]# cat ds1307.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; /* * Aliases can be used to set the external RTC as rtc0 * Needs supplying the correct path to the I2C controller RTC is connected to, * this example is for I2C1 on H3 * NOTE: setting time at boot by the kernel * may not work in some cases if the external RTC module is loaded too late */ fragment@0 { target-path = "/aliases"; __overlay__ { rtc0 = "/soc/i2c@01c2b000/ds1307@68"; }; }; fragment@1 { target = <&i2c1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; ds1307@68 { compatible = "dallas,ds1307"; reg = <0x68>; status = "okay"; }; }; }; }; [root@PKTEST /boot/overlay-user]# armbian-add-overlay ds1307.dts Error: kernel headers are not installed properly Can't find dtc that supports compiling overlays Please install the headers package for kernel 4.18.8-sunxi [root@PKTEST /boot/overlay-user]#
  7. piknew

    RTC 1307 / 3232

    Hi, as written above everything is working correctly with "next" (4.14.70) and "default" (3.4.113) kernels. For some of my boards I have upgraded to dev. And unfortunately module stopped working. It seems that overlay method is mot causing that rtc device is registered. Here is my ds1307.dts file: [root@PKTEST /boot/overlay-user]# ll total 8 -rw-r--r-- 1 root root 271 May 13 18:11 ds1307.dts -rw-r--r-- 1 root root 401 May 13 18:11 ds1307.dtbo [root@PKTEST /boot/overlay-user]# cat ds1307.dts /dts-v1/; /plugin/; / { compatible = "brcm,bcm2708"; fragment@0 { target = <&i2c0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; ds1307@68 { compatible = "ds1307"; reg = <0x68>; status = "okay"; }; }; }; }; [root@PKTEST /boot/overlay-user]# After boot it is as folllowing: [root@PKTEST ~]# cd /sys/class/i2c-adapter/ [root@PKTEST /sys/class/i2c-adapter]# ll total 0 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-2 -> ../../devices/platform/soc/1f02400.i2c/i2c-2 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-1 -> ../../devices/platform/soc/1c2ac00.i2c/i2c-1 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-0 -> ../../devices/platform/soc/1ee0000.hdmi/i2c-0 [root@PKTEST /sys/class/i2c-adapter]# cd i2c-2 [root@PKTEST /sys/class/i2c-adapter/i2c-2]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 4 root root 0 Jan 1 1970 2-0065 drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev drwxr-xr-x 2 root root 0 Oct 4 11:47 power lrwxrwxrwx 1 root root 0 Oct 4 11:47 of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1f02400 --w------- 1 root root 4096 Oct 4 11:47 new_device -r--r--r-- 1 root root 4096 Oct 4 11:47 name lrwxrwxrwx 1 root root 0 Oct 4 11:47 device -> ../../1f02400.i2c --w------- 1 root root 4096 Oct 4 11:47 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-2]# cd ../i2c-1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 3 root root 0 Jan 1 1970 1-0068 drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev lrwxrwxrwx 1 root root 0 Oct 4 11:48 device -> ../../1c2ac00.i2c drwxr-xr-x 2 root root 0 Oct 4 11:48 power lrwxrwxrwx 1 root root 0 Oct 4 11:48 of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1c2ac00 --w------- 1 root root 4096 Oct 4 11:48 new_device -r--r--r-- 1 root root 4096 Oct 4 11:48 name --w------- 1 root root 4096 Oct 4 11:48 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# cd 1-0068 [root@PKTEST /sys/class/i2c-adapter/i2c-1/1-0068]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../../bus/i2c drwxr-xr-x 2 root root 0 Oct 4 11:48 power lrwxrwxrwx 1 root root 0 Oct 4 11:48 of_node -> ../../../../../../firmware/devicetree/base/soc/i2c@1c2ac00/ds1307@68 -r--r--r-- 1 root root 4096 Oct 4 11:48 name -r--r--r-- 1 root root 4096 Oct 4 11:48 modalias [root@PKTEST /sys/class/i2c-adapter/i2c-1/1-0068]# cd ../../i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev drwxr-xr-x 2 root root 0 Oct 4 11:48 power --w------- 1 root root 4096 Oct 4 11:48 new_device -r--r--r-- 1 root root 4096 Oct 4 11:48 name lrwxrwxrwx 1 root root 0 Oct 4 11:48 device -> ../../1ee0000.hdmi --w------- 1 root root 4096 Oct 4 11:48 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# Additionally I have verified and swtched off overlay method in armbianEnv.txt file. The used method used for "Default" (echo to new_device). rtc1 is registered but cannot be effectively used: [root@PKTEST ~]# cd /sys/class/i2c-adapter/ [root@PKTEST /sys/class/i2c-adapter]# ll total 0 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-1 -> ../../devices/platform/soc/1f02400.i2c/i2c-1 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-0 -> ../../devices/platform/soc/1ee0000.hdmi/i2c-0 [root@PKTEST /sys/class/i2c-adapter]# cd [root@PKTEST ~]# cat /boot/armbianEnv.txt verbosity=0 rootdev=UUID=f8301761-6756-4f97-aa80-12c05ea037cf extraargs=pty.legacy_count=2 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u,0x1058:0x10b8:u [root@PKTEST ~]# cd /sys/class/i2c-adapter/ [root@PKTEST /sys/class/i2c-adapter]# ll total 0 lrwxrwxrwx 1 root root 0 Oct 4 11:40 i2c-1 -> ../../devices/platform/soc/1f02400.i2c/i2c-1 lrwxrwxrwx 1 root root 0 Oct 4 11:40 i2c-0 -> ../../devices/platform/soc/1ee0000.hdmi/i2c-0 [root@PKTEST /sys/class/i2c-adapter]# cd i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev lrwxrwxrwx 1 root root 0 Oct 4 11:40 device -> ../../1ee0000.hdmi drwxr-xr-x 2 root root 0 Oct 4 11:40 power --w------- 1 root root 4096 Oct 4 11:40 new_device -r--r--r-- 1 root root 4096 Oct 4 11:40 name --w------- 1 root root 4096 Oct 4 11:40 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# cd .. [root@PKTEST /sys/class/i2c-adapter]# cd i2c-1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 4 root root 0 Jan 1 1970 1-0065 drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev drwxr-xr-x 2 root root 0 Oct 4 11:41 power lrwxrwxrwx 1 root root 0 Oct 4 11:41 of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1f02400 --w------- 1 root root 4096 Oct 4 11:41 new_device -r--r--r-- 1 root root 4096 Oct 4 11:41 name lrwxrwxrwx 1 root root 0 Oct 4 11:41 device -> ../../1f02400.i2c --w------- 1 root root 4096 Oct 4 11:41 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# cd .. [root@PKTEST /sys/class/i2c-adapter]# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: 30 31 32 33 34 35 36 37 -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST /sys/class/i2c-adapter]# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST /sys/class/i2c-adapter]# cd i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# echo ds1307 0x68 >new_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# dmesg | tail -10 [ 10.207986] zram0: detected capacity change from 0 to 52428800 [ 10.464198] EXT4-fs (zram0): mounted filesystem without journal. Opts: discard [ 10.560357] thermal thermal_zone0: failed to read out thermal zone (-110) [ 11.600361] thermal thermal_zone0: failed to read out thermal zone (-110) [ 13.280939] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 13.280991] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 15.604092] random: crng init done [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll total 0 lrwxrwxrwx 1 root root 0 Oct 4 11:40 device -> ../../1ee0000.hdmi lrwxrwxrwx 1 root root 0 Oct 4 11:40 subsystem -> ../../../../../bus/i2c drwxr-xr-x 2 root root 0 Oct 4 11:40 power --w------- 1 root root 4096 Oct 4 11:40 delete_device drwxr-xr-x 3 root root 0 Oct 4 11:40 i2c-dev -rw-r--r-- 1 root root 4096 Oct 4 11:40 uevent -r--r--r-- 1 root root 4096 Oct 4 11:40 name --w------- 1 root root 4096 Oct 4 11:41 new_device drwxr-xr-x 5 root root 0 Oct 4 11:41 0-0068 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 crw------- 1 root root 253, 1 Oct 4 11:41 /dev/rtc1 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# hwclock -r -f /dev/rtc1 hwclock: ioctl(RTC_RD_TIME) to /dev/rtc1 to read the time failed: Invalid argument [root@PKTEST /sys/class/i2c-adapter/i2c-0]# cd ../i2c-1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# echo ds1307 0x68 >new_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# dmesg | tail -10 [ 10.560357] thermal thermal_zone0: failed to read out thermal zone (-110) [ 11.600361] thermal thermal_zone0: failed to read out thermal zone (-110) [ 13.280939] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 13.280991] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 15.604092] random: crng init done [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [ 154.367483] rtc-ds1307 0-0068: read error -5 [ 166.008663] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 crw------- 1 root root 253, 1 Oct 4 11:41 /dev/rtc1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# hwclock -r -f /dev/rtc1 hwclock: ioctl(RTC_RD_TIME) to /dev/rtc1 to read the time failed: Invalid argument [root@PKTEST /sys/class/i2c-adapter/i2c-1]# cd ../i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# echo 0x68 >delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# dmesg | tail -10 [ 13.280939] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 13.280991] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 15.604092] random: crng init done [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [ 154.367483] rtc-ds1307 0-0068: read error -5 [ 166.008663] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [ 195.468248] rtc-ds1307 0-0068: read error -5 [ 209.625152] i2c i2c-0: delete_device: Deleting device ds1307 at 0x68 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# cd ../i2c-1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# echo ds1307 0x68 >new_device -bash: echo: write error: Invalid argument [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll total 0 lrwxrwxrwx 1 root root 0 Oct 4 11:41 device -> ../../1f02400.i2c lrwxrwxrwx 1 root root 0 Oct 4 11:41 subsystem -> ../../../../../bus/i2c drwxr-xr-x 2 root root 0 Oct 4 11:41 power drwxr-xr-x 4 root root 0 Oct 4 11:41 1-0065 --w------- 1 root root 4096 Oct 4 11:41 delete_device drwxr-xr-x 3 root root 0 Oct 4 11:41 i2c-dev -rw-r--r-- 1 root root 4096 Oct 4 11:41 uevent -r--r--r-- 1 root root 4096 Oct 4 11:41 name lrwxrwxrwx 1 root root 0 Oct 4 11:41 of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1f02400 drwxr-xr-x 3 root root 0 Oct 4 11:42 1-0068 --w------- 1 root root 4096 Oct 4 11:43 new_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# echo 0x68 >delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# dmesg | tail -10 [ 15.604092] random: crng init done [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [ 154.367483] rtc-ds1307 0-0068: read error -5 [ 166.008663] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [ 195.468248] rtc-ds1307 0-0068: read error -5 [ 209.625152] i2c i2c-0: delete_device: Deleting device ds1307 at 0x68 [ 226.135079] i2c i2c-1: Failed to register i2c client ds1307 at 0x68 (-16) [ 237.022019] i2c i2c-1: delete_device: Deleting device ds1307 at 0x68 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# echo ds1307 0x68 >new_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# dmesg | tail -10 [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [ 154.367483] rtc-ds1307 0-0068: read error -5 [ 166.008663] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [ 195.468248] rtc-ds1307 0-0068: read error -5 [ 209.625152] i2c i2c-0: delete_device: Deleting device ds1307 at 0x68 [ 226.135079] i2c i2c-1: Failed to register i2c client ds1307 at 0x68 (-16) [ 237.022019] i2c i2c-1: delete_device: Deleting device ds1307 at 0x68 [ 247.317683] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 [root@PKTEST /sys/class/i2c-adapter/i2c-1]#
  8. My plan is (on Friday - when I get physical access to device): 1. Unplug network cable and plug in into built-in eth0 port if successful then get logs/dmesg etc. 2. Move the device neat to PC (or laptop near to this board), connect by UART and try to login (of course I know that it is without initial login prompt). Fortunately I am using portable UPS, so there should be no issue. Any more suggestions? As topic is basically related to other (unfortunately other users the do not confirmed if connect by ssh is working (without debug option it seems that connection is not done at all).
  9. Dear All, today my Opi PC stoppped responding. But I think it is not totally "dead". From other machine I did: root@PKSERVER:~# ssh -vvv pkbackup OpenSSH_6.7p1 Debian-5+deb8u4, OpenSSL 1.0.1t 3 May 2016 debug1: Reading configuration data /etc/ssh/ssh_config debug3: checking match for 'exec "/etc/ssh/pkdata.sh %n"' host pkbackup debug1: Executing command: '/etc/ssh/pkdata.sh pkbackup' debug1: permanently_drop_suid: 0 debug3: command returned status 1 debug1: /etc/ssh/ssh_config line 18: no match 'exec "/etc/ssh/pkdata.sh pkbackup"' debug3: match not found debug1: /etc/ssh/ssh_config line 21: Applying options for * debug2: ssh_connect: needpriv 0 ......................... a lot of lines ................................. debug1: Offering RSA public key: /root/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: pkalg ssh-rsa blen 279 debug2: input_userauth_pk_ok: fp cc:d4:2d:54:9e:33:87:8e:ef:e0:b1:e3:dc:25:46:67 debug3: sign_and_send_pubkey: RSA cc:d4:2d:54:9e:33:87:8e:ef:e0:b1:e3:dc:25:46:67 debug1: Authentication succeeded (publickey). Authenticated to pkbackup ([192.168.10.220]:22). debug1: channel 0: new [client-session] debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. At this moment this is the last message from ssh. Quite interesting that CTRL+C is not working (session is already on remote machine side). Please note that previously I provided stacktrace which was registered in log: It was related to network driver (dwmac-sun8i): [44339.175188] dwmac-sun8i 1c30000.ethernet: packet dropped [55271.062033] kworker/0:0H: page allocation failure: order:0, mode:0x1080020(GFP_ATOMIC), nodemask=(null) [55271.062702] kworker/0:0H cpuset=/ mems_allowed=0 [55271.063225] CPU: 0 PID: 21267 Comm: kworker/0:0H Not tainted 4.14.18-sunxi #24 [55271.063347] Hardware name: Allwinner sun8i Family [55271.063793] Workqueue: xprtiod xs_tcp_data_receive_workfn [55271.064500] [<c010db15>] (unwind_backtrace) from [<c010a0d9>] (show_stack+0x11/0x14) [55271.064924] [<c010a0d9>] (show_stack) from [<c0868f69>] (dump_stack+0x69/0x78) Maybe this is the way (not kernel itself)? EDIT (from RPI SBC): https://github.com/raspberrypi/linux/issues/2482 Similar issue (I am also using nfs as primary "storage"). In my case also there was "packet dropped". Please note https://github.com/6by9/linux/commit/d9941e07f7b8d34a9404374c0e583ba6e5f25da9 Note to moderator: if this is wrong way - please delete/move it to "trash". EDIT2: I noticed difference to TSO between default and mainline in bonding driver, but no difference in eth interface. default: root@PKSERVER:~# ethtool -k bond0 | grep segmentation tcp-segmentation-offload: off tx-tcp-segmentation: off [requested on] tx-tcp-ecn-segmentation: off [requested on] tx-tcp6-segmentation: off [requested on] generic-segmentation-offload: on tx-fcoe-segmentation: off [fixed] root@PKSERVER:~# ethtool -k eth0 | grep segmentation tcp-segmentation-offload: off tx-tcp-segmentation: off [fixed] tx-tcp-ecn-segmentation: off [fixed] tx-tcp6-segmentation: off [fixed] generic-segmentation-offload: on tx-fcoe-segmentation: off [fixed] root@PKSERVER:~# mainline: root@PKOTHER:~# ethtool -k bond0 | grep segmentation Cannot get device udp-fragmentation-offload settings: Operation not supported tcp-segmentation-offload: on tx-tcp-segmentation: on tx-tcp-ecn-segmentation: on tx-tcp-mangleid-segmentation: on tx-tcp6-segmentation: on generic-segmentation-offload: on tx-fcoe-segmentation: off [fixed] tx-gre-segmentation: on tx-gre-csum-segmentation: on tx-ipxip4-segmentation: on tx-ipxip6-segmentation: on tx-udp_tnl-segmentation: on tx-udp_tnl-csum-segmentation: on tx-sctp-segmentation: off [fixed] tx-esp-segmentation: off [fixed] root@PKOTHER:~# ethtool -k eth0 | grep segmentation Cannot get device udp-fragmentation-offload settings: Operation not supported tcp-segmentation-offload: off tx-tcp-segmentation: off [fixed] tx-tcp-ecn-segmentation: off [fixed] tx-tcp-mangleid-segmentation: off [fixed] tx-tcp6-segmentation: off [fixed] generic-segmentation-offload: on tx-fcoe-segmentation: off [fixed] tx-gre-segmentation: off [fixed] tx-gre-csum-segmentation: off [fixed] tx-ipxip4-segmentation: off [fixed] tx-ipxip6-segmentation: off [fixed] tx-udp_tnl-segmentation: off [fixed] tx-udp_tnl-csum-segmentation: off [fixed] tx-sctp-segmentation: off [fixed] tx-esp-segmentation: off [fixed] root@PKOTHER:~# For device "pkbackup" ("frozen") I am using 1GBit USB eth1, but until I get physical access to this device - I am not able to confirm what are the settings for this interface).
  10. Sure. I will treat it as warning - do not use "stop" for this service. If there is relable way to recognise if "stop" is done on behalf of shutdown then it would be good idea to add it here as condition... I guess it is EOT for this "issue". How about the test that I've done here: https://forum.armbian.com/topic/7548-apt-list-vs-mainline-very-slow/?do=findComment&amp;comment=56805 I can repeat it, however as "apt" itself is a binary - I do not know what is really done by this tool here (no child processes, eg gzip etc.)...
  11. For the issue "systemctl stop armbian-hardware-monitor" - the reason is quite obvious, this line of script /usr/lib/armbian/armbian-hardware-monitor: /sbin/modprobe -r $(cut -f1 -d' ' </proc/modules) In my case (hint: removing network/binding modules is basically "showstopper"): root@PKHELPER:~# cut -f1 -d' ' </proc/modules rpcsec_gss_krb5 bonding snd_soc_hdmi_codec rc_cec dw_hdmi_i2s_audio dw_hdmi_cec evdev 8189es sun8i_dw_hdmi dw_hdmi cec sun8i_codec_analog snd_soc_simple_card sun4i_codec sun4i_i2s snd_soc_simple_card_utils ir_lirc_codec lirc_dev snd_soc_core rtc_ds1307 sunxi_cir snd_pcm_dmaengine cfg80211 snd_pcm snd_timer snd rfkill soundcore sun4i_gpadc_iio sun4i_tcon sun8i_mixer sun4i_drm uio_pdrv_genirq uio fuse uas pwrseq_simple sy8106a_regulator realtek
  12. Please see attached log.txt. This is the sequence of operations to reproduce (on my Orange Pi+2 in this case). Important is that removal or restore of /etc/apt/apt.conf.d/02-armbian-compress-indexes file shall be followed by apt update command. Result of armbianmonitor -u is here. Edit 1: my Opi+2 just "died" (this part of post shall be probably moved to new topic I guess). Igor, can you please try following? I was able to "make unresponsible" my both Opi+ and now OpiZero: Starting point - armbian-hardware-monitor was disabled wg. no related symlink in /etc/systemd/.... // Please do not ask why I disabled it . Enabling it was caused by message in armbianmonitor -u - so, next is what I did. root@PKOTHER:~# systemctl enable armbian-hardware-monitor Created symlink from /etc/systemd/system/basic.target.wants/armbian-hardware-monitor.service to /lib/systemd/system/armbian-hardware-monitor.service. root@PKOTHER:~# systemctl start armbian-hardware-monitor root@PKOTHER:~# systemctl stop armbian-hardware-monitor Interesting thing is that "PuTTY" is keeping connection (by means of TCP?) // as it is seen first I was trying to connect to "pkhelper" (OPi+2 which stop responding after commands as given above and is a subject of my my tests for armbiuanmonitor -u): Last command was not completed. And device... in not accessible anymore. I was able to reproduce it wit both OP'is. admin@PKSERVER:~$ ssh root@pkother ssh: connect to host pkother port 22: No route to host Edit 2: now both of my "servers" are restarted, so I can resume testing...
  13. Actually I have found root cause of this slowness. It is a file: /etc/apt/apt.conf.d/02-armbian-compress-indexes After removing it - everything is very fast again. So, the issue is rather not related to kernel. It is related to Armbian support files (in my case the version is 5.47).
  14. After upgrade two of my boards to mainline (4.14.51-sunxi) I have noticed that simple command apt list basically stopped working. It stuck at "Listing ..." (at this moment 1 core of CPU is utilized in 100%). Now I run it in background to see if eventually it will be completed... So far (15 minutes)... nothing. apt list --installed is also very slow, but after some time it gives results. However, it is much slower than on "default" (3.4.113-sun8i) Can anybody check it and reconfirm?
  15. Orange Pi Zero (which I am using for "testing"). I have built: Then I started normal (for me at least) activity) - cron.d is running my own backup software every one hour. This one in general is "rsync" (it is scanning disks/nfs) - determines the differences, storing state in sqlite3 db... So, I guess most of "my use cases". I will let you results. So, far it is OK. I can say that this test "frozen" next kernel (downloaded from stable repository) upgrade after around 1 day... Some results: backup-TEST.run.1.log