Any plan for basic mainline linux support?

Post Reply
User avatar
lazlo
Posts: 228
Joined: Sun Oct 01, 2017 11:32 am
languages_spoken: english
ODROIDs: XU4 N2+
Has thanked: 6 times
Been thanked: 12 times
Contact:

Re: Any plan for basic mainline linux support?

Post by lazlo »

Could be an issue with the directory /home/odroid, check permissions on it and the files in it with ls -hal /home/odroid?

meister ivar
Posts: 20
Joined: Fri Jan 05, 2018 7:27 pm
languages_spoken: english german
ODROIDs: xu4q c2 n2
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Post by meister ivar »

aull77 wrote:
Sat Sep 05, 2020 5:00 pm

Tried to install with linux 5.8 a fresh start. Looks like the mali-wayland driver is causing an endless password loop and not accepting the password at all. Terminal accepts the password and can see that the typed password is correct so not sure what is happening. Is this happening to anyone else too?
For me the same issue.
But pwd was accepted: Try to open the other tty's after your log-in seems to went wrong and your graphical session might be there.
In my case it was tty2, tty5 and than tty7, later tty3...

It seems to be a bug?

User avatar
tobetter
Posts: 6118
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 282 times
Been thanked: 792 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

meister ivar wrote:
Mon Sep 07, 2020 3:59 am
aull77 wrote:
Sat Sep 05, 2020 5:00 pm

Tried to install with linux 5.8 a fresh start. Looks like the mali-wayland driver is causing an endless password loop and not accepting the password at all. Terminal accepts the password and can see that the typed password is correct so not sure what is happening. Is this happening to anyone else too?
For me the same issue.
But pwd was accepted: Try to open the other tty's after your log-in seems to went wrong and your graphical session might be there.
In my case it was tty2, tty5 and than tty7, later tty3...

It seems to be a bug?
I think you guys are failed at Gnome Desktop login since Ubuntu on Wayland is not selected like the video.
https://youtu.be/J9EuXwxVik0?t=87

aull77
Posts: 6
Joined: Sun Jun 28, 2020 7:46 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Post by aull77 »

@lazlo, this is the output from the permissions. Does anything look odd?

drwxr-xr-x 16 odroid odroid 4.0K Sep 6 21:28 .
drwxr-xr-x 3 root root 4.0K Sep 2 06:36 ..
-rw------- 1 odroid odroid 974 Sep 6 21:16 .bash_history
-rw-r--r-- 1 odroid odroid 220 Sep 2 06:36 .bash_logout
-rw-r--r-- 1 odroid odroid 3.7K Sep 2 06:36 .bashrc
drwx------ 12 odroid odroid 4.0K Sep 5 06:25 m.cache
drwx------ 11 odroid odroid 4.0K Sep 5 06:30 .config
drwx------ 3 odroid odroid 4.0K Sep 5 06:29 m.gnupg
drwxr-xr-x 3 odroid odroid 4.0K Sep 5 06:24 m.local
drwx------ 4 odroid odroid 4.0K Sep 5 06:24 m.mozilla
-rw-r--r-- 1 odroid odroid 807 Sep 2 06:36 .profile
drwx------ 2 odroid odroid 4.0K Sep 5 06:29 .ssh
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Desktop
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Documents
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Downloads
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Music
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Pictures
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Public
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Templates
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Videos
-rw-rw-r-- 1 odroid odroid 0 Sep 6 21:28 session.log

@tobetter
I cannot see the option to switch to Wayland from the login screen.

User avatar
tobetter
Posts: 6118
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 282 times
Been thanked: 792 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

aull77 wrote:
Mon Sep 07, 2020 7:52 am
@lazlo, this is the output from the permissions. Does anything look odd?

