L4T Ubuntu - A fully featured linux on your switch

switchroot.png

L4T Ubuntu
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.

Join our discord: https://discord.gg/53mtKYt

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

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,

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
I tried installing the "noob" version a couple times in different cards and never got it to boot. No idea why I did that since it really isn't much easier.

Upon getting the switchroot image and the 1.5 update (cause why not be bleeding edge,) it boots no problem on a card that only black screened before.

Other items I noticed:
1. Touching the top menu doesn't work. Like ever.
2. Uninstalling stuff via the software menu (like libreoffice) while connected to a network resulted in it reinstalling after it uninstalled. No idea why. Disconnected and it worked.
3. Sudo apt-get upgrade looks like it says almost everything is no longer required and can be autoremoved. This can't be normal.....
4. Touchscreen freezes up on me randomly.


Haven't tried playing with joycons yet and still need to resize the partition and add a swap file.

Any one have directions to dual boot atmosphere? Seems like another boot folder on the same fat32 would conflict. Unless hekate can recognize another fat32 partition?
Yeah, their were some sdcard fixes for u-boot included in the 1.5.0 update I didnt document, because I didnt think they would make a difference after the kernel booted. I am happy they got you up and running though.
@Gavin_Darkglider how goes the other distributions?
Gentoo and Arch are done(At least basic hardware support) Just waiting on me to get off my ass and release them. lol. I will bootstrap debian next, which should go stupid quick(and have full hardware support like ubuntu). That being said, I am currently waiting on my sdcard RMA from samsung, so development has come to a halt for me until that comes in. As for the rest of the hardware support for arch and gentoo, it is a matter of installing debs from jetpack, which is the easy part, as most of that is just extract and place. lol. It is just the idiosyncrasies between distros. lol.
 

CalcProgrammer1

Member
Newcomer
Joined
May 4, 2019
Messages
19
Trophies
0
Age
34
XP
147
Country
United States
Glad to hear you're working on a Debian port. I started creating my own with debootstrap but never got around to finishing it, and I know I'd get stuck with the drivers. I already run Debian arm64 on a bunch of other boards as well as my desktop/laptop systems so I'll definitely be switching to it on my Switch.
 
  • Like
Reactions: SwordfishII

Ryab

Well-Known Member
Member
Joined
Aug 9, 2017
Messages
3,232
Trophies
1
XP
4,460
Country
United States
switchroot.png

L4T Ubuntu 1.3.1
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/

Features
  • Dock support with USB
  • Bluetooth (both controllers and audio)
  • Nvidia GPU drivers - Vulkan and OpenGL
  • Audio - Headphones, speakers and over HDMI when docked.
  • Joycons and pro controllers are supported fully when not attached to the the console
  • Touchscreen
  • Display
  • WiFi
  • 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)
Prerequisites
  • A dedicated 16GB+ sdcard
Downloads
Updates
  • 1.1:
  • Download:
  • https://download.switchroot.org/updates/update-1.1-for-switchroot-l4t-ubuntu-2019-04-28.tar.gz
  • Installation Instructions:
  • apt update && apt upgrade is NOT enough for this update
  • Extract this to the first partition of your sdcard, making sure to overwrite Image and tegra210-icosa.dtb.
  • Changelog:
  • Enabled USB mass storage and binfmt in kernel.
  • Fixed touch sensitivity and it not reaching bottom edge.
  • Fixed issues with joycon/procon right stick and y axis
  • Potentially fixed issues with sdcards, if someones didnt work before please try again, if still no then pm me.
  • 1.2:
  • Download:
  • https://download.switchroot.org/upd...1-for-switchroot-l4t-ubuntu-2019-04-28.tar.gz
  • Installation Instructions:
  • apt update && apt upgrade is NOT enough for this update
  • MAKE SURE TO DELETE THE boot FOLDER AND boot.scr BEFORE EXTRACTING THIS UPDATE
  • Extract this to the fat32 partition of your sdcard, making sure a l4t-ubuntu folder is created and the L4T ini is overwritten.
  • Changelog:
  • Enabled ntfs, nfs, squashfs (snaps may work now), ethernet drivers in kernel.
  • Added 2.0ghz overclock.
  • Enabled android ashmem drivers, needed for anbox (need arm64 ver of it and may run)
  • Potentially fixed issues with sdcards, if someones didnt work before please try again.
  • No longer conflicts with lakka.
  • Check misc info section on how to activate 2ghz mode.
  • 1.3.1:
  • Download:
  • https://download.switchroot.org/updates/update-1.3.1-for-switchroot-l4t-ubuntu-2019-04-28.zip
  • Installation Instructions:
  • apt update && apt upgrade is NOT enough for this update
  • MAKE SURE TO DELETE THE boot FOLDER AND boot.scr BEFORE EXTRACTING THIS UPDATE
  • Extract this to the fat32 partition of your sdcard, making sure a l4t-ubuntu folder is created and the L4T ini is overwritten.
  • Changelog:
  • 1.3
  • Enabled all iptables and bridge stuff in kernel.
  • Added SLEEP support (press power button), note the device may randomly wake up and log out if sleep is activated while logged i n, if this happens to you please ssh in and upload the contents of /var/log/syslog .
  • Sped up sdcards, broken ones still wont work though.
  • Charging now happens faster.
  • Probably more stuff I can't remember.
  • 1.3.1
  • Reduced battery usage in sleep
