Ubuntu 21.04 for ODROID-N2/C4/HC4

Post Reply
User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Okay, I installed Gnome (Or "Ubuntu" as it's called in the login screen selection menu).
glmark2-es2-wayland indeed works from here, with a result over 700, can't remember exactly.

supertuxkart is borked just the same as on Sway, the same errors appear in dmesg as described before.
supertux works well, but for some reason defaults to SDL. When forced to opengl20 works just as fine as on Sway.
extremetuxracer works fine, just like on Sway.

Cursor on gnome runs a bot choppy, whereas in Sway works smoothly. ;)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

amirul
Posts: 99
Joined: Wed Dec 30, 2020 6:03 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by amirul »

tobetter wrote:
Sun May 02, 2021 10:44 pm
20210502

Please note Ubuntu 21.04 server images for ODROID-N2/N2Plus/C4 have been uploaded. The image will boot with Linux kernel 5.11 and default account/password are odroid/odroid as always.

In case you like to install a desktop, please run tasksel and select preferred desktop.

Note for ODROID-HC4, for some reason the image for ODROID-HC4 has been failed but the image for ODROID-C4 will boot from ODROID-HC4. Only missing feature is OLED screen, it will work after installing odroid-homecloud-display.

Code: Select all

$ sudo apt update
$ sudo apt install odroid-homecloud-display
  • ODROID-N2/N2Plus installed great up to desktop, using tasksel ubuntu desktop. Hdmi sound is missing, how to get it back?

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

amirul wrote:
Mon May 03, 2021 1:10 am
tobetter wrote:
Sun May 02, 2021 10:44 pm
20210502

Please note Ubuntu 21.04 server images for ODROID-N2/N2Plus/C4 have been uploaded. The image will boot with Linux kernel 5.11 and default account/password are odroid/odroid as always.

In case you like to install a desktop, please run tasksel and select preferred desktop.

Note for ODROID-HC4, for some reason the image for ODROID-HC4 has been failed but the image for ODROID-C4 will boot from ODROID-HC4. Only missing feature is OLED screen, it will work after installing odroid-homecloud-display.

Code: Select all

$ sudo apt update
$ sudo apt install odroid-homecloud-display
  • ODROID-N2/N2Plus installed great up to desktop, using tasksel ubuntu desktop. Hdmi sound is missing, how to get it back?
Run this commands, audio will work after rebooting.

Code: Select all

sudo apt update
sudo apt install odroid-alsa
These users thanked the author tobetter for the post:
amirul (Mon May 03, 2021 7:29 pm)

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

Last several days, I was trying to update Panfrost and can see it's been improved a lot, the supertuxkart runs way better than before. Beside, one big issue I have with the update is that GPU only works with Wayland, not X11. I've not tested many Desktop variant yet, will investigate more...in any case I am not able to find out the patches that works with X11 session, I would upload packages for Wayland only or will consider the packages can be managed for X11 and Wayland separately.
Screenshot from 2021-05-04 19-18-49.png
Screenshot from 2021-05-04 19-18-49.png (1.86 MiB) Viewed 2668 times
These users thanked the author tobetter for the post (total 2):
amirul (Wed May 05, 2021 2:52 pm) • odroid (Thu May 06, 2021 12:25 pm)

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

I did see some updates of "libdrm" taken from linuxfactory yesterday, if I'm not mistaken. Thank you for that! Just rebooted my machine to see if there is any difference and sadly, supertuxkart works the same as I described in previous posts.
I got accomodated on Sway, it's a matter of acquired taste, I think. Super lightweight, nicely combines terminal workflow with accelerated graphics. It is important to note that Sway has been built from ground up specifically for Wayland - hence the name.
Anyway I failed to notice any difference in running applications against GNOME, except that glmark2-es2-wayland failed to run on Sway, and that GUI freezes for a few seconds from time to time - still can't say what this is about. Perhaps not related to Panfrost at all?

I got glmark2 to work by compiling it myself from source. Before that, I ran the stock version from ubuntu repository, that crashed with the following debug info. I wonder what does it have to do with Sway and why it worked okay with GNOME :?: :|

Code: Select all

Reading symbols from glmark2-es2-wayland...
(No debugging symbols found in glmark2-es2-wayland)
(gdb) run
Starting program: /usr/bin/glmark2-es2-wayland 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000fffff7f9ae1c in wl_proxy_marshal_constructor () from /lib/aarch64-linux-gnu/libwayland-client.so.0
(gdb) bt
#0  0x0000fffff7f9ae1c in wl_proxy_marshal_constructor () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#1  0x0000aaaaaaaf7414 in ?? ()
#2  0x0000fffff7a47148 in ?? () from /lib/aarch64-linux-gnu/libffi.so.8
#3  0x0000fffff7a46750 in ?? () from /lib/aarch64-linux-gnu/libffi.so.8
#4  0x0000fffff7f9de50 in ?? () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#5  0x0000fffff7f9a5b4 in ?? () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#6  0x0000fffff7f9bb40 in wl_display_dispatch_queue_pending () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#7  0x0000fffff7f9c108 in wl_display_roundtrip_queue () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#8  0x0000aaaaaaaf78c4 in ?? ()
#9  0x0000aaaaaaaacf40 in ?? ()
#10 0x0000aaaaaaaaac60 in ?? ()
#11 0x0000fffff7a7e9d4 in __libc_start_main (main=0xaaaaaaaaa4a0, argc=1, argv=0xfffffffff888, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:332
#12 0x0000aaaaaaaacd78 in ?? ()
(gdb) 

Anyway, my glmark2-es2-wayland score is 431.
for glmark2-wayland its' 345.

I think I recalled all that working slightly better some time ago. Hm.

Oh, right, some update has overwritten my /etc/default/[cg]pufrequtils values back to the stock. Gonna try again.

EDIT: I did two things: shifted GPU frequency back to 1GHz (I hope so?), and also ran glmark2* in windows, rather than half-screen tiles that Sway insisted on doing. It did change the results.
glmark2-es2-wayland: 578
glmark2-wayland: 569

Still wonder how did the others manage to get 700+ scores with older versions of Panfrost (as per panfrost status thread). Is that possible to get GPU overclock over 1GHz, or is there something else missing?

Anyway, I think that maybe some of my problems may be resolved by getting the most recent version of Sway - that one in the repo is 6 months old, but building Wayland, wlroots etc from scratch is gonna be a painful operation. :/
Last edited by mctom on Fri May 07, 2021 9:57 pm, edited 1 time in total.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Fri May 07, 2021 9:29 pm
I did see some updates of "libdrm" taken from linuxfactory yesterday, if I'm not mistaken. Thank you for that! Just rebooted my machine to see if there is any difference and sadly, supertuxkart works the same as I described in previous posts.
I got accomodated on Sway, it's a matter of acquired taste, I think. Super lightweight, nicely combines terminal workflow with accelerated graphics. It is important to note that Sway has been built from ground up specifically for Wayland - hence the name.
Anyway I failed to notice any difference in running applications against GNOME, except that glmark2-es2-wayland failed to run on Sway, and that GUI freezes for a few seconds from time to time - still can't say what this is about. Perhaps not related to Panfrost at all?

I got glmark2 to work by compiling it myself from source. Before that, I ran the stock version from ubuntu repository, that crashed with the following debug info. I wonder what does it have to do with Sway and why it worked okay with GNOME :?: :|

Code: Select all

Reading symbols from glmark2-es2-wayland...
(No debugging symbols found in glmark2-es2-wayland)
(gdb) run
Starting program: /usr/bin/glmark2-es2-wayland 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000fffff7f9ae1c in wl_proxy_marshal_constructor () from /lib/aarch64-linux-gnu/libwayland-client.so.0
(gdb) bt
#0  0x0000fffff7f9ae1c in wl_proxy_marshal_constructor () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#1  0x0000aaaaaaaf7414 in ?? ()
#2  0x0000fffff7a47148 in ?? () from /lib/aarch64-linux-gnu/libffi.so.8
#3  0x0000fffff7a46750 in ?? () from /lib/aarch64-linux-gnu/libffi.so.8
#4  0x0000fffff7f9de50 in ?? () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#5  0x0000fffff7f9a5b4 in ?? () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#6  0x0000fffff7f9bb40 in wl_display_dispatch_queue_pending () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#7  0x0000fffff7f9c108 in wl_display_roundtrip_queue () from /lib/aarch64-linux-gnu/libwayland-client.so.0
#8  0x0000aaaaaaaf78c4 in ?? ()
#9  0x0000aaaaaaaacf40 in ?? ()
#10 0x0000aaaaaaaaac60 in ?? ()
#11 0x0000fffff7a7e9d4 in __libc_start_main (main=0xaaaaaaaaa4a0, argc=1, argv=0xfffffffff888, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:332
#12 0x0000aaaaaaaacd78 in ?? ()
(gdb) 

