Odroid C2 mainline kernel support

waka324
Posts: 4
Joined: Thu Jul 26, 2018 10:20 am
languages_spoken: english
ODROIDs: odroid-c2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by waka324 » Thu Jan 24, 2019 6:30 pm

Has anyone been seeing issues with long-running instances where the ethernet connection becomes VERY latency prone? I'm seeing this behavior after a couple days of runtime where ssh sessions and ping latency swings from normal (1-2ms) to crazy (multiple seconds). I found that using "ip link set dev <dev> down; ip link set dev <dev> up" while on serial was able to restore normal operation (at least temporarily). Currently running 4.19.15 (patchless).

Thanks in advance.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Fri Jan 25, 2019 5:54 am

waka324 wrote:
Thu Jan 24, 2019 6:30 pm
Has anyone been seeing issues with long-running instances where the ethernet connection becomes VERY latency prone? I'm seeing this behavior after a couple days of runtime where ssh sessions and ping latency swings from normal (1-2ms) to crazy (multiple seconds). I found that using "ip link set dev <dev> down; ip link set dev <dev> up" while on serial was able to restore normal operation (at least temporarily). Currently running 4.19.15 (patchless).

Thanks in advance.
This is related to the very thing Brad was just discussing in the previous post:
brad wrote:
Thu Jan 24, 2019 5:11 pm
Energy Efficient Ethernet (EEE) is no longer disabled in some newer kernels ... https://git.kernel.org/pub/scm/linux/ke ... 3fa639d1c9
The new kernel 4.20.something has a proper fix to the problem, whereas slightly earlier kernels have a hack fix that results in more power consumption. It sounds like the kernel you're running has neither the proper fix nor the hack fix. The fix should have been backported to the 4.19 series, you should be able to update to a newer kernel without having to apply any patch yourself.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Fri Jan 25, 2019 8:12 am

brad wrote:
Thu Jan 24, 2019 5:11 pm
Energy Efficient Ethernet (EEE) is no longer disabled in some newer kernels :) This might provide some additional benefits for power saving for Ethernet be it 10, 100 or 1000. I don't have easy tools to check :( https://git.kernel.org/pub/scm/linux/ke ... 3fa639d1c9
Just checked and the difference between 10baseT and ifconfig eth0 down is 65 milliwatts, which is about the same as what it used to be under the 3.14 kernel.

waka324
Posts: 4
Joined: Thu Jul 26, 2018 10:20 am
languages_spoken: english
ODROIDs: odroid-c2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by waka324 » Fri Jan 25, 2019 1:32 pm

campbell wrote:
Fri Jan 25, 2019 5:54 am
The fix should have been backported to the 4.19 series, you should be able to update to a newer kernel without having to apply any patch yourself.
Reading the patch notes, this sounds very similar to what I've been seeing. I haven't seen this patch backported yet, but I made a patch for my kernel and I'm trying it out now. Thanks!

juanjo1024
Posts: 2
Joined: Sat Sep 02, 2017 10:07 pm
languages_spoken: english
Contact:

Re: Odroid C2 mainline kernel support

Unread post by juanjo1024 » Sat Jan 26, 2019 10:12 am

USB still not working properly, right ?

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Sat Jan 26, 2019 12:00 pm

juanjo1024 wrote:
Sat Jan 26, 2019 10:12 am
USB still not working properly, right ?
USB hotplug is not working properly. As long at at least one device is plugged in, from boot onward, then it's fine.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Sun Jan 27, 2019 5:12 am

campbell wrote:
Fri Jan 25, 2019 8:12 am
brad wrote:
Thu Jan 24, 2019 5:11 pm
Energy Efficient Ethernet (EEE) is no longer disabled in some newer kernels :) This might provide some additional benefits for power saving for Ethernet be it 10, 100 or 1000. I don't have easy tools to check :( https://git.kernel.org/pub/scm/linux/ke ... 3fa639d1c9
Just checked and the difference between 10baseT and ifconfig eth0 down is 65 milliwatts, which is about the same as what it used to be under the 3.14 kernel.
Finally had time to do a more thorough set of measurements. Common conditions: 4.20.4 kernel, 28 C core temp, 408 MHz RAM clock, ondemand governor, USB disabled in device tree, 3 foot ethernet cable

10baseT:
Link down (ifconfig eth0 down): 580 mW
Link up but disconnected: 755 mW (+175 mW re min)
Link up: 645 mW (+65 mW re min)

100baseTX:
Link down: 587 mW (+7 mW re min)
Link up but disconnected: 763 mW (+183 mW re min)
Link up: 675 mW (+95 mW re min)

