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,

Worldblender

Well-Known Member
Member
Joined
May 27, 2019
Messages
326
Trophies
0
Age
27
XP
2,236
Country
United States
I got started with another Switch unit that sometimes crashes to an orange screen on the stock OS. Luckily, I'm able to save this unit by booting it into RCM mode and pushing Hekate to it. To my joy, this L4T Ubuntu boots up nearly flawlessly even on this broken unit. :) However, the following things prevent me from making full use of this OS:
  • Wi-Fi icon is not present and it isn't detected. I haven't found out why it isn't working at all on my particular unit.
  • Bluetooth appears as turned off, but attempting to turn it on makes airplane mode appear.
  • After logging in, the NVIDIA logo will appear, causing my screen to turn sideways/portrait mode, and I also am unable to put the screen back into landscape mode. If there was a way to have the screen rotate by orientation, that's better, but even the stock OS is set to landscape all the time, so I'd like to follow it for simplicity.
  • I would like to turn on verbose logging so that I can see the kernel messages scroll by every time I boot up L4T.
  • As noted by @bylaws, USB OTG isn't working at all. I currently don't have a dock with me, only multiport hubs with power delivery. I haven't known if I charge the battery while running L4T yet.
Without a way to use USB devices or access the internet in this unit's current state, it's hard to take full advantage of what can be offered. I have a Raspberry Pi 3B that uses the same 64-bit ARM architecture as the Nintendo Switch does, so all I need to do is boot up a 64-bit OS image on that, and chroot into the L4T system so that I install some more packages to it. I hate the fact that I lost some convenience for the time being, but I'll have to live with it until things get better or someone steps in to guide me where I should go from here.
 

dotmick

Member
Newcomer
Joined
Oct 7, 2018
Messages
23
Trophies
0
Age
40
XP
138
Country
United Kingdom
Having loads of fun with Linux on Switch, thanks to the devs!

I making some tests on running x86 code and the first one is trying to see if I can get Exagear working. But I'm having issues like:

Starting ExaGear: update-binfmts: warning: Couldn't load the binfmt_misc module

Any idea on how to solve that? Should I recompile the kernel with a specific config?

(note: if I've got no luck with Exagear, I'll try Qemu.)
 

Refriger8tor

Well-Known Member
Member
Joined
Sep 2, 2013
Messages
135
Trophies
0
Location
A kitchen near you.
XP
458
Country
United States
Hey, I already asked on the software install page but nobody hit me back, I have the joycons working in Retroarch menu but they don't actually work in-game, has this occurred to anybody and does anyone know what's going on?
 
  • Like
Reactions: zarkon

Refriger8tor

Well-Known Member
Member
Joined
Sep 2, 2013
Messages
135
Trophies
0
Location
A kitchen near you.
XP
458
Country
United States
Hey, I already asked on the software install page but nobody hit me back, I have the joycons working in Retroarch menu but they don't actually work in-game, has this occurred to anybody and does anyone know what's going on?
Nevermind, I just had to access the quick menu while in game and change user 1 to controller
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
I got started with another Switch unit that sometimes crashes to an orange screen on the stock OS. Luckily, I'm able to save this unit by booting it into RCM mode and pushing Hekate to it. To my joy, this L4T Ubuntu boots up nearly flawlessly even on this broken unit. :) However, the following things prevent me from making full use of this OS:
  • Wi-Fi icon is not present and it isn't detected. I haven't found out why it isn't working at all on my particular unit.
  • Bluetooth appears as turned off, but attempting to turn it on makes airplane mode appear.
  • After logging in, the NVIDIA logo will appear, causing my screen to turn sideways/portrait mode, and I also am unable to put the screen back into landscape mode. If there was a way to have the screen rotate by orientation, that's better, but even the stock OS is set to landscape all the time, so I'd like to follow it for simplicity.
  • I would like to turn on verbose logging so that I can see the kernel messages scroll by every time I boot up L4T.
  • As noted by @bylaws, USB OTG isn't working at all. I currently don't have a dock with me, only multiport hubs with power delivery. I haven't known if I charge the battery while running L4T yet.
Without a way to use USB devices or access the internet in this unit's current state, it's hard to take full advantage of what can be offered. I have a Raspberry Pi 3B that uses the same 64-bit ARM architecture as the Nintendo Switch does, so all I need to do is boot up a 64-bit OS image on that, and chroot into the L4T system so that I install some more packages to it. I hate the fact that I lost some convenience for the time being, but I'll have to live with it until things get better or someone steps in to guide me where I should go from here.

