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/9d66FYg

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,

brettwolf

New Member
Newbie
Joined
Apr 10, 2021
Messages
1
Trophies
0
Age
33
XP
30
Country
Australia
Hey buddy, i like your work and it work perfectly. But is there a way to disable the mapping when using dolphin Emu?
Pressing buttons during playing also give the comments for example volume up, down ext.

Never mind I have figure it out.:)
Hi, how did you get this to work? Is there some setting that I may have missed or did you change change the joycon config?

Sent from my SM-G973F using Tapatalk
 
  • Like
Reactions: evil_santa

Jeromy22

Well-Known Member
Newcomer
Joined
Sep 15, 2021
Messages
45
Trophies
0
Age
24
XP
85
Country
Australia
Hi, how did you get this to work? Is there some setting that I may have missed or did you change change the joycon config?

Sent from my SM-G973F using Tapatalk

If your using the latest megascript files, by default screenshot capture disables the keyboard config running in the background. Just tap in once your inside an app.
 
  • Like
Reactions: piek50

binkinator

Member
Newcomer
Joined
Mar 29, 2021
Messages
21
Trophies
0
Age
50
XP
187
Country
United States
Small consolation
Hi! I can't get for Hekate to dump my Joy-Con BT data to use in Ubuntu. It does work for one pair of joycons, the first party old ones that drift like crazy, but not for the new third party ones that don't drift. It says the paring failed because the data isn't HOS based even when I've already paired them in my stock sysnand. I wiped my sd card, booted normally into HOS, paired everything and checked that a Nintendo folder had been created, just for Hekate to then say it failed. So my guess is that third party joycons aren't supported, but I'd like to know if someone here can help me. My joycons are the red and blue Binbok model.
Black Bibboks behave the same way. Trying to figure out the firmware update program they have on their web site in hopes my controllers will be dumpable afterwards. Other than this one edge case I love these controllers.
 

vojut

Member
Newcomer
Joined
Jun 5, 2021
Messages
9
Trophies
0
XP
76
Country
Poland
My friend ran into a problem with Ubuntu. After copying movies from external sd card reader through OTG cable to the desktop, something went wrong - files could not be played. After restart, boot screen started flashing in unusual way and did not get into desktop but started looping between dark and gray screen. This is Switch with multiboot, with Atmosphere, Ubuntu and Android 10/Q. Problem is only with Ubuntu. Do anyone of you encountered something like this? I don't have direct access to this Switch - is there any way to instruct my friend to enable some logging, fallback/safe mode, or maybe somehow "reset" it? He does not have access to computer, so this will need to be done on Switch itself.

Turns out disk was completely full. I thought there was reserved space for system services, but seems not.
 

vojut

Member
Newcomer
Joined
Jun 5, 2021
Messages
9
Trophies
0
XP
76
Country
Poland
There seems to be an issue with latest Hekate (5.6.2, 5.6.3) or Atmosphere (1.1.1) - if you create partitions for Linux and emuMMC then fusee will launch to sysMMC instead of emu. Works fine with only emuMMC partition or with emu + Linux + Android.

Looks like this is the only case where emuMMC is addressed as RAW2 - in two other cases it's RAW1.
 
Last edited by vojut,

Jeromy22

Well-Known Member
Newcomer
Joined
Sep 15, 2021
Messages
45
Trophies
0
Age
24
XP
85
Country
Australia
There seems to be an issue with latest Hekate (5.6.2, 5.6.3) or Atmosphere (1.1.1) - if you create partitions for Linux and emuMMC then fusee will launch to sysMMC instead of emu. Works fine with only emuMMC partition or with emu + Linux + Android.

Looks like this is the only case where emuMMC is addressed as RAW2 - in two other cases it's RAW1.

If your running all 3, my question is why would you use fusee at all.
 

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
265
Trophies
0
Age
24
XP
1,274
Country
United States
Having not read the 135-page thread fully, is there a way to get XFCE on this?
To install for a stock XFCE4 experience:
Bash:
sudo apt-get install xfce4
Alternative to get the Xubuntu-branded experience:
Bash:
sudo apt-get install xubuntu-desktop

The former command with just XFCE4 should be enough for your use case.
This same concept can be used to get any packaged desktop environment installed.
 

Jeromy22

Well-Known Member
Newcomer
Joined
Sep 15, 2021
Messages
45
Trophies
0
Age
24
XP
85
Country
Australia
What do you mean? Does not matter if I inject it by loader or by selecting `payload=bootloader/payloads/fusee.bin` entry in Hekate.

You dont need fusee payload at all for any.
Hekate has more configs for dual boots & a launch screen, hekate has sigpatches. Just edit you’re hekate ipl.ini so that it has a boot entry for sysnand cfw/emunand or whatever you want to boot.
 

vojut

