Odroid XU3/XU4 NEXT thread

Test and fix the Kernel 4.14 features

Moderators: odroid, mdrjr

Odroid XU3/XU4 NEXT thread

Unread postby memeka » Tue Aug 16, 2016 2:43 pm

I started this thread to discuss new developments for XU3 and XU4.

Specifically, let me share an exciting video: https://www.youtube.com/watch?v=RbMLkXbB3Gs



There are 3 things that stand out:

* ubuntu 16.10
* full support for kernel 4.8 (4.8-rc1 as of now), including Mali
* wayland support with gnome3 running accelerated.

Those that want to help:

* testing: please test the 4.8 kernel: https://github.com/mihailescu2m/linux/t ... dxu4-4.8.y - my config is http://paste.debian.net/789788/
* developing: if you have knowledge about MFC, please help the effort at https://github.com/mihailescu2m/FFmpeg/ ... _m2m-2.8.6 to build ffmpeg with MFC support (currently broken)

Hope I got people exiting and willing to collaborate.

UPDATE: viewtopic.php?f=95&t=23163&p=165241#p165241
Last edited by memeka on Thu Oct 27, 2016 8:45 am, edited 1 time in total.
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby odroid » Tue Aug 16, 2016 3:27 pm

Very interesting project. :o

I have a question about the Wayland.
Can we expect any GUI HW acceleration with Wayland driver when we use Chromium or LibreOffice on Gnome3?
User avatar
odroid
Site Admin
 
Posts: 27660
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Tue Aug 16, 2016 3:47 pm

Latest chromium crashes, but i think this is a more general issue, and i will have to retry with older chromium. however, newer versions of chromium (v52 and above) should be wayland native.
Otherwise, older chromium, and libreoffice, which are not native to wayland, will run via xwayland - that is, there's x11 also running. i am not sure if egl acceleration is possible in xwayland.

I was able to run LibreOffice without any issue.
Can you run LibreOffice accelerated in X11?
In wayland, I enabled in LibreOffice from the Tools - Options -> View: Use OpenGL for all rendering & Force OpenGL even if blacklisted but after restarting LibreOffice it was more sluggish than before (so maybe it required OpenGL, not OpenGL-es, and software OpenGL is slower than not using OpenGL at all).

But libre office is using GTK2 and you can see it looks different than gtk3 apps :)

To sum it up: non-wayland applications should work as they do on X11.

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

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Tue Aug 16, 2016 4:11 pm

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

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Wed Aug 17, 2016 2:23 pm

FYI:

1) gnome3 works also on x11 in ubuntu 16.10
however is slower than wayland (it's using software render for composition), and EGL apps are crashing X11 in the Gnome3 session, or have black output screen in the Gnome3 Classic session.

2) starting with 16.10, mate is switching to GTK3, which means that if you disable composition, you'll get black tiles where shadows are supposed to be - mate is unusable for me on ubuntu 16.10 with the marco window manager...

3) starting soon (16.10?) LXDE will switch over from GTK2 to LXQT (QT5) which is also quite slow in software, or with bugs in EGL rendering - I found QT5 to be more buggy than GTK3
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby stmicro » Wed Aug 17, 2016 3:27 pm

Very exciting development. Can you tell me the performance of USB 3.0? Is it working at Super-Speed mode in Kernel 4.8 RC1?
Hardkernel people should look into this thread if they wanna keep selling and support the XU4 one more year. :mrgreen:
Old desktop managers and graphics middle wares seem to be switched to new technologies.
stmicro
 
Posts: 224
Joined: Tue Apr 28, 2015 4:23 pm
Location: shenzhen china
languages_spoken: english, chinese
ODROIDs: Many Odroids and Rpis.

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Wed Aug 17, 2016 6:30 pm

That looks great, I hope hardkernel team will give support to make this more "official" / "testable"

What kind of glxgears / es2gears / glmark2-es benchmars do you get ? (on XU4)