Gbit:
Link down: 614 mW (+34 mW re min)
Link up but disconnected: 771 mW (+191 mW re min)
Link up: 908 mW (+328 mW re min)

So it looks like the incremental cost of 100baseTX with the link up and connected is about 35 milliwatts cheaper than it used to be (july 2017, 3.14 kernel). Gbit is only 10 mW cheaper, and 10baseT hasn't really changed at all.

Lost Dog
Posts: 3
Joined: Thu Jan 03, 2019 9:09 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Lost Dog » Wed Jan 30, 2019 3:44 pm

Are there updated instructions for using the mainline kernel for the C2 or is Post 1 still accurate? I'd like to give an updated kernel a go... I'm using the C2 as an OpenVPN / Wireguard server so I'm not concerned with no video acceleration...

Thanks!

User avatar
memeka
Posts: 4241
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid C2 mainline kernel support

Unread post by memeka » Wed Jan 30, 2019 4:04 pm

Lost dog - easiest is to try armbian

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Thu Jan 31, 2019 12:44 am

Lost Dog wrote:
Wed Jan 30, 2019 3:44 pm
Are there updated instructions for using the mainline kernel for the C2 or is Post 1 still accurate? I'd like to give an updated kernel a go... I'm using the C2 as an OpenVPN / Wireguard server so I'm not concerned with no video acceleration...

Thanks!
It's trivially easy starting from a vanilla Arch Linux:

Code: Select all

sudo pacman -R uboot-odroid-c2 && sudo pacman -S uboot-odroid-c2-mainline linux-aarch64 && sudo reboot

Lost Dog
Posts: 3
Joined: Thu Jan 03, 2019 9:09 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Lost Dog » Thu Jan 31, 2019 9:45 am

campbell wrote:
Thu Jan 31, 2019 12:44 am
Lost Dog wrote:
Wed Jan 30, 2019 3:44 pm
Are there updated instructions for using the mainline kernel for the C2 or is Post 1 still accurate? I'd like to give an updated kernel a go... I'm using the C2 as an OpenVPN / Wireguard server so I'm not concerned with no video acceleration...

Thanks!
It's trivially easy starting from a vanilla Arch Linux:

Code: Select all

sudo pacman -R uboot-odroid-c2 && sudo pacman -S uboot-odroid-c2-mainline linux-aarch64 && sudo reboot
I've already got an install of Ubuntu 18.04 that I've been running for a month or so. I've never used Arch and have always had a Debian based system (mostly Mint on a x86 system). I don't have any issues giving a compile a go if there are updated instructions.

Thanks!

BraveSirRobin
Posts: 1
Joined: Sat Jan 19, 2019 7:50 am
languages_spoken: english
ODROIDs: 4xC2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by BraveSirRobin » Sat Feb 02, 2019 7:36 am

Hi there.

This worked well for me, thanks.

Code: Select all

sudo pacman -R uboot-odroid-c2 && sudo pacman -S uboot-odroid-c2-mainline linux-aarch64 && sudo reboot
However, the boot partition is different now, there's no boot.ini file to be able to follow these instructions to free up a bit of RAM. Do you know of an alternative method?

Thanks,
--Robin

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Sat Feb 02, 2019 10:06 am

BraveSirRobin wrote:
Sat Feb 02, 2019 7:36 am
Hi there.

This worked well for me, thanks.

Code: Select all

sudo pacman -R uboot-odroid-c2 && sudo pacman -S uboot-odroid-c2-mainline linux-aarch64 && sudo reboot
However, the boot partition is different now, there's no boot.ini file to be able to follow these instructions to free up a bit of RAM. Do you know of an alternative method?

Thanks,
--Robin
It's boot.txt now, and after modifying it you run ./mkscr to finalize it. BUT, the equivalent of "nographics 1" appears to be the default in this kernel, as far as I can tell:

Code: Select all

campbell@odroid64:~$ uname -a
Linux odroid64 3.16.62-1-ARCH #1 SMP PREEMPT Wed Jan 23 18:16:02 MST 2019 aarch64 GNU/Linux
campbell@odroid64:~$ cat /proc/meminfo | grep MemTotal
MemTotal:        1767312 kB

Code: Select all

campbell@odroid64:~$ uname -a
Linux odroid64 4.20.4-1-ARCH #1 SMP Tue Jan 22 19:53:37 MST 2019 aarch64 GNU/Linux
campbell@odroid64:~$ cat /proc/meminfo | grep MemTotal
MemTotal:        2013120 kB

