Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odroid N2 | Hard lockup on USB drive insert/remove #4188

Closed
TheOriginalMrWolf opened this issue Mar 11, 2021 · 22 comments
Closed

Odroid N2 | Hard lockup on USB drive insert/remove #4188

TheOriginalMrWolf opened this issue Mar 11, 2021 · 22 comments
Milestone

Comments

@TheOriginalMrWolf
Copy link

TheOriginalMrWolf commented Mar 11, 2021

Hi,

Running on Odroid N2, I experience hard lockups (console unresponsive, no response to ping on LAN nor any other network traffic, SSH connections dropped) when using USB drives.

This can occur either randomly on install/remove of a drive, or after the drive has simply been plugged in for a few hours/days. Occurs if drive is either plugged directly into SBC, or via a powered Pluggable USB3-Hub7C.

Was connected via SSH & running journalctl -f when this happened and saw:

Mar 11 18:12:25 NewPi kernel: sd 0:0:0:1: [sdb] Attached SCSI removable disk
Mar 11 18:12:29 NewPi kernel: usb 2-1.2.3: usb_reset_and_verify_device Failed to disable LTM
                              .
Mar 11 18:12:29 NewPi kernel: usb 1-1.2.3: new high-speed USB device number 5 using xhci-hcd
Mar 11 18:12:30 NewPi kernel: usb 2-1.2.3: USB disconnect, device number 17
Mar 11 18:12:30 NewPi kernel: amlogic-new-usb2-v2 ffe09000.usb2phy: ---Recovery port(2) tuning for host cf(hub_event)--
Mar 11 18:12:30 NewPi kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000038

Message from syslogd@NewPi at Mar 11 18:12:31 ...
 kernel:[ 6740.706919@0] Internal error: Oops: 96000047 [#1] PREEMPT SMP

Is there any way to better capture debug information?

Required Information

  • DietPi version | cat /boot/dietpi/.version
    G_DIETPI_VERSION_CORE=7
    G_DIETPI_VERSION_SUB=0
    G_DIETPI_VERSION_RC=2
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'

  • Distro version | echo $G_DISTRO_NAME or cat /etc/debian_version
    Buster / 10.8

  • Kernel version | uname -a
    Linux NewPi 4.9.241-arm64 #1 SMP PREEMPT Thu Feb 25 18:56:07 CET 2021 aarch64 GNU/Linux

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
    Odroid N2 (aarch64)

  • Power supply used | (EG: 5V 1A RAVpower)
    Odroid supplied PSU

  • SDcard used | (EG: SanDisk ultra)
    Sandisk Ultra in Kingston MobileLite G4 card reader
    Samsung T5 Portable SSD

Additional Information (if applicable)

Steps to reproduce

  1. Power on SBC
  2. Plug in USB drive
  3. Wait for a number of hours / days
  4. Observe hard lockup

or

  1. Power on SBC
  2. Repeatedly plug / unplug USB drive
  3. Wait an hour or two
  4. Goto step 2 until hard lockup observed

Expected behaviour

  • SBC with DietPi should continue running & being available

Actual behaviour

  • Hard lockup. Console unresponsive (just blinking cursor), no messages. Stops responding to ping or any other network traffic, drops SSH sessions.

Extra details

  • N/A
@MichaIng
Copy link
Owner

Many thanks for your report.

Are there other kernel errors, before the actual crash happens?

dmesg -l emerg,alert,crit,err

Just in case some kernel files are broken, please try to reinstall it:

apt install --reinstall linux-image-4.9.241-arm64 linux-firmware-image-4.9.241-arm64

@TheOriginalMrWolf
Copy link
Author

TheOriginalMrWolf commented Mar 12, 2021

Hi @MichaIng ,

Thanks for the quick response!

I reinstalled the kernel as requested.

Rebooted & plugged in the USB drive and waited about six hours before the unit locked up again.

I was running journalctl -f to a file on SD card, but didn't capture anything of interest. Can you possibly suggest a better way to try to capture errors?

Kernel errors:

dmesg -l emerg,alert,crit,err
[    0.000000]  7f800000 - 80000000,     8192 KB, linux,meson-fb
[    0.000000]  e5800000 - ed800000,   131072 KB, linux,ion-dev
[    0.000000]  e3000000 - e5800000,    40960 KB, linux,di_cma
[    0.000000]  e3000000 - e3000000,        0 KB, linux,ppmgr
[    0.000000]  cfc00000 - e3000000,   315392 KB, linux,codec_mm_cma
[    0.000000]  cfc00000 - cfc00000,        0 KB, linux,codec_mm_reserved
[    0.000000]  05000000 - 05400000,     4096 KB, linux,secmon
[    0.320770] codec_mm_module_init
[    0.328534] clkmsr ffd18004.meson_clk_msr: failed to get msr ring reg0
[    0.344480] cvbs_out: chrdev devno 264241152 for disp
[    0.468456] dmi: Firmware registration failed.
[    0.897850] meson-pwm ff802000.pwm: pwm pinmux : can't get pinctrl
[    0.898065] meson-pwm ffd1b000.pwm: pwm pinmux : can't get pinctrl
[    0.902554] mtdoops: mtd device (mtddev=name/number) must be supplied
[    0.920725] meson_cpufreq_init:don't find the node <dynamic_gp1_clk>
[    0.922760] meson_cpufreq_init:don't find the node <dynamic_gp1_clk>
[    0.924779] ff803000.serial: clock gate not found
[    3.345880] meson-fb meson-fb: create ion_client ffffffc0c9ff4840, handle=ffffffc0ca333ec0
[    3.345883] meson-fb meson-fb: ion memory(0): created fb at 0x00000000e5800000, size 75 MiB
[    3.686541] di_get_vpu_clkb: get clk vpu error.
[    3.891983] Reserved memory: failed to init DMA memory pool at 0x00000000e3000000, size 0 MiB
[    4.116466] meson-mmc: >>>>>>>>hostbase ffffff800858d000, dmode
[    4.179973] meson-mmc: >>>>>>>>hostbase ffffff8008596000, dmode
[    4.180106] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.180109] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.180119] meson-mmc: meson_mmc_irq_thread_v3() 653: set 1st retry!
[    4.180120] meson-mmc: retry cmd 1 the 3-th time(s)
[    4.189809] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.189810] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.189818] meson-mmc: retry cmd 1 the 2-th time(s)
[    4.196571] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.196573] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.196580] meson-mmc: retry cmd 1 the 1-th time(s)
[    4.203066] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.203068] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.203076] meson-mmc: Command retried failed line:675, cmd:1
[    4.304669] cectx ff80023c.aocec: cec driver date:2019/10/22: finetune ARB rising time

[    4.313493] cectx ff80023c.aocec: compatible:amlogic, aocec-g12a
[    4.319521] cectx ff80023c.aocec: cecb_ver:0x1
[    4.324101] cectx ff80023c.aocec: line_reg:0x1
[    4.328701] cectx ff80023c.aocec: line_bit:0x3
[    4.333287] cectx ff80023c.aocec: ee_to_ao:0x1
[    4.343835] cectx ff80023c.aocec: not find 'port_num'
[    4.348979] cectx ff80023c.aocec: using cec:1
[    4.353491] cectx ff80023c.aocec: no hdmirx regs
[    4.358251] cectx ff80023c.aocec: no hhi regs
[    4.362757] cectx ff80023c.aocec: not find 'output'
[    4.371315] cectx ff80023c.aocec: wakeup_reason:0x0
[    4.376230] cectx ff80023c.aocec: cev val1: 0x0;val2: 0x0
[    4.381736] cectx ff80023c.aocec: aml_cec_probe success end
[    4.511085] meson-mmc: card IN
[    4.524195] defendkey ff630218.defendkey: Reserved memory is not enough!
[    4.549845] Error: Driver 'spdif-dit' is already registered, aborting...
[    4.891243] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Left DAC
[    4.891245] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Left DAC -> LOLP_SEL_DACL -> Lineout left P switch
[    4.891247] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Left DAC
[    4.891249] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Left DAC -> LOLP_SEL_DACL_INV -> Lineout left P switch
[    4.891251] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Left DAC
[    4.891253] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Left DAC -> LOLN_SEL_DACL_INV -> Lineout left N switch
[    4.891256] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Left DAC
[    4.891257] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Left DAC -> LOLN_SEL_DACL -> Lineout left N switch
[    4.891259] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Right DAC
[    4.891261] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Right DAC -> LORP_SEL_DACR -> Lineout right P switch
[    4.891263] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Right DAC
[    4.891264] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Right DAC -> LORP_SEL_DACR_INV -> Lineout right P switch
[    4.891266] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Right DAC
[    4.891268] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Right DAC -> LORN_SEL_DACR_INV -> Lineout right N switch
[    4.891270] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Right DAC
[    4.891272] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Right DAC -> LORN_SEL_DACR -> Lineout right N switch
[    4.892975] aml_codec_T9015 ff632000.t9015: ASoC: mux Lineout left P switch has no paths
[    4.892979] aml_codec_T9015 ff632000.t9015: ASoC: mux Lineout left N switch has no paths
[    4.892985] aml_codec_T9015 ff632000.t9015: ASoC: mux Lineout right P switch has no paths
[    4.892988] aml_codec_T9015 ff632000.t9015: ASoC: mux Lineout right N switch has no paths
[    5.052168] pm-meson pm: Can't get switch_clk81
[    6.496741] cgroup: cgroup2: unknown option "nsdelegate"

