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,

Drban789

Well-Known Member
Member
Joined
Jun 28, 2018
Messages
105
Trophies
0
XP
371
Country
United Kingdom
Hello,

Is there any way to configure the switch joycons on retroarch without using a keyboard? Right now i can only scroll through the main menu on retroarch but i cant click anything
 

dixeflatline

Active Member
Newcomer
Joined
Dec 16, 2010
Messages
43
Trophies
0
Location
Somewhere near you
XP
279
Country
United States
Hello,

Is there any way to configure the switch joycons on retroarch without using a keyboard? Right now i can only scroll through the main menu on retroarch but i cant click anything

If its not an OS related issue, try to post over at https://gbatemp.net/threads/l4t-ubuntu-applcation-install-guides.537579/ that seems to be where application help is going on at. You need to configure whatever controller your using inside of RA. Settings > Input > User 1 Binds > (change seetings accordinly) > User 1 bind all.

Should be done.
 

tabzer

moon!
Member
Joined
Feb 15, 2019
Messages
4,661
Trophies
1
Age
38
XP
3,603
Country
Japan
I am trying to get the "HORI Nintendo Switch Multiport USB Playstand" to work with L4T. Charges fine, but USB doesn't seem to be working. Anyone know why?
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
33
XP
571
Country
United States
How do you install software? are there repos, or do you have to compile from source?

