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,

ed58

Member
Newcomer
Joined
Mar 15, 2016
Messages
21
Trophies
0
Age
27
XP
123
Country
United States
Does ishiiruka have to be made from source? I get too many errors when trying that. Vulcan backend doesn’t seem to work at all on the latest dolphin build
 

Pipistrele

Well-Known Member
Member
Joined
Jan 21, 2019
Messages
770
Trophies
0
Age
29
XP
1,637
Country
Russia
A fun thing to mess around with, but kinda hard to use for anything practical due to everything being so zoomed out (pain in the ass to tap small icons), lack of sleep mode, chaotic onscreen keyboard behavior and no OTG. A good beginning for sure though; some further quality of life additions, and it'll make for an awesome ARM-powered Linux tablet c:
 
Last edited by Pipistrele,

Pipistrele

Well-Known Member
Member
Joined
Jan 21, 2019
Messages
770
Trophies
0
Age
29
XP
1,637
Country
Russia
What's so great about this release? Out of curiousity?
Welp, it's a full-fledged Linux OS on your Switch (although on ARM, which means not all apps will work). You can do all sorts of stuff with it, from Word/Excel documents to internet browsing to coding etc. etc.
 

iotdevnet

Active Member
Newcomer
Joined
Apr 29, 2019
Messages
29
Trophies
0
Age
45
XP
75
Country
Bulgaria
I wonder is it possible we to use first part of the sd card just ot load the kernel and after that continue booting the file-system from usb-hdd cos usb3.0 port is pretty fast and we can use even ssd i know switch must be in dock mode but still is intersting to test but as i`m not aware on arm where is the conf file who told the kernel from where to load the filesystem cos on arm we don`t have grup bootloader

P.S i tested 4k h265 in kodi and was choppy :) so i think nvidia hw decoder is not been used from kodi :)

P.S2 found some commend in youtube for hwdec in tx1 chip.

A very decent device (It's essentially a Shield TV Lite hardware-wise) which is let down by somewhat poor software support, at least in the video decoding field. Nvidia still uses a custom OMX decoder (they were using it since Tegra 2 or even Tegra 1 days) instead of VDPAU on all Tegra boards. And the only software framework they support for video decoding is gstreamer. That means you can forget about Kodi, VLC or anything else that uses FFMPEG or AVCodec. Heck, even gstreamer-based software will need to be patched to work with Tegra although patching is quite trivial (you just need to change the default video sink). As for all that AI stuff, it sounds a bit strange why is Nvidia trying to target such a narrow market when this board has potential to be a really decent general purpose SBC. My guess they just want to focus on their existing target market for Jetson boards - AI developers and researchers. So they can sell them a more expensive Jetson later when the Nano is no longer powerful enough.


Okay, they provide video accel via openmax, which only works in kodi and gstreamer

can we patch gstreamer ? to be able to use some player 4k h265 ?





REPLY
 
Last edited by iotdevnet,

burt111

Well-Known Member
Newcomer
Joined
Oct 30, 2016
Messages
48
Trophies
0
Age
25
XP
187
Country
United States
Or
Others have said yes, but I haven't looked into those yet.
yes works fine the only issue I had is you either compile every core yourself “bc of arm64” or you take the ones from the Lakka switch release which you can open the blank system file with the archive manager and find the so files and drop them and the info files in the right directories
 
D

Deleted User

Guest
I have a pen that i must turn on to use on screen like smartphone or switch, on HOS, actually i have to turn it on, and it work perfectly. When in ubuntu even with the pen OFF, the screen is like ultra sensitive and it work. I somewhat feel like a magnet on it sometime, but it feel really, really tiny, or it may be just my feeling. Only happen under L4T.

Maybe the screen sensivity is too hight, even after 1.1 update? I wonder how it work but if it can help @bylaws, otherwise, sorry to bother.

Did the pen run dolphin? of course.
 

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
598
Trophies
0
Age
32
XP
1,157
Country
United States
Thank you all who tried to help me - eventually got a new MicroSD card and every previous problem was sorted out thanks to this.

I do have one issue with the Dolphin (L4T is updated to 1.1): I am unable to set my right joycon stick, it just doesm't do anything, when I move with the stick in controls settings. Left joycon stick works absolutely fine.
The right Joy Con stick was fixed in 1.1. Are you sure you applied the update? You have to download the separate package, it's not built in to the img file.

Does ishiiruka have to be made from source? I get too many errors when trying that. Vulcan backend doesn’t seem to work at all on the latest dolphin build
Yeah you have to build it from source. Run this command first to get all of the dependencies it needs:

Code:
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



I have a pen that i must turn on to use on screen like smartphone or switch, on HOS, actually i have to turn it on, and it work perfectly. When in ubuntu even with the pen OFF, the screen is like ultra sensitive and it work. I somewhat feel like a magnet on it sometime, but it feel really, really tiny, or it may be just my feeling. Only happen under L4T.

Maybe the screen sensivity is too hight, even after 1.1 update? I wonder how it work but if it can help @bylaws, otherwise, sorry to bother.

Did the pen run dolphin? of course.
I've noticed that the touch screen is really sensitive. A lot of times all you have to do is hover your finger over the screen and it will register as a touch without even making contact with the screen.
 
Last edited by stick267,
  • Like
Reactions: MartianMSK

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,480
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,218
Country
United States
I will leave it charging once again for a couple of hours, will let you guys know.
Starting a charge from 0% is going to be extremely slow, but it was designed that way I believe to prevent damage. It's why li-ion batteries are recommended to never be fully depleted. Not only that, but the system was also designed to prevent being turned on when under a certain percentage (I think 5%). So even if it's plugged in, it won't be able to turn on until it gets above the forced-shutdown range, and that'll be slow. Patience is a must in these cases.
 

crow132

Well-Known Member
Member
Joined
Jan 19, 2016
Messages
303
Trophies
0
Age
33
XP
1,333
Country
Saint Helena
Yes, I have had this happen to me before, and holding down power, charging, then plugging it into my PC would trigger RCM. This is the first time where doing so didnt work out. Pretty sure it bricked my switch.
you use autorcm right?

did you hit the usb port or something? maybe the issue is a broken port

I also heard that if you run out of battery completly while autorcm is active you cant charge the system back, you should try plugin your battery into another switch
 

burt111

Well-Known Member
Newcomer
Joined
Oct 30, 2016
Messages
48
Trophies
0
Age
25
XP
187
Country
United States
you use autorcm right?

did you hit the usb port or something? maybe the issue is a broken port

I also heard that if you run out of battery completly while autorcm is active you cant charge the system back, you should try plugin your battery into another switch
I’ve never had this issue
 

GibboHull

Active Member
Newcomer
Joined
Apr 4, 2019
Messages
25
Trophies
0
Age
30
XP
166
Country
United Kingdom
Managed to break it attempting to install moonlight. Was probably something I did to be honest my linux skills are non-exsistent.

Tried to install it from the repo provided by moonlight got a "cant install snap store cant support snapd/ linux can't mount image squashfs image using squashfs mount" error. Then installed snap (seemingly worked fine) and then tried to install moonlight again and got the same error. Restarted L4T and now switch hangs on a black screen before resetting back to RCM.

Might format the SD card and try again, make sure it's not something I've missed. Anyone got any ideas?

Edit: Also, not sure if this is a known error but I got no touchpad popup when using the browser, this was the only place that it happened.
 

burt111

Well-Known Member
Newcomer
Joined
Oct 30, 2016
Messages
48
Trophies
0
Age
25
XP
187
Country
United States
Managed to break it attempting to install moonlight. Was probably something I did to be honest my linux skills are non-exsistent.

Tried to install it from the repo provided by moonlight got a "cant install snap store cant support snapd/ linux can't mount image squashfs image using squashfs mount" error. Then installed snap (seemingly worked fine) and then tried to install moonlight again and got the same error. Restarted L4T and now switch hangs on a black screen before resetting back to RCM.

Might format the SD card and try again, make sure it's not something I've missed. Anyone got any ideas?

Edit: Also, not sure if this is a known error but I got no touchpad popup when using the browser, this was the only place that it happened.
I did this it was something else you did that broke it
 
General chit-chat
Help Users
    SylverReZ @ SylverReZ: I think I'd be dead if I take too many. Lol.