Are you able to run scilab (it does not run on official odroid 16.04, it seems there is some opengl issue) ?

Could you provide more or less details instructions for testing you build / kernel / installing ubuntu 16.10...

Best regards !
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Wed Aug 17, 2016 8:58 pm

stmicro wrote:Very exciting development. Can you tell me the performance of USB 3.0? Is it working at Super-Speed mode in Kernel 4.8 RC1?
Hardkernel people should look into this thread if they wanna keep selling and support the XU4 one more year. :mrgreen:
Old desktop managers and graphics middle wares seem to be switched to new technologies.



I am using the usb3 patches that were floating around and network is detected on usb3.
But I don't use the Ethernet or have usb3 devices. So testers are welcome.
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Wed Aug 17, 2016 9:18 pm

Matioupi wrote:That looks great, I hope hardkernel team will give support to make this more "official" / "testable"

What kind of glxgears / es2gears / glmark2-es benchmars do you get ? (on XU4)

Are you able to run scilab (it does not run on official odroid 16.04, it seems there is some opengl issue) ?

Could you provide more or less details instructions for testing you build / kernel / installing ubuntu 16.10...

Best regards !


There are a lot of howtos here to build the kernel.
Using Weston won't magically fix OpenGL issues, since the board does not have OpenGL but OpenGL-ES.
The performance of EGL is similar to X11 - the X11 drivers were not bad; the problem in X11 is that 2D operations were slow; in wayland 2G is done via 3G.

Gnome3 feels a bit sluggish - although faster than on X11 with llvmpipe. But the CPU is not maximized so I suspect the slugginesh to be in part from sd-card and in part from memory.
There's also many frequecy tables not defined on 4.8 so some things might not be as fast as they should.

I wonder if memory can be overclocked :)
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby DarkBahamut » Thu Aug 18, 2016 5:03 am

Overclocked, almost certainly not. It would require deep level knowledge of the SoC to implement such a change and likely impossible for anyone outside of samsung. The code isn't there to do it, so you'd have to reverse engineer the kernel to work it out, assuming it would even accept a higher clock anyway. It's been tried before on Exynos chips and never been achieved.

It's possible the memory might not be running at the right speed though, which could be a problem. I don't really know enough about mainline to know whats going on in there memory wise. Is it just being set to 825MHz and held there?

Also, are the CPU clocks in this kernel 1.8/1.3? That could hurt performance. CPU's that are showing lower clock speeds (and average load levels) still often will be spiking to maximum CPU speed in between the very slow updates that any monitoring program will have.
DarkBahamut
 
Posts: 300
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Thu Aug 18, 2016 5:16 am

CPU is 2.0/1.4
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby DarkBahamut » Thu Aug 18, 2016 7:32 am

Oh I see. Is this file used to set the op points? https://github.com/mihailescu2m/linux/b ... s5800.dtsi

I'm sure I'm commented on it before when that commit was added, but those op voltages (if they're setting the actually CPU op voltage) aren't suitable. Many XU3/4 boards ship with higher voltages than offered there, plus there isn't a proper curve offered which isn't optimal. IMO they should be changed as running an undervolt could make people boards unstable.

If this file - https://github.com/mihailescu2m/linux/b ... ommon.dtsi - is doing the thermal throttling then you will also have an additional issue as the op points lead to very poor thermal management due to what the 5800 dts file is doing. Some tweaks will go a long way to keeping clock speeds up under load :)
DarkBahamut
 
Posts: 300
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Thu Aug 18, 2016 10:26 am

you are correct, for 2GHz is under-volted; while for 1.8, 1.7 and 1.6 Ghz it's over-volted.
i will try to remember to fix the voltages at the next update.
if you want to contribute tweaks to the thermal management and voltages, please contribute :)
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby crossover » Thu Aug 18, 2016 12:22 pm