arny91
Posts: 17
Joined: Sat Aug 13, 2016 9:12 pm
languages_spoken: english
ODROIDs: Odroid C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by arny91 » Thu Feb 14, 2019 5:46 am

Hi there,
Linux 5.0 is almost ready, is there a way to run the latest version of kodi and its addons on this platform by installing the kernel patched by scpcom?
Is DRM/KMS working at last?

mscdex
Posts: 74
Joined: Sun Jan 04, 2015 11:09 am
languages_spoken: english
ODROIDs: ODROID C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by mscdex » Thu Feb 14, 2019 7:05 am

Is there a hardware support status page anywhere that is kept up-to-date for the mainline kernel for the C2?

andy5macht
Posts: 210
Joined: Mon May 16, 2016 5:25 am
languages_spoken: english, german
ODROIDs: U3, C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by andy5macht » Fri Feb 15, 2019 12:43 am


User avatar
tobetter
Posts: 2811
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Contact:

Re: Odroid C2 mainline kernel support

Unread post by tobetter » Fri Feb 15, 2019 12:49 am

andy5macht wrote:
Fri Feb 15, 2019 12:43 am
http://linux-meson.com/doku.php
this one. C2=S905
Yes

rarecoil
Posts: 6
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Sun Feb 17, 2019 1:13 pm

campbell wrote:
Fri Jan 18, 2019 3:39 am
Latest power consumption numbers with 4.20.2 kernel just in case anyone is tracking this:

- Early 2016 Odroid C2 in cogent.design aluminium heatsink enclosure, 16 GB red eMMC
- Arch Linux with 4.20.2 kernel (430 mW less than 3.16.61-2-ARCH)
- Powering via barrel jack with OTG jumper removed (important, worth at least 1 W, and not under the heatsink, you can damage yourself or your gear)
- Ethernet limited to 100baseTX via ethtool
- Ondemand governor

Resulting core temperature reported in sysfs is 27-28 C, and idle power draw is 810 mW.

- Ethernet limited to 10baseT via ethtool (~30 mW)
- Reduce RAM clock to 408 MHz via script from Hardkernel (~100 mW)
- Disable USB in device tree (~40 mW)

The above additional changes drop the idle power consumption to 640 mW. The single greatest drop (other than improperly leaving the jumper attached) is due to substituting the mainline kernel for the 3.16.x kernel. You can drop it a small bit further by disabling cores but the costs outweigh the benefits.
I'm following along because I'm looking to make many of the same optimizations, and I'm using the same case. There's no CPUfreq loaded for me on the Arch mainline 4.20.10 and thus no real governor in use. Is there something I need to do to boot.txt? Seems that boot.ini isn't used anymore. If you could share your boot config that'd be awesome.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Sun Feb 17, 2019 4:48 pm

rarecoil wrote:
Sun Feb 17, 2019 1:13 pm
campbell wrote:
Fri Jan 18, 2019 3:39 am
The above additional changes drop the idle power consumption to 640 mW. The single greatest drop (other than improperly leaving the jumper attached) is due to substituting the mainline kernel for the 3.16.x kernel. You can drop it a small bit further by disabling cores but the costs outweigh the benefits.
I'm following along because I'm looking to make many of the same optimizations, and I'm using the same case. There's no CPUfreq loaded for me on the Arch mainline 4.20.10 and thus no real governor in use. Is there something I need to do to boot.txt? Seems that boot.ini isn't used anymore. If you could share your boot config that'd be awesome.
Add the three new lines below (the ones starting with "fdt addr") to your boot.txt, run ./mkscr, and reboot. Skip the last one if you don't want to disable USB.

Code: Select all

# After modifying, run ./mkscr

test -n "${distro_bootpart}" || setenv distro_bootpart 1
part uuid ${devtype} ${devnum}:${distro_bootpart} uuid
setenv bootargs "console=ttyAML0,115200n8 root=PARTUUID=${uuid} rw rootwait earlycon"

if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} /boot/Image; then
  if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
    if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
fdt addr ${fdt_addr_r};
fdt set /scpi/clocks status okay;
fdt rm /soc/phy@c0000000; fdt rm /soc/phy@c0000020; fdt rm /soc/usb@c9000000; fdt rm /soc/usb@c9100000; fdt rm /regulator-usb-pwrs
      booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
    else
      booti ${kernel_addr_r} - ${fdt_addr_r};
    fi;
  fi;
fi

rarecoil
Posts: 6
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Sun Feb 17, 2019 7:00 pm

campbell wrote:
Sun Feb 17, 2019 4:48 pm
Add the three new lines below (the ones starting with "fdt addr") to your boot.txt, run ./mkscr, and reboot. Skip the last one if you don't want to disable USB.