Anyway, my glmark2-es2-wayland score is 431.
for glmark2-wayland its' 345.

I think I recalled all that working slightly better some time ago. Hm.

Oh, right, some update has overwritten my /etc/default/[cg]pufrequtils values back to the stock. Gonna try again.
I have not treid Sway since I am very lazy to build yet, I usually run Gnome and Weston. If Sway does not have Debian package, I would not try sometime soon. So...I am glad to have your experience with it.
For new package for libdrm, this won't improve the performance and Panfrost. I've updated it for next update Mesa and new Linux kernel package what I am testing, I wish I can upload them in 2 days. The updates make SuperTuxKart runs, but minor display gliches, better than major...

What's the version of glmark2-es2-wayland? If the package version is 20.02, it's from LinuxFactory, 14.03 or so from Canonical.

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

You don't need to build Sway, it's in ubuntu repo and works out of a box, at least for me. Just run "sway" in tty and you're all set. Of course, it's very hard to navigate for a newbie, so if you don't have much time on hands or prior experience with i3, better skip this "opportunity" ;) It took me a few days to get used to it.
tobetter wrote:
Fri May 07, 2021 9:46 pm
What's the version of glmark2-es2-wayland? If the package version is 20.02, it's from LinuxFactory, 14.03 or so from Canonical.

Code: Select all

mctom@Tomusiomat-ARM:~$ sudo apt show glmark2-es2-wayland
Package: glmark2-es2-wayland
Version: 5:2021.02+202104220018~hirsute
(...)
And indeed it's from LinuxFactory. And that one didn't work for me on Sway.
The one that I built today is whatever they have on github at the moment. :)

But I think it's not a matter of some bug they fixed recently. It may hav something to do with library versions that I have on my system and used for building it. Wayland and others might break backwards compatibility, I imagine...
tobetter wrote:
Fri May 07, 2021 9:46 pm
I've updated it for next update Mesa and new Linux kernel package what I am testing, I wish I can upload them in 2 days. The updates make SuperTuxKart runs, but minor display gliches, better than major...
Okay, sorry, I got the impression that these updates have been already pushed to repos :oops:

I edited my last reply and added more glmark scores. Still suspiciously little, but hey, doesn't matter unless I fix my compatibility problems. :)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

amirul
Posts: 99
Joined: Wed Dec 30, 2020 6:03 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by amirul »

Code: Select all

$ glmark2-es2-wayland 
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali G52 (Panfrost)
    GL_VERSION:    OpenGL ES 3.0 Mesa 21.1.0-devel (git-14b2dc0013)
=======================================================
[build] use-vbo=false: FPS: 622 FrameTime: 1.608 ms
[build] use-vbo=true: FPS: 649 FrameTime: 1.541 ms
[texture] texture-filter=nearest: FPS: 1354 FrameTime: 0.739 ms
[texture] texture-filter=linear: FPS: 1161 FrameTime: 0.861 ms
[texture] texture-filter=mipmap: FPS: 1387 FrameTime: 0.721 ms
[shading] shading=gouraud: FPS: 417 FrameTime: 2.398 ms
[shading] shading=blinn-phong-inf: FPS: 420 FrameTime: 2.381 ms
[shading] shading=phong: FPS: 389 FrameTime: 2.571 ms
[shading] shading=cel: FPS: 397 FrameTime: 2.519 ms
[bump] bump-render=high-poly: FPS: 145 FrameTime: 6.897 ms
[bump] bump-render=normals: FPS: 1517 FrameTime: 0.659 ms
[bump] bump-render=height: FPS: 1341 FrameTime: 0.746 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 995 FrameTime: 1.005 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 391 FrameTime: 2.558 ms
[pulsar] light=false:quads=5:texture=false: FPS: 1282 FrameTime: 0.780 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 215 FrameTime: 4.651 ms
[desktop] effect=shadow:windows=4: FPS: 910 FrameTime: 1.099 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 243 FrameTime: 4.115 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 241 FrameTime: 4.149 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 309 FrameTime: 3.236 ms
[ideas] speed=duration: FPS: 216 FrameTime: 4.630 ms
[jellyfish] <default>: FPS: 549 FrameTime: 1.821 ms
[terrain] <default>: FPS: 29 FrameTime: 34.483 ms
[shadow] <default>: FPS: 285 FrameTime: 3.509 ms
[refract] <default>: FPS: 36 FrameTime: 27.778 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 1141 FrameTime: 0.876 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 1115 FrameTime: 0.897 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 937 FrameTime: 1.067 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 1112 FrameTime: 0.899 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 755 FrameTime: 1.325 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 916 FrameTime: 1.092 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 1056 FrameTime: 0.947 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 867 FrameTime: 1.153 ms
=======================================================
                                  glmark2 Score: 709 
=======================================================
$ cat /etc/default/cpufrequtils 
GOVERNOR=schedutil
MIN_SPEED="1000MHZ"
MAX_SPEED="2400MHZ"

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

@mctom, what do you have in /etc/default/cpufrequtils and /etc/default/gpufrequtils?
For GPU overclocking, I don't think 1GHz is real but improve a bit from 800MHz which is official max frequency on the datasheet.

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

tobetter wrote:
Fri May 07, 2021 11:00 pm
@mctom, what do you have in /etc/default/cpufrequtils and /etc/default/gpufrequtils?
For GPU overclocking, I don't think 1GHz is real but improve a bit from 800MHz which is official max frequency on the datasheet.
Well, I have just reverted these two to my preferred values, because *something* has replaced them 3 days ago with the stock. Must have been an update, I think.
That's N2+ of course.

Code: Select all

mctom@Tomusiomat-ARM:/etc/default$ cat cpufrequtils 
GOVERNOR=ondemand
MIN_SPEED="1000MHZ"
MAX_SPEED="2400MHZ"
mctom@Tomusiomat-ARM:/etc/default$ cat gpufrequtils 
# GOVERNORS:    [userspace powersave performance simple_ondemand]
# FREQUENCIES : [124999998 249999996 285714281 399999994
#                499999992 666666656 799999987]
GOVERNOR=performance
MIN_FREQ=499999992
MAX_FREQ=999999984
mctom@Tomusiomat-ARM:/etc/default$ 
And before you ask:

Code: Select all

mctom@Tomusiomat-ARM:~$ sudo cat /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/max_freq
[sudo] hasło użytkownika mctom: 
999999984
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

amirul
Posts: 99
Joined: Wed Dec 30, 2020 6:03 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by amirul »

tobetter wrote:
Fri May 07, 2021 11:00 pm
@mctom, what do you have in /etc/default/cpufrequtils and /etc/default/gpufrequtils?
For GPU overclocking, I don't think 1GHz is real but improve a bit from 800MHz which is official max frequency on the datasheet.
$ cat /etc/default/cpufrequtils
GOVERNOR=schedutil
MIN_SPEED="1000MHZ"
MAX_SPEED="2400MHZ"
$ cat /etc/default/gpufrequtils
# GOVERNORS: [userspace powersave performance simple_ondemand]
# FREQUENCIES : [124999998 249999996 285714281 399999994
# 499999992 666666656 799999987]
GOVERNOR=performance
MIN_FREQ=499999992
MAX_FREQ=799999987
$ cat /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/available_frequencies
124999998 249999996 285714281 399999994 499999992 666666656 799999987 999999984
$ cat /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/cur_freq
999999984

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

amirul wrote:
Fri May 07, 2021 11:30 pm
tobetter wrote:
Fri May 07, 2021 11:00 pm
@mctom, what do you have in /etc/default/cpufrequtils and /etc/default/gpufrequtils?
For GPU overclocking, I don't think 1GHz is real but improve a bit from 800MHz which is official max frequency on the datasheet.
$ cat /etc/default/cpufrequtils
GOVERNOR=schedutil
MIN_SPEED="1000MHZ"
MAX_SPEED="2400MHZ"
$ cat /etc/default/gpufrequtils
# GOVERNORS: [userspace powersave performance simple_ondemand]
# FREQUENCIES : [124999998 249999996 285714281 399999994
# 499999992 666666656 799999987]
GOVERNOR=performance
MIN_FREQ=499999992
MAX_FREQ=799999987
$ cat /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/available_frequencies
124999998 249999996 285714281 399999994 499999992 666666656 799999987 999999984
$ cat /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/cur_freq
999999984
That's interesting, you didn't touch the MAX_FREQ setting and yet still get 1GHz GPU cur_freq? I feel stupid for "overclocking" my GPU then :roll: The reason why I got better scores in glmark was solely because I let it open a smaller window.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

@mctom, can you check the values? Also, if GPU governor is set with performance, ignore it's frequency. You would better to test with Gnome or Weston what I am testing.

Code: Select all

