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,

hallo23

Well-Known Member
Member
Joined
Sep 13, 2009
Messages
144
Trophies
0
XP
1,401
Country
Germany
Damn I really wanna try this out.
Now I have to decide if I wanna sacrifice a Sd card for that >.<

I'm really curious how good a video player works with it.
If someone is trying this out pls test a video player for me <3 (Especially high bitrate 1080p files)
 
Last edited by hallo23,

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
598
Trophies
0
Age
32
XP
1,157
Country
United States
Let's goooooo. Thanks @bylaws.

FYI Dolphin Ishiiruka works much better with Vulkan than stock Dolphin.

https://github.com/Tinob/Ishiiruka

To install, run this command first to get all of the dependencies for it:
sudo apt install git cmake ffmpeg libavcodec-dev libevdev-dev libusb-1.0-0-dev libavformat-dev libswscale-dev libsfml-dev libminiupnpc-dev libmbedtls-dev curl libhidapi-dev libwxbase3.0-dev libwxgtk3.0-dev libpangocairo-1.0-0 libgtk2.0-dev libbluetooth-dev qt5-default qtbase5-private-dev libudev-dev
Then follow the Linux Global Build instructions in the repo to compile/install.
 
Last edited by stick267,

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
22,493
Trophies
4
Location
Space
XP
12,348
Country
Norway
Last edited by The Real Jdbye,

bottmint

Well-Known Member
Newcomer
Joined
Oct 28, 2017
Messages
90
Trophies
0
Age
30
XP
372
Country
United States
Works wonderfully! Thanks to all the contributors to this!

Damn I really wanna try this out.
Now I have to decide if I wanna sacrifice a Sd card for that >.<

I'm really curious how good a video player works with it.
If someone is trying this out pls test a video player for me <3 (Especially high bitrate 1080p files)
From the videos I've played (docked), it runs well, amd the picture looks great! You could likely back up your card, flash the image, resize the fat 32 partition to suit your needs, amd leave some space to resize the ext4 partition once you're done with the initial setup. Horizon only looks for the first fat32/exfat partition, afaik.

Thank you, i was waiting an updated linux build for a while.
If you could use the wired joycons as a mouse it would be the perfect portable linux machine

The touchscreen works fairly well.
 
Last edited by bottmint,

bylaws

Well-Known Member
OP
Member
Joined
Dec 11, 2018
Messages
129
Trophies
0
XP
1,144
Country
United Kingdom
Damn, this looks nice. But is it possible to customize the OC? I don't really feel comfortable OCing my Switch. At least not by that much.

What's the FPS like?
posted in info section.

Fps is like 27in WW but if you turn emulated clock down you can get to 30 in some places
 
Last edited by bylaws,

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
598
Trophies
0
Age
32
XP
1,157
Country
United States
can someone check whether dolphin or cemu runs well?
Dolphin is solid with Vulkan. Using an earlier build, I played through Dragon Roost Cavern in Wind Waker. Usually around 25fps, but full 30fps on occasion. ~20fps pretty often inside Dragon Roost Cavern.

Skip to ~9:00 in this video to see a few mins on Outset Island.
https://www.dailymotion.com/video/x76a6vf
 
Last edited by stick267,
D

Deleted User

Guest
Oh FUCK! I'mma get this right now to try!

I hope that they can figure out how to get the joycons to work while connected to the system, else it makes it a little less Portable friendly.
 
Last edited by ,

GibboHull

Active Member
Newcomer
Joined
Apr 4, 2019
Messages
25
Trophies
0
Age
30
XP
166
Country
United Kingdom
I regularly use in home switching to play games, in fact it's probably what I use my switch for the most at the minute.

Does anyone know if it would perform better if I ran the Linux moonlight client through this, especially with the sound support and video acceleration, or would I be better off just carrying on as I am?
 

wiewiec

Well-Known Member
Member
Joined
Dec 24, 2015
Messages
773
Trophies
0
Age
38
Location
Somewhere
XP
1,354
Country
Poland
Brilliant! Android and Linux - great stuff comes to Switch. I love it and no matter that Nintendo have it as port machine from dead Wii U.
 

bottmint

Well-Known Member
Newcomer
Joined
Oct 28, 2017
Messages
90
Trophies
0
Age
30
XP
372
Country
United States
I have a switch with a dead screen. Will this work or I need the screen to select something somewhere?
Edit: on the dock of course.
You need the screen for the initial setup. If you have a switch with a working screen, or can borrow one for the setup, that should work and get you to the desktop. A usb keyboard will be handy for docked mode.
 
  • Like
Reactions: dbrown1986
General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://imgur.com/gallery/jcHBrqX