Code: Select all

# After modifying, run ./mkscr

test -n "${distro_bootpart}" || setenv distro_bootpart 1
part uuid ${devtype} ${devnum}:${distro_bootpart} uuid
setenv bootargs "console=ttyAML0,115200n8 root=PARTUUID=${uuid} rw rootwait earlycon"

if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} /boot/Image; then
  if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
    if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
fdt addr ${fdt_addr_r};
fdt set /scpi/clocks status okay;
fdt rm /soc/phy@c0000000; fdt rm /soc/phy@c0000020; fdt rm /soc/usb@c9000000; fdt rm /soc/usb@c9100000; fdt rm /regulator-usb-pwrs
      booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
    else
      booti ${kernel_addr_r} - ${fdt_addr_r};
    fi;
  fi;
fi
Great, thank you for all of your work on this. I'm building the C2 to work as an ultra-low-power (potentially off-grid) server, so any power/performance optimization I can get I'll take.

back2future
Posts: 198
Joined: Sun Jul 23, 2017 3:19 pm
languages_spoken: english
Contact:

Re: Odroid C2 mainline kernel support

Unread post by back2future » Sun Feb 17, 2019 10:06 pm

campbell wrote:
Sun Jan 27, 2019 5:12 am
campbell wrote:
Fri Jan 25, 2019 8:12 am
brad wrote:
Thu Jan 24, 2019 5:11 pm
Energy Efficient Ethernet (EEE) is no longer disabled in some newer kernels :) This might provide some additional benefits for power saving for Ethernet be it 10, 100 or 1000. I don't have easy tools to check :( https://git.kernel.org/pub/scm/linux/ke ... 3fa639d1c9
Just checked and the difference between 10baseT and ifconfig eth0 down is 65 milliwatts, which is about the same as what it used to be under the 3.14 kernel.
Finally had time to do a more thorough set of measurements. Common conditions: 4.20.4 kernel, 28 C core temp, 408 MHz RAM clock, ondemand governor, USB disabled in device tree, 3 foot ethernet cable

10baseT:
...
100baseTX:
...
Gbit:
...
2.5GbE:
...
So it looks like the incremental cost of 100baseTX with the link up and connected is about 35 milliwatts cheaper than it used to be (july 2017, 3.14 kernel). Gbit is only 10 mW cheaper, and 10baseT hasn't really changed at all.
Would You mind adding some input for kernel compile time comparison and power consumption ¹ (full-load cpu consumption, while compiling a 4.x kernel)?
[ 1) viewtopic.php?p=246324#p246324
Compiling a 4.9.x kernel on H2 seems to have a (14W*570s) 2222mWh (15V->150mAh) dc consumption.
Cross-compiling on H2 for odroidn2_defconfig(Image,modules) ~6400mWh (430mAh@15V). ]

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Mon Feb 18, 2019 4:12 am

back2future wrote:
Sun Feb 17, 2019 10:06 pm
Would You mind adding some input for kernel compile time comparison and power consumption ¹ (full-load cpu consumption, while compiling a 4.x kernel)?
[ 1) viewtopic.php?p=246324#p246324
Compiling a 4.9.x kernel on H2 seems to have a (14W*570s) 2222mWh (15V->150mAh) dc consumption.
Cross-compiling on H2 for odroidn2_defconfig(Image,modules) ~6400mWh (430mAh@15V). ]
I don't really have the measurement apparatus necessary to do this properly in a repeatable fashion, but I can try. In my idle power consumption measurements it's easy to just read the numbers off the Smart Power because they're not fluctuating. By eyeball I can only say that the power is hanging out around 2.95 W while compiling Linux with -j4 with the "ondemand" governor and the 912 MHz RAM clock. I expect performance vs ondemand, and 408 vs 912 MHz RAM clock to be the only two tweaks that affect compilation time.

edit: Happened to be looking at it when it finished. Total consumption was 3.751 Wh in 4683 seconds, for a mean power consumption of 2.88 W, at a final CPU temp of 35 C.
edit again: No statistically significant difference with "performance" vs "ondemand" governor. Finished about eight seconds sooner, no measureable change in power consumption
Last edited by campbell on Mon Feb 18, 2019 6:32 am, edited 1 time in total.

rarecoil
Posts: 6
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Mon Feb 18, 2019 5:40 am

