L4T Ubuntu - A fully featured linux on your switch

switchroot.png

L4T Ubuntu
Intro
L4T Ubuntu is a version of Linux based on nvidia's linux for tegra project. It uses a different kernel compared to previous releases which allows it to use features not yet in mainline. Such as audio, docking support and vulkan.

Join our discord: https://discord.gg/53mtKYt

We have a wiki !
To facilitate our work we will only update our wiki from now on in order to avoid multiple outdated references, please refer to the following link instead of this page

https://wiki.switchroot.org/en/Linux/Ubuntu-Install-Guide

Credits

Bylaws,
Langerhans,
Ave,
Natinusala,
CTCaer(most of the hard stuff),
Gavin_Darkglider,
DanielOgorchock(Joycon drivers/joycond),
stary2001 (reboot2payload),
NVIDIA,
Azkali
Everyone else in switchroot - more info on that in the future.
 
Last edited by azkali,

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
586
Trophies
0
Age
33
XP
1,171
Country
United States
This doesn't really pertain to the topic at hand but can someone check this out.; just to see if its feasible.
https:// elinux.org/Tegra/Downstream_SW/Linux4Tegra/WebBrowsers/Hardware_Accelerated_Video_Decoding
I believe the Chromium installed to L4T Ubuntu supports hardware video decoding by default. I remember seeing bylaws say it.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
Here are new scripts for both the switch and cross compiling that apply them memory patch mentioned above for you to the kernel sources. Should help with the not booting issue.

Same instructions as before, and it will set up the kernel build enviornment. If someone could test, and get back to me, that would be nice.
 

Attachments

  • l4t_kernel_prep.txt
    4.3 KB · Views: 203
  • l4t_kernel_prep_switch.txt
    4 KB · Views: 183
  • Like
Reactions: ZachyCatGames

dotmick

Member
Newcomer
Joined
Oct 7, 2018
Messages
23
Trophies
0
Age
40
XP
138
Country
United Kingdom
On the topic of Retroarch:

@Gavin_Darkglider I tested your suggestion and added a verbose flag to retroarch. I was also suspicious as to whether my 144Hz 2K monitor was fucking with my poor little switch, so I tried it on the monitor and then in handheld mode.

Here's the output: https://pastebin.com/4jFs4zPQ

One line that sticks out to me:
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.

Sounds like I may have missed a video drive somewhere in the install? I followed the tutorial carefully, but I'll take another look.

And in handheld mode:
ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
[MIDI]: snd_seq_open failed with error -2.
[MIDI]: Initialization failed (list of input devices unavailable).

I know ALSA handles audio, so maybe I've got something messed up there as well?

Pretty sure you're having your video driver set on Vulkan with a core that doesn't support it

Which cores support Vulkan?

  • All 2D / software rendered cores (PCSX ReARMed counts as software rendered)
  • Beetle PSX HW
  • Dolphin
Please go back to OpenGL for any core that’s not in this list.

--------------------- MERGED ---------------------------

For anyone compiling their own kernels this patch should fix the unable to boot issue https://github.com/lakka-switch/Lak...s/l4t-kernel-drop-emc-optimization-flag.patch

The patch should be applied before compilation right?
 

Oxynux

New Member
Newbie
Joined
Sep 12, 2009
Messages
1
Trophies
0
XP
19
Country
France
I have some issues with wifi in L4T Ubuntu on Switch, the throughput is great but sometime I am disconnected from the wifi and auto-reconnection not working (most of the time) I have to reconnect it to the AP manually -and even manually reconnection is difficult- (I have tested differents APs but it's still the same).

I am in v1.3.1 an I have this problem since 1.2 (I didn't test 1.0 and 1.1)
 

Yo_Homie

Member
Newcomer
Joined
Dec 31, 2018
Messages
20
Trophies
0
Age
29
XP
102
Country
United States
I believe the Chromium installed to L4T Ubuntu supports hardware video decoding by default. I remember seeing bylaws say it.
It supports OpenGL for hardware accelerated browsing but video (like YouTube) are all decoded on the CPU instead of the built in 4K 60fps hardware decoder (which is much more efficient).

--------------------- MERGED ---------------------------

--------------------- MERGED ---------------------------

Just went to wake my switch up on the dock only to find it awake and logged out with wifi not working. Here is my syslog (renamed to syslog.txt so that I could upload it):
 

Attachments

  • syslog.txt
    96.8 KB · Views: 212
  • Like
Reactions: stick267

Techjunky90

Well-Known Member
Member
Joined
Apr 7, 2017
Messages
487
Trophies
0
Age
33
XP
882
Country
United States
It supports OpenGL for hardware accelerated browsing but video (like YouTube) are all decoded on the CPU instead of the built in 4K 60fps hardware decoder (which is much more efficient).

--------------------- MERGED ---------------------------

--------------------- MERGED ---------------------------

Just went to wake my switch up on the dock only to find it awake and logged out with wifi not working. Here is my syslog (renamed to syslog.txt so that I could upload it):
Same thing has happened to me in portable mode. Had to either log in and out 2 or 3 times or reboot to get Wi-Fi working again.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
Take your time, just curious to know where you'll post it. Here on gbatemp or elsewhere?

Usually I post things on realmodscene, as I am a moderator there, it makes it easier. Since that site is mainly for xbox mods, I will problable post it here, and link to it there, and on the TX forums.
Just went to wake my switch up on the dock only to find it awake and logged out with wifi not working. Here is my syslog (renamed to syslog.txt so that I could upload it):
The log you posted didnt say anything about wifi, but I am fairly certain it is the same issue that effects the mainline kernel, where after so long, if you change networks, the card gets stuck with ret=-12, and then does nothing. I was planning on looking into it, but then I started building gentoo for tegra. lol.
 

bylaws

Well-Known Member
OP
Member
Joined
Dec 11, 2018
Messages
129
Trophies
0
XP
1,655
Country
United Kingdom
Just wait until I finish my Gentoo 4 Tegra build....... I have all sorts of fun things in store for people, including(Hopefully) Kodi with hardware acceleration(OpenMax Player was removed last month, after kodi 18 officially dropped), and libwedevine(Netflix/Amazon/Other DRM library, needs 32bit chroot, so might not be possible with hardware acceleration), I then have extra patches for USB gadgets, for fun hacking stuff, and an almost complete reimplementation of the bashbunny framework, that I plan on integrating into kodi as well..... Still a bit of work there, but on my mainline 32bit build, I have kodi 18 with netflix, with battery monitoring support, though I handled that with a plugin..... I know where the problem is in kodi sources, but there is no simple patch, as their battery monitoring is a total of all batteries connected, so it was easier than hardcoding 1 battery. I also have joycon battery status implemented. Now, I just have to find a way to implement all of that into the gui. lol. The battery works monitor works, but the joycon stuff I was going to keep in the plugin, as the status bar is a bit cramped anyway.

As for being a linux guru, I have been running linux since before windows vista released, so, I know enough. lol.



No, it primarily changes when on the interupt the power button is registered, from what I could see, so instead of catching the interupt on the rising edge, it catches it on the falling edge. Probably makes the power button more responsive. Not sure how it would help with battery life, but maybe bylaws could answer that. Also, usually userspace issues such as UI not responding is not a kernel issue, but an issue with the software. That being said, the touch screen driver still has a few issues, but is much better that it was in the failoverfl0w kernel.
I had a DTS change in my tree to disable c7 suspend state, I removed it.
@Gavin_Darkglider what X video drivers are you using in gentoo? Did you copy or build the nvidia_drv.so from l4t?
He is using mesa, so no vk or audio
I believe the Chromium installed to L4T Ubuntu supports hardware video decoding by default. I remember seeing bylaws say it.
It doesn't
 

Deathscreton

Well-Known Member
Member
Joined
Oct 1, 2009
Messages
826
Trophies
0
XP
1,092
Country
United States
Bah, I've given up on DHCP/NAT. For whatever reason, DNSMASQ refuses to see virtual devices (bridges, Taps, etc..). It won't start with an interface pointing to such. DHCPD refuses to latch onto ANY interface and does not see my subnet declarations. I'm almost certain it's due to my inexperience with Linux and networking. Someone else will have to focus on this another time. I'll just have to find something else to obsess over. lol
 
Last edited by Deathscreton,

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
Has anyone been able to get 1080P files to play without studdering?

Have you tried it in omxplayer? It by default is an openmax player, so it will support the hardware. kodi has an option for the raspberry pi build to enable openmax, but it isnt included in the aarch64 stuff. It is an easy fix(Makefile), assuming the code compiles for aarch64. Unfortunatly, they recently removed all openmax support for kodi on github. I think they are revamping it in kodi 19.

As for the person who asked about video card drivers in gentoo on the switch, for mainline mesa, for my Gentoo for Tegra build, I am using nvidia bsp drivers 23.1 I think. The latest released for the tegra x1. If that doesnt work, I will copy lakka's driver files, and patch them in manually. I modified an old ebuild that installed the nvidia tegra drivers, but it doesnt cover vulkan, v4l2, gles, etc. just opengl for now. Should be easy enough to add those libraries, but gentoo is specific for being customisable so, when I do finish writing support for those in the ebuild, they will all have standard use flags attached.
 
  • Like
Reactions: Watermelonz

bylaws

Well-Known Member
OP
Member
Joined
Dec 11, 2018
Messages
129
Trophies
0
XP
1,655
Country
United Kingdom
Have you tried it in omxplayer? It by default is an openmax player, so it will support the hardware. kodi has an option for the raspberry pi build to enable openmax, but it isnt included in the aarch64 stuff. It is an easy fix(Makefile), assuming the code compiles for aarch64. Unfortunatly, they recently removed all openmax support for kodi on github. I think they are revamping it in kodi 19.

As for the person who asked about video card drivers in gentoo on the switch, for mainline mesa, for my Gentoo for Tegra build, I am using nvidia bsp drivers 23.1 I think. The latest released for the tegra x1. If that doesnt work, I will copy lakka's driver files, and patch them in manually. I modified an old ebuild that installed the nvidia tegra drivers, but it doesnt cover vulkan, v4l2, gles, etc. just opengl for now. Should be easy enough to add those libraries, but gentoo is specific for being customisable so, when I do finish writing support for those in the ebuild, they will all have standard use flags attached.
You want l4t 32.1
 

v311403

Member
Newcomer
Joined
May 1, 2019
Messages
5
Trophies
0
Age
42
XP
112
Country
United States
I tried 32.1 very briefly last night on my arch root. Retroarch runs but mpv and kodi core dumped in glx somewhere (don't have the stack traces in front me). I wonder if perhaps the Nvidia binary drivers were compiled with a differing gcc ABI or against an older Xorg. I'm using gcc 8.3.
 

dixeflatline

Active Member
Newcomer
Joined
Dec 16, 2010
Messages
43
Trophies
0
Location
Somewhere near you
XP
279
Country
United States
@MrSaturn On the Retroarch issue, I too am having same issue, and our logs looks damn near identical. Though, my retroarch wont even boot to menu, i get black screen or a yellow blob. Happened after updating from 1.2 to 1.3 and same on 1.3.1. I tried a fresh install on new SD Card, flashed image and applied the 1.3.1 patch, deleted boot.src and boot folder... Same issue on fresh system. I have changed the drivers to all possible options in the retroarch.cfg, all which had about the same results, it cant find device or drops to a segmentation fault (core dumped). That leads me to believe that permissions got a little screwy or GPU driver got corrupted or moved without proper symlinks. I did try re-installing mesa/opengl driver via sudo add-apt-repository ppa:ubuntu-x-swat/updates && sudo apt-get dist-upgrade -y on the fresh SD Card for shits and giggles, still got same issue. I would assume a bug in the patches 1.3* in the way it hooks GPU.... idk, im making stabs in the dark. Just thought id let you know what i have tried and failed so far.

Cheers!
DFL
 
Last edited by dixeflatline,

ELY_M

Developer
Developer
Joined
Dec 6, 2007
Messages
710
Trophies
1
XP
1,691
Country
United States
I do not know how I did it but I am able to have my attached joycons working 100%



--------------------- MERGED ---------------------------

actually, I ran this command in my ssh session with my switch

sudo apt-get install xserver-xorg-input-joystick

then rebooted my switch and resynced the joycons.
then attached them back to the tablet.
guess what, I see the pointer moving and did tests. it worked even it is attached to my tablet.
 

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,398
Trophies
1
Location
Hell
XP
4,209
Country
United States
I do not know how I did it but I am able to have my attached joycons working 100%



--------------------- MERGED ---------------------------

actually, I ran this command in my ssh session with my switch

sudo apt-get install xserver-xorg-input-joystick

then rebooted my switch and resynced the joycons.
then attached them back to the tablet.
guess what, I see the pointer moving and did tests. it worked even it is attached to my tablet.

they’re still connected over bluetooth, I’ve known about this since L4T Ubuntu released :P
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Mondooooo @ Mondooooo: anyone