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,

blastbeng

New Member
Newbie
Joined
Jan 3, 2020
Messages
2
Trophies
0
Age
35
XP
36
Country
Italy
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.

OK so actually there is no way to cold boot the switch, even with uboot you still need to inject something to activate the bootloader, that's what I wanted to know

Have I understood well?
 

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,406
Trophies
1
Location
Hell
XP
4,163
Country
United States
OK so actually there is no way to cold boot the switch, even with uboot you still need to inject something to activate the bootloader, that's what I wanted to know

Have I understood well?
Coldbooting into any sort of unofficial software isn't possible without a hardmod, yeah.
 
Last edited by ZachyCatGames,

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,143
Trophies
2
XP
20,171
Country
United Kingdom
OK so actually there is no way to cold boot the switch, even with uboot you still need to inject something to activate the bootloader, that's what I wanted to know

Have I understood well?
Agreeing with Zachy, but phrasing differently - yes, the way to get untethered coldboot is to have a modchip fitted.

All the cool kids are doing it.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
33
XP
571
Country
United States
Agreeing with Zachy, but phrasing differently - yes, the way to get untethered coldboot is to have a modchip fitted.

All the cool kids are doing it.
No, the cool kids, like Zahir and I are desigining our own modchip, that will do 4 emmcs. lol, and payload injection, and push hekate stuff via uart to the switch, so you dont need an sdcard unless running atmosphere. ;)
 
  • Like
Reactions: hippy dave

Killoso32

Member
Newcomer
Joined
Apr 5, 2018
Messages
9
Trophies
0
Age
27
XP
75
Country
Germany
audio in docked mode is not working for me
EDIT: it works know, the hdmi cable I used was faulty.

and when I try to load the plasma de, the screen gets stuck at the nvidia logo, but xfce works somehow
what do
 
Last edited by Killoso32,

Moe90

Member
Newcomer
Joined
Jan 8, 2020
Messages
7
Trophies
0
Age
32
XP
30
Country
United Arab Emirates
hello dudes, am utterly new here, just wanted to confirm if I grab a USB hub along with a keyboard and mouse, can I use them on my switch on Ubuntu? thanks for any assistance!
 

iotdevnet

Active Member
Newcomer
Joined
Apr 29, 2019
Messages
29
Trophies
0
Age
45
XP
75
Country
Bulgaria
hello dudes, am utterly new here, just wanted to confirm if I grab a USB hub along with a keyboard and mouse, can I use them on my switch on Ubuntu? thanks for any assistance!

Only in dock mode :) Connecting anything to switch usbC port in portable mode will not work on ubuntu cos missing usb otg driver.
 

Moe90

Member
Newcomer
Joined
Jan 8, 2020
Messages
7
Trophies
0
Age
32
XP
30
Country
United Arab Emirates
Only in dock mode :) Connecting anything to switch usbC port in portable mode will not work on ubuntu cos missing usb otg driver.
thanks so i also need a monitor in that case lol might as well grab me a pc with ubuntu on it

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

bluetooth keyboard and mouse should connect normally through bluetooth settings tho
for real??
 

Silent_Gunner

Crazy Cool Cyclops
Banned
Joined
Feb 16, 2017
Messages
2,696
Trophies
0
Age
28
XP
4,646
Country
United States
thanks so i also need a monitor in that case lol might as well grab me a pc with ubuntu on it

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


for real??

You'll mainly be using the M/KB for the initial setup. After everything is tinkered with, you can have fun and map everything you'd want to use with a controller!

Question: Has sleep mode been implemented in this version of Ubuntu? I only followed the noob-friendly thread and kind of put this one on ignore to let time pass for everyone to figure everything out, and the lack of sleep mode is what killed this homebrew solution as it'd drain my hacked Switch's battery if I had it out of the dock for any extended period of time!
 

Moe90

Member
Newcomer
Joined
Jan 8, 2020
Messages
7
Trophies
0
Age
32
XP
30
Country
United Arab Emirates
You'll mainly be using the M/KB for the initial setup. After everything is tinkered with, you can have fun and map everything you'd want to use with a controller!

Question: Has sleep mode been implemented in this version of Ubuntu? I only followed the noob-friendly thread and kind of put this one on ignore to let time pass for everyone to figure everything out, and the lack of sleep mode is what killed this homebrew solution as it'd drain my hacked Switch's battery if I had it out of the dock for any extended period of time!
hmm what do you mean by M/KB?
 

wstlxx

Member
Newcomer
Joined
Apr 29, 2019
Messages
13
Trophies
0
Age
27
XP
124
Country
China
if i use linux on the switch am i running into a potential ban?
No , only piracy and some mods along with connecting to Nintendo server result in a ban.

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

hello ! I got a 3rd party dock which works with switch system
but could not work with L4T,
is there anything i could do about it ?
 

Silent_Gunner

Crazy Cool Cyclops
Banned
Joined
Feb 16, 2017
Messages
2,696
Trophies
0
Age
28
XP
4,646
Country
United States
No , only piracy and some mods along with connecting to Nintendo server result in a ban.

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

hello ! I got a 3rd party dock which works with switch system
but could not work with L4T,
is there anything i could do about it ?

I hate to be that guy, but honestly, just get the official dock and you won't have as many or no problems at all. I know, Nintendo overcharges for that shit, but I've always put my money on officially supported peripherals working over trying my luck with 3rd parties for the most part.
 

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
598
Trophies
0
Age
32
XP
1,157
Country
United States
where are 1.5 updates ?
There are 2 different updates on page 98. The first one enables reboot2payload and the second one adds some Minerva stuff and touchscreen fixes. Both from user @Gavin_Darkglider.

I've had trouble enabling the reboot2payload update however. When I do step 5 I get a file/folder not found error. I was hoping there was some kind of update which bundles everything together already.
 
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*