Member
Newcomer
Joined
Jun 5, 2021
Messages
9
Trophies
0
XP
76
Country
Poland
You dont need fusee payload at all for any.
Hekate has more configs for dual boots & a launch screen, hekate has sigpatches. Just edit you’re hekate ipl.ini so that it has a boot entry for sysnand cfw/emunand or whatever you want to boot.


Yes, I use Hekate. Setting it up is not the problem. It's not the first time I'm doing this. It worked before without issues. I even tried downgrading and it worked. It even work with emunand alone or with emunand+linux+android. But my target setup is emunand on SD partition and Linux, and it does not work with HOS 13 + Hekate 5.6.3 + Atmosphere 1.1.1 - it always launches to sysnand for some reason no mater what I try.
 

Jeromy22

Well-Known Member
Newcomer
Joined
Sep 15, 2021
Messages
45
Trophies
0
Age
24
XP
85
Country
Australia
Yes, I use Hekate. Setting it up is not the problem. It's not the first time I'm doing this. It worked before without issues. I even tried downgrading and it worked. It even work with emunand alone or with emunand+linux+android. But my target setup is emunand on SD partition and Linux, and it does not work with HOS 13 + Hekate 5.6.3 + Atmosphere 1.1.1 - it always launches to sysnand for some reason no mater what I try.

Again your not booting cfw from hekate then, your using fusee payload.

If you go to the launch menu in hekate & pick emummc(cfw)
Which has it force enabled it should not happen.
Can you link your hekate ipl ini template?? Inside your bootloader folder.
 
  • Like
Reactions: vojut

vojut

Member
Newcomer
Joined
Jun 5, 2021
Messages
9
Trophies
0
XP
76
Country
Poland
Again your not booting cfw from hekate then, your using fusee payload.

If you go to the launch menu in hekate & pick emummc(cfw)
Which has it force enabled it should not happen.
Can you link your hekate ipl ini template?? Inside your bootloader folder.
Ah! I know what you mean. I'm now launching by:

Code:
[CFW]
payload=bootloader/payloads/fusee.bin

should I use this instead:

Code:
[CFW]
emummcforce=1
fss0=atmosphere/package3

?

Yes! It works! Thanks!

But, launching by fusee worked fine before, why this aspect changed? And it was more stable for me, that's why I did launched directly by fusee-primary. Just now three restarts was enough for "panic ####" text mode to show up :( I will rather stick to my solution with Android partition even if not used.
 
  • Like
Reactions: Jeromy22

vojut

Member
Newcomer
Joined
Jun 5, 2021
Messages
9
Trophies
0
XP
76
Country
Poland

I think I missed something before. I don't have this console right now and cannot check to be sure (maybe next week).

When I was testing booting by fss0 and restarted from emunand I ended up with sysmmc again - so I don't think it works as it should. But I think that replacing reboot_payload.bin to Hekate will get around this.
 

qaz015393

Well-Known Member
Member
Joined
Jan 28, 2009
Messages
787
Trophies
0
XP
712
Country
United States
I want to use this on my switch, do I need to backup my saves with jksv before I format my SD card with this? My original plan was to dual boot my new 1 tb SD card with this and Atmosphere but since I have the latest JKSV I don't know how to restore all of my save data it backs up.
 

wstlxx

Member
Newcomer
Joined
Apr 29, 2019
Messages
13
Trophies
0
Age
26
XP
109
Country
China
I want to use this on my switch, do I need to backup my saves with jksv before I format my SD card with this? My original plan was to dual boot my new 1 tb SD card with this and Atmosphere but since I have the latest JKSV I don't know how to restore all of my save data it backs up.
all you need to backup is files visible on the sd card (if you are not using dual boot currently). just copy them to your computer. Then fresh install ubuntu from scrach. then paste your files back.
 
  • Like
Reactions: qaz015393

qaz015393

Well-Known Member
Member
Joined
Jan 28, 2009
Messages
787
Trophies
0
XP
712
Country
United States
all you need to backup is files visible on the sd card (if you are not using dual boot currently). just copy them to your computer. Then fresh install ubuntu from scrach. then paste your files back.
Ok I think I understand. I'm installing RetroPie and hopefully it'll be done before I sleep 😂 I'm installing pcsx2 and when I'm ready I'll back it up until I'm ready to reformat my SD card again and have it's full 956 gigs back to get back that ~90 gigs.
 

XC-3730C

Well-Known Member
Member
Joined
May 10, 2014
Messages
731
Trophies
0
Age
44
XP
1,426
Country
United States
Is there a way to boot directly into Retropie/Emulationstation?

I would love to be able to use one of the many Raspberry Pi3/4 builds on Switch. I would want to set up a 400gb card with only RetroPie/Emulationstation.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    KennieDaMeanie @ KennieDaMeanie: https://youtube.com/shorts/nqdQNSEjtnA?feature=share