5 5
martinayotte

H6 Famous Reboot problem

Recommended Posts

40 minutes ago, froezus said:

You need also to rmmod the MAC module (something like dwmac-sun8i) it's him who manage the phy-supply.

I've compiled a new kernel with DWMAC-SUN8I as module, and it seems to be the trick, even no needs to do manual "rmmod", simply "reboot", using NetworkManager on my OPiOnePlus.

I will verify that it still true with "old school /etc/network/interface" , and then I will also confirm that it is working the same way on OPi3.

 

This would means something is wrong in the cleanup when built-in in the kernel ...

Share this post


Link to post
Share on other sites

If rtl ephy is powered by two power supplies, they need to be enabled at the same time, otherwise it will fail (maybe not always, but it may). I've seen DTS files flying around that have this wrong and insert power up delays in wrong places. I only work on Orange Pi 3 though, so I have no concrete input on what other baords do.

Share this post


Link to post
Share on other sites

Configuring a reset line to the phy may also help, if it is connected to some GPIO on the SoC.

Share this post


Link to post
Share on other sites
2 minutes ago, megi said:

I only work on Orange Pi 3 though, so I have no concrete input on what other baords do.

But do you have the symptom if you are using "old school /etc/network/interface" on your OPi3 ?

 

Share this post


Link to post
Share on other sites
19 minutes ago, martinayotte said:

I will verify that it still true with "old school /etc/network/interface" , and then I will also confirm that it is working the same way on OPi3.

I seems the workaround is working for "old school /etc/network/interface", and this is also true for OPi3.

 

Even if we don't have complete understanding, I think I will commit the DWMAC-SUN8I change in defconfig into Armbian ...

Share this post


Link to post
Share on other sites
1 hour ago, froezus said:

You need also to rmmod the MAC module (something like dwmac-sun8i) it's him who manage the phy-supply.

 

rmmod phy && rmmod mac
modprobe mac (should also modprobe the phy)

 

 

hmm current modules lis ( below ),

the dwmac-sun8i reports : "  rmmod: ERROR: Module dwmac_sun8i is builtin. " 

# thus not a module as it seems

root@orangepioneplus:~# lsmod
Module                  Size  Used by
snd_soc_hdmi_codec     16384  0
zstd                   16384  4
snd_soc_core          126976  1 snd_soc_hdmi_codec
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm                94208  3 snd_soc_hdmi_codec,snd_soc_core,snd_pcm_dmaengine
snd_timer              32768  1 snd_pcm
snd                    57344  4 snd_soc_hdmi_codec,snd_timer,snd_soc_core,snd_pcm
soundcore              16384  1 snd
dw_hdmi_cec            16384  0
dw_hdmi_i2s_audio      16384  0
cpufreq_dt             16384  0
sun50i_h6_ths          16384  0
thermal_sys            65536  2 cpufreq_dt,sun50i_h6_ths
zram                   28672  2
realtek                20480  1

 

Ran out of time due to unexpected visit ... 

more tomorrow therefore.

cheers!

Share this post


Link to post
Share on other sites
3 minutes ago, dolphs said:

the dwmac-sun8i reports : "  rmmod: ERROR: Module dwmac_sun8i is builtin. "

If you read my previous posts, it require to recompile the kernel with DWMAC-SUN8I as module.

Since I've done it and tested succesffuly, I've just committed the change in Armbian, so simply redo a new build ...

Share this post


Link to post
Share on other sites
8 hours ago, martinayotte said:

I've just committed the change in Armbian, so simply redo a new build ...


Works for me!

 

Spoiler

$ ansible orangepioneplus.angrybear2.local -m reboot --become
orangepioneplus.angrybear2.local | CHANGED => {
    "changed": true,
    "elapsed": 57,
    "rebooted": true
}
 

 

Share this post


Link to post
Share on other sites
11 hours ago, martinayotte said:

If you read my previous posts, it require to recompile the kernel with DWMAC-SUN8I as module.

Since I've done it and tested succesffuly, I've just committed the change in Armbian, so simply redo a new build ...

 

yes I did not browse carefully enough, apologies.

However therefore the ghost vanished from our machines ( OpiOnePlus and Opi3 ),

Suppose configuring this kernel setting from built in to Module is not a bad idea in general?

 

2 hours ago, lanefu said:

Works for me!

I can concur, 

well done all, appreciate your efforts!

Share this post


Link to post
Share on other sites
30 minutes ago, Werner said:

Awesome news. And everyone can still be an old school guy using interfaces file :wub::lol:

 

certainly just execute:

root@orangepioneplus:~# systemctl disable NetworkManager

root@orangepioneplus:~#ip a |grep ether
link/ether 00:2d:fd:1e:f1:e1 brd ff:ff:ff:ff:ff:ff  # take note of MAC address

root@orangepioneplus:~#vi /etc/network/interfaces

## add or update in to /etc/network/interfaces.d/
auto eth0
iface eth0 inet static
address 192.168.10.200
netmask 255.255.255.0
gateway 192.168.10.1
dns-nameservers 192.168.10.2 192.168.10.1
hwaddress ether 00:2d:fd:1e:f1:e1


root@orangepioneplus:~# reboot   
# wait 5 secs and reconnect to IP address set

root@orangepioneplus:~# cat /etc/network/interfaces
# tada!

 

you guys don't even realise how perfect this weekend started,

once again cheers for all your efforts, it is appreciated a lot!

Share this post


Link to post
Share on other sites
8 minutes ago, froezus said:

is there a Dev branch of 5.1 ?

Armbian still using Megous 5.0.y branch, but I've personally switched, just for test, to Megous 5.1.y.