There are repos..... Mainly the Ubuntu Arm64 repo, which is lacking a lot, and hasnt been updated in quite a while..... Kodi hasnt even been upgraded to 18 yet in those repos. :( I am in the middle of building gentoo for the switch, which would take things back to being compiled, but at least the stuff that has newer upgrades, can get those upgrades, without breaking ubuntu. lol.

I am trying to get the "HORI Nintendo Switch Multiport USB Playstand" to work with L4T. Charges fine, but USB doesn't seem to be working. Anyone know why?

Because non official docks are not supported on L4T. They handle dock negotiations a little different, and the driver doesnt support those docks(yet?) Use the official dock, or get some dmesg dumps, and see what is going on with the bm92t driver. so something along the lines of dmesg | grep bm92, and it will tell you about the negotiation, and what state the chip is in(Dock, usb host, usb device, etc.) There are a few different modes, but I have a feeling it isnt changing like it should, due to the custom stuff that was needed for the switch dock.
 
Last edited by Gavin_Darkglider,
  • Like
Reactions: Worldblender

Vigg

Member
Newcomer
Joined
Jul 5, 2018
Messages
22
Trophies
0
Age
23
XP
295
Country
Netherlands
Hey i've been trying to install anbox, but I cant't find a working arm64 port. It says in the patch notes that it now has the right modules for it right? Can someone maybe help me or link me a working tutorial. I'm not that inapt so a little direction is all I need.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
33
XP
571
Country
United States
Hey i've been trying to install anbox, but I cant't find a working arm64 port. It says in the patch notes that it now has the right modules for it right? Can someone maybe help me or link me a working tutorial. I'm not that inapt so a little direction is all I need.

I was looking into it, and it seems you need a special built arm64 android root. The best I found was: https://github.com/HarleyPato/anbox-arm64 and even that seems to have issues listed.... But what on github doesnt. lol. I was going to work that out later for my build, but I am having enough issues fighting with the updates, and software install trying to keep both gentoo, and the nvidia drivers happy. lol. Really, it has nothing to do with with the nvidia drivers, but more on gentoo's dependence on perl, which the version they want you to have doesnt work with perl-cross yet, but it doesnt want to continue since it cant build that 1 package, because so much of the base system depends on it. It is a work in progress though. and goes fairly quick, since I told it to build binary packages as well. lol.

Edit: Think I found a fix for the perl issue..... now I go back to waiting. lol.
 
Last edited by Gavin_Darkglider,

Vigg

Member
Newcomer
Joined
Jul 5, 2018
Messages
22
Trophies
0
Age
23
XP
295
Country
Netherlands
I was looking into it, and it seems you need a special built arm64 android root. The best I found was: https://github.com/HarleyPato/anbox-arm64 and even that seems to have issues listed.... But what on github doesnt. lol. I was going to work that out later for my build, but I am having enough issues fighting with the updates, and software install trying to keep both gentoo, and the nvidia drivers happy. lol. Really, it has nothing to do with with the nvidia drivers, but more on gentoo's dependence on perl, which the version they want you to have doesnt work with perl-cross yet, but it doesnt want to continue since it cant build that 1 package, because so much of the base system depends on it. It is a work in progress though. and goes fairly quick, since I told it to build binary packages as well. lol.

Edit: Think I found a fix for the perl issue..... now I go back to waiting. lol.
Oh oke thnx for clarification. Guess I'll just have to wait for news then.
 

ZeroFX

why?
Member
Joined
Jun 18, 2018
Messages
940
Trophies
0
Location
napaJ
XP
2,418
Country
Japan
I was looking into it, and it seems you need a special built arm64 android root. The best I found was: https://github.com/HarleyPato/anbox-arm64 and even that seems to have issues listed.... But what on github doesnt. lol. I was going to work that out later for my build, but I am having enough issues fighting with the updates, and software install trying to keep both gentoo, and the nvidia drivers happy. lol. Really, it has nothing to do with with the nvidia drivers, but more on gentoo's dependence on perl, which the version they want you to have doesnt work with perl-cross yet, but it doesnt want to continue since it cant build that 1 package, because so much of the base system depends on it. It is a work in progress though. and goes fairly quick, since I told it to build binary packages as well. lol.

Edit: Think I found a fix for the perl issue..... now I go back to waiting. lol.
Could not get anbox to work, look at that: https://github.com/anbox/anbox/issues/1043

I cant get it to build because libboost.
 

Qubarf

Well-Known Member
Member
Joined
Dec 14, 2018
Messages
233
Trophies
0
Age
32
XP
854
Country
Pakistan
Has anybody tried shashlik yet?
And Bylaws, just asking, are you still thinking about making android work?
It’s my personal opinion but I think android would be much more practical on a switch than Ubuntu.
Thanks!

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

The linux L4T release has done a lot of the groundwork for Android, they're waiting for nvidia to release updated drivers for a new android release.

The android remote play client can be made to run on non-sony devices, the hardest part is getting the controller working.
Is this true, just want to confirm
 
  • Like
Reactions: trohn_javolta

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
33
XP
571
Country
United States
Could not get anbox to work, look at that: https://github.com/anbox/anbox/issues/1043

I cant get it to build because libboost.
My build already has libboost, and the headers installed, so building anbox wont be the issue, but building the special arm64 android root might be. Should be fun, as I havnt tried to build it before. lol.

Has anybody tried shashlik yet?
And Bylaws, just asking, are you still thinking about making android work?
It’s my personal opinion but I think android would be much more practical on a switch than Ubuntu.
Thanks!

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


Is this true, just want to confirm

I am not sure l4t is the answer for android, especially since I have seen no video card drivers for android in any of the bsp releases I have gone through. If there were, I am sure Bylaws would have released Android Switch by now. As I am rebuilding my build again, to see if I managed to fix the build issues I was having, it might be a while until it is ready for that.

Actually, after looking into it a bit more, I found this, which might make l4t a viable android candidate: http://nv-tegra.nvidia.com/gitweb/?...git;a=shortlog;h=refs/heads/rel-30-r2-partner I am not sure if this is the correct version for this kernel, but I would think it would be worth a try. I am not a huge fan of android, so I do not plan on attempting to build android with this, but it would be cool to see working android and linux.
 
Last edited by Gavin_Darkglider,
  • Like
Reactions: lordelan

Qubarf

Well-Known Member
Member
Joined
Dec 14, 2018
Messages
233
Trophies
0
Age
32
XP
854
Country
Pakistan

bylaws

Well-Known Member
OP
Member
Joined
Dec 11, 2018
Messages
129
Trophies
0
XP
1,144
Country
United Kingdom
I was looking into it, and it seems you need a special built arm64 android root. The best I found was: https://github.com/HarleyPato/anbox-arm64 and even that seems to have issues listed.... But what on github doesnt. lol. I was going to work that out later for my build, but I am having enough issues fighting with the updates, and software install trying to keep both gentoo, and the nvidia drivers happy. lol. Really, it has nothing to do with with the nvidia drivers, but more on gentoo's dependence on perl, which the version they want you to have doesnt work with perl-cross yet, but it doesnt want to continue since it cant build that 1 package, because so much of the base system depends on it. It is a work in progress though. and goes fairly quick, since I told it to build binary packages as well. lol.

Edit: Think I found a fix for the perl issue..... now I go back to waiting. lol.
Regular anboz works
Could not get anbox to work, look at that: https://github.com/anbox/anbox/issues/1043

I cant get it to build because libboost.
It won't work anyway, it will eventually once you get it running think its being ran from /mnt and that messes up stuff, I guess probably some fs namespace issue in kernel.
My build already has libboost, and the headers installed, so building anbox wont be the issue, but building the special arm64 android root might be. Should be fun, as I havnt tried to build it before. lol.



I am not sure l4t is the answer for android, especially since I have seen no video card drivers for android in any of the bsp releases I have gone through. If there were, I am sure Bylaws would have released Android Switch by now. As I am rebuilding my build again, to see if I managed to fix the build issues I was having, it might be a while until it is ready for that.

Actually, after looking into it a bit more, I found this, which might make l4t a viable android candidate: http://nv-tegra.nvidia.com/gitweb/?...git;a=shortlog;h=refs/heads/rel-30-r2-partner I am not sure if this is the correct version for this kernel, but I would think it would be worth a try. I am not a huge fan of android, so I do not plan on attempting to build android with this, but it would be cool to see working android and linux.
Nope, nvs source is botched and terrible, it will come whenever its fixed.
 
General chit-chat
Help Users
    Skelletonike @ Skelletonike: a big nope