tobetter@hirsute:~$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq 
2016000
tobetter@hirsute:~$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor 
performance
tobetter@hirsute:~$ cat /sys/devices/system/cpu/cpufreq/policy2/scaling_cur_freq 
2400000
tobetter@hirsute:~$ cat /sys/devices/system/cpu/cpufreq/policy2/scaling_governor 
performance
tobetter@hirsute:~$ cat /sys/class/devfreq/ffe40000.gpu/cur_freq 
999999984
tobetter@hirsute:~$ cat /sys/class/devfreq/ffe40000.gpu/governor 
performance

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Code: Select all

mctom@Tomusiomat-ARM:~$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq 
1000000
mctom@Tomusiomat-ARM:~$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor 
ondemand
mctom@Tomusiomat-ARM:~$ cat /sys/devices/system/cpu/cpufreq/policy2/scaling_cur_freq
2400000
mctom@Tomusiomat-ARM:~$ cat /sys/devices/system/cpu/cpufreq/policy2/scaling_governor 
ondemand
mctom@Tomusiomat-ARM:~$ cat /sys/class/devfreq/ffe40000.gpu/cur_freq 
124999998
mctom@Tomusiomat-ARM:~$ cat /sys/class/devfreq/ffe40000.gpu/governor
simple_ondemand
mctom@Tomusiomat-ARM:~$ cat /etc/default/gpufrequtils 
# GOVERNORS:    [userspace powersave performance simple_ondemand]
# FREQUENCIES : [124999998 249999996 285714281 399999994
#                499999992 666666656 799999987]
GOVERNOR=performance
MIN_FREQ=499999992
MAX_FREQ=999999984
Right now I'm compiling supertuxkart, so despite the CPU is ondemand it really is busy right now.
About the GPU results, I'm honestly puzzled. I remember once I experimented with

Code: Select all

simple_ondemand
governor, but I gave up that some time ago. Surely this is not what I have set in gpufrequtils.

Also when I run glmark2*, GPU frequency jumps to 1GHz.

Code: Select all

mctom@Tomusiomat-ARM:~$ cat /sys/class/devfreq/ffe40000.gpu/cur_freq 
999999984
mctom@Tomusiomat-ARM:~$ cat /sys/class/devfreq/ffe40000.gpu/governor
simple_ondemand
mctom@Tomusiomat-ARM:~$ echo performance | sudo tee /sys/class/devfreq/ffe40000.gpu/governor
[sudo] hasło użytkownika mctom: 
performance
[I killed glmark2 here]
mctom@Tomusiomat-ARM:~$ cat /sys/class/devfreq/ffe40000.gpu/cur_freq 
999999984
mctom@Tomusiomat-ARM:~$ cat /sys/class/devfreq/ffe40000.gpu/governor
performance
You got a good idea, I'll try glmark on Weston and see if it gives any better results.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

I've tried PPSPP on ODROID-N2 21.04 and can play some games. The meaning "Play" here mean, I can launch a game and get started but not playing to measure the performance since I am not a game player. :)
Screenshot from 2021-05-08 01-40-58.png
Screenshot from 2021-05-08 01-40-58.png (928.21 KiB) Viewed 2564 times
Screenshot from 2021-05-08 01-37-46.png
Screenshot from 2021-05-08 01-37-46.png (681.51 KiB) Viewed 2564 times

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Okay I just fired up Weston and indeed, glmark2-es2-wayland score is... 830! :o

But supertuxkart is buggy just the same, so... I'll give it a try once you drop new Panfrost on the repository. I'll surely compare performance and report back!
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Sat May 08, 2021 2:31 am
Okay I just fired up Weston and indeed, glmark2-es2-wayland score is... 830! :o

But supertuxkart is buggy just the same, so... I'll give it a try once you drop new Panfrost on the repository. I'll surely compare performance and report back!
Thanks, different compositors will give you different scores and currently Gnome Desktop gave me the decent scores. The SuperTuxKart will draw the screen on the next update and I will let you guys know when new packages are uploaded. I am collecting the patches and buillding it in order to reduce the screen glitches, testing to make them land to your ODROID-N2.
These users thanked the author tobetter for the post:
mctom (Sat May 08, 2021 2:40 am)

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

[20200508] Update for Panfrost

Update notes:
  • All X11 based desktop session (e.g Mate Desktop) won't render the screen properly, the screen glitches all the time and not usuable. If you inteneded to use such desktop, unfortunately new updates today won't help you and the packages must be held to prevent further updates and stay with the version (21.1.0-devel+202104231552). Run echo $XDG_SESSION_TYPE when you are unsure whether your preferred desktop uses X11 or Wayland. Definetely you should run this command to prevent further upgrade if it shows x11.

Code: Select all

$ dpkg-query -f '${binary:Package}\n' -W | grep -e mesa -e gbm | xargs sudo apt-mark hold
  • Window title won't be displayed for OpenGL* based applications. It's annoying to see glitched window title but it happens to new updates unfortunately. But new update have more benefit to renders more OpenGL objects. At least SuperTuxKart works very well. :D
  • We are still with Linux kernel 5.11 and will switch to new kernel 5.12 which I am still working on. Linux 5.12 kernel has more updates for DRM and Panfrost, it looks like a bit better than Linux 5.11. If you like to run Linux kernel 5.12, do run sudo apt install linux-image-5.12.0-odroid-arm64 but please do update at your own risk since it's not completely tested for ODROID-N2/N2Plus/C4/HC4 yet.

Code: Select all

$ dpkg -l | grep linux-image-5
ii  linux-image-5.11.0-odroid-arm64            5.11.18-202105080924~hirsute                                         arm64        Linux 5.11 for 64-bit ARMv8 machines
ii  linux-image-5.12.0-odroid-arm64            5.12.1-202105080719~hirsute                                          arm64        Linux 5.12 for 64-bit ARMv8 machines
  • Here is the list of the packages I've tested and uploaded.

Code: Select all

$ dpkg -l | grep -e mesa -e drm -e linux-image-5 | sort 
ii  libdrm-amdgpu1:arm64                       2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii  libdrm-common                              2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to kernel DRM services -- common files
ii  libdrm-nouveau2:arm64                      2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to nouveau-specific kernel DRM services -- runtime
ii  libdrm-radeon1:arm64                       2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to radeon-specific kernel DRM services -- runtime
ii  libdrm2:arm64                              2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to kernel DRM services -- runtime
ii  libegl-mesa0:arm64                         5:21.2.0-devel+202105081032~hirsute                                  arm64        free implementation of the EGL API -- Mesa vendor library
ii  libgbm1:arm64                              5:21.2.0-devel+202105081032~hirsute                                  arm64        generic buffer management API -- runtime
ii  libgl1-mesa-dri:arm64                      5:21.2.0-devel+202105081032~hirsute                                  arm64        free implementation of the OpenGL API -- DRI modules
ii  libglapi-mesa:arm64                        5:21.2.0-devel+202105081032~hirsute                                  arm64        free implementation of the GL API -- shared library
ii  libglu1-mesa:arm64                         9.0.1-1build1                                                        arm64        Mesa OpenGL utility library (GLU)
ii  libglx-mesa0:arm64                         5:21.2.0-devel+202105081032~hirsute                                  arm64        free implementation of the OpenGL API -- GLX vendor library
ii  linux-image-5.11.0-odroid-arm64            5.11.18-202105080924~hirsute                                         arm64        Linux 5.11 for 64-bit ARMv8 machines
ii  mesa-vulkan-drivers:arm64                  5:21.2.0-devel+202105081032~hirsute                                  arm64        Mesa Vulkan graphics drivers
  • The CPU frequency for the best performance should be 2016/2400 on ODROID-N2Plus and 1800/1896 on ODROID-N2.

Code: Select all

$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq
2016000
2400000
$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
performance
performance
$ cat /sys/class/devfreq/ffe40000.gpu/cur_freq 
799999987
$ cat /sys/class/devfreq/ffe40000.gpu/governor 
performance

These users thanked the author tobetter for the post (total 3):
istanbulls (Sat May 08, 2021 9:19 pm) • mctom (Sat May 08, 2021 9:26 pm) • odroid (Sun May 09, 2021 9:28 pm)

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Yeah! I'll do the proper tests later today. I installed new goodies and just noticed that one thing during upgrade. sda2 is my swap partition. Anything to worry about?

Code: Select all

/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-odroid-arm64
W: Possible missing firmware /lib/firmware/renesas_usb_fw.mem for built-in driver xhci_pci
I: The initramfs will attempt to resume from /dev/sda2
I: (UUID=9c9e7c11-c20b-43fc-a610-c739fe9f6626)
I: Set the RESUME variable to override this.

Code: Select all