@MichaIng
Copy link
Owner

Hmm, I don't like kernels which print "expected" error messages as now it's very hard to know if there is an actual issue or not... One thing could be muted by disabling CEC support.

I did just create/update the boot.ini for N2: https://github.com/MichaIng/DietPi/blob/dev/boot_n2.ini
You can install it on your system:

curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/dev/boot_n2.ini -o /boot/boot.ini

Then CEC can be disabled:

G_CONFIG_INJECT 'setenv cec[[:blank:]]' 'setenv cec "false"' /boot/boot.ini

Remembering the initial reason for the boot.ini update: Is it actually an Odroid N2 or N2+? The latter was not really supported but with this new boot.ini it is as it loads a different device tree. Maybe this is even the reason for all those kernel errors.

@TheOriginalMrWolf
Copy link
Author

TheOriginalMrWolf commented Mar 14, 2021

Hi @MichaIng,

Thanks for that.

The devices are definitely an N2, not N2+. I bought two of them over a year ago (and both are affected - which sort of rules out faulty hardware/PSU issues).

Followed your instructions above (copy/pasted both & confirmed they worked), unfortunately the system is still crashing. Had journalctl -f running again and this time got:

Logfile attached. Click to expand!
Mar 14 14:25:57 NewPi kernel: sd 0:0:0:1: [sdb] Attached SCSI removable disk
Mar 14 14:26:02 NewPi kernel: usb 2-1.2.1.3: USB disconnect, device number 11
Mar 14 14:26:10 NewPi kernel: amlogic-new-usb2-v2 ffe09000.usb2phy: ---Recovery port(2) tuning for host cf(hub_event)--
Mar 14 14:26:10 NewPi kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000038
Mar 14 14:26:10 NewPi kernel: pgd = ffffffc0c92dd000
Mar 14 14:26:11 NewPi kernel: [0000000000000038] *pgd=0000000000000000, *pud=0000000000000000
Mar 14 14:26:11 NewPi kernel: Internal error: Oops: 96000045 [#1] PREEMPT SMP
Mar 14 14:26:12 NewPi kernel: Modules linked in: xt_nat xt_tcpudp xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink xt_addrtype iptable_filter iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack br_netfilter bridge stp llc overlay i2c_meson_master mali_kbase ip_tables x_tables ipv6
Mar 14 14:26:12 NewPi kernel: CPU: 0 PID: 12176 Comm: kworker/0:0 Not tainted 4.9.241-arm64 #1
Mar 14 14:26:12 NewPi kernel: Hardware name: Hardkernel ODROID-N2 (DT)
Mar 14 14:26:12 NewPi kernel: Workqueue: usb_hub_wq hub_event
Mar 14 14:26:12 NewPi kernel: task: ffffffc0ca2c1c00 task.stack: ffffffc0ae9ac000
Mar 14 14:26:12 NewPi kernel: PC is at set_usb_phy_host_tuning+0xf4/0x100
Mar 14 14:26:12 NewPi kernel: LR is at set_usb_phy_host_tuning+0xec/0x100
Mar 14 14:26:12 NewPi kernel: pc : [<ffffff800977f2a4>] lr : [<ffffff800977f29c>] pstate: 00000145
Mar 14 14:26:12 NewPi kernel: sp : ffffffc0ae9afc20
Mar 14 14:26:12 NewPi kernel: x29: ffffffc0ae9afc20 x28: ffffffc03d3b4400
Mar 14 14:26:12 NewPi kernel: x27: ffffffc03d3b5308 x26: 0000000000000003
Mar 14 14:26:12 NewPi kernel: x25: ffffffc0c80e2000 x24: 0000000000000002
Mar 14 14:26:12 NewPi kernel: x23: 0000000000000000 x22: 0000000000000001
Mar 14 14:26:12 NewPi kernel: x21: 0000000000000002 x20: ffffff80095d463c
Mar 14 14:26:12 NewPi kernel: x19: ffffff800a816000 x18: 0000000000000001
Mar 14 14:26:12 NewPi kernel: x17: 0000007f9fe71208 x16: ffffff800924eb90
Mar 14 14:26:12 NewPi kernel: x15: ffffffffffffffff x14: 676e696e75742029
Mar 14 14:26:12 NewPi kernel: x13: 322874726f702079 x12: 7265766f6365522d
Mar 14 14:26:12 NewPi kernel: x11: 2d2d203a79687032 x10: 00000000000004e7
Mar 14 14:26:12 NewPi kernel: x9 : 306566662032762d x8 : 6275682866632074
Mar 14 14:26:12 NewPi kernel: x7 : 736f6820726f6620 x6 : ffffff800a736042
Mar 14 14:26:12 NewPi kernel: x5 : 0000000000000000 x4 : 0000000000000000
Mar 14 14:26:12 NewPi kernel: x3 : 0000000000000000 x2 : ffffffc0ca2c1c00
Mar 14 14:26:12 NewPi kernel: x1 : ffffffc0ca2c1c00 x0 : 0000000000000038
Mar 14 14:26:12 NewPi kernel:
                              SP: 0xffffffc0ae9afba0:
Mar 14 14:26:12 NewPi kernel: fba0  00000001 00000000 00000000 00000000 00000002 00000000 c80e2000 ffffffc0
Mar 14 14:26:12 NewPi kernel: fbc0  00000003 00000000 3d3b5308 ffffffc0 3d3b4400 ffffffc0 ae9afc20 ffffffc0
Mar 14 14:26:12 NewPi kernel: fbe0  0977f29c ffffff80 ae9afc20 ffffffc0 0977f2a4 ffffff80 00000145 00000000
Mar 14 14:26:12 NewPi kernel: fc00  095d463c ffffff80 ffffffff 00ffffff ffffffff ffffffff 00000000 00000000
Mar 14 14:26:12 NewPi kernel: fc20  ae9afc60 ffffffc0 095d463c ffffff80 00000001 00000000 ffffff95 00000000
Mar 14 14:26:12 NewPi kernel: fc40  ffffff95 00000000 00000000 00000000 c9e64800 ffffffc0 3d3b5008 ffffffc0
Mar 14 14:26:12 NewPi kernel: fc60  ae9afd70 ffffffc0 090c39d4 ffffff80 3d3b4608 ffffffc0 ca356000 ffffffc0
Mar 14 14:26:12 NewPi kernel: fc80  cf3230c0 ffffffc0 cf328b00 ffffffc0 00000000 00000000 0a577000 ffffff80
Mar 14 14:26:12 NewPi kernel:
                              X1: 0xffffffc0ca2c1b80:
Mar 14 14:26:12 NewPi kernel: 1b80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1ba0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1bc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1be0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1c00  00000002 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1c20  ae9ac000 ffffffc0 00000002 0420c060 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1c40  00000001 00000000 00000009 00000000 0022ec14 00000001 c9e76200 ffffffc0
Mar 14 14:26:12 NewPi kernel: 1c60  00000000 00000001 00000078 00000078 00000078 00000000 09bd9498 ffffff80
Mar 14 14:26:12 NewPi kernel:
                              X2: 0xffffffc0ca2c1b80:
Mar 14 14:26:12 NewPi kernel: 1b80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1ba0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1bc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1be0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1c00  00000002 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1c20  ae9ac000 ffffffc0 00000002 0420c060 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1c40  00000001 00000000 00000009 00000000 0022ec14 00000001 c9e76200 ffffffc0
Mar 14 14:26:12 NewPi kernel: 1c60  00000000 00000001 00000078 00000078 00000078 00000000 09bd9498 ffffff80
Mar 14 14:26:12 NewPi kernel:
                              X25: 0xffffffc0c80e1f80:
Mar 14 14:26:12 NewPi kernel: 1f80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1fa0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1fc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 1fe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 2000  c80e6000 ffffffc0 00332e31 00000000 00000000 00000312 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 2020  00000000 00000000 00000000 00000000 00000000 00000000 c9e64800 ffffffc0
Mar 14 14:26:12 NewPi kernel: 2040  3d0de000 ffffffc0 00000507 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 2060  c80e2060 ffffffc0 c80e2060 ffffffc0 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel:
                              X27: 0xffffffc03d3b5288:
Mar 14 14:26:12 NewPi kernel: 5288  3d3b5288 ffffffc0 3d3b5288 ffffffc0 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 52a8  00000000 00000000 00000000 00000000 00000000 00000000 0a612958 ffffff80
Mar 14 14:26:12 NewPi kernel: 52c8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 52e8  00000000 00000000 3d3b0000 ffffffc0 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 5308  00000001 00000000 3d3b5310 ffffffc0 3d3b5310 ffffffc0 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 5328  00000000 00000000 00000003 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 5348  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 5368  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel:
                              X28: 0xffffffc03d3b4380:
Mar 14 14:26:12 NewPi kernel: 4380  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 43a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 43c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 43e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 4400  3d3b4c30 ffffffc0 c9e64800 ffffffc0 00000003 00000000 c792bcc0 ffffffc0
Mar 14 14:26:12 NewPi kernel: 4420  c78d4140 ffffffc0 c78d4100 ffffffc0 00000001 00000000 3d3b4438 ffffffc0
Mar 14 14:26:12 NewPi kernel: 4440  3d3b4438 ffffffc0 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel: 4460  00000008 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Mar 14 14:26:12 NewPi kernel:
                              X29: 0xffffffc0ae9afba0:
Mar 14 14:26:12 NewPi kernel: fba0  00000001 00000000 00000000 00000000 00000002 00000000 c80e2000 ffffffc0
Mar 14 14:26:12 NewPi kernel: fbc0  00000003 00000000 3d3b5308 ffffffc0 3d3b4400 ffffffc0 ae9afc20 ffffffc0
Mar 14 14:26:12 NewPi kernel: fbe0  0977f29c ffffff80 ae9afc20 ffffffc0 0977f2a4 ffffff80 00000145 00000000
Mar 14 14:26:12 NewPi kernel: fc00  095d463c ffffff80 ffffffff 00ffffff ffffffff ffffffff 00000000 00000000
Mar 14 14:26:12 NewPi kernel: fc20  ae9afc60 ffffffc0 095d463c ffffff80 00000001 00000000 ffffff95 00000000
Mar 14 14:26:12 NewPi kernel: fc40  ffffff95 00000000 00000000 00000000 c9e64800 ffffffc0 3d3b5008 ffffffc0
Mar 14 14:26:12 NewPi kernel: fc60  ae9afd70 ffffffc0 090c39d4 ffffff80 3d3b4608 ffffffc0 ca356000 ffffffc0
Mar 14 14:26:12 NewPi kernel: fc80  cf3230c0 ffffffc0 cf328b00 ffffffc0 00000000 00000000 0a577000 ffffff80
Mar 14 14:26:12 NewPi kernel:
Mar 14 14:26:12 NewPi kernel: Process kworker/0:0 (pid: 12176, stack limit = 0xffffffc0ae9ac000)
Mar 14 14:26:12 NewPi kernel: Stack: (0xffffffc0ae9afc20 to 0xffffffc0ae9b0000)
Mar 14 14:26:12 NewPi kernel: fc20: ffffffc0ae9afc60 ffffff80095d463c 0000000000000001 00000000ffffff95
Mar 14 14:26:12 NewPi kernel: fc40: 00000000ffffff95 0000000000000000 ffffffc0c9e64800 ffffffc03d3b5008
Mar 14 14:26:12 NewPi kernel: fc60: ffffffc0ae9afd70 ffffff80090c39d4 ffffffc03d3b4608 ffffffc0ca356000
Mar 14 14:26:12 NewPi kernel: fc80: ffffffc0cf3230c0 ffffffc0cf328b00 0000000000000000 ffffff800a577000
Mar 14 14:26:12 NewPi kernel: fca0: 0000000000000000 ffffff800a593a80 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: fcc0: ffffff8009bc1808 ffffff800a80fbd0 ffffffc03d3b5008 ffffffc03d3b5308
Mar 14 14:26:12 NewPi kernel: fce0: ffffffc03d3b5308 ffffff800a611728 ffffffc03d3b5000 ffffff800a611758
Mar 14 14:26:12 NewPi kernel: fd00: ffffffc0c9e648f8 ffffffc0c9e64800 ffffffc03d0de050 ffffffc03d3b4c30
Mar 14 14:26:12 NewPi kernel: fd20: ffffffc03d3b4608 ffffffc03d0de000 ffffffc03d3b3608 ffffffc0cf328b00
Mar 14 14:26:12 NewPi kernel: fd40: ffffffc03d3b4460 ffffffc03d3b44fb 0000000200000064 ffffffc03d3b4c00
Mar 14 14:26:12 NewPi kernel: fd60: ffffffc03d3b4608 ffffffc000010101 ffffffc0ae9afdc0 ffffff80090c3d60
Mar 14 14:26:12 NewPi kernel: fd80: ffffffc0ca356000 ffffffc0cf3230c0 ffffffc0cf3230c0 ffffffc0ca356030
Mar 14 14:26:12 NewPi kernel: fda0: ffffffc0cf3230e0 ffffff800a577000 ffffffc0ca2c1c00 ffffffc0cf3230c0
Mar 14 14:26:12 NewPi kernel: fdc0: ffffffc0ae9afe20 ffffff80090ca924 ffffffc0a896fe40 ffffff800a731960
Mar 14 14:26:12 NewPi kernel: fde0: ffffffc0ca2c1c00 ffffff8009eea768 ffffffc0ca356000 ffffff80090c3d08
Mar 14 14:26:12 NewPi kernel: fe00: 0000000000000000 0000000000000000 0000000000000000 ffffffc0ca2c1c00
Mar 14 14:26:12 NewPi kernel: fe20: 0000000000000000 ffffff80090836c0 ffffff80090ca840 ffffffc0a896fe40
Mar 14 14:26:12 NewPi kernel: fe40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: fe60: ffffffc0ca990e00 0000000000000000 0000000000000000 ffffffc0ca356000
Mar 14 14:26:12 NewPi kernel: fe80: 0000000000000000 0000000000000000 ffffffc0ae9afe90 ffffffc0ae9afe90
Mar 14 14:26:12 NewPi kernel: fea0: ffffff8000000000 ffffffc000000000 ffffffc0ae9afeb0 ffffffc0ae9afeb0
Mar 14 14:26:12 NewPi kernel: fec0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: fee0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: ff00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: ff20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: ff40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: ff60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: ff80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: ffa0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: ffc0: 0000000000000000 0000000000000005 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: ffe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: Call trace:
Mar 14 14:26:12 NewPi kernel: Exception stack(0xffffffc0ae9afa50 to 0xffffffc0ae9afb80)
Mar 14 14:26:12 NewPi kernel: fa40:                                   ffffff800a816000 0000007fffffffff
Mar 14 14:26:12 NewPi kernel: fa60: ffffffc0ae9afc20 ffffff800977f2a4 306566663a6d726f 6273752e30303039
Mar 14 14:26:12 NewPi kernel: fa80: 0000000079687032 0000000080000400 ffffffc0ae9afae0 ffffff80095d91d8
Mar 14 14:26:12 NewPi kernel: faa0: ffffffc0c765db40 ffffffc0ae9afb48 0000000000000000 ffffffc0ae9afbdc
Mar 14 14:26:12 NewPi kernel: fac0: 00000000000003e8 0000000080000400 ffffffc0ae9afb70 ffffff80095230e0
Mar 14 14:26:12 NewPi kernel: fae0: ffffffc0ca15b810 ffffff8009ee6938 0000000000000038 ffffffc0ca2c1c00
Mar 14 14:26:12 NewPi kernel: fb00: ffffffc0ca2c1c00 0000000000000000 0000000000000000 0000000000000000
Mar 14 14:26:12 NewPi kernel: fb20: ffffff800a736042 736f6820726f6620 6275682866632074 306566662032762d
Mar 14 14:26:12 NewPi kernel: fb40: 00000000000004e7 2d2d203a79687032 7265766f6365522d 322874726f702079
Mar 14 14:26:12 NewPi kernel: fb60: 676e696e75742029 ffffffffffffffff ffffff800924eb90 0000007f9fe71208
Mar 14 14:26:12 NewPi kernel: [<ffffff800977f2a4>] set_usb_phy_host_tuning+0xf4/0x100
Mar 14 14:26:12 NewPi kernel: [<ffffff80095d463c>] hub_event+0xc2c/0x1090
Mar 14 14:26:12 NewPi kernel: [<ffffff80090c39d4>] process_one_work+0x1fc/0x530
Mar 14 14:26:12 NewPi kernel: [<ffffff80090c3d60>] worker_thread+0x58/0x4e8
Mar 14 14:26:12 NewPi kernel: [<ffffff80090ca924>] kthread+0xe4/0xf8
Mar 14 14:26:12 NewPi kernel: [<ffffff80090836c0>] ret_from_fork+0x10/0x50
Mar 14 14:26:12 NewPi kernel: Code: 91232021 97f6907e d5033e9f 9100e2e0 (b900001f)
Mar 14 14:26:12 NewPi kernel: ---[ end trace c0d2c1337b3bdcb1 ]---

dmesg errors:

Logfile attached. Click to expand!
dmesg -l emerg,alert,crit,err
[    0.000000]  7f800000 - 80000000,     8192 KB, linux,meson-fb
[    0.000000]  e5800000 - ed800000,   131072 KB, linux,ion-dev
[    0.000000]  e3000000 - e5800000,    40960 KB, linux,di_cma
[    0.000000]  e3000000 - e3000000,        0 KB, linux,ppmgr
[    0.000000]  cfc00000 - e3000000,   315392 KB, linux,codec_mm_cma
[    0.000000]  cfc00000 - cfc00000,        0 KB, linux,codec_mm_reserved
[    0.000000]  05000000 - 05400000,     4096 KB, linux,secmon
[    0.320940] codec_mm_module_init
[    0.328722] clkmsr ffd18004.meson_clk_msr: failed to get msr ring reg0
[    0.344552] cvbs_out: chrdev devno 264241152 for disp
[    0.468535] dmi: Firmware registration failed.
[    0.898079] meson-pwm ff802000.pwm: pwm pinmux : can't get pinctrl
[    0.898283] meson-pwm ffd1b000.pwm: pwm pinmux : can't get pinctrl
[    0.902880] mtdoops: mtd device (mtddev=name/number) must be supplied
[    0.921308] meson_cpufreq_init:don't find the node <dynamic_gp1_clk>
[    0.923351] meson_cpufreq_init:don't find the node <dynamic_gp1_clk>
[    0.925373] ff803000.serial: clock gate not found
[    3.343257] meson-fb meson-fb: create ion_client ffffffc0c9c31900, handle=ffffffc0ca1a4280
[    3.343260] meson-fb meson-fb: ion memory(0): created fb at 0x00000000e5800000, size 75 MiB
[    3.669952] di_get_vpu_clkb: get clk vpu error.
[    3.875389] Reserved memory: failed to init DMA memory pool at 0x00000000e3000000, size 0 MiB
[    4.099887] meson-mmc: >>>>>>>>hostbase ffffff800858d000, dmode
[    4.164166] meson-mmc: >>>>>>>>hostbase ffffff8008596000, dmode
[    4.164301] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.164304] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.164314] meson-mmc: meson_mmc_irq_thread_v3() 653: set 1st retry!
[    4.164315] meson-mmc: retry cmd 1 the 3-th time(s)
[    4.174010] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.174012] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.174022] meson-mmc: retry cmd 1 the 2-th time(s)
[    4.180753] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.180754] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.180762] meson-mmc: retry cmd 1 the 1-th time(s)
[    4.187258] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.187259] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.187268] meson-mmc: Command retried failed line:675, cmd:1
[    4.288912] cectx ff80023c.aocec: cec driver date:2019/10/22: finetune ARB rising time

