ophub/amlogic-s9xxx-armbian

H96 max x3 kernel panic and not work wifi/ethernet

HelferP opened this issue · 32 comments

Standard chat template, no routine, no chat.
标准聊天模板,无套路不聊天。

Device Information | 设备信息

  • SOC: [e.g. S905x3]
  • Model [H96 max x3]

Armbian Version | 系统版本

  • Kernel Version: [5.15.84]

  • Release: [jammy]

Describe the bug | 问题描述
Describe the problem in detail and attach screenshots if necessary.
详细描述问题,并在必要时附上屏幕截图。

The first download is good, but WiFi does not work, Ethernet does not receive the DHCP address. After rebooting, I get Kernel Panic and no longer loads. See Screen. I use boot-u-boot-x96maxplus.bin and dtb-meson-sm1-h96-max-x3.dtb
Armbian_23.02.0_amlogic_s905x3_jammy_5.15.84_server_2022.12.21.img.gz

IMG_1932
IMG_1935
IMG_1937
IMG_1938
IMG_1950
IMG_1952

I re-downloaded the image to SD and replaced in two lines in meson-sm1-h96-max-x3.dtb see screenshot. After that, ethernet was able to get an IP from dhcp. Wi-Fi still does not work, it sees access points, but does not connect to them.

Saw this while uploading:
[ 35.628811] meson-gx-mmc ffe03000.sd: unaligned sg len 552 blksize 512, disabling descriptor DMA for transfer

Reboot also causes kernel panic
Maybe this will help:https://paste.armbian.com/xasidukisu

ff3f0000

ophub commented

https://github.com/unifreq/linux-5.15.y/blob/main/arch/arm64/boot/dts/amlogic/meson-sm1-h96-max-x3.dts

Snip20221224_3

You submit the changes to the upstream kernel source code, so that you can use the correct configuration in the future.
What chip is your wifi.

изображение
Yes, but you still need to remove the line.
For example, you can take the code from HK1. I copied from there.
изображение
There are two problems left to solve:

  1. kernel panic after reboot.
  2. wifi

>>What chip is your wifi.
HCY6355

>>I see that there is support for your wifi in the source code.
Yes, but for some reason it does not work correctly. Just like ethernet until I fixed the code.

>>You can test 5.4/5.10/5.15/6.0.
I can, but I don't know where to get images with these kernels.

>>Submit your changes to the upstream kernel source code, and submit all 4 kernel repositories.
I'm sorry, but I don't know how to do this.

ophub commented

meson-sm1-h96-max-x3-oc.dtb.zip

Download, decompress into dtb, overwrite the file with the same name in the /boot/dtb/amlogic directory, restart the test to see if it can start normally, and whether the wired network is normal.

meson-sm1-h96-max-x3-oc.dtb.zip

not work, only black screen.

Should I replace the boot.sd and boot.usb files?

ophub commented

No need, just replace dtb
I see that the modification result is the same as your feedback.

Snip20221224_6

Snip20221224_7

I see that the modification result is the same as your feedback.

Yes, but with this file it doesn't boot

ophub commented

meson-sm1-h96-max-x3.dtb.zip

try this is 5.15.85 kernel dtb

try this is 5.15.85 kernel dtb

I tried updating the kernel to 5.15.85 and used this file. ethrnet works, wifi still can't connect to access point. After reboot also kernel panic.

Maybe some logs are needed to understand what could be the problem?

ophub commented

Update to 5.10/5.4 kernel, and upload this file, try other kernels to see if it works.

ophub commented

armbian-update -k 5.4.228

You update this kernel. When I submitted the dts modification just now, I found that this was correct before. Try this to see if there is a kernel panic.

armbian-update -k 5.4.228

You update this kernel. When I submitted the dts modification just now, I found that this was correct before. Try this to see if there is a kernel panic.

Yes, I checked, there is no kernel panic on this kernel. At least it has rebooted several times.
WiFi also can't get ip

