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,
D

Deleted User

Guest
Install went just fine , but now i need help ... any clue how i could make the fat32 partition bigger ? because i would like to use Linux , Lakka , Emunand on one SD Card it should be possible i guess
 

Goffrier

Well-Known Member
Member
Joined
Dec 19, 2018
Messages
181
Trophies
0
Age
44
XP
428
Country
United States
@Refriger8tor is 1GB enough for the swap? because the minecraft map i host needs 4gb of allocated ram

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

and i have a 64gb sd card so the swap can be big if needed
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
I come bearing gifts today. If, you like me, do not like the behavior of dock removal, such as the console screen resolution being off, with this version of dock-hotplug, that is a thing of the past.

1. Download the attached script.
2. as root move script to /usr/bin/dock-hotplug
3. Open terminal, and type chmod +x /usr/bin/dock-hotplug

Now removing from the dock should result in screen resolution returning to 1280x720 resolution every time. In my gentoo build, I have 6 dock profiles to choose from, and easy switch using eselect. I also added disabling the touch screen when on dock(Assuming you are using a non dual screen dock-profile), which is as simple as adding xinput <enable/disable> 6(id number assigned to touch screen)
 

Attachments

  • dock-hotplug.txt
    2.1 KB · Views: 116
Last edited by Gavin_Darkglider,
D

Deleted User

Guest
Install went just fine , but now i need help ... any clue how i could make the fat32 partition bigger ? because i would like to use Linux , Lakka , Emunand on one SD Card it should be possible i guess
Any idea any one
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States

This is going to take forever, as the data all has to be moved to extend the partition,

This is how I would do it:

1. Copy the switchroot img.gz to a flash drive(Assuming you arent already running linux)
2. gunzip switchroot img.gz
3. type into root terminal: kpartx -v -a <path to extracted img>
4. partition sdcard with fat32 partition the size you want, and create the second partition formatted to ext4 to use the rest of the drive(we will need to resize it later.)
5. close partition editor
5. extract switchroot update 1.3 to fat32 partition.
6. type into root terminal: dd if=/dev/loop<# assignedbykpartx)p2 of=/dev/<sdcardPartition2> bs=4M sync=conv
7. type into root terminal: kpartx -d <path to extracted img>
7. reopen gparted, and resize the partition how you like, then create more partitions, if needed.
8. mount the partition and make sure it works before putting it in the switch.
 
  • Like
Reactions: Deleted User

Mouser X

Well-Known Member
Member
Joined
Aug 26, 2009
Messages
101
Trophies
0
XP
546
Country
United States
Install went just fine , but now i need help ... any clue how i could make the fat32 partition bigger ? because i would like to use Linux , Lakka , Emunand on one SD Card it should be possible i guess
If you searched this thread, you'd find this:
If you have 2 SD cards, and an official Nintendo dock, install L4T to two SD cards. Boot Linux on your Switch, and insert your 2nd SD into a USB SD card reader, and plug that into your dock's USB port. Now install/use gparted on your Switch, to resize/move the ext4 and fat32 partions on your 2nd SD card. This resized SD card will be your full, permanent, L4T + Lakka card (this is how I got Lakka and L4T on the same SD card).
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
When can we expect hw acceleration in Firefox? I strongly dislike chromium.

When you want to compile a version that supports the hardware acceleration in the switch. I havnt looked into it yet, but I know there is a version of chromium that has openMax acceleration, which is what I would search for for firefox.
 

BruhBoy

Well-Known Member
Newcomer
Joined
May 3, 2019
Messages
46
Trophies
0
Age
54
XP
103
Country
United States
So does mupen64 work fine through retroarch? If it does, what is the code to get retroarch? I know that the install guides has a piece of code for retroarch but that is outdated (at least I don't know if it is).
 

Refriger8tor

Well-Known Member
Member
Joined
Sep 2, 2013
Messages
135
Trophies
0
Location
A kitchen near you.
XP
458
Country
United States
So does mupen64 work fine through retroarch? If it does, what is the code to get retroarch? I know that the install guides has a piece of code for retroarch but that is outdated (at least I don't know if it is).
If you haven't already flashed an image you can grab mine with retroarch and other emus already installed on my thread. Otherwise those instructions should be fine but keep in mind it's the experimental nightly retroarch so it might not always work.
 

Drban789

Well-Known Member
Member
Joined
Jun 28, 2018
Messages
105
Trophies
0
XP
381
Country
United Kingdom
If you haven't already flashed an image you can grab mine with retroarch and other emus already installed on my thread. Otherwise those instructions should be fine but keep in mind it's the experimental nightly retroarch so it might not always work.

hello again fridgy, on your ubunti build how do i add 1.3.1 and further updates? Do i just put it in the fat 32 section?
 

Gameboyandwatch

Well-Known Member
Member
Joined
May 13, 2016
Messages
207
Trophies
0
XP
423
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.
Can this mess up my battery or break my screen? I heard somewhere that it could do that.
 

EpicLPer

Your friendly Austrian IT Guy
Member
Joined
Mar 13, 2015
Messages
1,060
Trophies
0
Age
28
Location
Austria
Website
epiclper.com
XP
1,141
Country
Austria
Can this mess up my battery or break my screen? I heard somewhere that it could do that.
This was with the very first Linux version that came out, it doesn't happen anymore now. Only thing it derps up is the time but that'll correct itself again once you boot back into Horizon OS since it grabs that over the internet.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
You will probably not get any guarantees, but so far I did not spot any reports of unrecoverable battery or screen issues due to L4T.

Chances are it still writes the register that messes up the battery. If it doesnt, then the version of u-boot being used probably does. I havnt seen any sources for U-boot on switch root, so they are probably using the version from FailOverfl0w. That being said, hekate fixes the register automagicaly when you boot the latest version, so it isnt a big deal. As for screen issues, I have been running linux mainline 5.0 since october, and before that I ran tardyp's 4.17 kernel, and FailOverfl0w's 4.15 kernel, and never had screen issues(excepting when a friends kid sat on it, while playing breath of the wild), and even that was minimal, and not really noticeable, unless you are looking at a black screen with the backlight on. lol. Nothing to do with linux though
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: The mutated Axolotl was awesome