[    4.297722] cectx ff80023c.aocec: compatible:amlogic, aocec-g12a
[    4.303728] cectx ff80023c.aocec: cecb_ver:0x1
[    4.308324] cectx ff80023c.aocec: line_reg:0x1
[    4.312911] cectx ff80023c.aocec: line_bit:0x3
[    4.317506] cectx ff80023c.aocec: ee_to_ao:0x1
[    4.328051] cectx ff80023c.aocec: not find 'port_num'
[    4.333193] cectx ff80023c.aocec: using cec:1
[    4.337709] cectx ff80023c.aocec: no hdmirx regs
[    4.342465] cectx ff80023c.aocec: no hhi regs
[    4.346974] cectx ff80023c.aocec: not find 'output'
[    4.355538] cectx ff80023c.aocec: wakeup_reason:0x0
[    4.360445] cectx ff80023c.aocec: cev val1: 0x0;val2: 0x0
[    4.365953] cectx ff80023c.aocec: aml_cec_probe success end
[    4.495303] meson-mmc: card IN
[    4.508408] defendkey ff630218.defendkey: Reserved memory is not enough!
[    4.534077] Error: Driver 'spdif-dit' is already registered, aborting...
[    4.875459] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Left DAC
[    4.875462] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Left DAC -> LOLP_SEL_DACL -> Lineout left P switch
[    4.875464] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Left DAC
[    4.875465] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Left DAC -> LOLP_SEL_DACL_INV -> Lineout left P switch
[    4.875467] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Left DAC
[    4.875468] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Left DAC -> LOLN_SEL_DACL_INV -> Lineout left N switch
[    4.875470] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Left DAC
[    4.875472] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Left DAC -> LOLN_SEL_DACL -> Lineout left N switch
[    4.875473] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Right DAC
[    4.875475] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Right DAC -> LORP_SEL_DACR -> Lineout right P switch
[    4.875476] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Right DAC
[    4.875478] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Right DAC -> LORP_SEL_DACR_INV -> Lineout right P switch
[    4.875479] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Right DAC
[    4.875481] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Right DAC -> LORN_SEL_DACR_INV -> Lineout right N switch
[    4.875483] aml_codec_T9015 ff632000.t9015: ASoC: no source widget found for Right DAC
[    4.875484] aml_codec_T9015 ff632000.t9015: ASoC: Failed to add route Right DAC -> LORN_SEL_DACR -> Lineout right N switch
[    4.877105] aml_codec_T9015 ff632000.t9015: ASoC: mux Lineout left P switch has no paths
[    4.877109] aml_codec_T9015 ff632000.t9015: ASoC: mux Lineout left N switch has no paths
[    4.877112] aml_codec_T9015 ff632000.t9015: ASoC: mux Lineout right P switch has no paths
[    4.877115] aml_codec_T9015 ff632000.t9015: ASoC: mux Lineout right N switch has no paths
[    5.036371] pm-meson pm: Can't get switch_clk81
[    6.961185] cgroup: cgroup2: unknown option "nsdelegate"