ophub commented

Wired network is normal, use wired

Wired network is normal, use wired

Bluetooth also finds devices but does not connect to them.

There is no ethernet where I want to use it, only WiFi is possible.

After installing BT in armbian-config, it stopped rebooting, after turning off the power it loads normally. Now I deleted BT and everything is fine again.

Possibly the wrong driver?

ophub commented

You mean bluetooth is not working but wireless is working?

You mean bluetooth is not working but wireless is working?

WiFi and Bluetooth find other devices, but cannot connect to them.
Dmesg contain this errors:
image

ophub commented

Unable to connect to wireless network in armbian-config? Can't connect using commands? Show me what the error log says.

ophub commented

dmesg|grep brcm
dmesg|grep Bluetooth

Unable to connect to wireless network in armbian-config? Can't connect using commands? Show me what the error log says.


Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7434] device
(wlan0): Activation: starting connection 'HOMEWIFI' (e077d37d-dbc9-4fda-8c5f-463f7465f536)
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7443] audit: op="connection-add-activate" uuid="e077d37d-dbc9-4fda-8c5f-463f7465f536" name="HOMEWIFI" pid=2255 uid=0 result="success"
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7469] device (wlan0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7487] device (wlan0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7499] device (wlan0): Activation: (wifi) access point 'HOMEWIFI' has security, but secrets are required.
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7500] device (wlan0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7549] device (wlan0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7561] device (wlan0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7580] device (wlan0): Activation: (wifi) connection 'HOMEWIFI' has security, and secrets exist.  No new secrets needed.
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7775] Config: added 'ssid' value 'HOMEWIFI'
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7776] Config: added 'scan_ssid' value '1'
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7777] Config: added 'bgscan' value 'simple:30:-70:86400'
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7777] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK'
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7778] Config: added 'auth_alg' value 'OPEN'
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.7778] Config: added 'psk' value '<hidden>'
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.8618] device (wlan0): supplicant interface state: disconnected -> scanning
Dec 24 20:50:38 armbian NetworkManager[847]: <info>  [1671889838.8620] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Dec 24 20:50:41 armbian wpa_supplicant[904]: wlan0: Trying to associate with SSID 'HOMEWIFI'
Dec 24 20:50:41 armbian NetworkManager[847]: <info>  [1671889841.7096] device (wlan0): supplicant interface state: scanning -> associating
Dec 24 20:50:41 armbian NetworkManager[847]: <info>  [1671889841.7097] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Dec 24 20:50:44 armbian wpa_supplicant[904]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Dec 24 20:50:44 armbian NetworkManager[847]: <info>  [1671889844.4310] device (wlan0): supplicant interface state: associating -> disconnected
Dec 24 20:50:44 armbian NetworkManager[847]: <info>  [1671889844.4312] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Dec 24 20:50:44 armbian NetworkManager[847]: <info>  [1671889844.5357] device (wlan0): supplicant interface state: disconnected -> scanning
Dec 24 20:50:44 armbian NetworkManager[847]: <info>  [1671889844.5358] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Dec 24 20:50:47 armbian wpa_supplicant[904]: wlan0: Trying to associate with SSID 'HOMEWIFI'
Dec 24 20:50:47 armbian NetworkManager[847]: <info>  [1671889847.2858] device (wlan0): supplicant interface state: scanning -> associating
Dec 24 20:50:47 armbian NetworkManager[847]: <info>  [1671889847.2860] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Dec 24 20:50:49 armbian wpa_supplicant[904]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Dec 24 20:50:49 armbian NetworkManager[847]: <info>  [1671889849.9508] device (wlan0): supplicant interface state: associating -> disconnected
Dec 24 20:50:49 armbian NetworkManager[847]: <info>  [1671889849.9510] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Dec 24 20:50:50 armbian NetworkManager[847]: <info>  [1671889850.4456] device (wlan0): supplicant interface state: disconnected -> scanning
Dec 24 20:50:50 armbian NetworkManager[847]: <info>  [1671889850.4457] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Dec 24 20:50:53 armbian wpa_supplicant[904]: wlan0: Trying to associate with SSID 'HOMEWIFI'
Dec 24 20:50:53 armbian NetworkManager[847]: <info>  [1671889853.2191] device (wlan0): supplicant interface state: scanning -> associating
Dec 24 20:50:53 armbian NetworkManager[847]: <info>  [1671889853.2193] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Dec 24 20:50:55 armbian wpa_supplicant[904]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Dec 24 20:50:55 armbian NetworkManager[847]: <info>  [1671889855.8909] device (wlan0): supplicant interface state: associating -> disconnected
Dec 24 20:50:55 armbian NetworkManager[847]: <info>  [1671889855.8910] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Dec 24 20:50:56 armbian NetworkManager[847]: <info>  [1671889856.9488] device (wlan0): supplicant interface state: disconnected -> scanning
Dec 24 20:50:56 armbian NetworkManager[847]: <info>  [1671889856.9489] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> scanning
Dec 24 20:50:59 armbian wpa_supplicant[904]: wlan0: Trying to associate with SSID 'HOMEWIFI'
Dec 24 20:50:59 armbian NetworkManager[847]: <info>  [1671889859.6681] device (wlan0): supplicant interface state: scanning -> associating
Dec 24 20:50:59 armbian NetworkManager[847]: <info>  [1671889859.6682] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Dec 24 20:51:02 armbian wpa_supplicant[904]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:00:00:00:00:00 status_code=16
Dec 24 20:51:02 armbian wpa_supplicant[904]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="HOMEWIFI" auth_failures=1 duration=10 reason=CONN_FAILED
Dec 24 20:51:02 armbian NetworkManager[847]: <info>  [1671889862.3476] device (wlan0): supplicant interface state: associating -> disconnected
Dec 24 20:51:02 armbian NetworkManager[847]: <info>  [1671889862.3478] device (p2p-dev-wlan0): supplicant management interface state: associating -> disconnected
Dec 24 20:51:03 armbian NetworkManager[847]: <warn>  [1671889863.9291] device (wlan0): Activation: (wifi) association took too long
Dec 24 20:51:03 armbian NetworkManager[847]: <info>  [1671889863.9292] device (wlan0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Dec 24 20:51:03 armbian NetworkManager[847]: <warn>  [1671889863.9308] device (wlan0): Activation: (wifi) asking for new secrets
Dec 24 20:51:03 armbian NetworkManager[847]: <warn>  [1671889863.9320] device (wlan0): no secrets: No agents were available for this request.
Dec 24 20:51:03 armbian NetworkManager[847]: <info>  [1671889863.9322] device (wlan0): state change: need-auth -> failed (reason 'no-secrets', sys-iface-state: 'managed')
Dec 24 20:51:03 armbian NetworkManager[847]: <warn>  [1671889863.9343] device (wlan0): Activation: failed for connection 'HOMEWIFI'
Dec 24 20:51:03 armbian NetworkManager[847]: <info>  [1671889863.9356] device (wlan0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Dec 24 20:51:10 armbian NetworkManager[847]: <info>  [1671889870.3403] device (wlan0): supplicant interface state: disconnected -> inactive
Dec 24 20:51:10 armbian NetworkManager[847]: <info>  [1671889870.3404] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> inactive

dmesg|grep brcm
dmesg|grep Bluetooth

image

There are still such errors on the boot:

image

image

image

image

image

image

image

ophub commented

From the log, your wireless and bluetooth are normally driven

You're right. I found the wifi issue.
It was in setting my router to openwrt. Because of this setting, the box did not connect, while the rest of the devices, including the Raspberry Pi Zero W, work fine. In the picture is the line that caused the problem, it need delete:
изображение

I also think I solved the kernel panic problem on the 5.15.y kernel. I compared two dts from 5.4.228 and 5.15.85, found a discrepancy, added them in 5.15.85 and now I don't get kernel panic on reboot.
Add in opp-table from 5.5.228 dtb

	       opp-100000000 {
			status = "disabled";
		};

		opp-250000000 {
			status = "disabled";
		};

		opp-500000000 {
			status = "disabled";
		};

		opp-750000000 {
			opp-hz = <0x00 0x2cb41780>;
			opp-microvolt = <0xb71b0>;
		};

I'm still testing this and not completely sure.

Thank you very much for your help and great work!!!

ophub commented

Ok, your tweak feedback has been submitted to the kernel repository

added them in 5.15.85 and now I don't get kernel panic on reboot.

can u show ur box's cpufreq-info here?

added them in 5.15.85 and now I don't get kernel panic on reboot.

can u show ur box's cpufreq-info here?


cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 50.0 us.
  hardware limits: 750 MHz - 1.91 GHz
  available frequency steps: 750 MHz, 1000 MHz, 1.20 GHz, 1.40 GHz, 1.50 GHz, 1.61 GHz, 1.70 GHz, 1.80 GHz, 1.91 GHz
  available cpufreq governors: userspace, conservative, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 1.40 GHz and 1.91 GHz.
                  The governor "schedutil" may decide which speed to use
                  within this range.
  current CPU frequency is 1.91 GHz (asserted by call to hardware).
analyzing CPU 1:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 50.0 us.
  hardware limits: 750 MHz - 1.91 GHz
  available frequency steps: 750 MHz, 1000 MHz, 1.20 GHz, 1.40 GHz, 1.50 GHz, 1.61 GHz, 1.70 GHz, 1.80 GHz, 1.91 GHz
  available cpufreq governors: userspace, conservative, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 1.40 GHz and 1.91 GHz.
                  The governor "schedutil" may decide which speed to use
                  within this range.
  current CPU frequency is 1.40 GHz (asserted by call to hardware).
analyzing CPU 2:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 50.0 us.
  hardware limits: 750 MHz - 1.91 GHz
  available frequency steps: 750 MHz, 1000 MHz, 1.20 GHz, 1.40 GHz, 1.50 GHz, 1.61 GHz, 1.70 GHz, 1.80 GHz, 1.91 GHz
  available cpufreq governors: userspace, conservative, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 1.40 GHz and 1.91 GHz.
                  The governor "schedutil" may decide which speed to use
                  within this range.
  current CPU frequency is 1.40 GHz (asserted by call to hardware).
analyzing CPU 3:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 50.0 us.
  hardware limits: 750 MHz - 1.91 GHz
  available frequency steps: 750 MHz, 1000 MHz, 1.20 GHz, 1.40 GHz, 1.50 GHz, 1.61 GHz, 1.70 GHz, 1.80 GHz, 1.91 GHz
  available cpufreq governors: userspace, conservative, powersave, ondemand, performance, schedutil
  current policy: frequency should be within 1.40 GHz and 1.91 GHz.
                  The governor "schedutil" may decide which speed to use
                  within this range.
  current CPU frequency is 1.40 GHz (asserted by call to hardware).

Ok, your tweak feedback has been submitted to the kernel repository

Tested for several days. After a while, I tried to reboot the device and got the kernel panic again. Now additionally disabled frequencies higher than the maximum specified in the processor specification. I've been testing for a day and have never received a kernel panic yet.

		opp-100000000 {
			status = "disabled";
		};

		opp-250000000 {
			status = "disabled";
		};

		opp-500000000 {
			status = "disabled";
		};

		opp-750000000 {
			opp-hz = <0x00 0x2cb41780>;
			opp-microvolt = <0xb71b0>;
		};

		opp-2016000000 {
			status = "disabled";
		};

		opp-2100000000 {
			status = "disabled";
					};

ubuntu 18是哪个版本支持的,请问历史版本去哪里下载