drwxr-xr-x 16 odroid odroid 4.0K Sep 6 21:28 .
drwxr-xr-x 3 root root 4.0K Sep 2 06:36 ..
-rw------- 1 odroid odroid 974 Sep 6 21:16 .bash_history
-rw-r--r-- 1 odroid odroid 220 Sep 2 06:36 .bash_logout
-rw-r--r-- 1 odroid odroid 3.7K Sep 2 06:36 .bashrc
drwx------ 12 odroid odroid 4.0K Sep 5 06:25 m.cache
drwx------ 11 odroid odroid 4.0K Sep 5 06:30 .config
drwx------ 3 odroid odroid 4.0K Sep 5 06:29 m.gnupg
drwxr-xr-x 3 odroid odroid 4.0K Sep 5 06:24 m.local
drwx------ 4 odroid odroid 4.0K Sep 5 06:24 m.mozilla
-rw-r--r-- 1 odroid odroid 807 Sep 2 06:36 .profile
drwx------ 2 odroid odroid 4.0K Sep 5 06:29 .ssh
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Desktop
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Documents
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Downloads
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Music
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Pictures
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Public
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Templates
drwxr-xr-x 2 odroid odroid 4.0K Sep 5 06:24 Videos
-rw-rw-r-- 1 odroid odroid 0 Sep 6 21:28 session.log

@tobetter
I cannot see the option to switch to Wayland from the login screen.
If you are not able to see the option, I doubt if you have successfully installed Wayland driver. Can you check if the kernel module mali_kbase is loaded?

aull77
Posts: 6
Joined: Sun Jun 28, 2020 7:46 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Post by aull77 »

Thanks tobetter
lsmod showed mali_kbase was there ...

User avatar
tobetter
Posts: 6118
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 282 times
Been thanked: 792 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

aull77 wrote:
Mon Sep 07, 2020 5:42 pm
Thanks tobetter
lsmod showed mali_kbase was there ...
Did you install the package ubuntu-desktop?
Can you share the long in screen that suppose to have "Ubuntu on Wayland"?

aull77
Posts: 6
Joined: Sun Jun 28, 2020 7:46 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Post by aull77 »

I see my error. Did not notice that the option for Ubuntu on Wayland only showed after I selected the user. :oops:

Sorry - but appreciate your time.

bas25
Posts: 15
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Post by bas25 »

i made a fresh install with linux 5.8 thanks to tobetter image (N2) :
tobetter wrote:
Wed Sep 02, 2020 11:35 pm
The new image with Linux kernel 5.8.x is ready.
Ubuntu 20.04 (Focal Fossa) for ODROID-N2 and ODROID-N2Plus
Does someone know how to use
-> UART_EE_A
-> GPIO irq (no edge file after export)

bas25
Posts: 15
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Post by bas25 »

if it can help someone :
UART_EE_A : enabled by default pin 8-10 /dev/ttyAML1
to change the state it should be :
fdtput -t s /boot/dtb /soc/bus@ffd00000/serial@24000 status "okay"
fdtput -t s /boot/dtb /soc/bus@ffd00000/serial@24000 status "disabled"

4-pin CON5 UART : enabled /dev/ttyAML0

i haven't tried activating uart_EE_B, probably :
fdtput -t s /boot/dtb /soc/bus@ffd00000/serial@23000 status "okay"
fdtput -t s /boot/dtb /soc/bus@ffd00000/serial@23000 status "disabled"

https://wiki.odroid.com/odroid-n2/appli ... /gpio/uart
These users thanked the author bas25 for the post:
brad (Mon Sep 14, 2020 8:16 am)

bas25
Posts: 15
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Post by bas25 »

i think something is missing in device tree for uart_EE_B .
when activated with fdtput -t s /boot/dtb /soc/bus@ffd00000/serial@23000 status "okay"
i've got : ffd23000.serial: ttyAML6 at MMIO 0xffd23000 (irq = 22, base_baud = 1500000) is a meson_uart
but pins (15 and 35) are not switched to alternate mode

Code: Select all

 +------+-----+----------+------+---+----+---- Model  ODROID-N2 ----+----+---+------+----------+-----+------+
 | GPIO | wPi |   Name   | Mode | V | DS | PU/PD | Physical | PU/PD | DS | V | Mode |   Name   | wPi | GPIO |
 +------+-----+----------+------+---+----+-------+----++----+-------+----+---+------+----------+-----+------+
  |  473 |   7 | GPIO.473 | ALT1 | 0 |  0 | DSBLD |  7   || 8     | DSBLD | 1  | 1 | ALT1 | TxD1     | 15  | 488  |
 |         |     |  GND(0V) |      |   |    |                 |  9   || 10  | DSBLD | 1  | 1 | ALT1 | RxD1     | 16  | 489  |