@MichaIng
Copy link
Owner

MichaIng commented Mar 14, 2021

CEC errors are still there, which makes sense as CEC is not disabled by boot.ini but only not actively enabled. I.e. it was disabled before and I guess the error is coming from a kernel module which cannot find the "hdmirx" option.
Can you paste: lsmod

The other kernel errors can all be found in various other cases on Odroid and Armbian in combination with the Hardkernel kernel. Not beautiful (IMO) but likely not related .

Can you try to clock down the CPUs a bit? I don't think it helps, but it does not hurt to try it out:

sed -i 's/\${a73_freq\]/\${a73_freq}/' /boot/boot.ini # A typo in my previous boot.ini
G_CONFIG_INJECT 'setenv max_freq_a73[[:blank:]]' 'setenv max_freq_a73 "1608"' /boot/boot.ini
G_CONFIG_INJECT 'setenv max_freq_a53[[:blank:]]' 'setenv max_freq_a53 "1608"' /boot/boot.ini

@TheOriginalMrWolf
Copy link
Author

TheOriginalMrWolf commented Mar 16, 2021

Hi @MichaIng,

Applied the above as requested.

lsmod:

Module                  Size  Used by
xt_nat                 16384  3
xt_tcpudp              16384  9
xt_conntrack           16384  1
ipt_MASQUERADE         16384  4
nf_nat_masquerade_ipv4    16384  1 ipt_MASQUERADE
nf_conntrack_netlink    45056  0
xt_addrtype            16384  2
iptable_filter         16384  1
iptable_nat            16384  1
nf_conntrack_ipv4      20480  2
nf_defrag_ipv4         16384  1 nf_conntrack_ipv4
nf_nat_ipv4            16384  1 iptable_nat
nf_nat                 32768  3 xt_nat,nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack          143360  6 nf_conntrack_ipv4,nf_conntrack_netlink,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
br_netfilter           24576  0
bridge                155648  1 br_netfilter
stp                    16384  1 bridge
llc                    16384  2 bridge,stp
overlay                53248  2
mali_kbase            462848  0
i2c_meson_master       20480  0
ip_tables              32768  2 iptable_filter,iptable_nat
x_tables               49152  7 xt_nat,ip_tables,iptable_filter,xt_tcpudp,ipt_MASQUERADE,xt_addrtype,xt_conntrack
ipv6                  462848  95 bridge

