• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Linux4Tegra R23.1/R24.1 beta for the Shield Tablet

Search This thread

Jokte

Member
Sep 28, 2020
8
0
I'm no expert but that log looks like it's complaining about the broken nvidia driver, have you switched to nouveau or are you still trying to use the proprietary driver from L4T?
Before, I tried to use the proprietary driver from L4T R23.1. Now, I have just tried with the nouveau drivers following this forum and it doesnt work, it follow crashing when I try to log in
 

LouMinartey

Member
Jan 20, 2020
40
14
Before, I tried to use the proprietary driver from L4T R23.1. Now, I have just tried with the nouveau drivers following this forum and it doesnt work, it follow crashing when I try to log in

I've not tried a 20.04 upgrade yet but I definitely got video working (but very slowly) on 18.04 using nouveau. I'll try and upgrade this to 20.04 and see if it stays working when I get the time
 

Jokte

Member
Sep 28, 2020
8
0
I've not tried a 20.04 upgrade yet but I definitely got video working (but very slowly) on 18.04 using nouveau. I'll try and upgrade this to 20.04 and see if it stays working when I get the time
Can you tell me which are the steps to upgrade from 16.04 to 18.04 and activate nouvau drivers, please?
 

LouMinartey

Member
Jan 20, 2020
40
14
I'll dig the instructions out of my Wekan server as soon as I'm back near it, but as far as I can remember I connected to the tablet via SSH, performed a dist-upgrade (which resulted in the black screen @ login glitch), I then fixed the rotation and touch with this post and installed the nouveau drivers with the following from the SSH session:

ubuntu-drivers devices
sudo apt install xserver-xorg-video-nouveau
sudo apt install nouveau-firmware

Then, fix systemd with this post and reboot for what should be a functional (but very slow) desktop. I'd like to point out that people have posted fixes that worked for the Shield Tablet K1 (newer model sans DirectStylus) that didn't work for me (OG Shield Tablet LTE with DirectStylus). Possible hardware differences?

This page might be of use, it applies to the TK1 but SoCwise they're the same.
Unfortunately, I think we might be hitting the bug outlined here, specifically:
Warning: running an outdated U-Boot will cause the kernel to silently crash when loading the GPU driver!

And just in case, DO NOT try and flash any of the TK1's uboot files to the shield. At best it won't work, at worst it'll brick it. I remember someone saying 30 odd pages back something about us not being able to change that, but I might be wrong
 
Last edited:

Jokte

Member
Sep 28, 2020
8
0
I'll dig the instructions out of my Wekan server as soon as I'm back near it, but as far as I can remember I connected to the tablet via SSH, performed a dist-upgrade (which resulted in the black screen @ login glitch), I then fixed the rotation and touch with this post and installed the nouveau drivers with the following from the SSH session:

ubuntu-drivers devices
sudo apt install xserver-xorg-video-nouveau
sudo apt install nouveau-firmware

Then, fix systemd with this post and reboot for what should be a functional (but very slow) desktop. I'd like to point out that people have posted fixes that worked for the Shield Tablet K1 (newer model sans DirectStylus) that didn't work for me (OG Shield Tablet LTE with DirectStylus). Possible hardware differences?

This page might be of use, it applies to the TK1 but SoCwise they're the same.
Unfortunately, I think we might be hitting the bug outlined here, specifically:


And just in case, DO NOT try and flash any of the TK1's uboot files to the shield. At best it won't work, at worst it'll brick it. I remember someone saying 30 odd pages back something about us not being able to change that, but I might be wrong
I have changed the kernel, installed xserver-xorg-input-evdev and removed xserver-xorg-input-libinput, edited /usr/share/X11/xorg.conf.d/10-evdev.conf, executated ubuntu-drivers devices, sudo apt install xserver-xorg-video-nouveau and sudo apt install nouveau-firmware and fixed systemd but I dont get rotate screen to landscape. Can you tell me how I can rotate the screen? Configuring the screen with GUI doesnt work.

When I execute ubuntu-drivres devices return nothing and sudo apt install xserver-xorg-video-nouveau tell me that it was alrady installed
 

wertus33333

Senior Member
Sep 14, 2016
218
143
No, because first I tried to rotate screen to landscape. I have just to unhold xserver-xorg-core to update all packages before do do-release-upgrade to update from 16 to 18 and the login screen is bad rotated and when I try to login, it crash and return to login screen. Trying all previous methods doesn't work now in ubuntu 16. I dont know what I can do. If I see the /var/log/lightdm/x-0.log, it show me this:

(II) Server terminated successfully (0). Closing log file. X.Org X Server 1.18.4 Release Date: 2016-07-19 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.15.0-140-generic armv7l Ubuntu Current Operating System: Linux fran-tablet 3.10.40-g793214a #9 SMP PREEMPT Tue Jul 21 09:57:49 PDT 2015 armv7l Kernel command line: tegraid=40.1.1.0.0 [email protected] memtype=0 [email protected] [email protected] [email protected] section=256M commchip_id=0 usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 [email protected] video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,3 sku_override=0 usbcore.old_scheme_first=1 [email protected] [email protected] nvdumper_reserved=0xfd600000 core_edp_mv=1150 core_edp_ma=4000 pmuboard=0x06e1:0x04d2:0x04:0x00:0x00 displayboard=0x0791:0x03e8:0x00:0x00:0x00 power_supply=Battery board_info=0x06e1:0x04d2:0x04:0x00:0x00 tegraboot=sdmmc gpt gpt_sector=41983 modem_id=1 watchdog=disable [email protected] root=/dev/mmcblk0p23 rootfstype=ext4 rw console=tty1 fbcon=rotate:2 rootflags=defaults,noatime,nodiratime rootsubdir=/media/0/multirom/roms/Linux4TegraR231Ubuntu16/root Build Date: 08 April 2021 01:59:12PM xorg-server 2:1.18.4-0ubuntu0.12 (For technical support please see http://www.ubuntu.com/support) Current version of pixman: 0.33.6 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Mon Nov 1 19:17:49 2021 (==) Using config file: "/etc/X11/xorg.conf" (==) Using system config directory "/usr/share/X11/xorg.conf.d" ================ WARNING WARNING WARNING WARNING ================ This server has a video driver ABI version of 20.0 that is not supported by this NVIDIA driver. Please check http://www.nvidia.com/ for driver updates or downgrade to an X server with a supported driver ABI. ================================================================= (EE) NVIDIA: Use the -ignoreABI option to override this check. The XKEYBOARD keymap compiler (xkbcomp) reports: > Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols > Ignoring extra symbols Errors from xkbcomp are not fatal to the X server

Some ideas:
-Which kernel are you using? I posted one with some fixed stuff some posts ago.
-Also, starting from ubuntu 18 gdm is used instead of lightdm by default
-Enable autologin in gdm/gdm3 or/and lightdm, had many problems with gdm login which i could "solve" this way and forget until i was able to propperly set things in ubuntu-settings and copy the conf
-have a look at other logs in /var/log, your log tells you: "(==) Log file: "/var/log/Xorg.0.log", Time: Mon Nov 1 19:17:49 2021". The Xorg.#.log (there are other similar ones, you can delete the logs and restart to generate new ones) files are always giving a lot of information (which actually helped me fix touch in 18.04)
-In 18.04 init.rc scripts do not work propperly/at all so you have to convert them to system.d scripts (otherwise many things are broken). I posted my converted scripts some posts ago, just make sure to alter the paths, username and anything else specific to your device...

EDIT:
If you want the best possible experience for an ubuntu tablet use 16.04 with opengl 4.5 and vulkan drivers. If you cant find some application you need, you'll have to recompile them (preferably on the device) tho.