mctom@Tomusiomat-ARM:~$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda            8:0    0 931,5G  0 disk 
├─sda1         8:1    0 899,5G  0 part 
└─sda2         8:2    0    32G  0 part [SWAP]
mmcblk1      179:0    0  14,6G  0 disk 
├─mmcblk1p1  179:1    0   243M  0 part /boot
└─mmcblk1p2  179:2    0  14,3G  0 part /
mmcblk1boot0 179:32   0     4M  1 disk 
mmcblk1boot1 179:64   0     4M  1 disk 
mmcblk0      179:96   0 183,3G  0 disk 
└─mmcblk0p1  179:97   0 183,3G  0 part /home
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Sat May 08, 2021 9:26 pm
Yeah! I'll do the proper tests later today. I installed new goodies and just noticed that one thing during upgrade. sda2 is my swap partition. Anything to worry about?

Code: Select all

/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-odroid-arm64
W: Possible missing firmware /lib/firmware/renesas_usb_fw.mem for built-in driver xhci_pci
I: The initramfs will attempt to resume from /dev/sda2
I: (UUID=9c9e7c11-c20b-43fc-a610-c739fe9f6626)
I: Set the RESUME variable to override this.

Code: Select all

mctom@Tomusiomat-ARM:~$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda            8:0    0 931,5G  0 disk 
├─sda1         8:1    0 899,5G  0 part 
└─sda2         8:2    0    32G  0 part [SWAP]
mmcblk1      179:0    0  14,6G  0 disk 
├─mmcblk1p1  179:1    0   243M  0 part /boot
└─mmcblk1p2  179:2    0  14,3G  0 part /
mmcblk1boot0 179:32   0     4M  1 disk 
mmcblk1boot1 179:64   0     4M  1 disk 
mmcblk0      179:96   0 183,3G  0 disk 
└─mmcblk0p1  179:97   0 183,3G  0 part /home
I don't think you need to worry about it.

amirul
Posts: 99
Joined: Wed Dec 30, 2020 6:03 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by amirul »

Mesa update, glmark2-es2-wayland score up to 728

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Well, I rebootted my machine and I get now is pitch blackness. Nothing happens :(
I think it doesn't boot anymore, because the blue LED doesn't go "foom-foom".

I toggled the boot switch and got to petit boot. I guess this is the only way to fix it somehow but no idea what the hell went wrong and where to start. :/
I did only apt update/upgrade, didn't install the experimental kernel.

HELP!
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
istanbulls
Posts: 584
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 359 times
Been thanked: 97 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by istanbulls »

tobetter wrote:
Sat May 08, 2021 8:50 pm
[20200508] Update for Panfrost

Update notes:
  • All X11 based desktop session (e.g Mate Desktop) won't render the screen properly, the screen glitches all the time and not usuable. If you inteneded to use such desktop, unfortunately new updates today won't help you and the packages must be held to prevent further updates and stay with the version (21.1.0-devel+202104231552). Run echo $XDG_SESSION_TYPE when you are unsure whether your preferred desktop uses X11 or Wayland. Definetely you should run this command to prevent further upgrade if it shows x11.

Code: Select all

$ dpkg-query -f '${binary:Package}\n' -W | grep -e mesa -e gbm | xargs sudo apt-mark hold
  • Window title won't be displayed for OpenGL* based applications. It's annoying to see glitched window title but it happens to new updates unfortunately. But new update have more benefit to renders more OpenGL objects. At least SuperTuxKart works very well. :D
  • We are still with Linux kernel 5.11 and will switch to new kernel 5.12 which I am still working on. Linux 5.12 kernel has more updates for DRM and Panfrost, it looks like a bit better than Linux 5.11. If you like to run Linux kernel 5.12, do run sudo apt install linux-image-5.12.0-odroid-arm64 but please do update at your own risk since it's not completely tested for ODROID-N2/N2Plus/C4/HC4 yet.

Code: Select all

$ dpkg -l | grep linux-image-5
ii  linux-image-5.11.0-odroid-arm64            5.11.18-202105080924~hirsute                                         arm64        Linux 5.11 for 64-bit ARMv8 machines
ii  linux-image-5.12.0-odroid-arm64            5.12.1-202105080719~hirsute                                          arm64        Linux 5.12 for 64-bit ARMv8 machines
  • Here is the list of the packages I've tested and uploaded.

Code: Select all

$ dpkg -l | grep -e mesa -e drm -e linux-image-5 | sort 
ii  libdrm-amdgpu1:arm64                       2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii  libdrm-common                              2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to kernel DRM services -- common files
ii  libdrm-nouveau2:arm64                      2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to nouveau-specific kernel DRM services -- runtime
ii  libdrm-radeon1:arm64                       2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to radeon-specific kernel DRM services -- runtime
ii  libdrm2:arm64                              2.4.105-1+202105052322~hirsute                                       arm64        Userspace interface to kernel DRM services -- runtime
ii  libegl-mesa0:arm64                         5:21.2.0-devel+202105081032~hirsute                                  arm64        free implementation of the EGL API -- Mesa vendor library
ii  libgbm1:arm64                              5:21.2.0-devel+202105081032~hirsute                                  arm64        generic buffer management API -- runtime
ii  libgl1-mesa-dri:arm64                      5:21.2.0-devel+202105081032~hirsute                                  arm64        free implementation of the OpenGL API -- DRI modules
ii  libglapi-mesa:arm64                        5:21.2.0-devel+202105081032~hirsute                                  arm64        free implementation of the GL API -- shared library
ii  libglu1-mesa:arm64                         9.0.1-1build1                                                        arm64        Mesa OpenGL utility library (GLU)
ii  libglx-mesa0:arm64                         5:21.2.0-devel+202105081032~hirsute                                  arm64        free implementation of the OpenGL API -- GLX vendor library
ii  linux-image-5.11.0-odroid-arm64            5.11.18-202105080924~hirsute                                         arm64        Linux 5.11 for 64-bit ARMv8 machines
ii  mesa-vulkan-drivers:arm64                  5:21.2.0-devel+202105081032~hirsute                                  arm64        Mesa Vulkan graphics drivers
  • The CPU frequency for the best performance should be 2016/2400 on ODROID-N2Plus and 1800/1896 on ODROID-N2.

Code: Select all

$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq
2016000
2400000
$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
performance
performance
$ cat /sys/class/devfreq/ffe40000.gpu/cur_freq 
799999987
$ cat /sys/class/devfreq/ffe40000.gpu/governor 
performance

Thanks for the update.
The video demonstration is very nice.
Chromium, firefox and smplayer or mpv work very well, except that all images are torn, I can't see anything in the terminal, I took a screenshot but I can't share it, because I can't see anything.

I copied the result of uname -a without seeing anything at all :)

Code: Select all

n2p@odroid:~$ uname -a
Linux odroid 5.11.0-odroid-arm64 #1 SMP PREEMPT Ubuntu 5.11.18-202105080924~hirsute (2021-05-08) aarch64 aarch64 aarch64 GNU/Linux
n2p@odroid:~$ 
Edit:
I updated it to 5.12 the result is the same.

Code: Select all

n2p @ odroid: ~ $ uname -a
Linux odroid 5.12.0-odroid-arm64 # 1 SMP PREEMPT Ubuntu 5.12.1-202105080719 ~ hirsute (2021-05-07) aarch64 aarch64 aarch64 GNU / Linux
n2p @ odroid: ~ $
Attachments
Ekran Görüntüsü - 2021-05-08 19-15-00.png
Ekran Görüntüsü - 2021-05-08 19-15-00.png (55.36 KiB) Viewed 2450 times
Ekran Görüntüsü - 2021-05-08 19-14-30.png
Ekran Görüntüsü - 2021-05-08 19-14-30.png (64.41 KiB) Viewed 2450 times

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

