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,

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
I'm more interested in the occasional hang-ups I get when just using the system in general. I imagine it's IO holdups with the SD cards, but UHS1 (10MB/s) seems like it would be more than enough for low-end general usage.

This comes down to ubuntu. You are running a generic arm64 ubuntu build with no optimizations for the switch. Which is why the only package that supports OpenMax video acceleration is omxplayer. It isnt the only player in linux that supports OMX, but it is the only one that doesnt work without it. They build the packages a generic as possible, and dont optimize them, as they need them to work on as many platforms as possible. With gentoo, you build every package from source, and get to choose how it is optimized, and what features are used. Hince, getting rid of ubuntu for gentoo. Not only do you get more updated software, but you get to fix a lot of these issues. On top of optimization, Unity is mainly bloat, not to include all the rest of the bloat ware in ubuntu. It is great for grandma, but I would never choose to install it on a device, unless it was the only option.
 

Deathscreton

Well-Known Member
Member
Joined
Oct 1, 2009
Messages
826
Trophies
0
XP
1,092
Country
United States
uhh. 10MB/s is the minimum speed.
So after a bit of research, I'm not seeing any speed limitations or recommended IO speeds in regards to Ubuntu, just that using ext4 on an SD Card could lead to more wear than using another filesystem (such as YAFFS2 or LogFS). Do you have a link to this information?
 

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,398
Trophies
1
Location
Hell
XP
4,209
Country
United States
So after a bit of research, I'm not seeing any speed limitations or recommended IO speeds in regards to Ubuntu, just that using ext4 on an SD Card could lead to more wear than using another filesystem (such as YAFFS2 or LogFS). Do you have a link to this information?
according to https://integralmemory.com/faq/what-uhs-1 UHS1 has a max speed of 104mb/s
and according to https://kb.sandisk.com/app/answers/...-uhs-speed-class,-speed-ratings-(performance) the minimum speed is 10mb/s
 

Deathscreton

Well-Known Member
Member
Joined
Oct 1, 2009
Messages
826
Trophies
0
XP
1,092
Country
United States
Ahhhh, I see what you were meaning. My bad for mentioning minimum and not average. Still, the speeds of UHS-1 should be more than enough for a Ubuntu install. I'm interested in what @Gavin_Darkglider 's gentoo build can do for the Switch though. Any idea when we might see a work in progress?
 
  • Like
Reactions: ZachyCatGames

Sticker

Well-Known Member
Newcomer
Joined
Oct 1, 2018
Messages
89
Trophies
0
Age
34
XP
683
Country
Vietnam
I'm more interested in the occasional hang-ups I get when just using the system in general. I imagine it's IO holdups with the SD cards, but UHS1 (10MB/s) seems like it would be more than enough for low-end general usage.
I think it happened because not enough RAM to run so system should write data to virtual RAM on SD
 

Deathscreton

Well-Known Member
Member
Joined
Oct 1, 2009
Messages
826
Trophies
0
XP
1,092
Country
United States
I think it happened because not enough RAM to run so system should write data to virtual RAM on SD
Nah, my RAM never reaches three quarters, and swappiness is at default (60). Using the System Monitor shows that at most, I usually have half a meg of swap being used at any time.
 

Sticker

Well-Known Member
Newcomer
Joined
Oct 1, 2018
Messages
89
Trophies
0
Age
34
XP
683
Country
Vietnam
Nah, my RAM never reaches three quarters, and swappiness is at default (60). Using the System Monitor shows that at most, I usually have half a meg of swap being used at any time.
There are lots of bugs and systems optimization should implement. I skip at 1.2 and waiting for it more stable.
 

MrSaturn

Member
Newcomer
Joined
May 29, 2019
Messages
11
Trophies
0
Age
30
XP
66
Country
United States
Pressing the power button to sleep doesn't work for me. However, if I log off or lock the screen, the power button brings things back. Strange. It worked normally until I installed Kodi, but I'm not sure if that was actually the cause of the change.

I installed Retroarch, but I can't get it to display the UI, just a black screen. Any advice?
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
Ahhhh, I see what you were meaning. My bad for mentioning minimum and not average. Still, the speeds of UHS-1 should be more than enough for a Ubuntu install. I'm interested in what @Gavin_Darkglider 's gentoo build can do for the Switch though. Any idea when we might see a work in progress?

A couple of weeks for a basic build, I am in the middle of cross compiling, which doesnt always work the way you want, If you dont care about all of the hardware support, I can post a copy of my 5.0 32bit gentoo build, that plays netflix and amazon on kodi 18. It was a work in progress, and hasnt been updated in a while, and still needs some packages rebuilt. On top of that, it isnt optimized, as I didnt know how to configure the armv7-a compiler for this chip, so the optimizations are close to those used on a raspberry pi, so kodi freezes a bit, but it works. there are other bugs as well, that I am hoping to fix with l4t(Netflix is going bye bye in the new build).

Pressing the power button to sleep doesn't work for me. However, if I log off or lock the screen, the power button brings things back. Strange. It worked normally until I installed Kodi, but I'm not sure if that was actually the cause of the change.

I installed Retroarch, but I can't get it to display the UI, just a black screen. Any advice?

The change is that unity was handling suspend, when you pressed the power button. pressing the button sends key_suspend to the computer. Kodi has no handler for this button press. If you log out, and launch unity, then launch kodi from there, it should work, but that adds extra bloat running in the background. Then again on my build, I run kodi on top of lxde, as dbus wasnt working between pulseaudio and kodi without it, and bluetooth speakers werent working as well.
 

MrSaturn

Member
Newcomer
Joined
May 29, 2019
Messages
11
Trophies
0
Age
30
XP
66
Country
United States
Gavin, the power button still does nothing in the default Unity environment for me.

I tried using Kodi as a desktop environment, but the touchscreen has weird issues there (touching the top-right triggers a click in the top-left, directions reversed). Running it through Unity is the only way it works for me.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
To fix the touch screen issues in kodi, delete the udev rules for touchscreen(should be in /usr/lib/udev/rules.d). This will break the touchscreen on unity, and the login screen though. As for the power button sleep action, I am not sure, as I havnt tested it yet. I see no point, until I have my working userspace. For testing, try running xev in the terminal, and then hit the power button, and see if it registers there.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
It got my attention but should I turn to Gentoo 4 ? Hmmm.. I know that Gentoo is for PS4 but I don't know.

Not sure what you mean by Gentoo 4...... I am calling my build Gentoo 4 Tegra, in this thread, as it is L4T Ubuntu. Currently it is in the beginning stages of being built, and that is turning out to be a bit of a pain, Most gentoo builds are. lol. Personally,I cant stand ubuntu, and have been running gentoo since 2004, so undertaking a project like this is a bit of work, but at least I am comfortable with the work flow there so to say. As it sits, it wouldnt do anything for you, as I havnt even gotten to building X11(it is on its way, but there is still a bunch of work to be done) yet, which is a requirement for the video card driver. I am working through build issues, both cross compiling, and in qemu. Since I am half building in qemu/cross compiling, I also plan to do a complete rebuild on the switch, before I release a stage 4. When I release a stage 4, it will be basic, in the sense it will have everything you need to build further(Such as hardware configuration, etc, but no apps excepting a terminal, and what ever comes with lxde.) You will have to build the rest from there, excepting what was pulled in as build dependencies, because I keep a hefty use flag list. lol. It could be more light weight, but I have plans for it, and since I was building this for me first and foremost, before I even mentioned it here, it is a little late to go back and change that now. lol.

As for Gentoo being for the PS4, that is news to me, as my PS4(Starwars edition) needs a power supply, awesome dumpster find, but the board gets no power, I havnt had time to mess with it. The switch I bought specifcally because I wanted a linux computer that fit in my pocket. lol. Gentoo is a logical choice for me, as I have been running it for years. And it was one of the first versions of linux used on the OG Xbox(Where I started hacking consoles), it has some nestalgia in that sense as well.

As for turning to gentoo, if you are comfortable with the command line and linux debugging, then sure. If not, then it probably isnt the distro for you. I figure most of the people that would try to use this build will A. Want the final build, not the initial stage 4, B. Have a really decent idea of how linux works under the hood. If that doesnt sound like you, then I would stick with L4T Ubuntu.
 
  • Like
Reactions: spotanjo3

spotanjo3

Well-Known Member
Member
Joined
Nov 6, 2002
Messages
11,145
Trophies
3
XP
6,211
Country
United States
I will wait for further development for L4T Ubuntu and wanting to know how well Dolphin emulator is doing first because it is my attention and curious about this one.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
try typing into a terminal rm -r ~/.local/share/retroarch;rm -r ~/.config/retroarch*;retroarch

That command will remove all of the retroarch data, including probably bios files, if they are installed, and then launch retroarch. If retroarch is still a black screen, copy and paste the output of the terminal, and I will take a look. that is probably better done in a pm though.
 

Deathscreton

Well-Known Member
Member
Joined
Oct 1, 2009
Messages
826
Trophies
0
XP
1,092
Country
United States
I will wait for further development for L4T Ubuntu and wanting to know how well Dolphin emulator is doing first because it is my attention and curious about this one.
Dolphin works fine. I play PSO Ep 1 & 2 regularly at 30FPS with the increased draw distance patch. If you are only interested in Dolphin, then use Lakka instead. You'll get more consistent performance.
 
  • Like
Reactions: Gavin_Darkglider

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
I would also say that L4T ubuntu isnt being developed persay. What is being developed on is the kernel that gives you hardware support. Ubuntu is the distribution that Nvidia used for the jetson tx1 userspace, so it is easier to build. That being said, if you havnt noticed, all of the updates that are released for this never touch the userspace, and are installed on the fat32 partition.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.