New vim3 with ubuntu focal gives wrong screen colors

Hi,

I got a new vim3. I installed in a microSD with Etcher an ubuntu image from the official docs (VIM3_Ubuntu-gnome-focal_Linux-5.7-rc7_arm64_SD-USB_V0.9-20200530.7z 2020-05-30 05:58 669M). It needed plenty of time to be recognized (tested with 2 different monitors and 3 wires, rebooted, power on/off a couple of times), and when it did, it got wrong colors. I updated/upgraded the distro, and it was still like that.

What did I wrong? Should I use another system?

By the way, I tried to enter in the KeysMode and it was not possible, pressing that combination Power-Reset as it is said here (How To Boot Into Upgrade Mode | Khadas Documentation)

I would like to have a desktop system with the best performance since my plan is to run OpenCL and OpenGL applications (Blender, Inkscape, Gimp, etc).

1 Like

Hi @bizcocho85
great to see you got your VIM3,

the color problem is due to the issue of using mainline linux + android uboot,

to solve the issue, you need to flash mainline uboot to the eMMC, or remove android from the eMMC all together, it should solve the issue :slightly_smiling_face:

also another tip, I suggest installing a new mainline fenix image, that should give you the latest panfrost graphics drivers for a smoother performance,
you can get it VIM3_Ubuntu-minimal-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.1-210123.img.xz

(remember to install the desktop environment of your choice!)

Can you upgrade your system to check this issue?

$ sudo apt update
$ sudo apt full-upgrade
$ sudo reboot

I did this but it is still with weird-wrong colors.

Currently up-to-date: kernel 5.7.0 with Ubuntu 20.04.2 LTS (Focal Fossa)

Thank you. Yes, finally! 2 years later. I got it for a few months but didn’t have time. So, let’s try as soon as possible since I want to experiment with it.

I will try the image you posted with 5.10-rc6.

Question 1) So, I understand that the colors problem can be solved if I write the “mainline uboot”. With that mainline boot, can I keep the android in the emmc and the linux in the sd?

Question 2) I would like to save the android emmc image in another hard drive, so I can write the linux image in the emmc (I suppose it will have faster writing/reading than the sd). But in the future, I would like to “reset to factory”, having the emmc with the android as it was bought. Can I do all this? I suppose yes, but the recommended method is “Krescue”?

Question 3) OpenCL does not work in Android, isn’t it? At least “clpeak” cannot detect platforms.

Regards

Yes, you can. Please use the newer version image here:

https://github.com/khadas/fenix/suites/1916681430/artifacts/37735368

You can use kreasuce to backup/resotore your system.

Please open a new topic to discuss the Android OpenCL issue.

1 Like

Thank you.

I am dumping the emmc contents to the sd card. I suppose that there is the android+android boot. In the future, if I restore it, I will have the factory configuration (attached image)
image

If I use the Wizard mode I can see “VIM3 Ubuntu minimal focal linux 4.9 arm64 emmc … nov 17”. So, a bit old, and not even the 5.9-5.10 kernel. So, I skipped this way.

I understand your image is like the @Electr1, but a bit newer (january 2020). With those images, I can only install in a sdcard (I used Etcher). I flashed in the sd the VIM3_Ubuntu-gnome-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.1-210128.img.xz. By the way, the two partitions do not have “/extlinux/extlinux.conf”, but the dtb.img file is exactly the same as the /dtb/meson-g12b-a311d-khadas-vim3.dtb.

Question 1) How to boot that image from the sdcard? I tried Keys-mode and TST Mode, in both cases the “Khadas” logo screen is kept forever.

Question 2) If I use the alternative method, go to android and use the update method, select the aml autoscript zip, it goes to another window (see attached) but it emits an error. I select “reboot to bootloader” and it keeps forever in the same “Khadas” logo screen.

So, generally, I have no clue how to boot in the sdcard (the image you posted and I dumped with Etcher) instead of android. I would like to try in the sd before doing anything in the eMMC.

Question 3) If i want to install your image in the eMMC, I suppose I should put it in upgrade mode and use this: Upgrade Via a USB-C Cable | Khadas Documentation. So, the energy is given by my computer, connecting the USB (linux) to the USB-C (vim3), isn’t it?

Question 4) Is there any possibility to have a boot selector, to select android or the sdcard?

Thanks.

EDIT: I tried with both images given by you two, 210123 and 210128 .img.xz. (Etcher)

@bizcocho85 you might be doing the upgrade mode wrong,
don’t worry it tends to happen with beginners,