Noticed that I can trigger the lockup if I insert the USB card reader slowly (presumably not a 'clean' insert). Not sure if this is related or another issue? Surely we shouldn't have a crash if a USB device has some issues on insert?!?

journalctl output:

Logfile attached. Click to expand!
[ 6876.579899] amlogic-new-usb2-v2 ffe09000.usb2phy: ---Recovery port(2) tuning for host cf(hub_event)--
[ 6876.584736] Unable to handle kernel NULL pointer dereference at virtual address 00000038
[ 6876.598233] pgd = ffffffc0a679c000
[ 6876.598317] [0000000000000038] *pgd=0000000000000000, *pud=0000000000000000
[ 6876.604966] Internal error: Oops: 96000045 [#1] PREEMPT SMP

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6876.604966@0] Internal error: Oops: 96000045 [#1] PREEMPT SMP
[ 6876.609048] Modules linked in: xt_nat xt_tcpudp xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink xt_addrtype iptable_filter iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack br_netfilter bridge stp llc overlay mali_kbase i2c_meson_master ip_tables x_tables ipv6
[ 6876.636618] CPU: 0 PID: 8355 Comm: kworker/0:2 Not tainted 4.9.241-arm64 #1
[ 6876.643707] Hardware name: Hardkernel ODROID-N2 (DT)
[ 6876.648863] Workqueue: usb_hub_wq hub_event
[ 6876.653157] task: ffffffc0ca2cd400 task.stack: ffffffc0a658c000
[ 6876.659235] PC is at set_usb_phy_host_tuning+0xf4/0x100
[ 6876.664600] LR is at set_usb_phy_host_tuning+0xec/0x100
[ 6876.669977] pc : [<ffffff800977f2a4>] lr : [<ffffff800977f29c>] pstate: 00000145
[ 6876.677506] sp : ffffffc0a658fc20
[ 6876.680974] x29: ffffffc0a658fc20 x28: ffffffc03d3a5c00
[ 6876.686433] x27: ffffffc03d3a5308 x26: 0000000000000003
[ 6876.691893] x25: ffffffc0b3225800 x24: 0000000000000002
[ 6876.697353] x23: 0000000000000000 x22: 0000000000000001
[ 6876.702812] x21: 0000000000000002 x20: ffffff80095d463c
[ 6876.708273] x19: ffffff800a816000 x18: 0000000000000001
[ 6876.713733] x17: 0000007f919dcbb8 x16: ffffff800913bbf8
[ 6876.719193] x15: ffffffffffffffff x14: 736f6820726f6620
[ 6876.724653] x13: 676e696e75742029 x12: 322874726f702079
[ 6876.730113] x11: 7265766f6365522d x10: 000000000000042a
[ 6876.735573] x9 : 6273752e30303039 x8 : 2d29746e6576655f
[ 6876.741033] x7 : 6275682866632074 x6 : ffffff800a736042
[ 6876.746492] x5 : 0000000000000000 x4 : 0000000000000000
[ 6876.751952] x3 : 0000000000000000 x2 : ffffffc0ca2cd400
[ 6876.757413] x1 : ffffffc0ca2cd400 x0 : 0000000000000038
[ 6876.762878]
               SP: 0xffffffc0a658fba0:
[ 6876.768157] fba0  00000001 00000000 00000000 00000000 00000002 00000000 b3225800 ffffffc0
[ 6876.776477] fbc0  00000003 00000000 3d3a5308 ffffffc0 3d3a5c00 ffffffc0 a658fc20 ffffffc0
[ 6876.784797] fbe0  0977f29c ffffff80 a658fc20 ffffffc0 0977f2a4 ffffff80 00000145 00000000
[ 6876.793117] fc00  095d463c ffffff80 ffffffff 00ffffff ffffffff ffffffff 00000000 00000000
[ 6876.801437] fc20  a658fc60 ffffffc0 095d463c ffffff80 00000001 00000000 ffffff95 00000000
[ 6876.809757] fc40  ffffff95 00000000 00000000 00000000 c7a80000 ffffffc0 3d3a5008 ffffffc0
[ 6876.818077] fc60  a658fd70 ffffffc0 090c39d4 ffffff80 3d3a5e08 ffffffc0 bb7720c0 ffffffc0
[ 6876.826397] fc80  cf3230c0 ffffffc0 cf328b00 ffffffc0 00000000 00000000 0a577000 ffffff80
[ 6876.834724]
               X1: 0xffffffc0ca2cd380:
[ 6876.840004] d380  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.848324] d3a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.856644] d3c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.864964] d3e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.873284] d400  00000002 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
[ 6876.881604] d420  a658c000 ffffffc0 00000002 0420c060 00000000 00000000 00000000 00000000
[ 6876.889924] d440  00000001 00000000 0000000b 00000000 001916b8 00000001 c86f8000 ffffffc0
[ 6876.898244] d460  00000000 00000001 00000078 00000078 00000078 00000000 09bd9498 ffffff80
[ 6876.906569]
               X2: 0xffffffc0ca2cd380:
[ 6876.911851] d380  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.920170] d3a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.928491] d3c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.936810] d3e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.945130] d400  00000002 00000000 ffffffff ffffffff 00000001 00000000 00000000 00000000
[ 6876.953451] d420  a658c000 ffffffc0 00000002 0420c060 00000000 00000000 00000000 00000000
[ 6876.961770] d440  00000001 00000000 0000000b 00000000 001916b8 00000001 c86f8000 ffffffc0
[ 6876.970090] d460  00000000 00000001 00000078 00000078 00000078 00000000 09bd9498 ffffff80
[ 6876.978448]
               X25: 0xffffffc0b3225780:
[ 6876.983784] 5780  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6876.992104] 57a0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.000424] 57c0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.008744] 57e0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.017064] 5800  b3222000 ffffffc0 00332e31 00000000 00000000 00000312 00000000 00000000
[ 6877.025384] 5820  00000000 00000000 00000000 00000000 00000000 00000000 c7a80000 ffffffc0
[ 6877.033704] 5840  c9d2c000 ffffffc0 00000507 00000000 00000000 00000000 00000000 00000000
[ 6877.042024] 5860  b3225860 ffffffc0 b3225860 ffffffc0 00000000 00000000 00000000 00000000
[ 6877.050351]
               X27: 0xffffffc03d3a5288:
[ 6877.055717] 5288  3d3a5288 ffffffc0 3d3a5288 ffffffc0 00000000 00000000 00000000 00000000
[ 6877.064037] 52a8  00000000 00000000 00000000 00000000 00000000 00000000 0a612958 ffffff80
[ 6877.072357] 52c8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.080677] 52e8  00000000 00000000 3d30d400 ffffffc0 00000000 00000000 00000000 00000000
[ 6877.088997] 5308  00000001 00000000 3d3a5310 ffffffc0 3d3a5310 ffffffc0 00000000 00000000
[ 6877.097317] 5328  00000000 00000000 00000003 00000000 00000000 00000000 00000000 00000000
[ 6877.105637] 5348  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.113957] 5368  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.122282]
               X28: 0xffffffc03d3a5b80:
[ 6877.127652] 5b80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.135971] 5ba0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.144291] 5bc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.280983@0] fc20: ffffffc0a658fc60 ffffff80095d463c 0000000000000001 00000000ffffff95
[ 6877.152611] 5be0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.160931] 5c00  3d3a6030 ffffffc0 c7a80000 ffffffc0 00000003 00000000 3d3990c0 ffffffc0
[ 6877.169250] 5c20  ca219b80 ffffffc0 ca219b40 ffffffc0 00000001 00000000 3d3a5c38 ffffffc0

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.288952@0] fc40: 00000000ffffff95 0000000000000000 ffffffc0c7a80000 ffffffc03d3a5008
[ 6877.177570] 5c40  3d3a5c38 ffffffc0 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.185890] 5c60  00000008 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 6877.194216]
               X29: 0xffffffc0a658fba0:
[ 6877.199584] fba0  00000001 00000000 00000000 00000000 00000002 00000000 b3225800 ffffffc0
[ 6877.207904] fbc0  00000003 00000000 3d3a5308 ffffffc0 3d3a5c00 ffffffc0 a658fc20 ffffffc0
[ 6877.216224] fbe0  0977f29c ffffff80 a658fc20 ffffffc0 0977f2a4 ffffff80 00000145 00000000
[ 6877.224544] fc00  095d463c ffffff80 ffffffff 00ffffff ffffffff ffffffff 00000000 00000000
[ 6877.232864] fc20  a658fc60 ffffffc0 095d463c ffffff80 00000001 00000000 ffffff95 00000000
[ 6877.241184] fc40  ffffff95 00000000 00000000 00000000 c7a80000 ffffffc0 3d3a5008 ffffffc0
[ 6877.249504] fc60  a658fd70 ffffffc0 090c39d4 ffffff80 3d3a5e08 ffffffc0 bb7720c0 ffffffc0
[ 6877.257824] fc80  cf3230c0 ffffffc0 cf328b00 ffffffc0 00000000 00000000 0a577000 ffffff80

[ 6877.267800] Process kworker/0:2 (pid: 8355, stack limit = 0xffffffc0a658c000)
[ 6877.275080] Stack: (0xffffffc0a658fc20 to 0xffffffc0a6590000)

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.296925@0] fc60: ffffffc0a658fd70 ffffff80090c39d4 ffffffc03d3a5e08 ffffffc0bb7720c0
[ 6877.280983] fc20: ffffffc0a658fc60 ffffff80095d463c 0000000000000001 00000000ffffff95
[ 6877.288952] fc40: 00000000ffffff95 0000000000000000 ffffffc0c7a80000 ffffffc03d3a5008
[ 6877.296925] fc60: ffffffc0a658fd70 ffffff80090c39d4 ffffffc03d3a5e08 ffffffc0bb7720c0
[ 6877.304898] fc80: ffffffc0cf3230c0 ffffffc0cf328b00 0000000000000000 ffffff800a577000
[ 6877.312871] fca0: 0000000000000000 ffffff800a593a80 0000000000000000 0000000000000000
[ 6877.320846] fcc0: ffffff8009bc1808 ffffff800a80fbd0 ffffffc03d3a5008 ffffffc03d3a5308
[ 6877.328818] fce0: ffffffc03d3a5308 ffffff800a611728 ffffffc03d3a5000 ffffff800a611758
[ 6877.336794] fd00: ffffffc0c7a800f8 ffffffc0c7a80000 ffffffc0c9d2c050 ffffffc03d3a6030
[ 6877.344765] fd20: ffffffc03d3a5e08 ffffffc0c9d2c000 ffffffc03d3a4e08 ffffffc0cf328b00
[ 6877.352739] fd40: ffffffc03d3a5c60 ffffffc03d3a5cfb 0000000200000064 ffffffc03d3a6000
[ 6877.360712] fd60: ffffffc03d3a5e08 ffffffc000010101 ffffffc0a658fdc0 ffffff80090c3d60
[ 6877.368686] fd80: ffffffc0bb7720c0 ffffffc0cf3230c0 ffffffc0cf3230c0 ffffffc0bb7720f0
[ 6877.376658] fda0: ffffffc0cf3230e0 ffffff800a577000 ffffffc0ca2cd400 ffffffc0cf3230c0
[ 6877.384632] fdc0: ffffffc0a658fe20 ffffff80090ca924 ffffffc03d2ad0c0 ffffff800a731960

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.304898@0] fc80: ffffffc0cf3230c0 ffffffc0cf328b00 0000000000000000 ffffff800a577000
[ 6877.392605] fde0: ffffffc0ca2cd400 ffffff8009eea768 ffffffc0bb7720c0 ffffff80090c3d08

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.312871@0] fca0: 0000000000000000 ffffff800a593a80 0000000000000000 0000000000000000

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.320846@0] fcc0: ffffff8009bc1808 ffffff800a80fbd0 ffffffc03d3a5008 ffffffc03d3a5308
[ 6877.400577] fe00: 0000000000000000 0000000000000000 0000000000000000 ffffffc0ca2cd400
[ 6877.408551] fe20: 0000000000000000 ffffff80090836c0 ffffff80090ca840 ffffffc03d2ad0c0

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.344765@0] fd20: ffffffc03d3a5e08 ffffffc0c9d2c000 ffffffc03d3a4e08 ffffffc0cf328b00
[ 6877.416523] fe40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 6877.424497] fe60: ffffffc0ca3ff000 0000000000000000 0000000000000000 ffffffc0bb7720c0
[ 6877.432471] fe80: 0000000000000000 0000000000000000 ffffffc0a658fe90 ffffffc0a658fe90
[ 6877.440445] fea0: ffffff8000000000 ffffffc000000000 ffffffc0a658feb0 ffffffc0a658feb0
[ 6877.448416] fec0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 6877.456389] fee0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.392605@0] fde0: ffffffc0ca2cd400 ffffff8009eea768 ffffffc0bb7720c0 ffffff80090c3d08
[ 6877.464363] ff00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 6877.472336] ff20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 6877.480310] ff40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 6877.488282] ff60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.400577@0] fe00: 0000000000000000 0000000000000000 0000000000000000 ffffffc0ca2cd400
[ 6877.496256] ff80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 6877.504229] ffa0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 6877.512203] ffc0: 0000000000000000 0000000000000005 0000000000000000 0000000000000000
[ 6877.520176] ffe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 6877.528141] Call trace:

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.408551@0] fe20: 0000000000000000 ffffff80090836c0 ffffff80090ca840 ffffffc03d2ad0c0
[ 6877.530751] Exception stack(0xffffffc0a658fa50 to 0xffffffc0a658fb80)
[ 6877.537336] fa40:                                   ffffff800a816000 0000007fffffffff
[ 6877.545312] fa60: ffffffc0a658fc20 ffffff800977f2a4 306566663a6d726f 6273752e30303039
[ 6877.553285] fa80: 0000000079687032 0000000080000400 ffffffc0a658fae0 ffffff80095d91d8
[ 6877.561258] faa0: ffffffc0a4113000 ffffffc0a658fb48 0000000000000000 ffffffc0a658fbdc
[ 6877.569231] fac0: 00000000000003e8 0000000080000400 ffffffc0a658fb70 ffffff80095230e0
[ 6877.577205] fae0: ffffffc0ca14b810 ffffff8009ee6938 0000000000000038 ffffffc0ca2cd400
[ 6877.585177] fb00: ffffffc0ca2cd400 0000000000000000 0000000000000000 0000000000000000
[ 6877.593152] fb20: ffffff800a736042 6275682866632074 2d29746e6576655f 6273752e30303039