|  483  |   3 | GPIO.483 |   IN | 0 |  1 |   P/U      | 15  || 16 | P/U   | 2  | 1 | IN   | GPIO.476 | 4   | 476  |

 |  482 |  24 | GPIO.482 |   IN | 0 |  1 |   P/D      | 35 || 36 | DSBLD | 1  | 0 | IN   | GPIO.495 | 27  | 495  |

jgmdev
Posts: 192
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 60 times
Been thanked: 134 times
Contact:

Re: Any plan for basic mainline linux support?

Post by jgmdev »

Today I have been compiling various kernel branches to test panfrost support and as I have read here audio support for the Odroid N2 should be in place since kernel 5.8 but I haven't been able to make it work so far... I read that some startup initialization is needed so saw tobetter odroid-alsa package commands for alsa which are the following:

Code: Select all

amixer sset 'FRDDR_A SINK 1 SEL' 'OUT 1' || true
amixer sset 'FRDDR_A SRC 1 EN' 'on' || true
amixer sset 'TDMOUT_B SRC SEL' 'IN 0' || true
amixer sset 'TOHDMITX I2S SRC' 'I2S B' || true
amixer sset 'TOHDMITX' 'on' || true

amixer sset 'FRDDR_B SINK 1 SEL' 'OUT 2' || true
amixer sset 'FRDDR_B SRC 1 EN' 'on' || true
amixer sset 'TDMOUT_C SRC SEL' 'IN 1' || true
amixer sset 'TOACODEC SRC' 'I2S C' || true
amixer sset 'TOACODEC OUT EN' 'on' || true
amixer sset 'TOACODEC Lane Select' '0' || true
amixer sset 'ACODEC' '255'

amixer sset 'FRDDR_C SINK 1 SEL' 'OUT 3' || true
amixer sset 'FRDDR_C SRC 1 EN' 'on' || true
amixer sset 'SPDIFOUT SRC SEL' 'IN 2' || true

alsactl store
But testing on a Linux 5.9 branch doesn't seems to work (also tested on 5.7, 5.8 in the past...), are there any specific kernel config options that need to be enabled or disabled to get it working? Recompiling the kernel so many times, playing around with config flags, uninstalling/installing can be depressing :D

So far for me, enabling audio support on mainline kernel remains a mystery. Any hints are highly appreciated!

brad
Posts: 1292
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

jgmdev wrote:
Fri Oct 09, 2020 11:22 am
Today I have been compiling various kernel branches to test panfrost support and as I have read here audio support for the Odroid N2 should be in place since kernel 5.8 but I haven't been able to make it work so far... I read that some startup initialization is needed so saw tobetter odroid-alsa package commands for alsa which are the following:

Code: Select all

amixer sset 'FRDDR_A SINK 1 SEL' 'OUT 1' || true
amixer sset 'FRDDR_A SRC 1 EN' 'on' || true
amixer sset 'TDMOUT_B SRC SEL' 'IN 0' || true
amixer sset 'TOHDMITX I2S SRC' 'I2S B' || true
amixer sset 'TOHDMITX' 'on' || true

amixer sset 'FRDDR_B SINK 1 SEL' 'OUT 2' || true
amixer sset 'FRDDR_B SRC 1 EN' 'on' || true
amixer sset 'TDMOUT_C SRC SEL' 'IN 1' || true
amixer sset 'TOACODEC SRC' 'I2S C' || true
amixer sset 'TOACODEC OUT EN' 'on' || true
amixer sset 'TOACODEC Lane Select' '0' || true
amixer sset 'ACODEC' '255'

amixer sset 'FRDDR_C SINK 1 SEL' 'OUT 3' || true
amixer sset 'FRDDR_C SRC 1 EN' 'on' || true
amixer sset 'SPDIFOUT SRC SEL' 'IN 2' || true

alsactl store
But testing on a Linux 5.9 branch doesn't seems to work (also tested on 5.7, 5.8 in the past...), are there any specific kernel config options that need to be enabled or disabled to get it working? Recompiling the kernel so many times, playing around with config flags, uninstalling/installing can be depressing :D