mctom wrote:
Sun May 09, 2021 1:13 am
Well, I rebootted my machine and I get now is pitch blackness. Nothing happens :(
I think it doesn't boot anymore, because the blue LED doesn't go "foom-foom".

I toggled the boot switch and got to petit boot. I guess this is the only way to fix it somehow but no idea what the hell went wrong and where to start. :/
I did only apt update/upgrade, didn't install the experimental kernel.

HELP!
Here's what I have:
When the boot switch is set to MMC (my system is on MMC)
- Display turns on but is black
- Blue LED is constantly on
- Cannot SSH to the machine (No route to host)

When booting to SPI, there's petitboot and I have access to drives etc.
When trying to boot Linux from petitboot:
- Display turns off
- Blue LED does heatbeat, because it does on petitboot
- SSH doesn't work
- After removing "quiet splash" boot arguments, still nothing appears on the screen

No now logs appear in /var/log of my drive, so it definitely doesn't run at all.
I cannot revert the kernel update manually because new files have the same name as the old one and got overwritten :evil:
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

okay, I reverted boot.scr and it did help me boot again.

See, the problem is that some important stuff disappeared from it.
"bak" is the copy of pre-update boot.scr, and "orig" is what has been written during today's update.

Code: Select all

mctom@Tomusiomat-ARM:/boot$ diff -a boot.scr.bak boot.scr.orig
1c1
< 'VC`%GQboot script?
---
> 'V1p!Lboot script
27,34d26
< # Default serial console
< # setenv console "ttyAML0,115200n8"
< 
< # Default TTY console
< setenv bootargs "${bootargs} console=tty1"
< setenv fdt_addr_r "0x20000000"
< setenv bootargs "${bootargs} cma=800M"
< setenv bootargs "${bootargs} clk_ignore_unused"
66,68d57
< if test -n "${fbcon}"; then
<     setenv bootargs "${bootargs} fbcon=${fbcon}"
< fi
And since my system boots to tty1 (no greeters etc), well, I guess it just didn't boot to anywhere.
I don't know if that was a conscious change, but I'd strongly encourage you to bring back these functionalities. They work, I can tell.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Sun May 09, 2021 2:53 am
And since my system boots to tty1 (no greeters etc), well, I guess it just didn't boot to anywhere.
I don't know if that was a conscious change, but I'd strongly encourage you to bring back these functionalities. They work, I can tell.
No, your back up script is correct. Were you running a custom kernel before updating or do you have a package odroid-base installed?
Can you try to run sudo update-bootscript to see if the same lines are removed in the new boot.scr again?

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

istanbulls wrote:
Sun May 09, 2021 1:22 am
Thanks for the update.
The video demonstration is very nice.
Chromium, firefox and smplayer or mpv work very well, except that all images are torn, I can't see anything in the terminal, I took a screenshot but I can't share it, because I can't see anything.

I copied the result of uname -a without seeing anything at all :)

Code: Select all

n2p@odroid:~$ uname -a
Linux odroid 5.11.0-odroid-arm64 #1 SMP PREEMPT Ubuntu 5.11.18-202105080924~hirsute (2021-05-08) aarch64 aarch64 aarch64 GNU/Linux
n2p@odroid:~$ 
Edit:
I updated it to 5.12 the result is the same.

Code: Select all

n2p @ odroid: ~ $ uname -a
Linux odroid 5.12.0-odroid-arm64 # 1 SMP PREEMPT Ubuntu 5.12.1-202105080719 ~ hirsute (2021-05-07) aarch64 aarch64 aarch64 GNU / Linux
n2p @ odroid: ~ $
Are you with Ubuntu 21.04? The wallpaper of KDE looks like from 20.10?
Also can you check the value of the environment value XDG_SESSION_TYPE?

User avatar
istanbulls
Posts: 584
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 359 times
Been thanked: 97 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by istanbulls »

tobetter wrote:
Sun May 09, 2021 3:30 am
istanbulls wrote:
Sun May 09, 2021 1:22 am
Thanks for the update.
The video demonstration is very nice.
Chromium, firefox and smplayer or mpv work very well, except that all images are torn, I can't see anything in the terminal, I took a screenshot but I can't share it, because I can't see anything.

I copied the result of uname -a without seeing anything at all :)

Code: Select all

n2p@odroid:~$ uname -a
Linux odroid 5.11.0-odroid-arm64 #1 SMP PREEMPT Ubuntu 5.11.18-202105080924~hirsute (2021-05-08) aarch64 aarch64 aarch64 GNU/Linux
n2p@odroid:~$ 
Edit:
I updated it to 5.12 the result is the same.

Code: Select all

n2p @ odroid: ~ $ uname -a
Linux odroid 5.12.0-odroid-arm64 # 1 SMP PREEMPT Ubuntu 5.12.1-202105080719 ~ hirsute (2021-05-07) aarch64 aarch64 aarch64 GNU / Linux
n2p @ odroid: ~ $
Are you with Ubuntu 21.04? The wallpaper of KDE looks like from 20.10?
Also can you check the value of the environment value XDG_SESSION_TYPE?

Code: Select all

n2p @ odroid: ~ $ XDG_SESSION_TYPE
XDG_SESSION_TYPE: command not found
n2p @ odroid: ~ $
The wallpaper I used to call Ubuntu-Gnome.

21.04 Gnome
I think I am using X11.
Attachments
Ekran Görüntüsü - 2021-05-08 21-40-02.png
Ekran Görüntüsü - 2021-05-08 21-40-02.png (58.34 KiB) Viewed 2436 times

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

istanbulls wrote:
Sun May 09, 2021 3:35 am

Code: Select all

n2p @ odroid: ~ $ XDG_SESSION_TYPE
XDG_SESSION_TYPE: command not found
n2p @ odroid: ~ $
The wallpaper I used to call Ubuntu-Gnome.

21.04 Gnome
I think I am using X11.
Do run echo $$XDG_SESSION_TYPE, it will give you 'x11'. The picture of system information attached definately says "X11", which I've mentioned that new update package won't work with "X11". So you need to switch to "Wayland" when you log-in.

User avatar
istanbulls
Posts: 584
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 359 times
Been thanked: 97 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by istanbulls »

IMG-20210509-WA0001.jpg
IMG-20210509-WA0001.jpg (76.96 KiB) Viewed 2426 times
As I mentioned in the picture, there is only one (ubuntu in xorg, (X11)) option problem. other options everything is fine too.
gnome via xorg also no problem - (X11)

Gnome and Ubuntu are OK in Wayland.
Ekran Görüntüsü - 2021-05-09 01-30-54.png
Ekran Görüntüsü - 2021-05-09 01-30-54.png (259.51 KiB) Viewed 2426 times
Ubuntu option (wayland) still has problems in some applications as in the second picture.
When adding a picture to this message, the screen is cluttered and unclear as shown in the picture.

The OS option I wrote this message on is Ubuntu (wayland)

Code: Select all

n2p@odroid:~$ echo $XDG_SESSION_TYPE
wayland
n2p@odroid:~$ 

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

tobetter wrote:
Sun May 09, 2021 3:28 am
mctom wrote:
Sun May 09, 2021 2:53 am
And since my system boots to tty1 (no greeters etc), well, I guess it just didn't boot to anywhere.
I don't know if that was a conscious change, but I'd strongly encourage you to bring back these functionalities. They work, I can tell.
No, your back up script is correct. Were you running a custom kernel before updating or do you have a package odroid-base installed?
Can you try to run sudo update-bootscript to see if the same lines are removed in the new boot.scr again?
I never installed any other kernel than provided with your image or updated via apt.

odroid-base is installed in my system. I don't remember if I installed it manually.

sudo update-bootscript breaks the bootscript to the point when I had to restore it manually. IT seems to be identical to the one that I had when my machine was unable to boot.
The tty and console related lines are missing.

Code: Select all

mctom@Tomusiomat-ARM:/boot$ sudo update-bootscript 
Generating boot script u-boot image... done.
Taking backup of boot.scr.
Installing new boot.scr.
mctom@Tomusiomat-ARM:/boot$ cat /boot/boot.scr
'V0`ELboot script
#
# flash-kernel: bootscr.odroid-g12
#

# Bootscript using the new unified bootcmd handling
#
# Expects to be called with the following environment variables set:
#
#  devtype              e.g. mmc/scsi etc
#  devnum               The device number of the given type
#  bootpart             The partition containing the boot files
#  distro_bootpart      The partition containing the boot files
#                       (introduced in u-boot mainline 2016.01)
#  prefix               Prefix within the boot partiion to the boot files
#  kernel_addr_r        Address to load the kernel to
#  fdt_addr_r           Address to load the FDT to
#  ramdisk_addr_r       Address to load the initrd to.
#
# The uboot must support the booti and generic filesystem load commands.

setenv bootargs " ${bootargs} quiet splash"
setenv overlay_resize 8192

setenv bootlabel "Ubuntu 21.04"


load ${devtype} ${devno}:${partition} ${loadaddr} config.ini \
    &&  ini generic ${loadaddr}
if test -n "${overlay_profile}"; then
    ini overlay_${overlay_profile} ${loadaddr}
fi

if test -n "${console}"; then
  setenv bootargs "${bootargs} console=${console}"
fi

if test -z "${fk_kvers}"; then
   setenv fk_kvers "5.11.0-odroid-arm64"
fi

# Hack to set kernel load address for Linux kernel v3.16.56 only
if test "${fk_kvers}" = "3.16.56-odroid-arm64"; then
   setenv kernel_addr_r "0x10800000"
fi

if test -z "${fdtfile}"; then
   setenv fdtfile "meson64_odroid${variant}.dtb"
fi

if test -z "${distro_bootpart}"; then
  setenv partition ${bootpart}
else
  setenv partition ${distro_bootpart}
fi



setenv dtbo_addr_r 0x21000000
setenv zimage_addr_r ${ramdisk_addr_r}

