When you first try to install lubuntu on an Asus K501UX, you will have a black
screen and no clue about what is happening.
This is the situation I faced and this guide is the result of 5 hours of
hair-pulling and cursing at various corporations including Asus, nvidia,
Microsoft and even Canonical.
This guide will hold you hand until you can boot to the desktop. How to install the nvidia drivers is not included in this guide.
Following this guide will remove Windows entirely and install GNU/Linux instead. Don't follow this if you plan to dual-boot.
- Boot to the BIOS by pressing
Escape
after pressing power. - Remove the Windows boot option.
- Disable FastBoot/SecureBoot.
- Enable CSM.
- Boot to the non-UEFI version of a lubuntu liveUSB for amd64.
See the available downloads.
-
sudo swapoff -a
Because of a blocking bug of "medium" importance dating back from 2013, see #1205397.
This may not be needed if you don't create an encrypted swap partition. Better safe than sorry. -
Format
/dev/sdb
usinggksudo gparted
with a GPT partition table. This step will get rid of Windows. -
ubiquity --no-bootloader gtk_ui & disown
ubiquity does not understand that we want to install the OS and its bootloader on the same disk (which happen to not be/dev/sda
) so we have to skip this step entirely.It would not be able to setup UEFI/SecureBoot because we were not able to boot with it anyway.
Funny thing, when ubiquity fails to install the bootloader it gives you the choice to skip the bootloader installation, install it another disk, or cancel the installation. Whatever you choose, pressing Ok does not do anything.
-
When prompted for a custom disk configuration, create a 256 MiB
biosgrub
partition, a 512 MiBext4
for/boot
and an encryptedLUKS+ext4
partition for/
. -
End the installation.
-
Do not reboot.
-
Using
gksudo gparted
set theboot
flag for/dev/sdb1
and label itEFI
.In GNU Parted,
boot
flag (not to be confused withlegacy_boot
flag) has different effect in MBR and GPT disk. In MBR disk, it marks the partition as active. In GPT disk, it changes the type code of the partition toEFI System Partition
type. Parted has no flag to mark a partition as ESP in MBR disk (this can be done using fdisk though). -
Install GRUB.
sudo -s apt-get install grub-efi-amd64 # /target should still be here as an installation leftover, if its not the # case just create it with mkdir. mount /dev/mapper/sdb3_crypt /target mount /dev/sdb2 /target/boot mkdir /target/boot/efi mount /dev/sdb1 /target/boot/efi grub-install --target=x86_64-efi --efi-directory=/target/boot/efi --root-directory=/target /dev/sdb
-
Reboot to BIOS.
-
Disable CSM.
-
Enable FastBoot/SecureBoot.
-
Add boot option with path set to
\EFI\ubuntu\grubx64.efi
and name toGRUB
.
Here we disable the nouveau driver so we can actually boot to something.
- Boot into single user (or "recovery") mode.
You might have to crash the boot a first time to access the GRUB menu. If you leave the shift key pressed when booting you might get lucky and get to GRUB first. mount -o remount,rw /dev/dm-0 /
- Add
nouveau.nomodeset=0
toGRUB_CMDLINE_LINUX_DEFAULT
in/etc/default/grub
using your favorite editor (meaning,vim
). echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
echo "options nouveau modeset=0" > /etc/modprobe.d/nouveau-kms.conf
update-initramfs -u && update-grub
.- Reboot to lubuntu, get a hoppy beverage and go on with your day.
What doesn't work:
- Wifi switch (fn+F2). The laptop boots with the Wifi disabled by default. To enable it you have to put the laptop to sleep with fn+F1.
- Headphone detection.
- Touchpad. Waiting for #1521410
to be fixed.
The mainline kernel 4.4.1-wily can be used in the meantime. - Screen brightness keys. Keyboard brightness keys work fine.
What works:
- Wifi:
03:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
showing aswlp3s0
. - Ethernet:
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
showing asenp2s0
. - OpenGL/WebGL with a blacklisted
nouveau
. I don't know who's in charge of the rendering but it seems to work. - Sound:
00:1f.3 Audio device: Intel Corporation Device 9d70 (rev 21)
. - Touchpad: only left/right click. Edge and two-fingers scrolling do not work.