Message from syslogd@NewPi at Mar 16 12:09:53 ...
 kernel:[ 6877.424497@0] fe60: ffffffc0ca3ff000 0000000000000000 0000000000000000 ffffffc0bb7720c0
[ 6877.601125] fb40: 000000000000042a 7265766f6365522d 322874726f702079 676e696e75742029
[ 6877.609098] fb60: 736f6820726f6620 ffffffffffffffff ffffff800913bbf8 0000007f919dcbb8
[ 6877.617076] [<ffffff800977f2a4>] set_usb_phy_host_tuning+0xf4/0x100
[ 6877.623492] [<ffffff80095d463c>] hub_event+0xc2c/0x1090
[ 6877.628865] [<ffffff80090c39d4>] process_one_work+0x1fc/0x530
[ 6877.634750] [<ffffff80090c3d60>] worker_thread+0x58/0x4e8
[ 6877.640303] [<ffffff80090ca924>] kthread+0xe4/0xf8
[ 6877.645241] [<ffffff80090836c0>] ret_from_fork+0x10/0x50
[ 6877.650703] Code: 91232021 97f6907e d5033e9f 9100e2e0 (b900001f)
[ 6877.656941] ---[ end trace 7440156809e6e474 ]---

@TheOriginalMrWolf
Copy link
Author

TheOriginalMrWolf commented Mar 16, 2021

Also, another interesting observation, I implemented a hardware watchdog as per https://wiki.odroid.com/odroid-n2/application_note/software/watchdog_timer. This works for the test scenarios however does not work for the above (system still dies & remains unavailable).

@MichaIng
Copy link
Owner

Dammit, I had a typo in the boot.ini fix 😄. Please try again with:

sed -i 's/\${a73_freq\]/\${a73_freq}/' /boot/boot.ini
reboot
cpu

The last command, after a reboot, should then show a max CPU frequency on all cores lowered to 1608 MHz. However, I do not expect this to help, just to rule it out.

@meveric
Do you have an idea what the issue might be here, or how to further debug? Looks like something to forward to Hardkernel, either kernel or hardware issue. The kernel didn't get any fix since your last build: https://github.com/hardkernel/linux/commits/odroidg12-4.9.y

@meveric
Copy link

meveric commented Mar 16, 2021

I remember that right at the beginning the N2 had terrible USB support, whit lots of similar issues as you describe.
It took HardKernel a very long time to fix it, although, I'd say with issues like this, you never know if they are "truly" fixed.
The bug for USB 1.1 devices on the ODROID C1 was never fixed.

Since this is very close to the hardware itself, USB controller, Kernel, etc. it's probably best to ask HardKernel directly.

I've seen similar reports on the coreelec forum, so it doesn't seem to be that uncommon.

@MichaIng
Copy link
Owner

There are a few other USB-related issues already, but none that matches this case good enough IMO. @TheOriginalMrWolf please report the issue at: https://github.com/hardkernel/linux/issues
I'll leave this one open to keep track.

@TheOriginalMrWolf
Copy link
Author

Hi @MichaIng,

Looks like something still not right with boot.ini - I'm expecting to see Max Freq == 1608 across the board:

cpu

 ─────────────────────────────────────────────────────
 DietPi CPU Info
 Use dietpi-config to change CPU / performance options
 ─────────────────────────────────────────────────────
 Architecture |     aarch64
 Temperature  |     32'C : 89'F (Cool runnings)
 Governor     |     interactive

                 Current Freq    Min Freq   Max Freq
 CPU0         |      1896 MHz      100 MHz    1896 MHz
 CPU1         |      1896 MHz      100 MHz    1896 MHz
 CPU2         |      1000 MHz      100 MHz    1800 MHz
 CPU3         |      1000 MHz      100 MHz    1800 MHz
 CPU4         |      1000 MHz      100 MHz    1800 MHz
 CPU5         |      1000 MHz      100 MHz    1800 MHz

[ INFO ] DietPi-CPU_info | CPU current frequency, may be affected by this script, due to the processing required to run it.

boot.ini is:

ODROIDN2-UBOOT-CONFIG

setenv board "odroidn2"

# Serial console device: /dev/tty1 is appended automatically
setenv condev "console=ttyS0,115200n8"

# Auto-detection of monitor settings based on your screen information: "false" or "true"
setenv display_autodetect "true"

# Toggle HDMI output: "false" or "true"
setenv monitor_onoff "false"

# Force SDR or HDR mode: "sdr", "hdr" or "auto"
setenv sdrmode "auto"

# Toggle CEC support: "false" or "true"
setenv cec "false"

# Toggle Wake-On-Lan support: 0=disable, 1=enable
setenv enable_wol "0"

# Device tree overlays
# See /boot/overlays/odroidn2/ for available overlays, e.g.:
# - hktft32: 3.2" TFT from HardKernel
# - hktft35: 3.5" TFT from HardKernel
#setenv overlays "spi0 i2c0 i2c1 uart0"

# HDMI mode resolution configuration
#    Symbol             | Resolution
# ----------------------+-------------
#    "480x272p60hz"     | 480x272 Progressive 60Hz
#    "480x320p60hz"     | 480x320 Progressive 60Hz
#    "480p60hz"         | 720x480 Progressive 60Hz
#    "576p50hz"         | 720x576 Progressive 50Hz
#    "720p60hz"         | 1280x720 Progressive 60Hz
#    "720p50hz"         | 1280x720 Progressive 50Hz
#    "1080p60hz"        | 1920x1080 Progressive 60Hz
#    "1080p50hz"        | 1920x1080 Progressive 50Hz
#    "1080p30hz"        | 1920x1080 Progressive 30Hz
#    "1080p24hz"        | 1920x1080 Progressive 24Hz
#    "1080i60hz"        | 1920x1080 Interlaced 60Hz
#    "1080i50hz"        | 1920x1080 Interlaced 50Hz
#    "2160p60hz"        | 3840x2160 Progressive 60Hz
#    "2160p50hz"        | 3840x2160 Progressive 50Hz
#    "2160p30hz"        | 3840x2160 Progressive 30Hz
#    "2160p25hz"        | 3840x2160 Progressive 25Hz
#    "2160p24hz"        | 3840x2160 Progressive 24Hz
#    "smpte24hz"        | 3840x2160 Progressive 24Hz SMPTE
#    "2160p60hz420"     | 3840x2160 Progressive 60Hz YCbCr 4:2:0
#    "2160p50hz420"     | 3840x2160 Progressive 50Hz YCbCr 4:2:0
#    "640x480p60hz"     | 640x480 Progressive 60Hz
#    "800x480p60hz"     | 800x480 Progressive 60Hz
#    "800x600p60hz"     | 800x600 Progressive 60Hz
#    "1024x600p60hz"    | 1024x600 Progressive 60Hz
#    "1024x768p60hz"    | 1024x768 Progressive 60Hz
#    "1280x800p60hz"    | 1280x800 Progressive 60Hz
#    "1280x1024p60hz"   | 1280x1024 Progressive 60Hz
#    "1360x768p60hz"    | 1360x768 Progressive 60Hz
#    "1440x900p60hz"    | 1440x900 Progressive 60Hz
#    "1600x900p60hz"    | 1600x900 Progressive 60Hz
#    "1600x1200p60hz"   | 1600x1200 Progressive 60Hz
#    "1680x1050p60hz"   | 1680x1050 Progressive 60Hz
#    "1920x1200p60hz"   | 1920x1200 Progressive 60Hz
#    "2560x1080p60hz"   | 2560x1080 Progressive 60Hz
#    "2560x1440p60hz"   | 2560x1440 Progressive 60Hz
#    "2560x1600p60hz"   | 2560x1600 Progressive 60Hz
#    "3440x1440p60hz"   | 3440x1440 Progressive 60Hz
setenv hdmimode "1080p60hz"