load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtbs/${fk_kvers}/amlogic/${fdtfile}
if test -n "${overlays}"; then
    fdt addr ${fdt_addr_r}
    fdt resize ${overlay_resize}
    if test "${variant}" = "n2_plus"; then
        setenv overlay_path ${prefix}dtbs/${fk_kvers}/amlogic/overlays/odroidn2
    else
        setenv overlay_path ${prefix}dtbs/${fk_kvers}/amlogic/overlays/odroid${variant}
    fi
    for overlay in ${overlays}; do
        load ${devtype} ${devno}:${partition} ${dtbo_addr_r} ${overlay_path}/${overlay}.dtbo \
            && fdt apply ${dtbo_addr_r}
    done
fi

load ${devtype} ${devnum}:${partition} ${zimage_addr_r} ${prefix}vmlinuz-${fk_kvers} \
&& unzip ${zimage_addr_r} ${kernel_addr_r} \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \
&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \
&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}

load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers} \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \
&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \
&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}

load ${devtype} ${devnum}:${partition} ${zimage_addr_r} ${prefix}vmlinuz-${fk_kvers} \
&& unzip ${zimage_addr_r} ${kernel_addr_r} \
&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtb-${fk_kvers} \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers} \
&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." \
&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}

load ${devtype} ${devnum}:${partition} ${zimage_addr_r} ${prefix}vmlinuz \
&& unzip ${zimage_addr_r} ${kernel_addr_r} \
&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}dtb \
&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img \
&& echo "Booting Debian from ${devtype} ${devnum}:${partition}..." \
&& booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
By the way, it says that it made a backup but it's nowhere to be found.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Here are some numbers obtained in Sway:

Before:
mctom wrote:
Fri May 07, 2021 9:29 pm
glmark2-es2-wayland: 578
glmark2-wayland: 569
After update:
glmark2-es2-wayland: 665
glmark2-wayland: 637

Moreover, supertux and extremetuxracer work just like before, no problems.

Now we all know this is all about supertuxkart, right? ;)
It does work very well now. No problems with rendering whatsoever, no problems that I reported previously are occurring anymore. There are even no reports in dmesg!
Although the graphics details settings must be kept at 1/6 to be fluent, well, it's a 2K display after all. I'm satisfied. That's the level comparable with my x86 Dell thin client that I keep as a backup.
And the random hiccup stopped - a few second freezes that I reported earlier. Not a single one ever since.

@istanbulls reported problems with GNOME terminal. I propose replacing it with wayland native terminal, like foot that is supplied with Sway. It seems to be available in ubuntu hirose repos. It's not available in focal though. Recently I mastered its settings file, so I could supply one that closely resembles Gnome terminal for seamless transition.
It does make some troubles when doing ssh to remote machines - these need to have foot-terminfo package installed to be handled properly. Otherwise it prints backspaces as spaces, which is hella confusing. Weird, but otherwise it's really nice.

Oh yes, and right-click menus are still garbled. I see them mostly in Firefox, and I'm not sure if that's the Firefox problem or global. Lots of tearing and whatnot, but aside from looking ugly they are usable, so nothing urgent.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Sun May 09, 2021 8:03 am
odroid-base is installed in my system. I don't remember if I installed it manually.

sudo update-bootscript breaks the bootscript to the point when I had to restore it manually. IT seems to be identical to the one that I had when my machine was unable to boot.
The tty and console related lines are missing.
This is odd, I never had this issue more than a thounds update so far.
What do you have with these commands?

Code: Select all

$ uname -r
$ dpkg -l | grep flash-kernel
$ linux-version list

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Code: Select all

mctom@Tomusiomat-ARM:~$ uname -r
5.11.0-odroid-arm64
mctom@Tomusiomat-ARM:~$ dpkg -l | grep flash-kernel
ii  flash-kernel                                  5:3.99+202104201150~hirsute                                          arm64        utility to make certain embedded devices bootable
mctom@Tomusiomat-ARM:~$ linux-version list
5.11.0-odroid-arm64
I'd rather ask someone else who made the upgrade recently to paste their

Code: Select all

cat /boot/boot.scr | grep -a fbcon
and see if they got the same change too, except that it doesn't affect them somehow.

Otherwise, if it happens just on my machine for whatever reason, it's kinda important for me to know why. ;) It's my work computer AND gaming rig! :D
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Sun May 09, 2021 5:26 pm

Code: Select all

mctom@Tomusiomat-ARM:~$ uname -r
5.11.0-odroid-arm64
mctom@Tomusiomat-ARM:~$ dpkg -l | grep flash-kernel
ii  flash-kernel                                  5:3.99+202104201150~hirsute                                          arm64        utility to make certain embedded devices bootable
mctom@Tomusiomat-ARM:~$ linux-version list
5.11.0-odroid-arm64
I'd rather ask someone else who made the upgrade recently to paste their

Code: Select all

cat /boot/boot.scr | grep -a fbcon
and see if they got the same change too, except that it doesn't affect them somehow.

Otherwise, if it happens just on my machine for whatever reason, it's kinda important for me to know why. ;) It's my work computer AND gaming rig! :D
Could you please help me to debug the issue if you know about shell script?
In the file /usr/share/flash-kernel/functions, the value of envdir must be upstream for the mainline kernel.

Code: Select all

 331         local envdir=$(ubootenv_by_kvers $kvers)
And you must have these file in the directory /usr/share/flash-kernel/ubootenv.d/upstream/, these files have to fill up your boot script.

Code: Select all

$ ls -l /usr/share/flash-kernel/ubootenv.d/upstream/
total 12
-rw-r--r-- 1 root root 127 Mar  3 16:02 10-console
-rw-r--r-- 1 root root  31 Mar  3 16:02 30-bootmemory
-rw-r--r-- 1 root root 112 May  8 18:24 90-misc

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

istanbulls wrote:
Sun May 09, 2021 7:38 am
Ubuntu option (wayland) still has problems in some applications as in the second picture.
When adding a picture to this message, the screen is cluttered and unclear as shown in the picture.
What's the application in the second picture?
Can you let me know what apps have the issue you found?

User avatar
istanbulls
Posts: 584
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 359 times
Been thanked: 97 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by istanbulls »

tobetter wrote:
Sun May 09, 2021 6:30 pm
istanbulls wrote:
Sun May 09, 2021 7:38 am
Ubuntu option (wayland) still has problems in some applications as in the second picture.
When adding a picture to this message, the screen is cluttered and unclear as shown in the picture.
What's the application in the second picture?
Can you let me know what apps have the issue you found?
I am trying to add a picture to this thread. File explorer that appears when adding a picture.

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

tobetter wrote:
Sun May 09, 2021 5:36 pm
Could you please help me to debug the issue if you know about shell script?
I'm glad you asked. :)

Code: Select all