Great work.
Can you make a trial image? I really want to test this image with my USB 3.0 devices.
crossover
 
Posts: 112
Joined: Wed Jul 22, 2015 2:23 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, USB-IO, HC2, Tinkering kits

Re: Odroid XU3/XU4 NEXT thread

Unread postby moon.linux » Thu Aug 18, 2016 2:03 pm

Hi memka, Great work.

Did you update the latest http://malideveloper.arm.com/resources/ ... e-drivers/ for this. :D
moon.linux
 
Posts: 1056
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Thu Aug 18, 2016 2:09 pm

@moon.linux
i already tested wayland and gnome on r10p0.
the kernel driver is r13p0, so it's just copying a new binary driver to have it working.
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Thu Aug 18, 2016 4:28 pm

Did you update the latest http://malideveloper.arm.com/resources/ ... e-drivers/ for this.


How do you do this update ?

I got the fbdev r10 version and copied them after untaring in /usr/lib/arm-linux-gnueabihf/mali-egl
changing owner group and permissions

And then when I try es2gears, I got a : EGLUT : failed to initialize EGL dislay message

regads
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Thu Aug 18, 2016 5:16 pm

Es2gears from X11 will not work with fbdev drivers.
Also you need kernel support for r10p0 drivers, hk kernel supports only up to r9p0
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Fri Aug 19, 2016 12:51 am

There are a lot of howtos here to build the kernel.


Hello, I tried building your kernel...

I've got an issue with the dts / dtb part that fails with an error message like :

FATAL ERROR: Unable to parse input tree

I'm building directly on the xu4

do you have any clue ?

regards
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby moon.linux » Fri Aug 19, 2016 1:14 am

This is small patch to fix the build. Currently only supports 480000 frequency and 1000000 uV.
Code: Select all
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index df3b703..c145efa 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -1297,16 +1297,16 @@

                 clocks = <&clock CLK_FOUT_VPLL>, <&clock CLK_DOUT_ACLK_G3D>, <&clock CLK_G3D>;
                 clock-names = "fout_vpll", "dout_aclk_g3d", "clk_mali";
-*/
+
                 operating-points = <
                         /* KHz   uV */
-                        600000 1150000
-                        543000 1037500
+/*                      600000 1150000
+                        543000 1037500 */
                         480000 1000000
-                        420000  962500
+/*                      420000  962500
                         350000  912500
                         266000  862500
-                        177000  812500
+                        177000  812500 */
                 >;

                 status = "disabled";
moon.linux
 
Posts: 1056
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Fri Aug 19, 2016 1:33 am

thanks this fixed the build.

I installed everything above stock 16.04 version
I modified the boot.ini to use the xu4 dtb file

and booted.

I'm quite a noob and i was a nice exercise.

When running es2gears, I notice that the small gear is rendered in grey when it used to be green...

Which binary mali drivers should I use ?
Could you provide your /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/exynos.conf

regards
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby moon.linux » Fri Aug 19, 2016 3:12 am

Actually we have not worked on g2d/g3d acceleration plus power domain in this kernel. Many miles to go.
moon.linux
 
Posts: 1056
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Fri Aug 19, 2016 6:15 am

Actually you can just remove the "*/" that was left by mistake in the dtsi.

you'll have the entire range of frequencies available, including 600MHz.

By default, my config has devfreq enabled, which uses only the 177Mhz frequency because default governor is simple_ondemand with no step-up threshold defined.
But you can echo performance in /sys/.../devfreq/mali.../governor and the clock will run at 600Mhz.
Or you can comment out all frequencies and leave the 600Mhz.

Previously i was using 480000 frequency and 1000000 uV because the clock could not be set to 600Mhz and/or the regulator to more than 1V.
But i commited the PLL patch so the freqency is available and devfreq will set the correct voltage from the in dtsi.

At 600Mhz I get the score 58 in glmark-es2 fullscreen in wayland (capped by vsync).
The offscreen results are similar to X11.
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Fri Aug 19, 2016 6:21 am