# Overscan percentage
# This value scales down the actual screen size by the percentage below.
# Valid range is 80 to 100.
setenv overscan "100"

# Output mode: "hdmi" or "dvi"
# "dvi" disables HDMI audio.
setenv voutmode "hdmi"

# HPD enable/disable option: "false" or "true"
setenv disablehpd "false"

# Hardkernel ODROID-VU7 support: "false" or "true"
# By default VU7 support is disabled
setenv disable_vu7 "true"

# Max CPU frequency for big A73 cores in MHz
# - Valid values on Odroid N2: 500, 667, 1000, 1200, 1398, 1512, 1608, 1704, 1800 (default), 1908, 2004
# - Valid values on Odroid N2+: 500, 667, 1000, 1200, 1398, 1512, 1608, 1704, 1800, 1908, 2016, 2100, 2208 (default), 2304, 2400
setenv max_freq_a73 "1608"

# Max CPU frequency for small A53 cores in MHz
# - Valid values on Odroid N2: 100, 250, 500, 667, 1000, 1200, 1398, 1512, 1608, 1704, 1896 (default), 1992
# - Valid values on Odroid N2+: 500, 667, 1000, 1200, 1398, 1512, 1608, 1704, 1800, 1908 (default), 2016
setenv max_freq_a53 "1608"

# Max CPU cores
# Note:
# CPU's 0 and 1 are the A53 (small cores)
# CPU's 2 to 5 are the A73 (big cores)
# Lowering this value disables only the bigger cores (the last cores).
# Valid range is 1 to 6.
setenv maxcpus "6"

### DO NOT EDIT ANYTHING BELOW THIS LINE ###

# Apply HDMI settings
if test "${display_autodetect}" = "true"; then hdmitx edid; fi
if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi

# Apply CEC setting
if test "${cec}" = "true"; then setenv cec_enable "hdmitx=cec3f"; fi

# Apply VU7 settings
if test "${disable_vu7}" = "false"; then setenv hid_quirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi

# Apply CPU frequencies if assigned
if test "${max_freq_a73}"; then setenv a73_freq "max_freq_a73=${max_freq_a73}"; fi
if test "${max_freq_a53}"; then setenv a53_freq "max_freq_a53=${max_freq_a53}"; fi

# Label for petitboot
setenv bootlabel "DietPi (64-bit)"

# Boot args
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs maxcpus=${maxcpus} voutmode=${voutmode} disablehpd=${disablehpd} enable_wol=${enable_wol} ${cec_enable} sdrmode=${sdrmode} consoleblank=0 logo=osd0,loaded monitor_onoff=${monitor_onoff} ${hid_quirks} ${cmode} overscan=${overscan} cvbscable=${cvbscable} ${a73_freq} ${a53_freq}"

# Set load addresses
setenv dtb_loadaddr "0x1000000"
setenv k_addr "0x1100000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x3700000"

# Load kernel, dtb and initrd
fatload mmc ${devno}:1 ${k_addr} Image.gz
fatload mmc ${devno}:1 ${dtb_loadaddr} meson64_odroid${variant}.dtb
fatload mmc ${devno}:1 ${initrd_loadaddr} uInitrd
fdt addr ${dtb_loadaddr}

# Load device tree overlays
if test "${overlays}"; then
        setenv dtbo_addr_r "0x11000000"
        fdt resize "16384"
        for overlay in ${overlays}; do
                fatload mmc ${devno}:1 ${dtbo_addr_r} overlays/${board}/${overlay}.dtbo && fdt apply ${dtbo_addr_r}
        done
fi

# Unzip the kernel
unzip ${k_addr} ${loadaddr}

# Boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}

@MichaIng
Copy link
Owner

Hmm, syntax looks right now. Could you check cat /proc/cmdline?
Or if that file does not exist: dmesg | grep 'Kernel command line'

Also to assure the frequencies from the Wiki/Wiki2 are still valid:

cat /sys/devices/system/cpu/cpufreq/policy[012]/scaling_available_frequencies

@TheOriginalMrWolf
Copy link
Author

@MichaIng

cat /proc/cmdline

root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro console=ttyS0,115200n8  no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=2160p60hz cvbsmode=576cvbs maxcpus=6 voutmode=hdmi disablehpd=false enable_wol=0  sdrmode=auto consoleblank=0 logo=osd0,loaded monitor_onoff=false   overscan=100 cvbscable=

cat /sys/devices/system/cpu/cpufreq/policy[012]/scaling_available_frequencies

100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1896000
100000 250000 500000 667000 1000000 1200000 1398000 1512000 1608000 1704000 1800000

@MichaIng
Copy link
Owner

Okay, frequencies are valid. Two ideas:

  1. It does not like when empty values are applied to boot arguments. Can you try:
    sed -i 's/ cvbscable=${cvbscable}//' /boot/boot.ini
    reboot
    cpu
    
  2. if test "${max_freq_a73}" does not work like it would in a shell script. Let's try ancient syntax that is also used in the Odroid Wiki:
    sed -i 's/test "${max_freq_a73}";/test "x${max_freq_a73}" != "x";/' /boot/boot.ini
    sed -i 's/test "${max_freq_a53}";/test "x${max_freq_a53}" != "x";/' /boot/boot.ini
    reboot
    cpu
    

@TheOriginalMrWolf
Copy link
Author

Hi @MichaIng - the 'ancient' syntax worked.
cpu

 ─────────────────────────────────────────────────────
 DietPi CPU Info
 Use dietpi-config to change CPU / performance options
 ─────────────────────────────────────────────────────
 Architecture |     aarch64
 Temperature  |     32'C : 89'F (Cool runnings)
 Governor     |     interactive

                 Current Freq    Min Freq   Max Freq
 CPU0         |      1608 MHz      100 MHz    1608 MHz
 CPU1         |      1608 MHz      100 MHz    1608 MHz
 CPU2         |      1512 MHz      100 MHz    1608 MHz
 CPU3         |      1512 MHz      100 MHz    1608 MHz
 CPU4         |      1512 MHz      100 MHz    1608 MHz
 CPU5         |      1512 MHz      100 MHz    1608 MHz

[ INFO ] DietPi-CPU_info | CPU current frequency, may be affected by this script, due to the processing required to run it.

Unfortunately this didn't help with the crashing.

@meveric
Copy link

meveric commented Mar 18, 2021

Have you tried switching the CPU governor?
Most of them are not very stable. Either try performance or ondemand rather than interactive.
Not sure if it helps with that particular issue though.

@TheOriginalMrWolf
Copy link
Author

Just using the default so far.

@MichaIng
Copy link
Owner

Default is ondemand on DietPi btw.

And @meveric you were right about using test "x${var}" != "x". I found some uboot docs stating that test "${var}" works just the same, like it does in shells, but obviously that is not true for at least this version of uboot.

@MichaIng MichaIng changed the title Hard lockup on USB drive insert/remove Odroid N2 | Hard lockup on USB drive insert/remove May 7, 2021
@Joulinar
Copy link
Collaborator

@MichaIng
is this still an open issue? We have a user on the forum reporting issues if he connect a HDD via USB. https://dietpi.com/phpbb/viewtopic.php?p=41366#p41366

@MichaIng
Copy link
Owner

I guess it is a persistent issue with some USB drives and N2, though I personally didn't run into any with my N2+ so far. Experimenting with mainline kernel is on my ToDo around new years eve when I'm back home (currently family visits).

@MichaIng MichaIng added this to the v8.1 milestone Jan 29, 2022
@MichaIng
Copy link
Owner

New image ready for testing based on mainline kernel: https://dietpi.com/downloads/images/testing/
Hopefully it makes USB drive usage more robust.

@MichaIng
Copy link
Owner

MichaIng commented Feb 1, 2022

Referring to the thread for testing the new image and closing this one: #5039

@MichaIng MichaIng closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants