domenica 6 settembre 2015

Configuring ASUS F302LJ laptop for dual boot with Ubuntu and Windows 10

A couple of days ago I bought a new laptop for personal use. The laptop is from Asus, the model is  F302LJ-R4025H, which seems to be also identified as "X302LJ" on the Asus website. Here are the specs from the shop where I bought it:

ASUS F302LJ-R4025H
Processor: Intel® Core™ i7-5500U (2.40/3.00GHz, 4MB L3)
Hard drive: SATA 1TB+24GB SSD
RAM: 8GB
Display :13,3" Full HD
Wi-Fi: 802.11a/b/g/n
Bluetooth: 4.0
OS: Windows 8.1 64-bit
Graphic card: nVidia GeForce 920M 2GB dedicated

Windows 8.1 was preinstalled, and I immediately upgraded it to Windows 10 using the automated process from Microsoft. The download and installation of the new OS took a while, but it worked correctly, and after about an hour I could use the laptop again.

This laptop uses UEFI instead of BIOS, which initially caused me some headache since I haven't been working with UEFI before. The Asus laptop has the so called Compatibility Support Mode (CSM) available in the UEFI configuration after boot , which allows to run BIOS the old way. However, Windows was configured for UEFI, and it does not load at all if the system is booted with CSM.

I installed UNetbootin on Windows and I used it to create a bootable GParted USB, and on another stick I installed Ubuntu (14.04.3 LTS).

I booted the system from the newly created USB stick, which worked correctly using the UEFI boot.  The hard drive was partitioned in the following way:
  • A 100MB FAT32 partition for UEFI
  • A 1GB NTFS partition labelled "recovery"
  • An NTFS partition for the Windows OS installation
  • An NTFS partition for data storage
  • A 15 GB partition labelled "restore"
  • An extra disk device with 22 GB, most likely the SSD part of the hybrid drive
I shrinked the size of the data and of the Windows partition, and I created an EXT4 partition for the Ubuntu installation, and a linux-swap partition with the same size ad the RAM (8GB).

Once the new partitions were in place, I rebooted the system with the Ubuntu Live USB. The OS loaded correctly, but the wireless card didn't work, and I found that it was because it uses proprietary drivers which are not active by default on Ubuntu. Here's the hardware specifications:

$ sudo lshw -class network
  *-network               
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth0
       version: 10
       serial: *:*:*:*:*:*
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:48 ioport:e000(size=256) memory:f7204000-f7204fff memory:f7200000-f7203fff
  *-network
       description: Wireless interface
       product: BCM43142 802.11b/g/n
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlan0
       version: 01
       serial: *:*:*:*:*:*
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=wl0 driverversion=6.30.223.248 (r487574) ip= *.*.*.* latency=0 multicast=yes wireless=IEEE 802.11abg
       resources: irq:19 memory:f7100000-f7107fff


The way to enable proprietary drivers on Ubuntu is to go to System Settings, Software & Updates, and enable the drivers from the "Additional Drivers" tab.

Once the Wireless card started to work I could proceed with the installation, specifying the right partition mount points. The FAT32 EFI partition is especially important, and that mount point is automatically assigned to /boot/efi by the installation process, you don't need to change it. Just make sure that the partition has the boot flag on it (it should have it already). Proceed with the software installation and GRUB2 should be able to load both Windows 10 and Ubuntu at the next reboot.

At the first boot after the Ubuntu installation, I noticed that the wireless card drivers were not loaded and the wireless card didn't work. I tried to enable it with the method mentioned above but it didn't work, since the graphical tools tried to install some software packages but no repository was reachable as there was no network connection. The solution for this was to mount the packages on the USB stick as APT repository, and use those to install the proprietary driver. I added the following lines to /etc/apt/sources.list :


deb file:/media/myuser/my_usb_stick/ trusty main 
deb file:/media/myuser/my_usb_stick/ trusty restricted
After editing the file I had to run the command to refresh the package list and install the missing drivers:


apt-get update
apt-get install bcmwl-kernel-source
The Wi-fi connection worked correctly after this.

In order to use the NVIDIA proprietary driver instead of the software acceleration provided by default (nouveau driver), you need to enable it as we did with the wi-fi card. Go to "Software & Updates", choose the "Additional drivers" tab, and select "NVIDIA binary driver - version 346.82 from nvidia-346 (proprietary, tested)". A reboot (or X restart) might be necessary. The lshw command should show "nvidia" instead of "nouveau" in the "configuration: driver" section of the 3D controller.


# lshw -c video
  *-display               
       description: VGA compatible controller
       product: Broadwell-U Integrated Graphics
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:50 memory:f5000000-f5ffffff memory:d0000000-dfffffff ioport:f000(size=64)
  *-display
       description: 3D controller
       product: NVIDIA Corporation
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:04:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:53 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:d000(size=128) memory:f7000000-f707ffff
I still need to find the best way to configure the SSD partition, I'll update this post once I sort it out.
 


2 commenti:

  1. Recently I bought the same laptop, but with Linux Mint 17 (kernel 3.19.0-32) and Ubuntu 15.10 the touchpad disappears from xinput after Sleep.

    Have you ever noticed this behaviour?

    RispondiElimina
    Risposte
    1. Yes, the sleep mode does not work for me either, I didn't bother doing any troubleshooting for this yet...

      Elimina