campbell wrote:
Sat Jan 26, 2019 12:00 pm
juanjo1024 wrote:
Sat Jan 26, 2019 10:12 am
USB still not working properly, right ?
USB hotplug is not working properly. As long at at least one device is plugged in, from boot onward, then it's fine.
Edit: Ah, nevermind. I had a device trying to draw more than 500mA connected, and was tripping the ODroid protection circuit.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Mon Feb 18, 2019 1:19 pm

Interestingly, compiling the kernel with the 408 MHz RAM clock took significantly longer (6054 seconds versus 4683 seconds) but did NOT appear to use proportionally less power during that time. So the more energy efficient way to operate the system under that kind of load is with a higher RAM clock, even though you pay 100 mW for it at idle. All the more reason to try to throttle the RAM clock automatically along with the CPU clock...

back2future
Posts: 198
Joined: Sun Jul 23, 2017 3:19 pm
languages_spoken: english
Contact:

Re: Odroid C2 mainline kernel support

Unread post by back2future » Tue Feb 19, 2019 5:17 am

Thx, for Your support.
Energy consumption is verified being reasonable within a 2.2-6.4Wh range for a C2 also.
Did You compile Image and modules and what was Your kernel compile .config (defconfig?) based on?
AFAIR during compiling on a C2 with -j4 option temperature for all cores could go well above 75-80°?
(That might be seen like somekind of narrowed thinking within these amounts of electricity, but (for awareness) is total consumption considering energy input or output?)
EnergyMonitor for cpu/gpu/ram frequencies and cpu/gpu/(ram)/storage temperatures and fan speeds would be very helpful with kernel compiling.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Tue Feb 19, 2019 5:21 am

back2future wrote:
Tue Feb 19, 2019 5:17 am
Did You compile Image and modules and what was Your kernel compile .config (defconfig?) based on?
I just cloned Linus's repo and did "make defconfig" and then "time -p make -j4 dtbs Image modules". I didn't try to run the resulting kernel.
back2future wrote:
Tue Feb 19, 2019 5:17 am
AFAIR during compiling on a C2 with -j4 option temperature for all cores could go well above 75-80°?
My C2 is inside a https://cogent.design aluminium heatsink case. It idles in the mid-high 20s C and never gets above 39 C in hard use.

User avatar
tuxx
Posts: 50
Joined: Fri Mar 11, 2016 6:42 am
languages_spoken: english
ODROIDs: C1+, C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by tuxx » Fri Feb 22, 2019 2:16 am

campbell wrote:
Sat Jan 26, 2019 12:00 pm
juanjo1024 wrote:
Sat Jan 26, 2019 10:12 am
USB still not working properly, right ?
USB hotplug is not working properly. As long at at least one device is plugged in, from boot onward, then it's fine.
Hi all,

is there any workaround on this issue?

I just checked with 4.20.11 and the problem remains.

User avatar
tuxx
Posts: 50
Joined: Fri Mar 11, 2016 6:42 am
languages_spoken: english
ODROIDs: C1+, C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by tuxx » Wed Feb 27, 2019 6:03 pm

I just tested with the 5.0.0-rc8 and unfortunately the USB hotplug issue remains.

SimonH78
Posts: 14
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by SimonH78 » Fri Mar 01, 2019 6:24 pm

im facing network performance problems with the latest mainline kernel. Usually i could go for 900MBits RX / 700 Mbits TX or so , but now when im testing i only get 600M non duplex , and when duplex its like 400 + 150 or so.

the last kernel i backtraced which was okay was 4.14.x . I even deactivated EEE and tried other things , but none gave me the performance back.


Does anyone face this problems also ?

User avatar
memeka
Posts: 4241
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid C2 mainline kernel support

Unread post by memeka » Fri Mar 01, 2019 6:33 pm

Define latest mainline kernel

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Fri Mar 01, 2019 6:48 pm

I'm getting 943 Mbit/s between an Odroid C2 running 4.20.13-1-ARCH, and an Odroid N2 running 4.9.160-17, via a router
Last edited by campbell on Fri Mar 01, 2019 7:02 pm, edited 1 time in total.

SimonH78
Posts: 14
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by SimonH78 » Fri Mar 01, 2019 6:51 pm

5.0rc8 or linux next from 2 days ago ,doesnt make a difference

SimonH78
Posts: 14
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by SimonH78 » Fri Mar 01, 2019 6:52 pm

can you provide your kernel configuration ?

SimonH78
Posts: 14
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by SimonH78 » Fri Mar 01, 2019 7:03 pm

and are you using VLANs ?

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Fri Mar 01, 2019 7:04 pm

SimonH78 wrote:
Fri Mar 01, 2019 6:52 pm
can you provide your kernel configuration ?
"linux-aarch64" installed via pacman, here is the config file: https://archlinuxarm.org/packages/aarch ... les/config

SimonH78
Posts: 14
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by SimonH78 » Fri Mar 01, 2019 11:21 pm

are you using VLANs in your setup ?

SimonH78
Posts: 14
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by SimonH78 » Mon Mar 04, 2019 12:53 am

your kernel configuration did not give me any improvements....

can you try and put 4 vlans into usage and then benchmark again ?

User avatar
mad_ady
Posts: 5427
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Contact:

Re: Odroid C2 mainline kernel support

Unread post by mad_ady » Mon Mar 04, 2019 4:16 am

If using vlans, try reducing the MTU by 4 bytes to account for the vlan header.
Not reducing the mtu will cause large packets to be fragmented and should impact performance (but I don't know by how much).

SimonH78
Posts: 14
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by SimonH78 » Wed Mar 06, 2019 3:22 am

Hi guys,


1. i discovered something strange. when i never configure my external
VLAN interface UP ( firewall doesnt start, traffic shaper CAKE doesnt
start), my non duplex iperf bandwidth increases from 600MBits to 930.

2. duplex isnt working, TX is totally starving RX, the total bandwidth
is 900MBits, whats going on there ?

3. i had a MTU issue ( was set to 1500, but due to VLANs etc 1450 would
be better ) but this didnt change performance !
4. even when i up eth0.4, then i down eth0.4, then flush iptables and
shaper were never added, i drop to 600MBits ....

questions:
- why is duplex still not working even so the kernel says so ?
- why is TX totally starving RX, even so duplex is "on"
- when i flush all my iptable rules, and the traffic shaper, still im
bond to 600MBits ... very strange, someone got an idea ? upping eth0.4
is cutting the performance, even when other VLAN IFs like eth0.3,
eth0.2, eth0.5 are up and bridged ( eth0.4 isnt bridged somewhere )



my setup:

br-dmz 8000.7ef0fd9b157f no eth0.2
br-guest 8000.001f1fbbbd60 no wlan0
br-iot 8000.7ef0fd9b157f no eth0.5
br-lan 8000.001f1fbbbd61 no eth0.3
wlan0_1
wlan2

eth0.4 is my uplink

all the bridges are internally , eth0.4 is externally


C:\Users\Simon\Downloads\iperf3.6_64bit\iperf3.6_64bit>iperf3.exe -c
10.10.11.1 -i1
warning: Ignoring nonsense TCP MSS 0
Connecting to host 10.10.11.1, port 5201
[ 5] local 10.10.11.100 port 52173 connected to 10.10.11.1 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 384 KBytes 3.14 Mbits/sec
[ 5] 1.00-2.00 sec 384 KBytes 3.15 Mbits/sec
[ 5] 2.00-3.00 sec 1.12 MBytes 9.44 Mbits/sec
[ 5] 3.00-4.00 sec 2.00 MBytes 16.8 Mbits/sec
[ 5] 4.00-5.00 sec 2.38 MBytes 19.9 Mbits/sec
[ 5] 5.00-6.00 sec 3.12 MBytes 26.2 Mbits/sec
[ 5] 6.00-7.00 sec 4.75 MBytes 39.8 Mbits/sec
[ 5] 7.00-8.00 sec 68.4 MBytes 574 Mbits/sec
[ 5] 8.00-9.00 sec 104 MBytes 875 Mbits/sec
[ 5] 9.00-10.00 sec 105 MBytes 881 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 292 MBytes 245 Mbits/sec sender
[ 5] 0.00-10.04 sec 292 MBytes 244 Mbits/sec
receiver

iperf Done.


root@odroidc2:~# iperf3 -c 10.10.11.100 -i1
Connecting to host 10.10.11.100, port 5201
[ 5] local 10.10.11.1 port 60022 connected to 10.10.11.100 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 112 MBytes 941 Mbits/sec 0 417 KBytes
[ 5] 1.00-2.00 sec 113 MBytes 945 Mbits/sec 0 487 KBytes
[ 5] 2.00-3.00 sec 112 MBytes 940 Mbits/sec 0 487 KBytes
[ 5] 3.00-4.00 sec 112 MBytes 941 Mbits/sec 0 512 KBytes
[ 5] 4.00-5.01 sec 109 MBytes 907 Mbits/sec 0 543 KBytes
[ 5] 5.01-6.01 sec 109 MBytes 911 Mbits/sec 0 543 KBytes
[ 5] 6.01-7.01 sec 108 MBytes 902 Mbits/sec 0 543 KBytes
[ 5] 7.01-8.01 sec 108 MBytes 905 Mbits/sec 0 543 KBytes
[ 5] 8.01-9.00 sec 106 MBytes 895 Mbits/sec 0 543 KBytes
[ 5] 9.00-10.00 sec 106 MBytes 891 Mbits/sec 0 543 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.07 GBytes 918 Mbits/sec 0 sender
[ 5] 0.00-10.04 sec 1.07 GBytes 915 Mbits/sec
receiver

--


Mar 5 09:46:03 localhost kernel: [ 105.534204] meson8b-dwmac
c9410000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

iperf Done.
root@odroidc2:~#




regards,
Simon

rarecoil
Posts: 6
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Wed Mar 06, 2019 1:56 pm

Has anyone had trouble upgrading to 5.0? I pulled the new Arch mainline package today and my C2 didn't survive a reboot. Haven't dug into what happened yet, since I have to pull the eMMC to find out. I don't get HDMI output on the mainline kernels.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Wed Mar 06, 2019 2:05 pm

rarecoil wrote:
Wed Mar 06, 2019 1:56 pm
Has anyone had trouble upgrading to 5.0? I pulled the new Arch mainline package today and my C2 didn't survive a reboot. Haven't dug into what happened yet, since I have to pull the eMMC to find out. I don't get HDMI output on the mainline kernels.
Worked fine here under arch. After reading this I plugged in the debug serial just to watch it reboot though. Can't imagine using one of these boards without having the debug serial.

rarecoil
Posts: 6
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Wed Mar 06, 2019 2:23 pm

campbell wrote:
Wed Mar 06, 2019 2:05 pm
rarecoil wrote:
Wed Mar 06, 2019 1:56 pm
Has anyone had trouble upgrading to 5.0? I pulled the new Arch mainline package today and my C2 didn't survive a reboot. Haven't dug into what happened yet, since I have to pull the eMMC to find out. I don't get HDMI output on the mainline kernels.
Worked fine here under arch. After reading this I plugged in the debug serial just to watch it reboot though. Can't imagine using one of these boards without having the debug serial.
Unfortunately I don't have one. I have the heartbeat, but the network didn't appear to come back up. I wonder if network interface names changed or something. Is there a way to get the HDMI port running with the mainline package? Looks like I'll likely be pulling the eMMC and doing some manual changing/package installation tomorrow.

EDIT: Also ordered USB->UART in case I have this trouble again, but that won't come in for a few days yet.

SimonH78
Posts: 14
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by SimonH78 » Wed Mar 06, 2019 6:21 pm

i have a working 5.0 kernel config, which i can provide in case you want to compile yourself.

And yes , kernel 5.0 boots fine ( im on debian buster / armbian upgrade )

rarecoil
Posts: 6
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Thu Mar 07, 2019 11:22 am

campbell wrote:
Wed Mar 06, 2019 2:05 pm
rarecoil wrote:
Wed Mar 06, 2019 1:56 pm
Has anyone had trouble upgrading to 5.0? I pulled the new Arch mainline package today and my C2 didn't survive a reboot. Haven't dug into what happened yet, since I have to pull the eMMC to find out. I don't get HDMI output on the mainline kernels.
Worked fine here under arch. After reading this I plugged in the debug serial just to watch it reboot though. Can't imagine using one of these boards without having the debug serial.
Just reinstalled Arch from the main package and it came right up on 3.16.

Moved to linux-aarch64 and uboot-odroid-c2-mainline again, and I have had the same issue occur. Clearly there is something strange with my config and I won't be able to sort it out until I get the debug console up and running. I'm going to do another install and go back to LTS for a while, I guess. I actually use this as a server, so I don't want to be fighting it all week. I am using eMMC as my primary boot device.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Thu Mar 07, 2019 12:09 pm

rarecoil wrote:
Thu Mar 07, 2019 11:22 am
Just reinstalled Arch from the main package and it came right up on 3.16.

Moved to linux-aarch64 and uboot-odroid-c2-mainline again, and I have had the same issue occur. Clearly there is something strange with my config and I won't be able to sort it out until I get the debug console up and running. I'm going to do another install and go back to LTS for a while, I guess. I actually use this as a server, so I don't want to be fighting it all week. I am using eMMC as my primary boot device.
Let me know what you figure out, because it sounds like our configurations are pretty similar. I'm using one of the red eMMCs if that matters (iirc the black eMMCs don't work with the XU4 but the red ones work just fine with the C2).

If you have two boards near each other, it can be a good preemptive practice to run each board's debug serial to the other board, so that you can always ssh into one of them and get to the other's debug console. You can use the usb-uart for this, OR just go directly from the debug serial to the other board's gpio pins if they're both at 3.3v logic levels.

uncarvedblock
Posts: 3
Joined: Sun Mar 10, 2019 3:58 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by uncarvedblock » Sun Mar 10, 2019 4:19 am

rarecoil wrote:
Wed Mar 06, 2019 1:56 pm
Has anyone had trouble upgrading to 5.0? I pulled the new Arch mainline package today and my C2 didn't survive a reboot. Haven't dug into what happened yet, since I have to pull the eMMC to find out. I don't get HDMI output on the mainline kernels.
Yes and no, I have a C2, running the Arch Linux mainline kernel, it upgraded from 4.20 > 5.0 without issue. However, my brother is running a nearly identical setup to mine, when he upgraded to 5.0 his C2 failed to boot. looking at the serial console the last few lines read:

Code: Select all

Waiting 10 seconds for device /dev/disk/by-partuuid/06440000-01 ...
ERROR: device 'PARTUUID=06440000-01' not found. Skipping fsck.
:: mounting 'PARTUUID=06440000-01' on real root
mount /new_root: can't find PARTUUID=06440000-01.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#
We have tried removing and reinstalling uboot-odroid-mainline in a chroot, but the only thing that seems to get the the C2 to boot again is downgrading to linux-aarch64-4.20. I am baffled since my C2 seemed to upgrade without issue, the hardware and software loadout are nearly identical.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Sun Mar 10, 2019 7:22 am

uncarvedblock wrote:
Sun Mar 10, 2019 4:19 am
rarecoil wrote:
Wed Mar 06, 2019 1:56 pm
Has anyone had trouble upgrading to 5.0? I pulled the new Arch mainline package today and my C2 didn't survive a reboot. Haven't dug into what happened yet, since I have to pull the eMMC to find out. I don't get HDMI output on the mainline kernels.
Yes and no, I have a C2, running the Arch Linux mainline kernel, it upgraded from 4.20 > 5.0 without issue. However, my brother is running a nearly identical setup to mine, when he upgraded to 5.0 his C2 failed to boot. looking at the serial console the last few lines read:

Code: Select all

Waiting 10 seconds for device /dev/disk/by-partuuid/06440000-01 ...
ERROR: device 'PARTUUID=06440000-01' not found. Skipping fsck.
:: mounting 'PARTUUID=06440000-01' on real root
mount /new_root: can't find PARTUUID=06440000-01.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#
We have tried removing and reinstalling uboot-odroid-mainline in a chroot, but the only thing that seems to get the the C2 to boot again is downgrading to linux-aarch64-4.20. I am baffled since my C2 seemed to upgrade without issue, the hardware and software loadout are nearly identical.
What colour eMMC are you using? rarecoil, you too?

uncarvedblock
Posts: 3
Joined: Sun Mar 10, 2019 3:58 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid C2 mainline kernel support

Unread post by uncarvedblock » Sun Mar 10, 2019 10:54 am

mine is a 32GB red emmc. the other is a 64GB red. not sure if I can gather further information, but both purchased through Ameridroid

brad
Posts: 818
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1
Location: Australia
Contact:

Re: Odroid C2 mainline kernel support

Unread post by brad » Sun Mar 10, 2019 9:25 pm

uncarvedblock wrote:
Sun Mar 10, 2019 4:19 am
We have tried removing and reinstalling uboot-odroid-mainline in a chroot, but the only thing that seems to get the the C2 to boot again is downgrading to linux-aarch64-4.20. I am baffled since my C2 seemed to upgrade without issue, the hardware and software loadout are nearly identical.
You can maybe try to revert this commit in 5.0 to see if the problem disappears. https://lkml.org/lkml/2018/12/6/746

I know it can have a big impact on which cards are able to be detected (or tuned) at boot.

campbell
Posts: 381
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Mon Mar 11, 2019 12:41 am

brad wrote:
Sun Mar 10, 2019 9:25 pm
uncarvedblock wrote:
Sun Mar 10, 2019 4:19 am
We have tried removing and reinstalling uboot-odroid-mainline in a chroot, but the only thing that seems to get the the C2 to boot again is downgrading to linux-aarch64-4.20. I am baffled since my C2 seemed to upgrade without issue, the hardware and software loadout are nearly identical.
You can maybe try to revert this commit in 5.0 to see if the problem disappears. https://lkml.org/lkml/2018/12/6/746

I know it can have a big impact on which cards are able to be detected (or tuned) at boot.
This again? When are they gonna stop fucking with the clock phase? It breaks things every single time.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest