L4T Ubuntu - A fully featured linux on your switch

switchroot.png

L4T Ubuntu 3.4.0
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.

Beware, using high clocks in handheld mode will degrade your batteries capacity a lot faster than at stock clocks

If you can't install an application check this thread, and ask all questions there
https://gbatemp.net/threads/l4t-ubuntu-applcation-install-guides.537579/

https://discord.gg/N9PPYXjWMY

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

3.4.0 update file listed below With the 3.0+ updates. If doing fresh install, install 3.4.0 image.


Big Thanks to CTCaer for 3.4.0, for fixing the final issues in Ubuntu/Linux kernel and all the testers that helped him.

Features

  • Full USB PD/OTG/OTG Docks
  • Bluetooth (both controllers and audio)
  • Full Joycon Support(Excluding NFC, and IRcamera)
  • Nvidia GPU drivers - Vulkan and OpenGL
  • Audio - Headphones, speakers and over HDMI when docked.
  • Touchscreen(more fixes)
  • Display
  • WiFi(sleep fixes/stability fixes)
  • CPU frequency scaling - The CPU scales from 200mhz to 1.7ghz (what switch is binned for) depending on the load its under. Fans are adjusted to account for this
  • Full sdcard speed
  • Hardware video acceleration when using the built in videos app (means you can watch videos without battery draining massively)
  • Overclocking
  • LP0 Sleep mode
  • IMU/Ambiant Light sensor support
  • reboot2payload
  • Minerva Memory Training
  • Support for Moonlight-QT
  • Initramfs updates(fix partition resize, add boot logo, and error screens)
Prerequisites
  • Minimum of 8 GB.
Downloads
Torrent Links can be found here:
https://torrents.switchroot.org/ubuntu/

Updates for previous 3.0+ installs. 3.4.0 link below.

https://download.switchroot.org/ubuntu/switchroot-ubuntu-3.4.0-update_only-2021-07-23.7z
1. Remove l4t-ubuntu folder and bootloader\ini\01-ubuntu.ini from fat32 partition on sdcard.
2. Extract zip to fat32 partition on sdcard.(if you have no space, try removing all ubuntu related files from fat32 partition on sdcard, and try again.)
3. Dump joycon pairing info in hekate.(Only needs to be done if you havnt already done this)
4. Boot.

How to install:
  1. Download the image (standard non cuda is probably what you want) you want from the downloads section.
  2. Partition with hekate, make sure to leave enough room on fat32 to extract chosen image.
  3. Extract 7z to fat32 partition, now labeled SWITCHSD
  4. Flash image in partition manager in hekate to linux partition.
  5. Go to NYX tools, and dump joycon pairing data, with joycons connected to console, after being paired in hos.
  6. Launch ubuntu through hekate.
  7. Wait for around 2-4 minutes while it initially loads.
  8. Enjoy, you now have fully featured Ubuntu on your switch!
Notes:
  • Pair procons by opening the bluetooth menu in settings and pressing the + button in the bottom left corner. Then press the sync button on the controller and select its name in the pairing window.
  • To update the system run "sudo apt update", "sudo apt upgrade". This will apply all switch and ubuntu updates aside from kernel updates, they will be posted here if ever needed.
  • CPU/GPU/Fan profiles and Overclocking are now handles in NVPmodel.
  • Disabled sandboxing in Chromium in order to enable GPU acceleration
    Night and day difference. Existing users can add --no-sandbox to their desktop shortcut.
Ubuntu Bionic 3.4.0 Short Changelog:
- Better performances in many scenarios (As always that should affect apps/games/emus/etc)
- Significant better deep sleep. (Measured at 582 hours. 440% better).
- Faster wake up from sleep.
- Saved 240MB ram (fb and active file page pool, aka always used pool)
- Memory remapping 800%-2000% speed up. Mostly used by emulators and VMs (and lot in android).
- Some other memory optimizations, plus enabled huge ram pages
- Faster kernel and OS boot.
- Fixed tearing issues for NVDEC/NVENC. (video hw accel)
- Lower latency for frame end calcs for builtin display
- Fixed Hori pads for joycond
- Fixed an issue where it would make railed jc to disconnect on rumble
- Joycon/Procon rumble was improved and intensity tuned for better user experience
- Kernel now uses the proper display panel init/deinit by checking panel id
- Improved dock/undock script
- Touch stays enabled now in dock mode. Users that use docks that do not cover the screen can use it as alternative input.
- Added low ram protection. Now instead of hanging for minutes it will only stutter for seconds until oom occurs and recovers ram
- Better seamless display on boot
- uenv.txt changed, read uenv_readme.txt. It's simple to transfer over custom settings.
- Reboot action can now be defined in new uenv.txt. Reboot back into Linux by changing `reboot_action=` from `bootloader` to `via-payload`.

Apps Changes:
- Full video HW decoding via new SMPV Player app (also supports youtube links)
- Full video HW encoding via ffmpeg-l4t
- Added L4T-Megascript app
You can get or build various essential stuff, apps or emulators with a single click. All configured and optimized for Switch.
- Nvpmodel was updated to include Battery charging protection limits options
Useful when you are constantly docked and want to protect battery's life.
Limit gets saved and applied on boot.
Reminder that discharging can't happen when plugged in. Even when charging is off, usb power is used to supplement system.
So you need to discharge first if you want the battery % to go inside the limit.
That also disables charging in sleep in order for the feature to work.
If you reboot/shutdown, it gets disabled and re-enabled at the next L4T boot.
As always the source is public and all L4T based projects for Switch will benefit (L4T linux distros/Lakka/Android)



Sources
They can all be found at https://gitlab.com/switchroot with the other kernel repos on http://nv-tegra.nvidia.com

Use these scripts if you want to build your own kernel: https://gitlab.com/switchroot/kernel/l4t-kernel-build-scripts/tree/test


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,

Josshy0125

Banned!
Banned
Joined
Jun 16, 2019
Messages
370
Trophies
0
Age
37
XP
753
Country
United Kingdom
Anybody?? I looked at YouTube to compared Ubunta and Lakka and Switchroot. Which is so much better ?

So I think Lakka is best. I feel its perfromance for games such as Gamecube, and the "tougher" games, is better, and also the UI is for the emulation. As far as Switchroot goes, the only real advantage it has over the others, is its DS emulation being basically perfect. But besides that, I'd say Lakka is best. I think of Ubuntu as kind of a "Lakka minus". It ran the bigger games slower for me, than Lakka had.
 

spotanjo3

Well-Known Member
Member
Joined
Nov 6, 2002
Messages
11,106
Trophies
3
XP
5,962
Country
United States
So I think Lakka is best. I feel its perfromance for games such as Gamecube, and the "tougher" games, is better, and also the UI is for the emulation. As far as Switchroot goes, the only real advantage it has over the others, is its DS emulation being basically perfect. But besides that, I'd say Lakka is best. I think of Ubuntu as kind of a "Lakka minus". It ran the bigger games slower for me, than Lakka had.

Hmmm.. I see. Thanks for your opinion.
 
  • Like
Reactions: Silent_Gunner

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,406
Trophies
1
Location
Hell
XP
4,163
Country
United States
Anybody?? I looked at YouTube to compared Ubunta and Lakka and Switchroot. Which is so much better ?
None are really the "best". They all run on the same L4T kernel + drivers and should in theory perform exactly the same on practically everything.

It's mostly a matter of whether you want android, a desktop linux environment, or a pure emulation machine.
 

Shahaan

Well-Known Member
Newcomer
Joined
Dec 29, 2018
Messages
99
Trophies
0
Age
17
Location
South Africa,Durban
XP
801
Country
South Africa
or don't be a fucking dick to the newbie who's asking on the literal thread about the product he's asking about...? Jesus some people here are cunts just to be cunts. Fuck off, guy.
Is being a newbie on a new site an excuse to dupe post 3 other times?
The info is there if you look just a little bit. "Friggin'" to aggressive for ya?
 
Last edited by Shahaan,
  • Like
Reactions: Silent_Gunner

Josshy0125

