L4T Ubuntu - A fully featured linux on your switch

Discussion in 'Switch - Exploits, Custom Firmwares & Soft Mods' started by bylaws, Apr 28, 2019.

  1. Liv2MsTrb8T

    Liv2MsTrb8T Advanced Member

    Newcomer
    3
    Aug 18, 2009
    United States
    Columbus Ohio
    @bylaws. Sorry if these are useless now. I've made bandaid tier macros to deal with the annoyances and forgot to upload.

    One bug I can't avoid is the sleepy gpu (I think) After a few hours uptime only the display will die.

    Also thank you! I've learned a lot from this.
     

    Attached Files:

  2. bitteorca

    bitteorca Member

    Newcomer
    1
    Jul 12, 2018
    United States
    EDIT: My bad you're right
     
    Last edited by bitteorca, Jul 14, 2019
  3. Gavin_Darkglider

    Gavin_Darkglider GBAtemp Regular

    Member
    3
    May 20, 2019
    United States
    I have ran gentoo for days without reboot, while compiling with dpms off, and the it has always come back. Sometimes it is a bit slow due to cpu load(Because I am compiling), but I am not sure what you mean by die.

    Also, I have a new kernel, with kali patches, and a test version of coreboot/atf that I hacked together that add minerva support(Removes binary blobs, and seems to fix some loading issues I was having.) There is also a new patch for the touchscreen driver from the android kernel, which seems to help, a little, but still isnt perfect.
     
  4. Gavin_Darkglider

    Gavin_Darkglider GBAtemp Regular

    Member
    3
    May 20, 2019
    United States
    Here you go, an unofficial kernel/coreboot update for l4t-ubuntu:https://www.dropbox.com/s/bzb6pzptzsemwz1/update-1.4-unofficial-l4t-ubuntu-switchroot.zip?dl=0

    This is my build:
    Coreboot includes switchroot patches for: SC7Sleep(Lp0 is still broken,as it doesnt resume gpu properly), Minerva Training Cell.
    Kernel includes a lot of new patches, which I will list here, with details on what they are:

    1. Kali-wifi-injection-4.9.patch - Add support for monitor mode channel change, and monitor mode packet injection(This doesnt work with internal wifi card though)
    2. 0001-wireless-carl9170-Enable-sniffer-mode-promisx-flag-t.patch - patch to add back support for sniffer mode promisx flag, which is needed in monitor mode for packet injection with that card(Driver not built in though.) lol.
    3. usb_gadget_bashbunny_patches-l4t_4.9.patch - Personal patch set, created b me, to add bashbunny style metric spoofing to rndis and ecm gadgets(ECM metric spoofing isnt included on the actual bash bunny for some reason, but whatever, I did both.)
    4. fix-usb0-rndis0-name.patch - rename local interface for rndis gadget from rndis0 to usb0 which is inline with mainline kernel, and is needed for my ATTACKMODE(Rewrite of official bashbunny version, using configfs instead of preconfigured gadgets) script.
    5. stmfts-disable-input-tuning.patch - Touchscreen fixes from android kernel(It still isnt perfect, but it helps a bit)
    6. read-mtc-table-addr-from-atf.patch - allow reading Minerva table address from ATF, basically coreboot runs minerva, and passes the table to ATF, then the kernel uses ATF with this patch to access it.

    Feel free to test, and use this kernel/coreboot update. Let me know if you find any bugs, an once lp0 is stable, I will push that version as well, if switchroot doesnt. I may even push a more updated kernel, as this is stock 4.9.109 and we were able to patch the kernel up to 4.9.112 without it breaking. Something about 4.9.113 breaks booting.

    EDIT: After further testing by me, this breaks resume from lp0 sleep, so maybe the issue I was having with deepsleep(lp0) is because of minerva. will run more tests later today, and will probably revert minerva changes.
     
    Last edited by Gavin_Darkglider, Jul 15, 2019
    Liv2MsTrb8T, ZeroFX and Watermelonz like this.
  5. globalc

    globalc Member

    Newcomer
    1
    Jun 14, 2019
    Japan
    You already got ideas for 2 approaches, let me add a third idea.
    You could just normally install L4T as per instructions, and boot it. Then extend the second partition, but not to span the whole device, but leave 1.5GB free at the end. Create an additional partition there.

    All of that can be done with the graphical disk utilities, but from here maybe fdisk or parted have to be used directly. You should open the disk-device, and look at the start/end data of your 3 partitions. The partitions which are in the partition table stored as 1/2/3 do not have to be in that order on the disk. So the idea is to record the data of partition 1 and 3, then "remove" both (which just removes them from the partition table, but is not touching their real data), and then create 1 and 3 again. Just this time, when creating partition 1, you use the start/enddata of the former partition 3. And for 3 the data from partition 1. After that you should be able to mount 1 and 3, and copy over the data (that could also be done before modifying the partition table).
     
  6. parkerlreed

    parkerlreed Member

    Newcomer
    1
    Sep 6, 2018
    United States
    It also appears to be used for the USB RNDIS to a computer. I can SSH on a computer it's connected to via USB.

    Code:
    [parker@stealth ~]$ ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: wlp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 9c:b6:d0:0e:0d:cd brd ff:ff:ff:ff:ff:ff
    3: enp8s0u1u1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 00:05:6b:00:57:1a brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.90/24 brd 192.168.0.255 scope global dynamic noprefixroute enp8s0u1u1
           valid_lft 84132sec preferred_lft 84132sec
        inet6 fe80::71a:46a2:903:7140/64 scope link noprefixroute
           valid_lft forever preferred_lft forever
    4: enp0s20f0u2i5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether be:32:f0:a9:ec:1a brd ff:ff:ff:ff:ff:ff
    5: enp0s20f0u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
        link/ether 22:fc:9d:9a:11:b5 brd ff:ff:ff:ff:ff:ff
        inet 192.168.55.100/24 brd 192.168.55.255 scope global dynamic noprefixroute enp0s20f0u2
           valid_lft 13sec preferred_lft 13sec
        inet6 fe80::d8f3:6be6:8ef6:805e/64 scope link noprefixroute
           valid_lft forever preferred_lft forever
    [parker@stealth ~]$ ssh parker@192.168.55.1
    Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.9.109+ aarch64)
    
     * Documentation:  https://help.ubuntu.com
     * Management:     https://landscape.canonical.com
     * Support:        https://ubuntu.com/advantage
    
    Last login: Mon Jul 15 14:09:48 2019 from 192.168.55.100
    parker@switch:~$ ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether d2:96:c4:01:3d:a9 brd ff:ff:ff:ff:ff:ff
    3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 2e:69:8d:30:bd:79 brd ff:ff:ff:ff:ff:ff
    4: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
        link/ether 00:90:4c:1a:a0:01 brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.214/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp1s0
           valid_lft 85942sec preferred_lft 85942sec
        inet6 fe80::c13c:422d:89a1:c66c/64 scope link noprefixroute
           valid_lft forever preferred_lft forever
    5: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1
        link/ipip 0.0.0.0 brd 0.0.0.0
    6: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1
        link/sit 0.0.0.0 brd 0.0.0.0
    7: rndis0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state UP group default qlen 1000
        link/ether be:32:f0:a9:ec:19 brd ff:ff:ff:ff:ff:ff
        inet6 fe80::bc32:f0ff:fea9:ec19/64 scope link
           valid_lft forever preferred_lft forever
    8: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state UP group default qlen 1000
        link/ether be:32:f0:a9:ec:1b brd ff:ff:ff:ff:ff:ff
        inet6 fe80::bc32:f0ff:fea9:ec1b/64 scope link
           valid_lft forever preferred_lft forever
    9: l4tbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/ether be:32:f0:a9:ec:19 brd ff:ff:ff:ff:ff:ff
        inet 192.168.55.1/24 brd 192.168.55.255 scope global l4tbr0
           valid_lft forever preferred_lft forever
        inet6 fe80::1/128 scope link
           valid_lft forever preferred_lft forever
        inet6 fe80::30eb:52ff:fe89:5b0a/64 scope link
           valid_lft forever preferred_lft forever
    
     
  7. Gavin_Darkglider

    Gavin_Darkglider GBAtemp Regular

    Member
    3
    May 20, 2019
    United States
    It is only attached to the bridge, because the bridge device attaches all available network cards, unless configured differently. I have removed the bridged device, and still used rndis ethernet. If you notice my build above, which I found out after I released it that it breaks sleep mode, it has custom patches I made just for this module.
     
  8. RealSlimSquiddy

    RealSlimSquiddy Newbie

    Newcomer
    1
    Jul 16, 2019
    United States
    I tried launching L4T, but my console's screen only stays lit for a few seconds and the console is sent back into RCM mode. Yes, I followed all of the instructions.
     
  9. Worldblender

    Worldblender Advanced Member

    Newcomer
    2
    May 27, 2019
    United States
    For the past three days, I've had my Switch unit taken into a repair store in hopes of trying to get it to work again. I was hoping that reflowing the solder of the wi-fi chip would solve all my problems - but nope! :sad: Nothing really changed, except that I no longer receive orange screens, and that even booting up CFW will cause my unit to hang without displaying anything. I really think that I'm holding a defective unit now, to the point that I want to just recycle it :hateit: (but I will never do that in reality as it is still usable in some way). However, booting up L4T Ubuntu still works like before, but it gives me no access to the console-exclusive games I so want to try. Given this situation I am in now, I am considering selling (or even giving away my unit as a last resort) my unit to let others experiment with L4T Ubuntu, or even convert it into a useful PC. Some caveats here:
    • Wi-fi and Bluetooth will not be detected, and thus be unusable.
    • An official dock is recommended to get the most out of this unit, as using one is the only other way to get another method of internet access.
    • AutoRCM is enabled on this unit for convenience purposes.
    • No other accessories are included with this unit; just the bare console (one screw on the bottom is missing).
    I made a backup of the eMMC just in case; I'm trying to see if restoring it will fix all my problems. If not, I will make an update, and begin selling the unit to someone who is interested, most likely on eBay.

    NEW: Restore went okay, and I have been able to successfully use Hekate 5.x.x, but the situation did not change one bit. Using Atmosphere, whether in sysNAND or emuNAND mode, always results in getting stuck at the Switch logo (if I wait long enough, I can get an orange or blue screen again). This leaves me with no choice but to get rid of my current Switch unit somehow (either by selling it or giving it away), so that I can replace it with another working Switch unit that I can enjoy hacking in the near future. (Private) Message me if interested in buying this unit, or wait until I make a listing for it.
     
    Last edited by Worldblender, Jul 17, 2019
  10. skittletop

    skittletop Newbie

    Newcomer
    2
    Feb 11, 2018
    United States
    I'm getting a network error trying to download the SD card image on the first page (tried on two different networks). Anyone got a mirror or know what's going wrong?
     
  11. lordelan

    lordelan GBAtemp Psycho!

    Member
    12
    Jan 4, 2015
    Germany
    Do I need to apply every single update or just the latest one?

    If every single update, is it enough to go from lowest to highest, copy and overwrite everytime and do an
    Code:
    apt update && apt upgrade
    
    just once after the last one?

    Also do I do this once before I copy over all single updates?
    In other words:
    What's the easiest/fastest way to fresh install Ubuntu and get to the latest update (1.3.1 as of now)?
     
    Last edited by lordelan, Jul 17, 2019
  12. Gavin_Darkglider

    Gavin_Darkglider GBAtemp Regular

    Member
    3
    May 20, 2019
    United States
    Updating with apt doesnt include the bootchain, that is what the updates are. Really, to update from the image directly to 1.3.1, before even booting it, just erase the stuff that written to the fat32 partition, then extract the file on the fat32 partition. then boot hekate, and launch linux. From there, you can update the userspace, like you would on a computer.
     
    globalc, lordelan and Watermelonz like this.
  13. lordelan

    lordelan GBAtemp Psycho!

    Member
    12
    Jan 4, 2015
    Germany
    Cool thx.
     
  14. uberloafy

    uberloafy Newbie

    Newcomer
    1
    Jul 18, 2019
    United States
    Is it possible to upgrade L4T's Ubuntu version from the LTS release to the current Disco Dingo version? On my switch, attempting to do so resulted in a black screen.
     
  15. Gavin_Darkglider

    Gavin_Darkglider GBAtemp Regular

    Member
    3
    May 20, 2019
    United States
    Yes, assuming you use a 7.x(needed for cuda) gcc compiler for the packages, and use the right version of X11. after that is is a matter of installing the nvidia packages for the drivers and such. Problem is, that you would probably have to rebuild every package in the repository from source to keep linking sane.
     
    Watermelonz likes this.
  16. Disco Inferno

    Disco Inferno GBAtemp Regular

    Member
    5
    Feb 25, 2016
    United States
    I tried forever to get this working on my already CFW switch (XAW1004...) without success, but it worked the first time on my stock switch (XAW1005...) with the same microsd. Not sure what's going on there.
     
  17. nopo

    nopo Advanced Member

    Newcomer
    1
    Dec 6, 2017
    Australia
    how to resize the screen when docked mode on my monitor the dock and the top bar is fully cut off so i cant use Linux at all
     
    Watermelonz likes this.
  18. Cryzzgrantham

    Cryzzgrantham Newbie

    Newcomer
    1
    Sep 30, 2018
    United Kingdom
    I haven’t used this for a while, has much changed the past few weeks? Like is there new updates, more stability etc? If so how do I go about updating things?
     
    Watermelonz likes this.
  19. Gavin_Darkglider

    Gavin_Darkglider GBAtemp Regular

    Member
    3
    May 20, 2019
    United States
    All updates get added to the first post.
     
  20. lordelan

    lordelan GBAtemp Psycho!

    Member
    12
    Jan 4, 2015
    Germany
    When I put it in the dock, nothing happens. It still shows the image on the Switch screen.
    Any ideas?
     
Quick Reply
Draft saved Draft deleted
Loading...