Good evening everyone,
I’m an owner of a ChromeBook that also has an NVIDIA Tegra K1 SoC like the Jetson TK1. I’ve recently have taken a look at getting Ubuntu 22.04 LTS working on the device with Ubuntu Xenial Xorg LTS packages. It runs the old ChromeOS kernel, so it also has the ‘nvpgu’ driver just as the L4T 21.8 Linux 3.10 kernel does. I can most certainly say that it does work and it runs quite well.
A post in here suggests that 18.04 LTS Xorg packages seems to also work, potentially 20.04 as well, but also perhaps not (according to my understanding, testing, and research). I could give that I go, I know for a fact that the Xenial Xorg does and I do know for a fact that starting with some Xorg version do the NVIDIA blobs no longer work. There was a case on my end, a version of Xorg (that was too new) I tried simply segfaulted and not even the NVIDIA logo appeared; that was on Debian bullseye.
I noticed that for some reason, a change in glibc (I’m guessing) makes the linker configs (that point to the NVIDIA blobs) no longer work correctly, at least, it appears that way to me. Manually adding them to ‘/etc/ld.so.conf.d/arm-linux-gnueabihf.conf’ and then running ‘ldconfig’ with root perms (such as with ‘sudo’) will fix this.
This is what it looks like for me on that ChromeBook:
# Multiarch support
/usr/lib/arm-linux-gnueaibhf/tegra
/usr/lib/arm-linux-gnueaibhf/tegra-egl
/usr/local/lib/arm-linux-gnueabihf
/lib/arm-linux-gnueabihf
Most people here will be using NVIDIA’s rootfs. Ultimately, the laptop’s Ubuntu rootfs originated from an Ubuntu Xenial LTS installation that has been upgraded to Jammy. Moreover, I had to patch several deb files to prevent dependency conflicts (which I plan to share). For some reason upgrading from Xenial, to Bionic, to Focal, and then Jammy was the only way I was able to retain the older Xorg packages and have a working modern Ubuntu system as any other way caused major issues. I also had to have a pin.pref file (which I’ll also share here). I don’t own a Jetson TK1, but I plan to experiment with a fresh copy of NVIDIA’s L4T 21.8 chroot though as I noticed my method of setting this up appears to be sensitive in a way, which is why I’m going to take a more in-depth look at NVIDIA’s Ubuntu Trust Tahr rootfs. It took many hours of trial and error to get my ChromeBook in its current state. Also, for some reason, the ‘apply_binaries.sh’ file has corrupted several of my rootfs’s and sometimes it doesn’t. I don’t really know why that is either.
From my experience, the Unity desktop was usable yet also problematic (it seems like there was some change that made it less usable with the blobs). The laptop runs the Mate desktop works and Mate runs wonderfully. For Mate, I needed two dummy packages to stop it from running into dependency conflicts. I have yet to try KDE. Gnome still doesn’t run without some problem/problems, rendering it to be unusable, in fact, if it ever ran on Tegra K1 GPUs, maybe it was in during the time of Ubuntu Trusty Tahr as it didn’t even work in Xenial when I was experimenting with an Xenial install that I had made before managing to get Jammy working.
It would be more ideal to get a newer kernel running. I have absolutely no kernel module porting experience or even kernel modification experience for that matter, but I’ve taken a look at the nvgpu kernel modules and so far, it seems like the oldest, most currently supported in some form Linux kernel that could work with minimal changes is 4.4 by Civil Infrastructure Platform. After a bit of modifying with the sources, I’ve managed to get some of the kernel modules to build, but much work is left to be done and I have absolutely no idea how to get passed some of the errors that I’ve been receiving neither if some of the work I’ve done that has gotten it to build partially would actually work in real use.
If anyone is wondering about where I’m getting stuck at, this is where:
drivers/gpu/nvgpu/gk20a/gk20a.c: In function 'gk20a_pm_initialise_domain':
drivers/gpu/nvgpu/gk20a/gk20a.c:1272:3: error: implicit declaration of function 'pm_genpd_set_poweroff_delay' [-Werror=implicit-function-declaration]
1272 | pm_genpd_set_poweroff_delay(domain, platform->railgate_delay);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c: In function 'gk20a_secure_page_alloc':
drivers/gpu/nvgpu/gk20a/gk20a.c:1315:3: error: implicit declaration of function 'tegra_periph_reset_assert' [-Werror=implicit-function-declaration]
1315 | tegra_periph_reset_assert(platform->clk[0]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/pmu_gk20a.c: In function 'gk20a_init_pmu_setup_sw':
drivers/gpu/nvgpu/gk20a/pmu_gk20a.c:1588:15: error: 'DMA_ATTR_READ_ONLY' undeclared (first use in this function)
1588 | dma_set_attr(DMA_ATTR_READ_ONLY, &attrs);
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/pmu_gk20a.c:1588:15: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/nvgpu/gk20a/gk20a.c:1318:3: error: implicit declaration of function 'tegra_periph_reset_deassert' [-Werror=implicit-function-declaration]
1318 | tegra_periph_reset_deassert(platform->clk[0]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/pmu_gk20a.c: At top level:
drivers/gpu/nvgpu/gk20a/pmu_gk20a.c:3530:5: error: "CONFIG_DEBUG_FS" is not defined, evaluates to 0 [-Werror=undef]
3530 | #if CONFIG_DEBUG_FS
| ^~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c: In function 'gk20a_init_clk_setup_sw':
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:483:8: error: implicit declaration of function 'tegra_dvfs_get_freqs' [-Werror=implicit-function-declaration]
483 | err = tegra_dvfs_get_freqs(clk_get_parent(clk->tegra_clk),
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c: At top level:
drivers/gpu/nvgpu/gk20a/gk20a.c: In function 'gk20a_remove':
drivers/gpu/nvgpu/gk20a/gk20a.c:1513:2: error: implicit declaration of function 'nvhost_module_disable_clk'; did you mean 'nvhost_module_idle_ext'? [-Werror=implicit-function-declaration]
1513 | nvhost_module_disable_clk(&dev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| nvhost_module_idle_ext
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:638:15: error: variable 'gk20a_clk_export_ops' has initializer but incomplete type
638 | static struct tegra_clk_export_ops gk20a_clk_export_ops = {
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:639:3: error: 'struct tegra_clk_export_ops' has no member named 'init'
639 | .init = gk20a_clk_export_init,
| ^~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:639:10: error: excess elements in struct initializer [-Werror]
639 | .init = gk20a_clk_export_init,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:639:10: note: (near initialization for 'gk20a_clk_export_ops')
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:640:3: error: 'struct tegra_clk_export_ops' has no member named 'enable'
640 | .enable = gk20a_clk_export_enable,
| ^~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:640:12: error: excess elements in struct initializer [-Werror]
640 | .enable = gk20a_clk_export_enable,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:640:12: note: (near initialization for 'gk20a_clk_export_ops')
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:641:3: error: 'struct tegra_clk_export_ops' has no member named 'disable'
641 | .disable = gk20a_clk_export_disable,
| ^~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:641:13: error: excess elements in struct initializer [-Werror]
641 | .disable = gk20a_clk_export_disable,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:641:13: note: (near initialization for 'gk20a_clk_export_ops')
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:642:3: error: 'struct tegra_clk_export_ops' has no member named 'set_rate'
642 | .set_rate = gk20a_clk_export_set_rate,
| ^~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:642:14: error: excess elements in struct initializer [-Werror]
642 | .set_rate = gk20a_clk_export_set_rate,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:642:14: note: (near initialization for 'gk20a_clk_export_ops')
drivers/gpu/nvgpu/gk20a/clk_gk20a.c: In function 'gk20a_clk_register_export_ops':
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:650:26: error: invalid use of undefined type 'struct tegra_clk_export_ops'
650 | if (gk20a_clk_export_ops.data)
| ^
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:653:22: error: invalid use of undefined type 'struct tegra_clk_export_ops'
653 | gk20a_clk_export_ops.data = (void *)g;
| ^
drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c: In function 'railgate_delay_store':
drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c:197:3: error: implicit declaration of function 'pm_genpd_set_poweroff_delay' [-Werror=implicit-function-declaration]
197 | pm_genpd_set_poweroff_delay(genpd, platform->railgate_delay);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:280: drivers/gpu/nvgpu/gk20a/pmu_gk20a.o] Error 1
make[4]: *** Waiting for unfinished jobs....
drivers/gpu/nvgpu/gk20a/gr_gk20a.c: In function 'gr_gk20a_init_ctxsw_ucode':
drivers/gpu/nvgpu/gk20a/gr_gk20a.c:1931:15: error: 'DMA_ATTR_READ_ONLY' undeclared (first use in this function)
1931 | dma_set_attr(DMA_ATTR_READ_ONLY, &attrs);
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gr_gk20a.c:1931:15: note: each undeclared identifier is reported only once for each function it appears in
At top level:
drivers/gpu/nvgpu/gk20a/gk20a.c:1240:12: error: 'gk20a_pm_resume' defined but not used [-Werror=unused-function]
1240 | static int gk20a_pm_resume(struct device *dev)
| ^~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1222:12: error: 'gk20a_pm_suspend' defined but not used [-Werror=unused-function]
1222 | static int gk20a_pm_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:658:8: error: implicit declaration of function 'tegra_clk_register_export_ops'; did you mean 'gk20a_clk_register_export_ops'? [-Werror=implicit-function-declaration]
658 | ret = tegra_clk_register_export_ops(clk_get_parent(c),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gk20a_clk_register_export_ops
drivers/gpu/nvgpu/gk20a/clk_gk20a.c: At top level:
drivers/gpu/nvgpu/gk20a/clk_gk20a.c:638:36: error: storage size of 'gk20a_clk_export_ops' isn't known
638 | static struct tegra_clk_export_ops gk20a_clk_export_ops = {
| ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:280: drivers/gpu/nvgpu/gk20a/clk_gk20a.o] Error 1
drivers/gpu/nvgpu/gk20a/gr_gk20a.c: In function 'gr_gk20a_add_zbc':
drivers/gpu/nvgpu/gk20a/gr_gk20a.c:3598:3: error: implicit declaration of function 'speculation_barrier' [-Werror=implicit-function-declaration]
3598 | speculation_barrier();
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a_scale.c: In function 'gk20a_scale_make_freq_table':
drivers/gpu/nvgpu/gk20a/gk20a_scale.c:109:8: error: implicit declaration of function 'tegra_dvfs_get_freqs' [-Werror=implicit-function-declaration]
109 | err = tegra_dvfs_get_freqs(clk_get_parent(g->clk.tegra_clk),
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a_scale.c:114:38: error: assignment to 'unsigned int *' from incompatible pointer type 'long unsigned int *' [-Werror=incompatible-pointer-types]
114 | profile->devfreq_profile.freq_table = (unsigned long *)freqs;
| ^
drivers/gpu/nvgpu/gk20a/gk20a_scale.c: In function 'gk20a_scale_notify':
drivers/gpu/nvgpu/gk20a/gk20a_scale.c:228:19: error: 'struct devfreq_dev_status' has no member named 'busy'
228 | profile->dev_stat.busy = busy;
| ^
drivers/gpu/nvgpu/gk20a/gk20a_scale.c: In function 'gk20a_scale_init':
drivers/gpu/nvgpu/gk20a/gk20a_scale.c:289:19: error: 'struct devfreq_dev_status' has no member named 'busy'
289 | profile->dev_stat.busy = false;
| ^
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:280: drivers/gpu/nvgpu/gk20a/gk20a_scale.o] Error 1
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:280: drivers/gpu/nvgpu/gk20a/gk20a_sysfs.o] Error 1
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:280: drivers/gpu/nvgpu/gk20a/gr_gk20a.o] Error 1
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:280: drivers/gpu/nvgpu/gk20a/gk20a.o] Error 1
make[3]: *** [scripts/Makefile.build:487: drivers/gpu/nvgpu/gk20a] Error 2
make[2]: *** [scripts/Makefile.build:487: drivers/gpu] Error 2
make[1]: *** [Makefile:1011: drivers] Error 2
make: *** [Makefile:515: __build_one_by_one] Error 2
I wanted to do kernel 4.14 LTS but there were more changes that appeared to be less inviting than the 4.4 Civil Infrastructure Platform kernel.
Hope you all have a fantastic night!