So far for me, enabling audio support on mainline kernel remains a mystery. Any hints are highly appreciated!
There are some settings in the kernel that need to be enabled. These will be the config options starting with SND_MESON_* make them as modules if they are not already. There may be some settings in the devicetree also, I can check at some stage.

The driver also needs to be configured in userpace during startup. Take a look at the /usr/share/alsa/cards/G12B-ODROID-N2.conf file on tobetters image (which is based off the work done by chewitt for LibreELEC) which enables the devices in userspace and you then also need to configure the sinks using the commands you listed above. Here is a copy of it for reference on my debian install:

Code: Select all

# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)

<confdir:pcm/hdmi.conf>

G12B-ODROID-N2.pcm.hdmi.0 {
        @args [ CARD AES0 AES1 AES2 AES3 ]
        @args.CARD { type string }
        @args.AES0 { type integer }
        @args.AES1 { type integer }
        @args.AES2 { type integer }
        @args.AES3 { type integer }
        type hooks
        slave.pcm {
                type hw
                card $CARD
                device 0
                subdevice 0
        }
        hooks.0 {
                type ctl_elems
                hook_args [
                        {
                                interface MIXER
                                name "IEC958 Playback Default"
                                lock true
                                preserve true
                                optional true
                                value [ $AES0 $AES1 $AES2 $AES3 ]
                        }
                ]
        }
        hint.device 0
}

<confdir:pcm/front.conf>

G12B-ODROID-N2.pcm.front.0 {
        @args [ CARD ]
        @args.CARD { type string }
        type hw
        card $CARD
        device 1
}

<confdir:pcm/iec958.conf>

G12B-ODROID-N2.pcm.iec958.0 {
        @args [ CARD AES0 AES1 AES2 AES3 ]
        @args.CARD { type string }
        @args.AES0 { type integer }
        @args.AES1 { type integer }
        @args.AES2 { type integer }
        @args.AES3 { type integer }
        type hooks
        slave.pcm {
                type hw
                card $CARD
                device 2
        }
        hooks.0 {
                type ctl_elems
                hook_args [
                        {
                                interface PCM
                                name "IEC958 Playback Default"
                                lock true
                                preserve true
                                optional true
                                value [ $AES0 $AES1 $AES2 $AES3 ]
                        }
                ]
        }
}
Hopefully this can be improved sometime in the future so that the kernel provides all the details so alsa can auto configure in userspace.

jgmdev
Posts: 192
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 60 times
Been thanked: 134 times
Contact:

Re: Any plan for basic mainline linux support?

Post by jgmdev »

brad wrote:
Sat Oct 10, 2020 1:32 am
There are some settings in the kernel that need to be enabled. These will be the config options starting with SND_MESON_* make them as modules if they are not already.
This settings are in place (/proc/config.gz), not sure if there is a missing setting not automatically added to the config file and that make menuconfig does not displays:

Code: Select all

#
# ASoC support for Amlogic platforms
#
CONFIG_SND_MESON_AIU=m
CONFIG_SND_MESON_AXG_FIFO=m
CONFIG_SND_MESON_AXG_FRDDR=m
CONFIG_SND_MESON_AXG_TODDR=m
CONFIG_SND_MESON_AXG_TDM_FORMATTER=m
CONFIG_SND_MESON_AXG_TDM_INTERFACE=m
CONFIG_SND_MESON_AXG_TDMIN=m
CONFIG_SND_MESON_AXG_TDMOUT=m
CONFIG_SND_MESON_AXG_SOUND_CARD=m
CONFIG_SND_MESON_AXG_SPDIFOUT=m
CONFIG_SND_MESON_AXG_SPDIFIN=m
CONFIG_SND_MESON_AXG_PDM=m
CONFIG_SND_MESON_CARD_UTILS=m
CONFIG_SND_MESON_CODEC_GLUE=m
CONFIG_SND_MESON_GX_SOUND_CARD=m
CONFIG_SND_MESON_G12A_TOACODEC=m
CONFIG_SND_MESON_G12A_TOHDMITX=m
CONFIG_SND_SOC_MESON_T9015=m
# end of ASoC support for Amlogic platforms
brad wrote:
Sat Oct 10, 2020 1:32 am
The driver also needs to be configured in userpace during startup. Take a look at the /usr/share/alsa/cards/G12B-ODROID-N2.conf file on tobetters image (which is based off the work done by chewitt for LibreELEC) which enables the devices in userspace and you
Also that file is in place in /usr/share/alsa/cards/
brad wrote:
Sat Oct 10, 2020 1:32 am
then also need to configure the sinks using the commands you listed above.
Running the sink commands I get:

Code: Select all

amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
alsactl: save_state:1595: No soundcards found...
So I guess there is something else missing on the kernel config :(
brad wrote:
Sat Oct 10, 2020 1:32 am
There may be some settings in the devicetree also, I can check at some stage.
That may be my issue, also as far as I know the audio is also an issue on manjaro. So knowing what needs to be enabled would help other distro packagers. I just did a diff from a backup I had of the tobetter ubuntu /proc/config.gz with the one I'm using and there are differences on the *SND* stuff:

https://gist.github.com/jgmdev/aa1b3980 ... cf809cfe2c

The issue I got with tobetter config file is that the system wasn't booting from my external usb SSD, so discovered usb issues on tobetter image due also to problematic kernel settings. I also tried to troubleshoot that usb issue but after like 10 compiles I gave up :lol:, will have to setup my x64 machine to do cross compiling in order to spend less time compiling and more testing.

jgmdev
Posts: 192
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 60 times
Been thanked: 134 times
Contact:

Re: Any plan for basic mainline linux support?

Post by jgmdev »

So after like 20 hours (:P) analyzing the linux config, re-compiling and adjusting the linux kernel config file with changes from the linux config file included on tobetter ubuntu image, I was finally able to build a mainline kernel (5.9 rc8) with sound and panfrost (requires additional patches) support that still boots from USB SSD :D. For those other distributions like Manjaro and Armbian (that as far as I know doesn't also have audio enabled on mainline kernel), here is a linux config that enables it (i'm still unsure which config settings made it work but I think I have a suspicion which I share below).

https://github.com/jgmdev/archlinux-odr ... -59/config

I have noticed a little bit of unstableness with the usb devices I have connected when an application starts playing audio, but when audio playing starts the system stabilizes, maybe the issue is because I set the kernel to 1000hz (overall offers less tearing), 250hz may be more stable. Another reason for the unstableness may be that I introduced unneeded settings that made the kernel perform worst... In any case (besides the settings listed on the posts above *_SND_MESON_*), I suspect some of these settings finally enabled the audio as it should (maybe something else is missing but that would require another set of recompiles :lol:):

Code: Select all

CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
CONFIG_SND_SOC_SPDIF=m
CONFIG_COMMON_CLK_MESON_PHASE=m
CONFIG_COMMON_CLK_MESON_SCLK_DIV=m
CONFIG_COMMON_CLK_AXG_AUDIO=m
CONFIG_RESET_MESON_AUDIO_ARB=m
CONFIG_MESON_EFUSE=y
CONFIG_MESON_MX_EFUSE=y
If anyone can confirm this enables the audio support please share it (I'm wear out :lol:) If the kernel support for audio is working aplay -l should list something like:

Code: Select all

**** List of PLAYBACK Hardware Devices ****
card 0: G12BODROIDN2 [G12B-ODROID-N2], device 0: fe.dai-link-0 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: G12BODROIDN2 [G12B-ODROID-N2], device 1: fe.dai-link-1 (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: G12BODROIDN2 [G12B-ODROID-N2], device 2: fe.dai-link-2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Also remember to setup alsa with the commands shared on the above posts, and make sure to disconnect any usb sound card you have, restart the system and then run the amixer/alsactl commands. This is done in order so that any usb sound card doesn't conflicts with the built-in audio support when running the amixer commands (maybe the amixer commands can be adjusted to detect connected sound devices and apply the commands to the proper sound card).

Ahhh, finally I can run mainline kernel with sound support, initial panfrost for testing and good hdmi video output (no green line on display, thanks to tobetter 5.9 branch) on my favorite linux distro! Thanks to all developers involved making the odroid-n2 better supported on each release of the kernel!
These users thanked the author jgmdev for the post (total 5):
tobetter (Mon Oct 12, 2020 3:30 pm) • Sav (Mon Oct 12, 2020 3:40 pm) • istanbulls (Mon Oct 12, 2020 5:58 pm) • brad (Mon Oct 12, 2020 6:12 pm) • xabolcs (Tue Oct 13, 2020 3:44 pm)

User avatar
istanbulls
Posts: 297
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID-N2, ODROID C4
Location: Istanbul-Turkey
Has thanked: 190 times
Been thanked: 39 times
Contact:

Re: Any plan for basic mainline linux support?

Post by istanbulls »

I follow the topics, I try to understand.
I'm just a simple user, not a developer, unfamiliar with most of the terms.
I have an experience with Audio-Screen tearing, maybe it will work for you.

When I set the audio output to 24Bit / 192khz, the screen was tearing.

When I tried this it improved.

Code: Select all

sudo cpufreq-set -c 0 -d 1000MHz -r
sudo cpufreq-set -c 2 -d 1000MHz -r
Maybe you already know this.

miskol
Posts: 263
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
ODROIDs: XU4,C1,C2,N2,C4
Has thanked: 1 time
Been thanked: 24 times
Contact:

Re: Any plan for basic mainline linux support?

Post by miskol »

istanbulls wrote:
Mon Oct 12, 2020 5:59 pm
I follow the topics, I try to understand.
I'm just a simple user, not a developer, unfamiliar with most of the terms.
I have an experience with Audio-Screen tearing, maybe it will work for you.

When I set the audio output to 24Bit / 192khz, the screen was tearing.

When I tried this it improved.

Code: Select all

sudo cpufreq-set -c 0 -d 1000MHz -r
sudo cpufreq-set -c 2 -d 1000MHz -r
Maybe you already know this.
Anybody can confirm this behavior?

jgmdev
Posts: 192
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 60 times
Been thanked: 134 times
Contact:

Re: Any plan for basic mainline linux support?

Post by jgmdev »

istanbulls wrote:
Mon Oct 12, 2020 5:59 pm
I follow the topics, I try to understand.
I'm just a simple user, not a developer, unfamiliar with most of the terms.
I have an experience with Audio-Screen tearing, maybe it will work for you.
...
What I mean about the 1000hz is the kernel timer frequency, I also don't know nothing about kernel stuff, I have only been able to play around with it because I'm motivated to get better graphics support :D. In any case the kernel timer frequency when set to higher tends to be more responsive (as I have read on various places) for desktop workloads, one example of that is graphic rendering, I noticed that setting the kernel timer frequency to 1000hz resulted in a noticeable reduction of screen tearing when running on a X session that doesn't has hardware accelerated support yet. But what you mention about Audio and Screen tearing is interesting...

As a side note I'm not getting anymore system instability with the built-in audio and the usb devices, only happened one or two times after reboot when enabling the audio. Also, I have noticed the chewiit kernel branch is much more stable than the one I was using before so maybe updating the kernel fixed any instabilities on previous one. I did mixed chewitt and tobetter branches and for the moment it seems more table than before and also panfrost works better: https://github.com/jgmdev/linux/tree/odroid-5.9.chewitt

Finally, discovered that this file may list all the flags that are needed to get sound working :D

https://github.com/tobetter/linux/blob/ ... on/Kconfig

nowell29
Posts: 42
Joined: Mon Aug 10, 2020 6:06 am
languages_spoken: english
ODROIDs: N2+
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Post by nowell29 »

hey friends. I am able to use the latest image 5.8.1-202008182312~focal this N2+ has never been faster! However, as soon as I run an apt upgrade I lose ethernet upon reboot. I spent a bunch of time yesterday looking through this thread for any details, but maybe I have overlooked something. Does anybody know what I need to do here? I did to a apt-mark hold on the kernel, but that didn't prevent the upgrade from breaking ethernet. Apt wants to update python and libc so I have cancelled considering.

I also did the recent spi update to 20200816, but that didn't change things either.

crashoverride
Posts: 5141
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 380 times
Contact:

Re: Any plan for basic mainline linux support?

Post by crashoverride »

jgmdev wrote:
Wed Oct 14, 2020 6:51 am
In any case the kernel timer frequency when set to higher tends to be more responsive (as I have read on various places) for desktop workloads, one example of that is graphic rendering,
The kernel timer frequency is the frequency at which a task gets "interrupted". On a single core system, this is what provides the illusion of multi-tasking. A process will will for the timer duration before the interruption causes the kernel to switch to a different task. The more frequent this interruption occurs (higher frequency), the less time a process runs before a "context switch" happens to run a different process. There is a lot of overhead in switching tasks. The current state of the task must be stored and a the state of the other task must be restored (including virtual memory page tables). This means more work for the CPU to do over a shorter period of time. To deal with this increased workload, the scheduler may choose to use a "big" core instead of a "little" one or increase processor frequency (governor). This is typically what makes the system appear to be more responsive. To verify if this is the case, the "little" cores can be disabled while using a "low" (250Hz) kernel timer frequency and the "performance" governor..

brad
Posts: 1292
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

crashoverride wrote:
Sat Oct 17, 2020 4:01 am
jgmdev wrote:
Wed Oct 14, 2020 6:51 am
In any case the kernel timer frequency when set to higher tends to be more responsive (as I have read on various places) for desktop workloads, one example of that is graphic rendering,
The kernel timer frequency is the frequency at which a task gets "interrupted". On a single core system, this is what provides the illusion of multi-tasking. A process will will for the timer duration before the interruption causes the kernel to switch to a different task. The more frequent this interruption occurs (higher frequency), the less time a process runs before a "context switch" happens to run a different process. There is a lot of overhead in switching tasks. The current state of the task must be stored and a the state of the other task must be restored (including virtual memory page tables). This means more work for the CPU to do over a shorter period of time. To deal with this increased workload, the scheduler may choose to use a "big" core instead of a "little" one or increase processor frequency (governor). This is typically what makes the system appear to be more responsive. To verify if this is the case, the "little" cores can be disabled while using a "low" (250Hz) kernel timer frequency and the "performance" governor..
I have been testing realtime kernel (5.9.0-rc8-rt12) and playing around with these timer settings to measure the differences. I think the key for the timer setting is to have it matched as closely as possible to a multiple of the other key timers in the system such as RAM for memory xfers, or mmc frequency for storage workloads, gpu / hdmi frequencies for GPU / display work, USB for usb work. Often for external IO to other components the lower settings seem to match better as multiples but for all out CPU context switching the 1000Hz works best. Higher timer frequencies are generally best for latency but lower frequencies are often better for throughput (or getting the job done). The other thing to consider on the N2 is the big.LITTLE and different timers for the different cores.

crashoverride
Posts: 5141
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 380 times
Contact:

Re: Any plan for basic mainline linux support?

Post by crashoverride »

brad wrote:
Sat Oct 17, 2020 9:47 am
Higher timer frequencies are generally best for latency
I disagree with this assertion on modern ARM SBCs (multi core/OOE) with modern kernels (post spectere). The reason is that in addition to the costs I previously mentioned for a context switch, there is an additional cost for barriers / cache flushing to mitigate exploits or when the processes crosses to a different CPU core.

elatllat
Posts: 1808
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 55 times
Been thanked: 119 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

crashoverride wrote:
Sun Oct 18, 2020 2:20 am
... spectere...
On 5.4.72 the N2 is still vulnerable to spec_store_bypass so no slowdown there :/
spectre_v1:Mitigation: __user pointer sanitization would likely slow it down though.

brad
Posts: 1292
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

crashoverride wrote:
Sun Oct 18, 2020 2:20 am
brad wrote:
Sat Oct 17, 2020 9:47 am
Higher timer frequencies are generally best for latency
I disagree with this assertion on modern ARM SBCs (multi core/OOE) with modern kernels (post spectere). The reason is that in addition to the costs I previously mentioned for a context switch, there is an additional cost for barriers / cache flushing to mitigate exploits or when the processes crosses to a different CPU core.
Interesting I should do some more research here, I am running realtime threads locked to a specific core with PREEMPT_RT enabled (and some scheduler patches for RT). The RT process "should" fit in the L1 cache, I wonder if it is impacted. I now also wonder if I disable some of these security features if latency would be improved.

jgmdev
Posts: 192
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 60 times
Been thanked: 134 times
Contact:

Re: Any plan for basic mainline linux support?

Post by jgmdev »

brad wrote:
Sun Oct 18, 2020 9:24 am
I now also wonder if I disable some of these security features if latency would be improved.
You can always try mitigations=off kernel parameter, I feel it does makes a different but I haven't done any proper benchmarks. Last time I tested with jack to record some music I was getting 5.8ms of latency.
These users thanked the author jgmdev for the post:
brad (Sun Oct 18, 2020 3:09 pm)

elatllat
Posts: 1808
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 55 times
Been thanked: 119 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

These users thanked the author elatllat for the post (total 2):
jgmdev (Sat Oct 24, 2020 4:39 am) • brad (Sat Oct 24, 2020 4:36 pm)

User avatar
tobetter
Posts: 6118
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 282 times
Been thanked: 792 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

20201024

The new image with Linux kernel 5.8.16 is ready, download the image and flash with Etcher.
Ubuntu 20.04 (Focal Fossa) for ODROID-N2/N2Plus

Note:
  • The default user account and its password is odroid and odroid
  • In case you like to run 5.9 kernel, install linux-image-5.9.0-odroid-arm64 package on this image
For Ubuntu Gnome Desktop users:
Gnome Desktop with ARM Wayland GPU acceleration can be installed on top of this server image.

Code: Select all

$ sudo apt update
$ sudo apt install ubuntu-desktop mali-bifrost-wayland-driver
$ sudo reboot
These users thanked the author tobetter for the post (total 4):
Sav (Sat Oct 24, 2020 4:13 pm) • brad (Sat Oct 24, 2020 4:36 pm) • istanbulls (Sat Oct 24, 2020 5:25 pm) • superpowter77 (Sun Oct 25, 2020 6:20 am)

trwn2p
Posts: 2
Joined: Fri Oct 16, 2020 5:12 am
languages_spoken: english
ODROIDs: N2 Plus
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Post by trwn2p »

Thanks for the n2 gnome wayland builds tobetter. I did a do-release-upgrade -d to Groovy-Gnome 3.38.1 and it runs nice on X. If you get the time to rebuild the bifrost-wayland-driver it would make it a great deal better imo. Hope you do a mainline panfrost version of this and a kde-plasma-wayland when that all works with 5.10rc1 hopefully. If not I have all that on manjaro on a testing build which is mentioned in the panfrost thread.

Cheers Archetech

brad
Posts: 1292
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

trwn2p wrote:
Sun Oct 25, 2020 8:22 am
Thanks for the n2 gnome wayland builds tobetter. I did a do-release-upgrade -d to Groovy-Gnome 3.38.1 and it runs nice on X. If you get the time to rebuild the bifrost-wayland-driver it would make it a great deal better imo. Hope you do a mainline panfrost version of this and a kde-plasma-wayland when that all works with 5.10rc1 hopefully. If not I have all that on manjaro on a testing build which is mentioned in the panfrost thread.

Cheers Archetech
Groovy Gorialla is end of life in July 2021 (~9 months) where as Focal is Long Term Release with life to 2025+ so just be mindful you would need to keep upgrading groovy to new short term releases each time to be able to get any updates. I'm in the process of creating some build packages for Panfrost development (mesa) on Focal at the moment (still some bugs). Even groovy mesa version will be too old to work.

I think 5.10 should have all that is needed for panfrost kernel side to work with N2 / C4 but time will tell.

elatllat
Posts: 1808
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 55 times
Been thanked: 119 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

As the last released kernel of the year 5.10 is next LTS;

http://phb-crystal-ball.org/

https://www.phoronix.com/scan.php?page= ... LTS-Kernel

elatllat
Posts: 1808
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 55 times
Been thanked: 119 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

5.10.0-rc1 seems to be working well on the N2-plus,
but I had to use the N2 DTS (N2-plus DTS stops boot while looking for root or enabling USB).
Has anyone looked into what is wrong with the mainline N2-plus DTS?
( @chewitt are we sure that under volt is stable? )

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 33 guests