mctom@Tomusiomat-ARM:~$ cat /usr/share/flash-kernel/functions | grep --line-number --context=5 envdir=
311-                    ;;
312-    esac
313-}
314-
315-gen_preboot() {
316:    local envdir=$(ubootenv_by_kvers $kvers)
317-
318-    PRESTUBDIRS="/etc/flash-kernel/preboot.d/$envdir /usr/share/flash-kernel/preboot.d/$envdir"
319-    PRESTUBS="$(find $PRESTUBDIRS -type f -regex '.*/[0-9a-zA-Z_-]+' -printf '%f\n' 2>/dev/null | LC_ALL=C sort -u)"
320-    for file in $PRESTUBS; do
321-            for dir in $PRESTUBDIRS; do
--
326-            done
327-    done
328-}
329-
330-gen_ubootenv() {
331:    local envdir=$(ubootenv_by_kvers $kvers)
332-
333-    ENVSTUBDIRS="/etc/flash-kernel/ubootenv.d/$envdir /usr/share/flash-kernel/ubootenv.d/$envdir"
334-    ENVSTUBS="$(find $ENVSTUBDIRS -type f -regex '.*/[0-9a-zA-Z_-]+' -printf '%f\n' 2>/dev/null | LC_ALL=C sort -u)"
335-
336-    for file in $ENVSTUBS; do
Sure enough, the script appears to be the same as yours (line 331 at least).

Code: Select all

mctom@Tomusiomat-ARM:~$ ls -l /usr/share/flash-kernel/ubootenv.d/upstream/
ls: nie ma dostępu do '/usr/share/flash-kernel/ubootenv.d/upstream/': Nie ma takiego pliku ani katalogu
It appears that this directory doesn't exist in my system.

Code: Select all

mctom@Tomusiomat-ARM:~$ cd /usr/share/flash-kernel/ubootenv.d/
mctom@Tomusiomat-ARM:/usr/share/flash-kernel/ubootenv.d$ ls -alh
razem 8,0K
drwxr-xr-x 2 root root 4,0K maj  2 17:33 .
drwxr-xr-x 7 root root 4,0K maj  2 09:35 ..
So I guess there's no need to debug the "function" file?
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Mon May 10, 2021 1:22 am
tobetter wrote:
Sun May 09, 2021 5:36 pm
Could you please help me to debug the issue if you know about shell script?
I'm glad you asked. :)

Code: Select all

mctom@Tomusiomat-ARM:~$ cat /usr/share/flash-kernel/functions | grep --line-number --context=5 envdir=
311-                    ;;
312-    esac
313-}
314-
315-gen_preboot() {
316:    local envdir=$(ubootenv_by_kvers $kvers)
317-
318-    PRESTUBDIRS="/etc/flash-kernel/preboot.d/$envdir /usr/share/flash-kernel/preboot.d/$envdir"
319-    PRESTUBS="$(find $PRESTUBDIRS -type f -regex '.*/[0-9a-zA-Z_-]+' -printf '%f\n' 2>/dev/null | LC_ALL=C sort -u)"
320-    for file in $PRESTUBS; do
321-            for dir in $PRESTUBDIRS; do
--
326-            done
327-    done
328-}
329-
330-gen_ubootenv() {
331:    local envdir=$(ubootenv_by_kvers $kvers)
332-
333-    ENVSTUBDIRS="/etc/flash-kernel/ubootenv.d/$envdir /usr/share/flash-kernel/ubootenv.d/$envdir"
334-    ENVSTUBS="$(find $ENVSTUBDIRS -type f -regex '.*/[0-9a-zA-Z_-]+' -printf '%f\n' 2>/dev/null | LC_ALL=C sort -u)"
335-
336-    for file in $ENVSTUBS; do
Sure enough, the script appears to be the same as yours (line 331 at least).

Code: Select all

mctom@Tomusiomat-ARM:~$ ls -l /usr/share/flash-kernel/ubootenv.d/upstream/
ls: nie ma dostępu do '/usr/share/flash-kernel/ubootenv.d/upstream/': Nie ma takiego pliku ani katalogu
It appears that this directory doesn't exist in my system.

Code: Select all

mctom@Tomusiomat-ARM:~$ cd /usr/share/flash-kernel/ubootenv.d/
mctom@Tomusiomat-ARM:/usr/share/flash-kernel/ubootenv.d$ ls -alh
razem 8,0K
drwxr-xr-x 2 root root 4,0K maj  2 17:33 .
drwxr-xr-x 7 root root 4,0K maj  2 09:35 ..
So I guess there's no need to debug the "function" file?
Strange...why you do not have the directory?
You should install yet another package with sudo apt install --reinstall bootscript-odroidn2, this will create the directries under /usr/share/flash-kernel/ubootenv.d and you must have these files by default in order to generate decent boot script.

Code: Select all

$ ls -l /usr/share/flash-kernel/ubootenv.d/upstream/
total 12
-rw-r--r-- 1 root root 127 Mar  3 16:02 10-console
-rw-r--r-- 1 root root  31 Mar  3 16:02 30-bootmemory
-rw-r--r-- 1 root root 112 May  8 18:24 90-misc
These users thanked the author tobetter for the post:
mctom (Mon May 10, 2021 3:14 am)

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

I installed bootscript-odroidn2. It wasn't installed on my system.

Code: Select all

mctom@Tomusiomat-ARM:~$ sudo apt install bootscript-odroidn2
[sudo] hasło użytkownika mctom: 
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności... Gotowe
Odczyt informacji o stanie... Gotowe   
Zostaną zainstalowane następujące NOWE pakiety:
  bootscript-odroidn2
0 aktualizowanych, 1 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
Konieczne pobranie 3 864 B archiwów.
Po tej operacji zostanie dodatkowo użyte 27,6 kB miejsca na dysku.
Pobieranie:1 http://ppa.linuxfactory.or.kr hirsute/main arm64 bootscript-odroidn2 arm64 5:2021.03+202103031600~hirsute [3 864 B]
Pobrano 3 864 B w 3s (1 191 B/s)                    
Wybieranie wcześniej niewybranego pakietu bootscript-odroidn2.
(Odczytywanie bazy danych ... 260771 plików i katalogów obecnie zainstalowanych.)
Przygotowywanie do rozpakowania pakietu .../bootscript-odroidn2_5%3a2021.03+202103031600~hirsute_arm64.deb ...
Rozpakowywanie pakietu bootscript-odroidn2 (5:2021.03+202103031600~hirsute) ...
Konfigurowanie pakietu bootscript-odroidn2 (5:2021.03+202103031600~hirsute) ...
+ update-bootscript
Generating boot script u-boot image... done.
Taking backup of boot.scr.
Installing new boot.scr.
+ exit 0
mctom@Tomusiomat-ARM:~$ cat /boot/boot.scr | grep -a fbcon
if test -n "${fbcon}"; then
    setenv bootargs "${bootargs} fbcon=${fbcon}"
mctom@Tomusiomat-ARM:~$ ls -l /usr/share/flash-kernel/ubootenv.d/upstream
razem 12
-rw-r--r-- 1 root root 127 mar  3 08:02 10-console
-rw-r--r-- 1 root root  31 mar  3 08:02 30-bootmemory
-rw-r--r-- 1 root root  87 mar  3 08:02 90-misc
It automatically did update-bootscript and created a valid boot.scr as far as I can tell. And the files appeared in that directory you pointed to.

Thanks a lot for solving this problem for me, but the question remains why on earth didn't I have this package installed in the first place? When it is supposed to be installed?
Here's a hint: When I installed Ubuntu using netboot I didn't choose any additional packages, no GNOME or anything. Just wanted to set it all up myself. Maybe this is somewhat related?
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Mon May 10, 2021 3:14 am
I installed bootscript-odroidn2. It wasn't installed on my system.

Code: Select all

mctom@Tomusiomat-ARM:~$ sudo apt install bootscript-odroidn2
[sudo] hasło użytkownika mctom: 
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności... Gotowe
Odczyt informacji o stanie... Gotowe   
Zostaną zainstalowane następujące NOWE pakiety:
  bootscript-odroidn2
0 aktualizowanych, 1 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
Konieczne pobranie 3 864 B archiwów.
Po tej operacji zostanie dodatkowo użyte 27,6 kB miejsca na dysku.
Pobieranie:1 http://ppa.linuxfactory.or.kr hirsute/main arm64 bootscript-odroidn2 arm64 5:2021.03+202103031600~hirsute [3 864 B]
Pobrano 3 864 B w 3s (1 191 B/s)                    
Wybieranie wcześniej niewybranego pakietu bootscript-odroidn2.
(Odczytywanie bazy danych ... 260771 plików i katalogów obecnie zainstalowanych.)
Przygotowywanie do rozpakowania pakietu .../bootscript-odroidn2_5%3a2021.03+202103031600~hirsute_arm64.deb ...
Rozpakowywanie pakietu bootscript-odroidn2 (5:2021.03+202103031600~hirsute) ...
Konfigurowanie pakietu bootscript-odroidn2 (5:2021.03+202103031600~hirsute) ...
+ update-bootscript
Generating boot script u-boot image... done.
Taking backup of boot.scr.
Installing new boot.scr.
+ exit 0
mctom@Tomusiomat-ARM:~$ cat /boot/boot.scr | grep -a fbcon
if test -n "${fbcon}"; then
    setenv bootargs "${bootargs} fbcon=${fbcon}"
mctom@Tomusiomat-ARM:~$ ls -l /usr/share/flash-kernel/ubootenv.d/upstream
razem 12
-rw-r--r-- 1 root root 127 mar  3 08:02 10-console
-rw-r--r-- 1 root root  31 mar  3 08:02 30-bootmemory
-rw-r--r-- 1 root root  87 mar  3 08:02 90-misc
It automatically did update-bootscript and created a valid boot.scr as far as I can tell. And the files appeared in that directory you pointed to.

Thanks a lot for solving this problem for me, but the question remains why on earth didn't I have this package installed in the first place? When it is supposed to be installed?
Here's a hint: When I installed Ubuntu using netboot I didn't choose any additional packages, no GNOME or anything. Just wanted to set it all up myself. Maybe this is somewhat related?
Let me reproduce the way how you installed. But my doubt is that if so your first boot cannot happen since boot.scr is also generated while installing. So...somehow the package has been removed or so...

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Okay, I think I found the reason.

I deleted bootscript-odroidn2 a week ago when I tried to remove ubuntu-desktop-minimal component using tasksel.
I remember that the process have been stopped by me when it asked if I want to remove kernel as well.

I think I should have reinstalled the system at that point. :oops: I think I'm gonna reinstall it, at least before asking for any more help from you :roll:
Sorry for wasting your time.

Code: Select all

mctom@Tomusiomat-ARM:~$ cat /var/log/apt/history.log | grep --after-context=3 "2021-05-02  17:33"
Start-Date: 2021-05-02  17:33:34
Commandline: apt-get -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 -q -y -o APT::Install-Recommends=true -o APT::Get::AutomaticRemove=true -o APT::Acquire::Retries=3 install ubuntu-desktop-minimal^-
Requested-By: mctom (1000)
Remove: kerneloops:arm64 (0.12+git20140509-6ubuntu3), openvpn:arm64 (2.5.1-1ubuntu1), fontconfig:arm64 (2.13.1-4.2ubuntu3), libvulkan1:arm64 (1.2.162.0-1), libkf5wallet-data:arm64 (5.80.0-0ubuntu1), extremetuxracer:arm64 (0.8.0-1), gkbd-capplet:arm64 (3.26.1-1), fonts-cantarell:arm64 (0.111-3), python3-pyxattr:arm64 (0.7.2-1ubuntu1), libsphinxbase3:arm64 (0.8+5prealpha+1-12), libcogl-path20:arm64 (1.22.8-2), libssh2-1:arm64 (1.9.0-2), libsub-exporter-perl:arm64 (0.987-1), libsynctex2:arm64 (2020.20200327.54578-7), libperl5.32:arm64 (5.32.1-3ubuntu2), fonts-tlwg-purisa-ttf:arm64 (1:0.7.2-1build1), fonts-tibetan-machine:arm64 (1.901b-5.1build1), tracker:arm64 (2.3.6-2), xserver-xorg-video-nouveau:arm64 (1:1.0.17-1), network-manager-openvpn-gnome:arm64 (1.8.12-2ubuntu1), libcups2:arm64 (2.3.3op2-3ubuntu3), libwind0-heimdal:arm64 (7.7.0+dfsg-2), qttranslations5-l10n:arm64 (5.15.2-2), libmpdclient2:arm64 (2.19-1), libxcb-present0:arm64 (1.14-3ubuntu1), libedata-book-1.2-26:arm64 (3.40.0-1ubuntu1), libxapian30:arm64 (1.4.18-3), libwrap0:arm64 (7.6.q-31), fonts-kacst-one:arm64 (5.0+svn11846-10), libcanberra-gtk3-0:arm64 (0.30-7ubuntu2),
(...)
bootscript-odroidn2:arm64 (5:2021.03+202103031600~hirsute)
(...)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

mctom wrote:
Mon May 10, 2021 4:17 am
Okay, I think I found the reason.

I deleted bootscript-odroidn2 a week ago when I tried to remove ubuntu-desktop-minimal component using tasksel.
I remember that the process have been stopped by me when it asked if I want to remove kernel as well.

I think I should have reinstalled the system at that point. :oops: I think I'm gonna reinstall it, at least before asking for any more help from you :roll:
Sorry for wasting your time.

Code: Select all

mctom@Tomusiomat-ARM:~$ cat /var/log/apt/history.log | grep --after-context=3 "2021-05-02  17:33"
Start-Date: 2021-05-02  17:33:34
Commandline: apt-get -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 -q -y -o APT::Install-Recommends=true -o APT::Get::AutomaticRemove=true -o APT::Acquire::Retries=3 install ubuntu-desktop-minimal^-
Requested-By: mctom (1000)
Remove: kerneloops:arm64 (0.12+git20140509-6ubuntu3), openvpn:arm64 (2.5.1-1ubuntu1), fontconfig:arm64 (2.13.1-4.2ubuntu3), libvulkan1:arm64 (1.2.162.0-1), libkf5wallet-data:arm64 (5.80.0-0ubuntu1), extremetuxracer:arm64 (0.8.0-1), gkbd-capplet:arm64 (3.26.1-1), fonts-cantarell:arm64 (0.111-3), python3-pyxattr:arm64 (0.7.2-1ubuntu1), libsphinxbase3:arm64 (0.8+5prealpha+1-12), libcogl-path20:arm64 (1.22.8-2), libssh2-1:arm64 (1.9.0-2), libsub-exporter-perl:arm64 (0.987-1), libsynctex2:arm64 (2020.20200327.54578-7), libperl5.32:arm64 (5.32.1-3ubuntu2), fonts-tlwg-purisa-ttf:arm64 (1:0.7.2-1build1), fonts-tibetan-machine:arm64 (1.901b-5.1build1), tracker:arm64 (2.3.6-2), xserver-xorg-video-nouveau:arm64 (1:1.0.17-1), network-manager-openvpn-gnome:arm64 (1.8.12-2ubuntu1), libcups2:arm64 (2.3.3op2-3ubuntu3), libwind0-heimdal:arm64 (7.7.0+dfsg-2), qttranslations5-l10n:arm64 (5.15.2-2), libmpdclient2:arm64 (2.19-1), libxcb-present0:arm64 (1.14-3ubuntu1), libedata-book-1.2-26:arm64 (3.40.0-1ubuntu1), libxapian30:arm64 (1.4.18-3), libwrap0:arm64 (7.6.q-31), fonts-kacst-one:arm64 (5.0+svn11846-10), libcanberra-gtk3-0:arm64 (0.30-7ubuntu2),
(...)
bootscript-odroidn2:arm64 (5:2021.03+202103031600~hirsute)
(...)
We know the problem and solution. So...no worries. :)