How to install
  1. Download the image from the downloads section and extract.
  2. Write it to your sdcard using a program such as etcher or dd
  3. Apply any updates from the updates section in the thread, IMPORTANT as images don't EVER come with them
  4. Boot hekate and select L4T from the configs menu.
  5. Wait for around 2-4 minutes while it initially loads
  6. Go through the setup process - make sure not to dock the console in this period.
  7. Once the initial setup is finished and you are on the login screen it is advisable to reboot:
  8. Hold the power button for 10 seconds.
  9. Load hekate again and select L4T as a payload.
  10. Log in and open the "Disks" app
  11. Select the second partition of your sdcard and click the gears icon
  12. Choose resize and change the size to the full amount of available space.
  13. Enjoy, you now have fully featured Ubuntu on your switch!
Bugs
  • Wired joycons do not work (connected to console)
  • Docking while having a ssh session open can cause the display to not turn off correctly
  • USB OTG - works fine in dock though
  • Vulkan is buggy in dolphin
  • Touch randomly freezes sometimes
  • The real time clock gets messed up in horizon
Misc Info
  • Pair (joy/pro)cons 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. Once both joycons are paired press each of their shoulder buttons to use as one controller
  • 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.
  • To limit cpu freq, run cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies. Find the one you want, then run: echo <freq you want> | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
  • To force max freq run echo performance | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
  • A gui to configure overclocks and fan profiles is coming soon
  • NEW: To activate 2 ghz mode run
    Code:
    echo 1 | sudo tee /sys/kernel/tegra_cpufreq/overclock
    echo 2091000  | sudo tee /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
    then run the command to force max freq if you want to use anything intensive.
  • To always use 2.0ghz mode copy
    Code:
    #!/bin/bash
    echo 1 > /sys/kernel/tegra_cpufreq/overclock
    echo  2091000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
    exit 0
    to /etc/rc.local (you'll need root to create)

Sources
They can all be found at https://gitlab.com/switchroot with the other kernel repos on http://nv-tegra.nvidia.com

Credits
Langerhans,
Ave,
Natinusala,
CTCaer,
NVIDIA,
Everyone else in switchroot - more info on that in the future.
Now to wait for arch
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
LP0 is working. It only took 180 Days, and hours of stairing at code for coreboot/atf, but it all payed off in the end.

Will push fixes later today so stay tuned.

20191012-011030.jpg
is there something wrong with my switch

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

im stuck on this screen

Nothing wrong with your switch, just the sdcard driver in the kernel. Use a samsung evo card, and it should work.


But YEAH. LP0....
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
LP0 is deep sleep, correct?
Yes, lp0 is deepsleep, unfortunatly, something about ubuntu is breaking it. So, I am working on porting ubuntu 18.04 from the nvidia samplefs to see if it makes a difference. Arch is having the same problems, so I dont know why it works *perfectly*(with a few workarounds) in gentoo.
 
  • Like
Reactions: stick267

DominoBright

Well-Known Member
Member
Joined
Sep 21, 2009
Messages
315
Trophies
1
Age
41
XP
2,514
Country
United States
Dang, guess deep sleep will take a while if it ever comes.

This has done so much to prevent me from installing Flash, while using Cinnamon makes the touch screen inputs hit other spots. (A rotation thing. I suppose that's fair though, it's made for Unity.)
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
Deep sleep issue has been found, and is being worked on as we speak. New touch driver should fix your issues there, rotation isnt working for me in rel30, probably something stupid I missed. lol. Ambiant light sensor is working though, and I am waiting on new joycon rail driver. Once that is done, and deepsleep issue is fixed, I will push an update for ubuntu, but really, I want to push a new image all together, because there are a lot of things userspace side of things that need to change to make everything work properly. Dont worry ubuntu people I havnt forgotten you. ;)
 

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
586
Trophies
0
Age
33
XP
1,171
Country
United States
Deep sleep issue has been found, and is being worked on as we speak. New touch driver should fix your issues there, rotation isnt working for me in rel30, probably something stupid I missed. lol. Ambiant light sensor is working though, and I am waiting on new joycon rail driver. Once that is done, and deepsleep issue is fixed, I will push an update for ubuntu, but really, I want to push a new image all together, because there are a lot of things userspace side of things that need to change to make everything work properly. Dont worry ubuntu people I havnt forgotten you. ;)
Great news. I wasn't aware that a Joy Con rail driver was being worked on. Will the updated image include reboot to payload as well? Either way, I can't wait for it. Thanks for all your hard work.
 

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,241
Country
United States
Deep sleep issue has been found, and is being worked on as we speak. New touch driver should fix your issues there, rotation isnt working for me in rel30, probably something stupid I missed. lol. Ambiant light sensor is working though, and I am waiting on new joycon rail driver. Once that is done, and deepsleep issue is fixed, I will push an update for ubuntu, but really, I want to push a new image all together, because there are a lot of things userspace side of things that need to change to make everything work properly. Dont worry ubuntu people I havnt forgotten you. ;)
Good that there will be a new image coming out. It will save me from having to download and apply multiple updates at once.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: yawn