Share this post


Link to post
Share on other sites

@martinayotte how to change repo? I have tried but build failed once i change branch  in source config. Also while testing @megous kernel i noticed that cpu max freq was 1.49, i guess there is some patch for dtb file which needs to be applied durring compile of dbt  as it had made that scale down change in freq

Share this post


Link to post
Share on other sites
8 minutes ago, kexec said:

I have tried but build failed once i change branch  in source config.

Right, once switched, there are few patches fo fix to get the build completed ...

8 minutes ago, kexec said:

kernel i noticed that cpu max freq was 1.49

I've not seen that, both 5.0.y and 5.1.y have the OPP up to 1.80MHz, check with "cpufreq-info" ...

Share this post


Link to post
Share on other sites
21 hours ago, dolphs said:

 

certainly just execute:


root@orangepioneplus:~# systemctl disable NetworkManager

root@orangepioneplus:~#ip a |grep ether
link/ether 00:2d:fd:1e:f1:e1 brd ff:ff:ff:ff:ff:ff  # take note of MAC address

root@orangepioneplus:~#vi /etc/network/interfaces

## add or update in to /etc/network/interfaces.d/
auto eth0
iface eth0 inet static
address 192.168.10.200
netmask 255.255.255.0
gateway 192.168.10.1
dns-nameservers 192.168.10.2 192.168.10.1
hwaddress ether 00:2d:fd:1e:f1:e1


root@orangepioneplus:~# reboot   
# wait 5 secs and reconnect to IP address set

root@orangepioneplus:~# cat /etc/network/interfaces
# tada!

 

you guys don't even realise how perfect this weekend started,

once again cheers for all your efforts, it is appreciated a lot!

You don't need to specify hwaddress if you use kernel 5.0 or later, as the changing mac address was addressed.

Share this post


Link to post
Share on other sites
1 hour ago, martinayotte said:

What do you means ?

Im compile last uboot for opi3 and have old problem. Put reboot = poweroff . Again power unplug.

Only me problem?

Share this post


Link to post
Share on other sites

Sorry, just buld and work reboot, but what im get this problem megous rep and last development uboot, I do not understand.

Many thanks for your work guys.

Armbian development kernel, dtb, modules for H6 great work to Arch Linux.

PS

dmesg bionic opi3

Quote

[    2.008272] sun50i-de2-bus 1000000.display-engine: Error couldn't map SRAM to device
[    2.008652] sun4i-usb-phy 5100400.phy: Couldn't request ID GPIO
[    2.008888] sun50i-usb3-phy 5210000.phy: failed to get phy clock

[    2.169352] sun4i-usb-phy 5100400.phy: Couldn't request ID GPIO
 

little things

Share this post


Link to post
Share on other sites
On 4/10/2019 at 3:28 AM, dolphs said:

As I dont have a " USB To TTL Serial UART STC Cable " yet I tried the HDMI output instead which reveals no output to screen ( also not after power cycling the device: WIP I suppose ).

Yet I will await the nightly image, although I do not expect miracles to happen as what would be the different from images just built  ....

 

 

Read an interesting commit in kernel 5.0.8 rgd H6 although not related to reboot issue, interesting fix imho rgd HDMI.

Would it be possible to incorporate this kernel in dev images ( which can be build manually ) please?

 

<snip snip>

    drm/sun4i: DW HDMI: Lower max. supported rate for H6
        commit cd9063757a227cf31ebf5391ccda2bf583b0806e upstream.
    
    Currently resolutions with pixel clock higher than 340 MHz don't work
    with H6 HDMI controller. They just produce a blank screen.
    
    Limit maximum pixel clock rate to 340 MHz until scrambling is supported.
    
    Cc: stable@vger.kernel.org # 5.0
    Fixes: 40bb9d3147b2 ("drm/sun4i: Add support for H6 DW HDMI controller")

<snip snip>
    
  

 

Share this post


Link to post
Share on other sites
38 minutes ago, dolphs said:

 

 

Read an interesting commit in kernel 5.0.8 rgd H6 although not related to reboot issue, interesting fix imho rgd HDMI.

Would it be possible to incorporate this kernel in dev images ( which can be build manually ) please?

 


<snip snip>

    drm/sun4i: DW HDMI: Lower max. supported rate for H6
        commit cd9063757a227cf31ebf5391ccda2bf583b0806e upstream.
    
    Currently resolutions with pixel clock higher than 340 MHz don't work
    with H6 HDMI controller. They just produce a blank screen.
    
    Limit maximum pixel clock rate to 340 MHz until scrambling is supported.
    
    Cc: stable@vger.kernel.org # 5.0
    Fixes: 40bb9d3147b2 ("drm/sun4i: Add support for H6 DW HDMI controller")

<snip snip>
    
  

 

 

i guess everyone can do this, it is just time question. If you are more experienced on that subject then you do it faster.

 

have you seen this post ?

 

Share this post


Link to post
Share on other sites

sunxi64-dev is currently based on megous orangepi-5.0 kernel branch and gets frequently upstream patches merged.  So if this patch makes it into mainline kernel it will become available in this branch as well.

Share this post


Link to post
Share on other sites
dwmac-sun8i 5020000.ethernet eth0: Could not attach to PHY
dwmac-sun8i 5020000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)

 

This error is coming up. I have tried downgrading and regardless getting the same error.

 

eth0 is not working anymore.

Share this post


Link to post
Share on other sites
34 minutes ago, kissste said:

This error is coming up.

Which images are you using ? Because we found a workaround last Friday : compile kernel with DWMAC-SUN8I as module .

Share this post


Link to post
Share on other sites
5 5