Banned!
Banned
Joined
Jun 16, 2019
Messages
370
Trophies
0
Age
37
XP
753
Country
United Kingdom
Is being a newbie on a new site an excuse to dupe post 3 other times?
The info is there if you look just a little bit. "Friggin'" to aggressive for ya?
No, but you can bear with him, because he's still learning, and probably doesn't know his way around the site. Don't be an asshole. And the fact that you're defending your asshole behaviour shows that your really are an asshole. Take 10 steps back and sit in the corner for a while. Come back when you feel like treating the new people kindly.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
33
XP
571
Country
United States
So I think Lakka is best. I feel its perfromance for games such as Gamecube, and the "tougher" games, is better, and also the UI is for the emulation. As far as Switchroot goes, the only real advantage it has over the others, is its DS emulation being basically perfect. But besides that, I'd say Lakka is best. I think of Ubuntu as kind of a "Lakka minus". It ran the bigger games slower for me, than Lakka had.
The only reason lakka is faster is because it doesnt have a whole OS eating resources in the background. And actually it would probably perform better if it were updated to use minerva, instead of the binary blob crap code for memory training that fOf implemented in coreboot. lol. Ubuntu has more overhead than lakka, and so does android, Lakka is a stripped down linux distribution with only 1 thing in mind.

Also, lakka currently has no wireless joycon support, dock support, bluetooth support, cuda supports, reboot2payload, etc. The joycon rail driver that is used there is also crap, and has no rumble, will break randomly if you disconnect joycons, etc. All of this has sense been fixed, and I am working on updating it, but I cant build it currently, as it wants an outdated build machine to compile it on, or it has issues. lol.

None are really the "best". They all run on the same L4T kernel + drivers and should in theory perform exactly the same on practically everything.

It's mostly a matter of whether you want android, a desktop linux environment, or a pure emulation machine.

This is the answer that should have been given, as it really depends on what you want to do with it, before you go into detail on how to go about it. Ubuntu has all around better hardware support than lakka, but I have plans to include things like mtp and what not to lakka as well, for easier rom/bios transfers and the like. Should make it easier for people to add roms, if all they have to do is drag and drop, then when they disconnect lakka will auto rescan. ;) Which ironically doesnt work in android. lol. It should in pie though.
 

spotanjo3

Well-Known Member
Member
Joined
Nov 6, 2002
Messages
11,106
Trophies
3
XP
5,962
Country
United States
Does that mean I should use Ubuntu instead of Lakka due to a better hardware support since Lakka doesn't have wireless joy con support, dock support, bluetooth support, and etc ?
 

DaruniaForever

New Member
Newbie
Joined
Nov 15, 2019
Messages
4
Trophies
0
XP
61
Country
Brazil
Does that mean I should use Ubuntu instead of Lakka due to a better hardware support since Lakka doesn't have wireless joy con support, dock support, bluetooth support, and etc ?
It does means you should use wharever switch you better.

Are you using it as a complete OS or for emulators only?
OS: no doubt, go for Ubuntu.
Emulators only: are you using wireless joycon and/or docked mode?
Yes: Go for Ubuntu.
No: Go for Lakka.

Simple like that.
 

Josshy0125

Banned!
Banned
Joined
Jun 16, 2019
Messages
370
Trophies
0
Age
37
XP
753
Country
United Kingdom
It does means you should use wharever switch you better.

Are you using it as a complete OS or for emulators only?
OS: no doubt, go for Ubuntu.
Emulators only: are you using wireless joycon and/or docked mode?
Yes: Go for Ubuntu.
No: Go for Lakka.

Simple like that.
Idk. From my experience lakka runs most gcn games (for example) far better than ubuntu. Probably because there are less resources being taken up by the OS, whereas ubuntu is a full OS with other areas taking up available memory and such
 

DaruniaForever

New Member
Newbie
Joined
Nov 15, 2019
Messages
4
Trophies
0
XP
61
Country
Brazil
Idk. From my experience lakka runs most gcn games (for example) far better than ubuntu. Probably because there are less resources being taken up by the OS, whereas ubuntu is a full OS with other areas taking up available memory and such
Interesting. I have never tested gcn games so I didn't know that. I think a "gaming mode" may fix it, maybe creating a gaming session (xserver + retroarch) instead of gnome. Dunno how hard is it, though.
 

Silent_Gunner

Crazy Cool Cyclops
Banned
Joined
Feb 16, 2017
Messages
2,696
Trophies
0
Age
28
XP
4,646
Country
United States
Idk. From my experience lakka runs most gcn games (for example) far better than ubuntu. Probably because there are less resources being taken up by the OS, whereas ubuntu is a full OS with other areas taking up available memory and such



IDK kid, I think you're just splitting hairs at this point...if your arguments had any merit to them in the first place, my sweet @Josshy0125. ;)
 