amirul
Posts: 99
Joined: Wed Dec 30, 2020 6:03 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by amirul »

Mesa upgrade, glmark2-es2-wayland up to 838

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

amirul wrote:
Mon May 10, 2021 10:22 pm
Mesa upgrade, glmark2-es2-wayland up to 838
Thanks for the report, are you running performance governor for CPU and GPU?
Can you run with performance if not?

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

amirul wrote:
Mon May 10, 2021 10:22 pm
Mesa upgrade, glmark2-es2-wayland up to 838
mctom wrote:
Sun May 09, 2021 8:38 am
After update:
glmark2-es2-wayland: 665
glmark2-wayland: 637
Yeah, I kinda got used to that. ;)

I think I'll try obtaining the most recent Sway and see how it behaves - it uses more recent Wayland implementation, just like Weston 9.0.0.
If only I didn't have to compile it myself :D And when I go through this hassle, might as well set up a ppa for this.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

amirul
Posts: 99
Joined: Wed Dec 30, 2020 6:03 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by amirul »

tobetter wrote:
Mon May 10, 2021 10:54 pm
amirul wrote:
Mon May 10, 2021 10:22 pm
Mesa upgrade, glmark2-es2-wayland up to 838
Thanks for the report, are you running performance governor for CPU and GPU?
Can you run with performance if not?
CPU 0-1: 1398 Mhz (1000 Mhz - 2016 MHz : schedutil)
CPU 2-5: 2208 Mhz (1000 Mhz - 2400 MHz : schedutil)
GPU : 999 Mhz ( 124 Mhz - 999 MHz : performance)
I'll give CPU performance governor a go

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

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by tobetter »

amirul wrote:
Mon May 10, 2021 11:18 pm
tobetter wrote:
Mon May 10, 2021 10:54 pm
amirul wrote:
Mon May 10, 2021 10:22 pm
Mesa upgrade, glmark2-es2-wayland up to 838
Thanks for the report, are you running performance governor for CPU and GPU?
Can you run with performance if not?
CPU 0-1: 1398 Mhz (1000 Mhz - 2016 MHz : schedutil)
CPU 2-5: 2208 Mhz (1000 Mhz - 2400 MHz : schedutil)
GPU : 999 Mhz ( 124 Mhz - 999 MHz : performance)
I'll give CPU performance governor a go
You should use "performance" governor when you check the score, other governor will switch the cpu frequencies dynamically based on their own power control algorithm.

amirul
Posts: 99
Joined: Wed Dec 30, 2020 6:03 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by amirul »

CPU, GPU both performance governor
glmark2-es2-wayland score 905 :D
These users thanked the author amirul for the post (total 2):
tobetter (Mon May 10, 2021 11:38 pm) • istanbulls (Tue May 11, 2021 12:11 am)

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: Ubuntu 21.04 for ODROID-N2/C4/HC4

Post by mctom »

Does the CPU governor play such a huge role on glmark? I wonder why, it's hardly used for this.

From another news, I have similar problems with badly rendered windows, similar to @istanbulls. In my case it affects Firefox mostly, the popup menus.
I read gossips in debian bug tracker that these issues are solved in Sway 1.6. I use Sway 1.5 from ubuntu repo.
The reason why I mention thi is that Sway 1.6 has bumped versions of their dependencies related to wlroots and wayland itself. Apparently this solved some rendering problems. I don't know what are the versions used by Gnome, but surely outdated just like my Sway - the libraries necessary for sway 1.6 are not up to date in ubuntu hirsute repositories.
All I say is that maybe ubuntu impish will come with yet another fixes, outside of the scope of Panfrost itself. ;)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

Post Reply

Return to “Ubuntu (All Linux'es)”

Who is online

Users browsing this forum: No registered users and 0 guests