I also noticed the gray in es2gears no idea why...
For X11 I am using the r9 binary driver from @mdrjr and the X11 confs from the HK image.

https://github.com/mdrjr/5422_platform/blob/4e2c555e88e191c28d6e1d65acc201d647567800/xorg.conf
and
https://github.com/mdrjr/5422_mali/tree/543eb787af5719224c2231490d5ebda71c1ec7a8/x11

but there's a new X11 driver (r10p0) at malideveloper.com that i did not try yet.
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby DarkBahamut » Fri Aug 19, 2016 7:54 am

Going to try playing with this 4.8 kernel a bit to try a few changes. When I built it and flashed it I didn't get any ethernet, one of the USB3 hubs is missing. I've never really used mainline though, any ideas what I'm missing on that?
DarkBahamut
 
Posts: 300
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4

Re: Odroid XU3/XU4 NEXT thread

Unread postby mattrix » Fri Aug 19, 2016 9:47 am

Using suggested .config (http://paste.debian.net/download/789788)
Same DTB compile issue.
Removing the /* on line# 1300 of /arch/arm/boot/dts/exynos5420.dtsi fixed that.

Added AUFS.
Enabled a few USB tuners and PPP support.

I'm only using headless.

Seems to work great so far.

Linux nas 4.8.0-rc1-g306529f-dirty

lsusb -t
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
|__ Port 3: Dev 6, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
|__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 4: Dev 7, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=dvb_usb_rtl28xxu, 480M
|__ Port 1: Dev 5, If 1, Class=Vendor Specific Class, Driver=, 480M
|__ Port 2: Dev 6, If 1, Class=Vendor Specific Class, Driver=, 480M
|__ Port 2: Dev 6, If 0, Class=Vendor Specific Class, Driver=dvb_usb_rtl28xxu, 480M
|__ Port 3: Dev 7, If 0, Class=Vendor Specific Class, Driver=dvb_usb_rtl28xxu, 480M
|__ Port 3: Dev 7, If 1, Class=Vendor Specific Class, Driver=, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M


I have 2x USB3.0 HDD's via a USB3.0 hub.
Also, 3x USB2.0 Tuners via another USB3.0 hub
(this hub also has buit-in gigabit ethernet - which I don't use currently)

Seems good :)
Here's how I compile the kernel on the XU4

Code: Select all
## BACKUP CURRENT FILES ##
mkdir /boot/`uname -r`
cp /boot/* /boot/`uname -r`
mkdir /media/boot/`uname -r`
cp /media/boot/* /media/boot/`uname -r`
#####################

apt-get install -y git build-essential libncurses5-dev bc lzop

cd ~
git clone --depth 1 --single-branch -b odroidxu4-4.8.y https://github.com/mihailescu2m/linux/
cd linux
wget http://paste.debian.net/download/791598 -O .config
make oldconfig

## ADD AUFS IF NEEDED ##
git clone --depth 1 --single-branch -b aufs4.x-rcN https://github.com/sfjro/aufs4-standalone/
git apply aufs4-standalone/aufs4-kbuild.patch
git apply aufs4-standalone/aufs4-base.patch
git apply aufs4-standalone/aufs4-mmap.patch

cp -r aufs4-standalone/Documentation .
cp -r aufs4-standalone/fs .
cp aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux/aufs_type.h
###########################

make menuconfig

###  Make desired changes.
### If using AUFS, enable it under File systems -> Miscellaneous filesystems -> Aufs support
### Once done, save and exit config

make -j8 zImage dtbs modules
kver=`make kernelrelease`

make modules_install
make firmware_install INSTALL_FW_PATH=/lib/firmware/${kver}
make headers_install INSTALL_HDR_PATH=/tmp
mv /tmp/include /usr/src/linux-headers-${kver}

ln -sfn /usr/src/linux-headers-${kver} /lib/modules/${kver}/build
ln -sfn /usr/src/linux-headers-${kver} /lib/modules/${kver}/source

rm /boot/*
cp arch/arm/boot/zImage arch/arm/boot/dts/exynos5422-odroidxu4.dtb /media/boot
cp .config /media/boot/config
cp .config /boot/config-${kver}

cd /boot
update-initramfs -c -k ${kver}
mkimage -A arm -O linux -T ramdisk -a 0x0 -e 0x0 -n initrd.img-${kver} -d initrd.img-${kver} uInitrd-${kver}
cp uInitrd-${kver} /media/boot/uInitrd
sed -i -e 's/odroidxu3.dtb/odroidxu4.dtb/g' /media/boot/boot.ini

sync

reboot


Takes about 30-45 mins. Not bad!
Last edited by mattrix on Wed Sep 14, 2016 12:36 pm, edited 5 times in total.
mattrix
 
Posts: 89
Joined: Tue Jan 13, 2015 7:12 am
languages_spoken: english
ODROIDs: C1

Re: Odroid XU3/XU4 NEXT thread

Unread postby rooted » Fri Aug 19, 2016 10:51 am

mattrix wrote:Using suggested .config (http://paste.debian.net/download/789788)
Same DTB compile issue.
Removing the /* on line# 1300 of /arch/arm/boot/dts/exynos5420.dtsi fixed that.

Added AUFS.
Enabled a few USB tuners and PPP support.

I'm only using headless.

Seems to work great so far.

Linux nas 4.8.0-rc1-g306529f-dirty

lsusb -t
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
|__ Port 3: Dev 6, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
|__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 4: Dev 7, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=dvb_usb_rtl28xxu, 480M
|__ Port 1: Dev 5, If 1, Class=Vendor Specific Class, Driver=, 480M
|__ Port 2: Dev 6, If 1, Class=Vendor Specific Class, Driver=, 480M
|__ Port 2: Dev 6, If 0, Class=Vendor Specific Class, Driver=dvb_usb_rtl28xxu, 480M
|__ Port 3: Dev 7, If 0, Class=Vendor Specific Class, Driver=dvb_usb_rtl28xxu, 480M
|__ Port 3: Dev 7, If 1, Class=Vendor Specific Class, Driver=, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M


I have 2x USB3.0 HDD's via a USB3.0 hub.
Also, 3x USB2.0 Tuners via another USB3.0 hub
(this hub also has buit-in gigabit ethernet - which I don't use currently)

Seems good :)
Here's how I compile the kernel on the XU4

1) Backup all files in /media/boot /
2) Backup all files in /boot/
3) Do below terminal commands (as root)

Code: Select all
cd ~
git clone --depth 1 --single-branch -b odroidxu4-4.8.y https://github.com/mihailescu2m/linux/
cd linux
wget http://paste.debian.net/download/789788 -O .config
make oldconfig

## AUFS SUPPORT IF NEEDED ##
git clone --depth 1 --single-branch -b aufs4.x-rcN https://github.com/sfjro/aufs4-standalone/
git apply aufs4-standalone/aufs4-kbuild.patch
git apply aufs4-standalone/aufs4-base.patch
git apply aufs4-standalone/aufs4-mmap.patch

cp -r aufs4-standalone/Documentation .
cp -r aufs4-standalone/fs .
cp aufs4-standalone/include/uapi/linux/aufs_type.h include/uapi/linux/aufs_type.h
###########################

make menuconfig

###  Make changes.
### If using AUFS, enable it under File systems -> Miscellaneous filesystems -> Aufs support
### Once done, save and exit config

make -j8 zImage dtbs modules

rm /boot/*
cp arch/arm/boot/zImage arch/arm/boot/dts/exynos5422-odroidxu4.dtb /media/boot
cp .config /media/boot/config
make modules_install
make firmware_install
make headers_install INSTALL_HDR_PATH=/usr
kver=`make kernelrelease`
cp .config /boot/config-${kver}

cd /boot
update-initramfs -c -k ${kver}
mkimage -A arm -O linux -T ramdisk -a 0x0 -e 0x0 -n initrd.img-${kver} -d initrd.img-${kver} uInitrd-${kver}
cp uInitrd-${kver} /media/boot/uInitrd
sed -i -e 's/odroidxu3.dtb/odroidxu4.dtb/g' /media/boot/boot.ini

sync

reboot


Takes about 30-45 mins. Not bad!


Great instructions but I would change this:

Code: Select all
rm /boot/*


To

Code: Select all
mkdir /boot/previous
cp -R /boot/* /boot/previous/
rm /boot/*


So not to leave yourself without a known good kernel to restore just in case.
User avatar
rooted
 
Posts: 4672
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Odroid XU3/XU4 NEXT thread

Unread postby mattrix » Fri Aug 19, 2016 11:25 am

Code: Select all
mkdir /boot/previous
cp -R /boot/* /boot/previous/
rm /boot/*


So not to leave yourself without a known good kernel to restore just in case.


Well, /boot I don't think is actually used.
You can remove everything in there and it still works fine.
All the kernel & boot stuff is actually in /media/boot.

But, I did have instruction #2 to back it up :)
I'll update with your terminal commands though
mattrix
 
Posts: 89
Joined: Tue Jan 13, 2015 7:12 am
languages_spoken: english
ODROIDs: C1

Re: Odroid XU3/XU4 NEXT thread

Unread postby rooted » Fri Aug 19, 2016 12:08 pm

You know how people like to copy paste commands :)

I meant /media/boot, but some Linux variations for these devices doesn't use /media/boot
User avatar
rooted
 
Posts: 4672
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Fri Aug 19, 2016 1:27 pm

I would suggest adding this to /etc/rc.local for some extra performance:

Code: Select all
# CPU performance
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor

# GPU performance
echo performance > /sys/class/regulator/regulator.42/11800000.mali\:-mali/devfreq/11800000.mali\:/governor


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

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Fri Aug 19, 2016 6:01 pm

Hello,

I noticed that when rebooting (instead of a full power on / off) I often get stuck at boot with messages shown on attached image

thanks for all the cut and paste commadns that also allow to learn things :-)
Attachments
IMG_20160819_104951.jpg
boot stuck with ome usb cryptic (to me) messages
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Fri Aug 19, 2016 6:03 pm

by the way, I also modified the /media/boot.ini to reference xu4 dtb file instead of the xu3 version.
Should i do that ?
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Fri Aug 19, 2016 6:35 pm

Yes, the xu4 dtb should be used.
Are you using any usb3 devices? Or Ethernet?
Do you have this issue if you disconnect these devices or network? (So after a full boot with them disconnected?)
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Fri Aug 19, 2016 6:47 pm

I have ethernet cable plugged in (and used) and mouse and keyboard plugged to both USB 3 outlets.

I'll try with the mouse on regular plug and let you know...
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Fri Aug 19, 2016 6:54 pm

I tryed the following with ethernet cable always in

config 1

Mouse to upper USB 3.0 port
keyboard to USB 2.0 port
bottom 3.0 port empty

--> no reboot issue

config 2

Mouse to lower USB 3.0 port
keyboard to USB 2.0 port
upper 3.0 port empty

--> reboot issue is there

When doing a power off / on the boot is ok on both configs.
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Fri Aug 19, 2016 7:07 pm

I went too fast, problem occurs in both configs
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Fri Aug 19, 2016 7:11 pm

what happens with eth cable off?
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby moon.linux » Fri Aug 19, 2016 7:28 pm

Actually their is bit of issue in the USB hub it's not resetting properly on reboot. Need to find a different way to achieve this.
moon.linux
 
Posts: 1056
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby Matioupi » Fri Aug 19, 2016 8:15 pm

Ok, I'll check with ethernet cable off.
Meanwhile, I've been trying to run scilab which used to work is setting driver to fbdev in xorg.conf on stock kernel.
With this test kernel, it's not working, either with armsoc or fbdev

running with -debug flag shows a crash in libcrytpo so I guess this thos crypto stuff is handled to the kernel at some point and something is broken there.

Code: Select all
odroid@odroid:~$ scilab
Segmentation fault
odroid@odroid:~$ scilab -debug
Running debug of Scilab [gdb]  :  gdb --args /usr/bin/scilab-bin -debug
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/scilab-bin...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/scilab-bin -debug
Cannot parse expression `.L966 4@r4'.
warning: Probes-based dynamic linker interface failed.
Reverting to original interface.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0xb4f0b408 in ?? () from /lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb)
Matioupi
 
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby DarkBahamut » Sat Aug 20, 2016 12:47 am

Got my ethernet working in the end. I had been using a kernel install script I used for install my 3.10 kernels, but I forgot to account for the xu4.dtb file. Doh :oops:

Everything seems to work fairly well so far. There are some performance issues but this is mostly from the lack of HMP, and unfortunately setting performance isn't going to help. The issue is almost everything gets run on the A7's and unless you manually set task affinity no governor settings will help. You really have to run a highly threaded work load to ever see the A15's used. Top claims CPU usage isn't so high but it's misleading. CPU usage is high enough that even the mouse is really laggy, yet all A15's remain at 100% idle time. I seem to recall something about flipping the order of the clusters which might help with that without much effort. Now I have it working right I'm going to try a few changes to see if I can get performance up. As it stands now,

Sysbench 8 threads 10000 prime:
3.10 = 13.8s
4.8 = 15.5s (~10% slower - mostly due to throttling profile)

Kraken 1.1:
3.10: 4618ms
4.8: 14953ms (>3x slower - mostly due to running on A7's)

Also, I had the same reboot issue above with it hanging. I had to unplug my USB3 hard drive (was plugging into bottom USB3 port) to get it booting again. Hasn't failed since then.
DarkBahamut
 
Posts: 300
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4

Re: Odroid XU3/XU4 NEXT thread

Unread postby derko » Sat Aug 20, 2016 7:12 pm

I have a good experience with USB3 (still on 4.7 kernel, but the patches are probably the same).

Network throughput is about 30mb/s and throughput to an attached USB3.0 HDD is about 80mb/s, which is pretty much okay.

Big thanks for this thread, i hope odroid jumps on the train and pushes the XU4 fixes needed.
derko
 
Posts: 58
Joined: Tue Jul 14, 2015 2:16 am
languages_spoken: englisch, german
ODROIDs: XU4

Re: Odroid XU3/XU4 NEXT thread

Unread postby mattrix » Mon Aug 22, 2016 12:35 pm

Does anyone know if the Samba package gets "better" (faster) in Stretch or Sid?
Currently just using the Jessie version but speeds seem to drift a lot.
Average around 60MB read / 50MB write (windows 10 gigabit -> XU4 gigabit).
Have seen up-to 90 though.

I'm most concerned with READ.
As my torrent software runs on the XU4, it can write directly to the USB3 hard-drives.
Need good read for just renaming stuff over the network and also copying to the PC.

I think I read later versions of Samba have some sort of parallel capability?
I do have a 2nd NIC connected to the XU4, so could get Bonding going.
mattrix
 
Posts: 89
Joined: Tue Jan 13, 2015 7:12 am
languages_spoken: english
ODROIDs: C1

Re: Odroid XU3/XU4 NEXT thread

Unread postby rooted » Mon Aug 22, 2016 3:11 pm

What general sized files are you transferring? You mention torrent so large files I'm guessing?

Try some configuration optimization:

https://www.samba.org/samba/docs/man/Sa ... speed.html
User avatar
rooted
 
Posts: 4672
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Mon Aug 22, 2016 4:26 pm

Here's an updated video.

After a few days of debugging, I patched gnome3 to use the Mali r10p0 Wayland. With this patch, I was able to run GDM3 as well, and the entire gnome stack.

And also, the performance is AMAZING. It's the fastest / most responsive desktop I ever had on the XU4!!!


https://www.youtube.com/watch?v=AkSgm4JF81U


PS: one core is at 100% because the gnome-settings-daemon gets stuck on something, I will check if there's a fix on the gnome threads.
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby mad_ady » Mon Aug 22, 2016 4:51 pm

Great progress memeka! Quick question - why are you using 16.10? Is it because the wayland bits are not part of 16.04?
User avatar
mad_ady
 
Posts: 3621
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Odroid XU3/XU4 NEXT thread

Unread postby moon.linux » Mon Aug 22, 2016 5:37 pm

Great Excellent news.

Could you test the kernel feature by enable
Code: Select all
CONFIG_ARM_SMMU=y
CONFIG_DRM_EXYNOS_G2D=y
CONFIG_DRM_EXYNOS_IPP=y
CONFIG_DRM_EXYNOS_ROTATOR=y
CONFIG_DRM_EXYNOS_GSC=y
moon.linux
 
Posts: 1056
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby ard » Mon Aug 22, 2016 5:53 pm

moon.linux wrote:Actually their is bit of issue in the USB hub it's not resetting properly on reboot. Need to find a different way to achieve this.

Hi moon,
Do you have any more info about this?
I can reliably make the external USB3 hang on the mdrjr 3.10 kernel *and* memeka's 4.8, and it requires a powercycle with the HDMI unplugged to get it back to normal again.
I can automate a powercycle for a single xu4 using the smartpower, but not a hdmi unplug/plug.
I would be fine if I just have to set some GPIO's to pull the reset line of the hub.
ard
 
Posts: 71
Joined: Tue Jul 09, 2013 2:12 am
languages_spoken: english, dutch, german
ODROIDs: ODROID-U2

Re: Odroid XU3/XU4 NEXT thread

Unread postby moon.linux » Mon Aug 22, 2016 6:07 pm

I would be fine if I just have to set some GPIO's to pull the reset line of the hub.


I am working on this approach, but I dont have the documentation or pinctl information to verify the feature.

Exyos4212 have hub reset for Odroid U3, so similarly their would be some way to achieve this on Odroid XU4
Code: Select all
+        hsic_reset: hsic-reset {
+                samsung,pins = "gpe1-0";
+                samsung,pin-function = <1>;
+                samsung,pin-pud = <0>;
+                samsung,pin-drv = <0>;
+        };
moon.linux
 
Posts: 1056
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Mon Aug 22, 2016 6:08 pm

mad_ady wrote:Great progress memeka! Quick question - why are you using 16.10? Is it because the wayland bits are not part of 16.04?

16.10 uses gnome 3.20 which has better wayland support.
I only had to patch mutter for cursor whereas in 3.18 it needs to be patched to support Mali DRM.
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid XU3/XU4 NEXT thread

Unread postby memeka » Mon Aug 22, 2016 6:10 pm

moon.linux wrote:Great Excellent news.

Could you test the kernel feature by enable
Code: Select all
CONFIG_ARM_SMMU=y
CONFIG_DRM_EXYNOS_G2D=y
CONFIG_DRM_EXYNOS_IPP=y
CONFIG_DRM_EXYNOS_ROTATOR=y
CONFIG_DRM_EXYNOS_GSC=y


Gscaler is enabled and gstreamer recognizes it (via v4l2) as a converter, however I was not able to use it with gstreamer to convert anything.
User avatar
memeka
 
Posts: 3889
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Next

Return to Linux Kernel 4.14 Debugging Party

Who is online

Users browsing this forum: No registered users and 1 guest