Well, if you wanted to repair that switch, you know where to look, assuming the issue wasnt also a nand issue. As for the USB stuff, that seems weird, as I have used l4t-ubuntu as a device, as it is pre setup as a device. You just cant plug it in to the dock/power supply, after it switches modes, it doesnt switch back correctly. This is easily fixed with a new kernel, using modules for gadgets, and xudc, as I tested this in my gentoo build as well. Not sure what the problem is there, but that seemed to fix it there.... Then again, that is using the switchroot 5.0 kernel, and I havnt tested a modified config with the l4t kernel yet.

The power charging speed is super slow in L4T is there any way to fix it?
Power delivery doesnt charge the batteries, that is handled by the charger circut, which linux defaults the charge rate to 500ma. You can up this to 2000ma by typing this into a root terminal:
echo 2000000 > /sys/class/power_supply/bq24190-charger/input_current_limit

you might even be able to do: echo 2500000 > /sys/class/power_supply/bq24190-charger/input_current_limit
Having loads of fun with Linux on Switch, thanks to the devs!

I making some tests on running x86 code and the first one is trying to see if I can get Exagear working. But I'm having issues like:

Starting ExaGear: update-binfmts: warning: Couldn't load the binfmt_misc module

Any idea on how to solve that? Should I recompile the kernel with a specific config?

(note: if I've got no luck with Exagear, I'll try Qemu.)

binfmt_misc is a kernel feature that isnt generally used unless needed, so the devs didnt include it in their kernel build. It is fairly simple to add, but you will need to roll your own kernel, using the sources on gitlab. I wrote a nice script for getting/preparing the source, but you need to do the rest. Google is your friend, and gentoo has a nice guide on cross development that explains how to configure the kernel with this feature.
 
Last edited by Gavin_Darkglider,
  • Like
Reactions: galaxior

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
Ohshit, you did it! :hrth:

Yes, now, all i care about is reboot to payload, and getting rid of ubuntu. lol. The latter I am working on, but it is taking forever, and with minerva, and LP0 patching in coreboot, which is required for sleep mode, and reboot to payload, it is only a matter of time. Also, looking at patchwork, this feature might get merged into the switchroot mainline kernel as well, eventually.
 

trohn_javolta

Active Member
Newcomer
Joined
Aug 9, 2018
Messages
25
Trophies
0
Age
43
XP
114
Country
Antigua and Barbuda
Yes, now, all i care about is reboot to payload, and getting rid of ubuntu. lol. The latter I am working on, but it is taking forever, and with minerva, and LP0 patching in coreboot, which is required for sleep mode, and reboot to payload, it is only a matter of time. Also, looking at patchwork, this feature might get merged into the switchroot mainline kernel as well, eventually.

What do you want to exchange ubuntu with? Android? That would be nice :)
 

bylaws

Well-Known Member
OP
Member
Joined
Dec 11, 2018
Messages
129
Trophies
0
XP
1,655
Country
United Kingdom
Yes, now, all i care about is reboot to payload, and getting rid of ubuntu. lol. The latter I am working on, but it is taking forever, and with minerva, and LP0 patching in coreboot, which is required for sleep mode, and reboot to payload, it is only a matter of time. Also, looking at patchwork, this feature might get merged into the switchroot mainline kernel as well, eventually.
it won't, that isnt lp0 at all on patchwork. We are just using s2idle and not lp0 because its not supported properly. We cant load warmboot from coreboot because it would overwrite coreboot as that is in iram
 

Drban789

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

I bet you had this since the beginning on your Ubuntu switch. What other goodies you hiding on your switch im interested to find out lol.

By the way was wondering if you had any future plans to support snapd. I have been given scripts and stuff but honestly would be nice to get some form of patch which did it all. I really have no clue what linux is about.

Also, i found that that main video player which is default is super buggy and randomly closes videos. So i found an alternative called mpv media player on the ubuntu software store which is really stable. But i noticed the battery depletes really fast. Does any media player you install have hardware acceleration? Is there any way i can activate it for any media player i install?

I found this info browsing on the internet:
If you’re looking for a GPU accelerated video player for Ubuntu mpv player is a worthy contender. It offers hardware acceleration via FFmpeg, with support for VDPAU and VAAPI.
Im guessing it is?



Thanks again
 
Last edited by Drban789,

achoissoumsaco

Member
Newcomer
Joined
Apr 28, 2019
Messages
14
Trophies
0
Age
36
XP
103
Country
Brazil
Is it possible that some kind of loader could be created so we can load Nintendo Switch games inside Linux or I am having unrealistic expectations? Having my games in an external hard drive would be a dream.
 
  • Like
Reactions: Neo_

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/IihvJBjUpNE?si=CsvoEbwzNKFf0GAm cool