Already recompiled many retroarch cores, retroarch, dolphin emu, Mupen64... i can share this if you are interested. box86 and wine for simple x86 32bit windows applications is pretty nice too (worms works xD). Although setting it up took some time... Ended up using some raspberry pi tutorial. Also, 2 PS4 controllers (the new ones with the top light bar, old ones lag AF) at the same time work great and i am trying to get this (https://github.com/devmapal/nvidia-shield-controller-driver/) working so we could have the original 2015 shield controller working over wifi (without success, the commits to the kernel are on my git).

Emulation performance seems to be worse than on android (compared to youtube vids as i dont have android on the device anymore) probably due to bad optimization for linux and ubuntu 16:
-Dolphin: 5-12fps (super smash bros)
-mupen64: crashes
Retroarch:
-mupen64: just some color splashes around the screen, the game and sound run at full speed in the background (can even use controllers and "play" games blind)
-gb,gbc,gba: runs great
-nds: hearth gold/soul silver work, sound is a bit glitchy sometimes
-ppsspp: runs great upscaled to 3-4x original resolution depending on game
-dreamcast: works great, also upscaled to slightly less than full hd (power stone, crazy taxy)

Unfortunately the 32bit cpu holds us back a lot bcs (as far as i understand) most dynamic recompilers only exist for 64bit. A waste for the gpu...

Biggest limitation is ofc the locked nvidia flash mode, without the possibility of unrecoverably bricking the device by trying a new bootloader (there are MANY tegra k1 devices mainlined into the linux kernel by now but they all use uboot bootloader) it is very hard to build/develop something. found https://github.com/shchmue/Lockpick_RCM which generates the rcm key for tegra x1 (switch) SOC so i wondered if that could be possible or maybe with an spi flasher? unfortunately i have no idea about such things so help would be great.

If we can use a custom uboot bootloader we can use a modified version of the mainlined jetson kernel with nouveau driver and always update to the latest debian/ubuntu as long as it supports 32bit

If someone can help with any of this, help would be greatly appreciated.
 
Last edited:
  • Like
Reactions: LouMinartey

wertus33333

Senior Member
Sep 14, 2016
218
143
The best way to go would probably be to get rcm key so we can just use tegrarcm to first backup device then build and test a working uboot so we can load, build and test a mainline kernel with the proper nouveau patches and good performance thanks to having opengles and vulkan.
-https://github.com/shchmue/Lockpick_RCM for the switch
-https://github.com/NVIDIA/tegrarcm nvidia flash tool and many tutorials on how to create a config (which we need to flash/backup)
-https://github.com/NVIDIA/tegra-uboot-scripts
-https://github.com/NVIDIA/tegra-uboot-flasher-scripts

or maybe we can just backup/flash some spi chip on the device? would be willing to buy a flasher and try if someone can tell me where i need to connect the pins.

if you want to work with the nvidia-nouveau driver you cant go with l4t (l4t+normal nouveau drivers is just a mess). you need a clean arm32 linux image (i'd recommend arch, like NVIDIA suggests: https://github.com/NVIDIA/tegra-nouveau-rootfs) and compile your own kernel with the nouveau patches. Ofc you can also build an ubuntu image with all you need on your ubuntu desktop with multistrap (i could not find any prebuilt arm32 ubuntu images...)

unfortunately i dont have a lot of time to tinker around and i dont know enough about the whole thing to just try something and make it work within a useful time so any help or corrections are greatly appreciated.
 
  • Like
Reactions: LouMinartey

Darklord071

Member
Mar 31, 2020
34
2
Completely unrelated, but is it possible to do this on the XiaoMi Pad 1 (mocha)? It has very similar hardware.
 

LouMinartey

Member
Jan 20, 2020
40
14
Completely unrelated, but is it possible to do this on the XiaoMi Pad 1 (mocha)? It has very similar hardware.

I really don't know, I wouldn't try it though. I'd advise trying to build an environment in a VM first. Does that device have a supported MultiROM? If not I wouldn't install the MultiROM for the shield to that tablet, lest any major differences brick the device
 

newemp

New member
Dec 4, 2021
1
0
Is there are the way to make vulkan work on 16.04 (23.1)? I have no idea how to install vulkan driver and make vulkan work. Maybe somebody can give a guide? Also I've tried to play some simple win games (box86+wine). Once i get into NFS Porsche Unleashsed (fps was pretty good) but it was just once (i don't know why it worked). Other times i tried to launch it I've got an error when initialising rendering (in the attachment). Other games don't work either (tried to launch Warcraft 3, nfs hot pursuit 2). Maybe someone had something similar and can you help me?
 

Attachments

  • Снимок.PNG
    Снимок.PNG
    38.6 KB · Views: 10

LouMinartey

Member
Jan 20, 2020
40
14
Is there are the way to make vulkan work on 16.04 (23.1)? I have no idea how to install vulkan driver and make vulkan work. Maybe somebody can give a guide? Also I've tried to play some simple win games (box86+wine). Once i get into NFS Porsche Unleashsed (fps was pretty good) but it was just once (i don't know why it worked). Other times i tried to launch it I've got an error when initialising rendering (in the attachment). Other games don't work either (tried to launch Warcraft 3, nfs hot pursuit 2). Maybe someone had something similar and can you help me?
Not sure on Vulkan, been a while since i Installed. And for the second problem I think you need to install DirectX via Winetricks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 55
    Stuff that doesn't work: 3G/LTE, accelerometer, GPS, camera, and maybe some other stuff that I'm not remembering
    Stuff that does work: GPU (full OpenGL 4.5 and Vulkan), sound, USB device and host, WiFi, Bluetooth, touchscreen (including stylus), SD/USB install

    Downloads:

    Installation instructions:
    1. Install MultiROM (+ TWRP + touch support + patched kernel)
    2. Download Linux4Tegra and install it through TWRP (Advanced -> MultiROM -> Add ROM)

    Tips/notes:

    12
    Linux4Tegra R23.1 has been released; it's for the Tegra X1, but the GPU drivers seem to work fine on the K1 too, so I'll probably release a new package this weekend (also going to add SD/USB boot support for MultiROM).
    7
    Successfully started linux on BitO kernel. Everything works except multirom, including xorg driver, suspend, bt, wifi. Touchscreen works after fixing driver reports. I used fastboot to run kernel, so we need to fix multirom with kexec-hardboot patch to make it work correctly.
    Other way is reflash kernel every time, or use it instead of recovery, but both usage is dangerous

    Kernel patch:
    http://pastebin.com/xdVAm08t
    Kernel config:
    http://pastebin.com/RSNVw5HG
    Based on bito-k10 source (BitO-K10-011,2596fbe41fa94eb894a618243619270295741a33)
    Android system partition mounted to /system to make firmwares load correctly

    P.S Finally got kexec-hardboot to work, but kexec'ed kernel ignoring initrd image from kexec and trying to boot android.

    Found workaround: hard-coded full path to installed multirom root, disabled compressed initrd support to prevent using bootloader's initrd.
    ==================================================
    Working 3.10.106 kernel for Ubuntu

    What works:


    1. wifi
    2. bluetooth
    3. touchscreen
    4. suspend
    5. nvidia drivers

    What does not work:

    1. Passing any command-line or initrd from kexec-hardboot. Command-line is hard-coded, need recompile to change it. initrd is linked in, external initrd support disabled
    2. ext4 ACL is broken, so mount tmpfs to /media to make udisks work
    3. loadable modules disabled
    4. Suspend while charging. It disabled in dtb, android kernel does not enter deep sleep when charger connected too.

    Only installing to /data partition works. You will need to rebuild kernel to run from different partition or change command-line

    Kernel binaries, source and Install Instructions:

    https://github.com/mittorn/android_kernel_nvidia_shieldtablet/releases
    Based on BitO-K10

    Cool, for finally getting "something workable" to readily install on.

    But I, for one, think ubuntu is by now a dead end.
    If I was you, I'd try to get aboard the postmarketOS bandwagon.
    I only prepared kernel for already released build. Kernel should work with any distro that uses glibc and have xorg-server 1.15 availiable (L4T drivers compatibility), but adding drivers to other distro and configuring it means big amount of work. It's better to spend this time doing something in ubunto than just setting up other distro.
    PostmarketOS based on Alpine, which using musl, not glibc. It will be incompatible with nvidia drivers and with android drivers too.
    Also, musl does not support some development utilities which i need. For example, address sanitizer will not work under alpine. So postmarketos is not choiсe for me at all

    So wait, did the initrd issue only crop up when using kexec/multirom or was the bootloader always meddling with the initrd somehow?
    That might explain some of my issues getting non-Android OSes to work...
    It seems to be a kernel and bootloader issue. Kernel reads initrd from address got from dtb, which is patched by bootloader (nvidia blob). And default initrd from boot.img still present here
    But kexec or kernel unpacker/relocator places it to different places. I do not want spend much time now searching what stage actually broken (already spent almost 2 days), embedded initrd/commandline is enough for me, but it is not enough for multirom.
    It is better to contact custom kernel developers, they should know.

    `/dev/mmcblk0p13 /system/ auto ro 0 0`
    looks like partitions table was change on some point - it's a `mmcblk0p14` in 5.4 firmware, while before it was 13 for non-LTE version. for LTE +1
    can you share you firmware version?
    it is Android 7.0 and non-lte tablet

    Hey,

    shouldnt it be possible to install mainline kernel and arch linux since the Acer CB5-311 Chromebook which have a TK1 does work nice with mainline+mesa+nouveau. --> Arch Linux ARM | Acer CB5-311 Mainline.

    i tried to boot the kernel i got inside bootfolder of my Acer CB5, but this ended in a black screen. Anyways i didnt do some modification to it and also havnt installed any linux on the shield (hoped for a busybox cmdline or error message). I dont now if fastboot is even capatable of booting a 4.x kernel but if this is possible than we could install an up-to-date linux on this devices, which, for my Chromebook, would run supersmooth.

    I think it is not possible. Mainline kernel needs mainline u-boot, but NST has signed nvboot bootloader. If you flash boot loader that not able to start, you will never unbrick tablet
    7
    Uploaded R23.1, link is in the first post. SD/USB boot now works properly, USB device mode also works without any additional configuration, and the screen is now properly rotated during setup.