Silent_Gunner

Crazy Cool Cyclops
Banned
Joined
Feb 16, 2017
Messages
2,696
Trophies
0
Age
28
XP
4,646
Country
United States
The only reason lakka is faster is because it doesnt have a whole OS eating resources in the background. And actually it would probably perform better if it were updated to use minerva, instead of the binary blob crap code for memory training that fOf implemented in coreboot. lol. Ubuntu has more overhead than lakka, and so does android, Lakka is a stripped down linux distribution with only 1 thing in mind.

Also, lakka currently has no wireless joycon support, dock support, bluetooth support, cuda supports, reboot2payload, etc. The joycon rail driver that is used there is also crap, and has no rumble, will break randomly if you disconnect joycons, etc. All of this has sense been fixed, and I am working on updating it, but I cant build it currently, as it wants an outdated build machine to compile it on, or it has issues. lol.



This is the answer that should have been given, as it really depends on what you want to do with it, before you go into detail on how to go about it. Ubuntu has all around better hardware support than lakka, but I have plans to include things like mtp and what not to lakka as well, for easier rom/bios transfers and the like. Should make it easier for people to add roms, if all they have to do is drag and drop, then when they disconnect lakka will auto rescan. ;) Which ironically doesnt work in android. lol. It should in pie though.

Yo, you actually the one working on Lakka for Switch? Or is this build you're detailing different from that of @natinusala 's? I'm curious because LakkArch, if it had all of those missing features implemented atm, might be my Switch emulation solution of choice if it could be used with a dock as opposed to the current situation right now.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
33
XP
571
Country
United States
Yo, you actually the one working on Lakka for Switch? Or is this build you're detailing different from that of @natinusala 's? I'm curious because LakkArch, if it had all of those missing features implemented atm, might be my Switch emulation solution of choice if it could be used with a dock as opposed to the current situation right now.

I was working on updating what Nati had finished, but with the new kernel, and implementing dock support, sleep support, and probably the drivers. I wasnt actually going to update retroarch.
 
  • Like
Reactions: Silent_Gunner

Silent_Gunner

Crazy Cool Cyclops
Banned
Joined
Feb 16, 2017
Messages
2,696
Trophies
0
Age
28
XP
4,646
Country
United States
I was working on updating what Nati had finished, but with the new kernel, and implementing dock support, sleep support, and probably the drivers. I wasnt actually going to update retroarch.

That was what I meant. Rock on! ;)

(No, but it feels like such a long time since anything has happened in this particular part of the forum)
 

blastbeng

New Member
Newbie
Joined
Jan 3, 2020
Messages
2
Trophies
0
Age
35
XP
36
Country
Italy
I got it installed on my switch, Ubuntu is running very well!
But just a stupid question, do I need to inject hekate every time I want to boot Ubuntu? Or is there another way to boot Ubuntu? (like a grub or something that let me choose stock os or Ubuntu?)

Inviato dal mio MI 9 Transparent Edition utilizzando Tapatalk
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
33
XP
571
Country
United States
I got it installed on my switch, Ubuntu is running very well!
But just a stupid question, do I need to inject hekate every time I want to boot Ubuntu? Or is there another way to boot Ubuntu? (like a grub or something that let me choose stock os or Ubuntu?)

Inviato dal mio MI 9 Transparent Edition utilizzando Tapatalk
What did you get installed? Latest kernel, from sources, or base ubuntu image. If latest, it runs so much better. lol. so does Android Pie, which is also still in development. That being said, everything you need is on gitlab, excepting the working sc7 entry, and the rebootstub from atmosphere.
Hekate does exactly that, we use u-boot, grub is for x86, and screen doesnt come up until X starts, so grub probably wont happen. There is reboot2payload that will reboot from linux/android/atmosphere back to hekate, or you could disable reboot2payload, and autorcm, and it will reboot back to stock hos directly, but you will have to inject something everytime you boot, there is no cold boot option.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Skelletonike @ Skelletonike:
    3h left until work finishes, bah
  • Skelletonike @ Skelletonike:
    link doesn't work
    +2
  • Skelletonike @ Skelletonike:
    1H left, such a slow week.
  • Sonic Angel Knight @ Sonic Angel Knight:
    Okay, I had spaghetti :P
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
    K3N1 @ K3N1: Plug in*