I have written a trick of how to enter upgrade mode precisely,

it works everytime and I never skip a beat,

yup, its power by the computer, and that isn’t an issue at all,
while flashing, the chip barely draws any power, so it is never an issue, but if possible connect to a USB3.0 port for ample power delivery

that isn’t possible, I presume you are asking like a GRUB loader ?
with mainline uboot, I think you can cancel booting from the eMMC and switch over to external SD/USB, but I am not completely sure, maybe @hyphop would know something about it…

Thank you. I keep trying and trying with no luck. I did many combinations with both images.

At the end, I just re-flashed the same image as yesterday (that image that has the weird-wrong colors) and I even didn’t need to do any key combination. It just boot it directly the VIM3_Ubuntu-gnome-focal_Linux-5.7-rc7_arm64_SD-USB_V0.9-20200530.

So, definitely, something is wrong with the above images (VIM3_Ubuntu-minimal-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.1-210123 and VIM3_Ubuntu-gnome-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.1-210128). What can I do?

I last used V1.0.1-210128 and it works just fine…

https://github.com/khadas/fenix/suites/1916681430/artifacts/37735368 This one?

I downloaded it. Flashed with Etcher, both .img.xz and just .img.

you can only flash .img files, how did you flash .xz.img files ?
can you try using krescue ? that is how I flashed mine…

Etcher allows to select .img.xz or .img, I did with both with no luck. The 20200530 version boots directly without any other key. This is the first thing I don’t understand, why only one of three worked (and quite easy).

I tried Krescue this morning, but the Wizard only allowed some old images. To be able to flash this image using Krescue, Do I have to flash krescue in the sd, and use another flash drive (usb) to place the .img, isn’t it? (I hope it can read NTFS/EXT… because FAT32 does not allow images over 4GiB)

I continue trying things… since I don’t understand why it does not work.

Since my distro does not allow the linux tools, I jump to windows, to try make things easier… but not.

First, if I try to use the image with Upgrade Via a USB-C Cable | Khadas Documentation, trying to omit the sd step, just burn it in th emmc… but again a new error. Remember that I use SD_USB-v1.0.1-20210128 (https://github.com/khadas/fenix/suites/1916681430/artifacts/37735368 posted by numbqq), since the “emmc” version is old. Index of /Firmware/Krescue/images I can only find Ubuntu EMMC 4.9 (old version) or Ubuntu EMMC 5.7 (old version). So… blocked.


Or if unchecking the “check image”, another error:

Second, if I try to do this Upgrade Android Or Ubuntu Via An SD-Card | Khadas Documentation it shows only weird characters (it does not matter if I select english or chinese). Bad vibes. Still, I try guessing the options. At the end, it gives an error. I am using the SD_USB-v1.0.1-20210128. So, again blocked.
image

Awful.

EDIT again:
Another test. I tried flashing in the emmc the U-boot mainline kresq image from the Wizard. Then, I tried to repeat the Keys mode steps with the sdcard with the v1.0.1-20210128 image… no luck:

EDIT2:

I tried to put the SD_USB img in the partition of dumps, inside the Krescue SD card (I used the minimal without graphical since it is 1.2GiB and it can be placed in a FAT32). When I boot in KRescue I cannot see the image. Also, now the graphics are broken-weird as it was when I opened the thread. I attach image showing the only selectable images…

Out of luck. It should be easy. I don’t understand what happens here. Spent all day in this, and it should be easy…

My objective:

  • To have the Ubuntu 5.10 with desktop system in my SD, being able to boot.
  • To have the Ubuntu 5.10 with desktop system in my eMMC, being able to boot.

I don’t know how to achieve any of these.

PS. I can only use if I do Krescue > Wizard > use any of the old images listed, like Ubuntu-gnome-focal-4.9 kernel.

wizard write only online images

if u need write other local images u must choose → Krescue → write to emmc →

1 Like

I suppose you mean EMMC images, but those are old as I wrote.

How do you write a SD_USB image that is 4.5GiB in the EMMC using Krescue?

u can build any fenix image and write it via Krescue without problem

just build SD_USB image by next command

COMPRESS_IMAGE=yes make

and write build/images/*.img.xz

eMMC vendor image by next command

COMPRESS_IMAGE=yes INSTALL_TYPE_RAW=yes make

and write build/images/*.raw.img.xz

1 Like

Building from docker, it failed after 2h or so.

With EMMC

Add khadas to (audio,video,disk,input,tty,root,users,games,dialout,cdrom,dip,plugdev,bluetooth,pulse-access,systemd-journal,netdev,staff,i2c) groups.
Hit:1 http://ports.ubuntu.com focal InRelease
Get:2 http://ports.ubuntu.com focal-security InRelease [109 kB]
Get:3 http://ports.ubuntu.com focal-updates InRelease [114 kB]
Get:4 http://ports.ubuntu.com focal-backports InRelease [101 kB]
Get:5 https://dl.khadas.com/repos/vim3 focal InRelease [2200 B]
Get:6 https://dl.khadas.com/repos/vim3 focal/main arm64 Packages [11.3 kB]                                
Get:7 https://dl.khadas.com/repos/vim3 focal/main armhf Packages [3514 B]
Fetched 341 kB in 21s (16.0 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Info: Preparing image file for rootfs...
Info: Current rootfs cache size: 3395 MiB
Info: Creating eMMC rootfs image...
0+0 records in
0+0 records out
0 bytes copied, 0.000210907 s, 0.0 kB/s
mount: /home/khadas/fenix/build/images/rootfs: failed to setup loop device for /home/khadas/fenix/build/images/rootfs.img.
Cleanup...
make: *** [Makefile:5: all] Error 32

I did this GitHub - khadas/fenix: One-stop script set to build Ubuntu/Debian images and built with:

khadas@7e1c7c279fca:~/fenix$ KHADAS_BOARD=VIM3 LINUX=mainline UBOOT=mainline DISTRIBUTION=Ubuntu DISTRIB_RELEASE=focal DISTRIB_TYPE=gnome DISTRIB_ARCH=arm64 COMPRESS_IMAGE=yes INSTALL_TYPE=EMMC INSTALL_TYPE_RAW=yes make

Now with SD_USB

Now building with the same but without “INSTALL_TYPE=EMMC”…

Info: Create SD/USB image...
0+0 records in
0+0 records out
0 bytes copied, 0.000115381 s, 0.0 kB/s

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x4239b479.

Command (m for help): Created a new DOS disklabel with disk identifier 0x2e93ccc5.

Command (m for help): Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (1-4, default 1): First sector (2048-9658367, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (32768-9658367, default 9658367):
Created a new partition 1 of type 'Linux' and of size 240 MiB.

Command (m for help): Selected partition 1
The bootable flag on partition 1 is enabled now.

Command (m for help): Selected partition 1
Hex code (type L to list all codes): Changed type of partition 'Linux' to 'W95 FAT32'.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-9658367, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (524288-9658367, default 9658367):
Created a new partition 2 of type 'Linux' and of size 4.4 GiB.

Command (m for help): Disk /home/khadas/fenix/build/images/VIM3_Ubuntu-gnome-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.2-210226.raw.img: 4.62 GiB, 4945084416 bytes, 9658368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2e93ccc5

Device                                                                                                     Boot  Start     End Sectors  Size Id Type
/home/khadas/fenix/build/images/VIM3_Ubuntu-gnome-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.2-210226.raw.img1 *     32768  524287  491520  240M  b W95
/home/khadas/fenix/build/images/VIM3_Ubuntu-gnome-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.2-210226.raw.img2      524288 9658367 9134080  4.4G 83 Linu

Command (m for help): The partition table has been altered.
Syncing disks.

losetup: /home/khadas/fenix/build/images/VIM3_Ubuntu-gnome-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.2-210226.raw.img: failed to set up loop device: No such file or directory
Cleanup...
make: *** [Makefile:5: all] Error 1

I tried to manually execute:

losetup --show -f ${BUILD_IMAGES}/${IMAGE_FILE_NAME}

and it fails, so, I do:

sudo mknod /dev/loop0 -m0660 b 7 0

And repeat the whole process. It continued failing…

losetup: /home/khadas/fenix/build/images/VIM3_Ubuntu-gnome-focal_Linux-5.10-rc6_arm64_SD-USB_V1.0.2-210226.raw.img: failed to set up loop device: No such file or directory
Cleanup...
make: *** [Makefile:5: all] Error 1
khadas@7e1c7c279fca:~/fenix$ ls /dev/loop
loop0         loop-control

Awful.

When will Khadas update the Wizard list of images (Krescue) with recent kernels (5.10-rc6) to be installed in the EMMC? Why we need to deal with this having so many problems.

@bizcocho85 you can try using this script to build the image in github :wink:
Making Fenix images in Github - General Discussion - Khadas Community