(These solutions apply to doing non-dual boot installs of either Fedora 32 Workstation and Ubuntu 20.04 unless specifically mentioned.)
GETTING THROUGH THE DISTRO INSTALL PROCESS
Once you've created a USB with your distribution's ISO, boot up your Ubook X and hit the Escape key on your keyboard a few times immediately after the device powers on.
The BIOS menu shows up. Go to the boot tab, and set it to boot from your USB first. Then select "Save and Exit."
The GRUB bootloader menu will now appear. If you select the standard "Ubuntu" option, your screen will go black and only show some colored stripes - and you will get nowhere. Instead, choose the "Safe Graphics Mode" and things will work fine for now. Your distribution installer will now boot. Complete your install as usual.
After the install, the system will reboot.
SOLVING BLACK SCREEN AT BOOT - STEP 1: UPDATING GRAPHICS DRIVERS
If you're installing Fedora, you can jump to point 11.
If you're installing Ubuntu, keep reading. Once the system reboots after the installation, if you do nothing, you will experience the same black screen mentioned above. Hence, as soon as the system boots up, start hitting the Escape key again.
The GRUB bootloader appears. Highlight - but do not click - the standard Ubuntu option (the top-most option). Instead of hitting enter, hit the "E" key on your keyboard, which will allow you to edit the GRUB settings for that option.
On the configuration page that now appears, find the line towards the bottom that begins with the word
linux. Go to the second half of that line and, immediately after the words
quiet splash, write
nomodeset. Once done, hit Ctrl+X to boot.
(The edit you're making in point 7 to the bootloader is temporary and disables certain graphics features so that you can get past the error that otherwise occurs. If you reboot at any point before completing the below additional steps, you will have to redo points 5 and 6 each time the computer reboots to be able to get past the black screen that otherwise appears.)*
Open up a terminal using Ctrl+Alt+T and install mesa-utils to get new graphics drivers installed. To do so, first enter
sudo apt-get install -y mesa-utils, followed by
sudo apt-get dist-upgrade.
Also, to play it safe (and yes, I know some people will freak out over that, but I simply haven't had a chance to test which of these Mesa packages works best), I also subsequently installed Mesa from another PPA, using
sudo add-apt-repository ppa:kisak/kisak-mesa and followed by
sudo apt-get dist-upgrade.
SOLVING BLACK SCREEN AT BOOT - STEP 2: UPGRADE KERNEL
- Next, we have to upgrade the Linux kernel. Once done, the problem with the graphics fail during the boot up will be eliminated. To do this, I opened up Ubuntu Software and installed Ukuu. This is a GUI that makes it very easy to upgrade your kernel. After testing a few different ones, 5.7.1 is the one that gave the best results (system didn't crash and no black screen at boot up). Highlight 5.7.1 in the list and click "Install." Once installed, go back to your terminal and enter
uname -r to confirm that your kernel indeed has updated. If it has, it should output in return
5.7.1-050701-generic if you're on Ubuntu. Next, go ahead and restart the computer. This time, rebooting will take you straight to your login screen, without getting indefinitely stuck on a black screen.
SOLVING INCORRECT SCREEN ROTATION
When you come to the login screen, you will notice that the screen orientation is off by 90 degrees to the right. Not ideal. Some people will argue that this is easy to solve - just turn the device until the screen is at your preferred orientation and then click "Lock screen rotation" and problem solved. Maybe so, but since this is a tablet after all, I would personally want the screen to be able to rotate based on how I use it at any given moment. And even more so, to rotate accurately.
Go ahead and log in, and once inside open up the terminal. Since your screen is still annoyingly rotated, enter
xrandr -o normal to temporarily fix the problem and give you a more normal screen rotation, assuming that you're using the device with a keyboard. If you wan't, feel free to click the "Lock screen rotation" in the menu top-right of the screen, since if you move your device at any point - even after using xrandr - it will default to its standard incorrect screen rotation.
(In Ubuntu, after having done this, the screen resolution will scale at 200%, which is very unpleasant. To fix that - again temporarily until we have a permanent fix - open up "Settings", scroll down to the "Display" tab, and hit "100%" at scale. Then hit "Keep Changes" in the box that pops up.)
- You now need to teach the device where the sensor is located that determines what is up, down, etc. To do that, we need to create a configuration file. In terminal, enter
sudo gedit /etc/udev/hwdb.d/61-sensor-local.hwdb**. This will open up a text editor in which you will enter the following:
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
Note! There is, and should be, a blank space before the first word on line 2. In Fedora, the system required this to be a tab rather than one space or it would claim the second line didn't exist. In Ubuntu, it required the opposite - one blank space instead of a tab, or it would fail.
Once you have entered exactly the above, hit Save. (If you want to learn more about the accelerometer configurations, official details are available here and some background is available here.)
To tell the system to update based on the above configuration, input in the terminal first
systemd-hwdb update followed by
Reboot, and when the login screen appears, you will see that it is now accurately rotated.
You have now solved the two main issues mentioned at the outset: Updating your graphics driver to get past the black screen that otherwise halts your boot up sequence, and you have taught the device "proper" rotation.
AN OPTION TO ELIMINATE SCREEN WAKE-UP DELAY
- As a sidepoint, I would personally recommend clicking the cog wheel at the bottom-right corner of the login screen and selecting "Gnome on Wayland." The reason? If you go with the regular Gnome option, and then lock the screen, hitting the power button will not wake up the system for a number of seconds, whereas with the Wayland option it will start up (almost) immediately.
The following are disclaimers to statements made above.
*While it is perfectly possible to hard-code the
nomodeset into GRUB (as explained here), this would not be ideal since this would result in a quite laggy Gnome experience (from a graphics standpoint), and would also disable any animations in the desktop environment. For those who are thinking of trying kernel parameters, such as
i915.modeset=0 - they don't solve the issue. While they do get you past the black screen at boot, you will be stuck with both an animation-less and quite laggy Gnome, and Wayland (and thus the faster wake-up from sleep option in Ubuntu) will not be available. (The cog wheel will not be present on the login screen.) Also,
i915.enable_guc=2 will not make a difference either.
**I don't remember if this is how you would input it in the Fedora terminal - however, the file path is the same in both Fedora and Ubuntu, so that part is accurate.