Difference between revisions of "ASUS U31SD"

From ArchWiki
Jump to: navigation, search
m (added bluetooth section)
(automatic style fixes)
Line 1: Line 1:
 
[[Category: Asus (English)]]
 
[[Category: Asus (English)]]
 +
{{i18n|Asus U31SD}}
  
 
{{Note|Read the WHOLE guide, it's very verbose}}
 
{{Note|Read the WHOLE guide, it's very verbose}}
  
=System Specification=
+
==System Specification==
 
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)
 
*CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)
 
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)
 
*Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)
Line 20: Line 21:
 
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}
 
{{Note|This page was written for the i3 model but I'm sure the i5 model will not be much different}}
  
=What DOESN'T work out of the box=
+
==What DOESN'T work out of the box==
 
*Sleep/Hibernate (see below)
 
*Sleep/Hibernate (see below)
 
*Nvidia GPU (Switchable GPU, see below)
 
*Nvidia GPU (Switchable GPU, see below)
 
*Disk optimization (!!!!, See GPT and GRUB2 guide below)
 
*Disk optimization (!!!!, See GPT and GRUB2 guide below)
  
=What Works out of the Box / With default configuration=
+
==What Works out of the Box / With default configuration==
 
*CPU (all cores detected)
 
*CPU (all cores detected)
 
*Wireless
 
*Wireless
Line 36: Line 37:
 
*USB
 
*USB
  
=Not Tested=
+
==Not Tested==
 
*HDMI
 
*HDMI
  
=Installation=
+
==Installation==
 
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).
 
Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get '''terrible''' performance when writing small files (which should effect most users).
  
==(Pre-install) Configuring GPT (Erasing the whole disk)==
+
===(Pre-install) Configuring GPT (Erasing the whole disk)===
 
You must install some tools that are not included in the installer (you do not have to update pacman):
 
You must install some tools that are not included in the installer (you do not have to update pacman):
<pre>$ dhcpcd eth0</pre>
+
{{bc|$ dhcpcd eth0}}
 
Update `pacman` and install `gdisk`
 
Update `pacman` and install `gdisk`
<pre>$ pacman -Syy </pre>
+
{{bc|$ pacman -Syy }}
<pre>$ pacman -S gdisk</pre>
+
{{bc|$ pacman -S gdisk}}
 
Launch `gdisk`
 
Launch `gdisk`
<pre>$ gdisk /dev/sda</pre>
+
{{bc|$ gdisk /dev/sda}}
  
 
Since you want to start a new GPT table, choose the option to create a new GPT table.
 
Since you want to start a new GPT table, choose the option to create a new GPT table.
 
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.
 
The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.
 
  
 
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.
 
Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be '''2048''' and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. '''Remember to not format this in the installer'''.
 
  
 
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`.  
 
From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`.  
 
  
 
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`.  
 
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`.  
 
  
 
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.
 
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.
 
  
 
Open `gdisk` and press `r`, then press `h`... A common looking process is below:
 
Open `gdisk` and press `r`, then press `h`... A common looking process is below:
 
  
 
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}
 
{{Note|Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.}}
 
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}
 
{{Note|I gathered this output after the installation, some things might be different for you at this stage}}
  
 
+
{{bc|
<pre>
+
  
 
Command (? for help): r
 
Command (? for help): r
Line 124: Line 118:
  
 
Recovery/transformation command (? for help): w
 
Recovery/transformation command (? for help): w
 
+
}}
</pre>
+
  
 
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.
 
What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.
 
  
 
At this point, you should '''reboot''' again so the kernel is aware of the disk changes.  
 
At this point, you should '''reboot''' again so the kernel is aware of the disk changes.  
 
  
 
You do not need to reinstall `gdisk` at this point.
 
You do not need to reinstall `gdisk` at this point.
 
  
 
''' At this point, you should install archlinux with the installer. '''
 
''' At this point, you should install archlinux with the installer. '''
  
 
+
===(Arch Installer) Installing===
==(Arch Installer) Installing==
+
 
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2
 
*Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2
  
 
*Do '''NOT''' install GRUB or any bootloader via the installer.
 
*Do '''NOT''' install GRUB or any bootloader via the installer.
  
 
+
===(Post-install) Installing GRUB2===
==(Post-install) Installing GRUB2==
+
 
*CHROOT into your new installation
 
*CHROOT into your new installation
  
 
After you have exited the installer, mount the required data in order to use your new installation:
 
After you have exited the installer, mount the required data in order to use your new installation:
<pre>$ mount -o bind /dev /mnt/dev</pre>
+
{{bc|$ mount -o bind /dev /mnt/dev}}
<pre>$ mount -t proc /proc /mnt/proc</pre>
+
{{bc|$ mount -t proc /proc /mnt/proc}}
<pre>$ mount -t sysfs /sys /mnt/sys</pre>
+
{{bc|$ mount -t sysfs /sys /mnt/sys}}
  
 
Now enter the chroot.
 
Now enter the chroot.
<pre>$ chroot /mnt bash</pre>
+
{{bc|$ chroot /mnt bash}}
  
 
You are now in your new installation.
 
You are now in your new installation.
 
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.
 
From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.
 
  
 
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition.  
 
We need to do a few things here. We need change a '''bios_grub FLAG''' on that 200M partition, and we need to add a '''boot FLAG''' on the partition with your /boot partition.  
  
<pre>$ parted /dev/sda</pre>
+
{{bc|$ parted /dev/sda}}
<pre>$(parted) set 1 bios_grub on</pre>
+
{{bc|$(parted) set 1 bios_grub on}}
<pre>$(parted) set 2 boot on</pre>
+
{{bc|$(parted) set 2 boot on}}
 
+
  
 
Now Install GRUB2
 
Now Install GRUB2
<pre>$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda</pre>
+
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}
 
+
  
 
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)
 
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)
<pre>$ grub-mkconfig -o /boot/grub/grub.cfg</pre>
+
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}
 
+
  
 
Follow the rest of the Sections below to get all of the hardware working.
 
Follow the rest of the Sections below to get all of the hardware working.
  
=Input / Touchpad=
+
==Input / Touchpad==
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in <pre> /etc/X/xorg.conf.d/10-synaptics.</pre>
+
The keyboard and touchpad work more or less without problems using the {{Pkg|xf86-input-keyboard}} and {{Pkg|xf86-input-synaptics}} modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in {{bc| /etc/X/xorg.conf.d/10-synaptics.}}
 
+
  
=Bluetooth=
+
==Bluetooth==
 
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.
 
Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice.
 
Bluetooth speakers not tested. (*users feel free to add to this)
 
Bluetooth speakers not tested. (*users feel free to add to this)
  
 
+
==Nvidia GPU (Optimus)==
=Nvidia GPU (Optimus)=
+
 
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}
 
{{Note|Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages}}
 
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...
 
Read the [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...
Line 195: Line 177:
 
*nvidia-utils-bumblebee
 
*nvidia-utils-bumblebee
 
*bbswitch
 
*bbswitch
 
  
 
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.
 
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.
Line 204: Line 185:
  
 
To check and make sure that you aren't using your GPU all the time:
 
To check and make sure that you aren't using your GPU all the time:
<pre>$ lsmod | grep nv</pre>
+
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}
 
Should return nothing, this means your GPU is off.
 
Should return nothing, this means your GPU is off.
  
 
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.
 
You can check your GPU by running '''glxgears''' with and without the 'optirun' prefix and comparing the Frames Per Second.
  
=Sound=
+
==Sound==
 
Install the typical ALSA packages (libs, oss, plugins, utils).
 
Install the typical ALSA packages (libs, oss, plugins, utils).
 
After the installation, you need to launch alsamixer
 
After the installation, you need to launch alsamixer
<pre>$ alsamixer</pre>
+
{{bc|$ alsamixer}}
  
 
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.
 
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.
  
=Suspend / Hibernate=
+
==Suspend / Hibernate==
 
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.
 
Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.
 
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}
 
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}
  
 
Create a script:
 
Create a script:
<pre>$ nano /etc/pm/sleep.d/20-asus-u31sd</pre>
+
{{bc|$ nano /etc/pm/sleep.d/20-asus-u31sd}}
  
<pre>
+
{{bc|<nowiki>
 
#!/bin/sh
 
#!/bin/sh
  
Line 242: Line 223:
 
     ;;
 
     ;;
 
esac
 
esac
</pre>
+
</nowiki>}}
  
 
Give it executable flag:
 
Give it executable flag:
<pre>$ chmod +x /etc/pm/sleep.d/20-asus-u31sd</pre>
+
{{bc|$ chmod +x /etc/pm/sleep.d/20-asus-u31sd}}
 
+
  
 
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:
 
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:
  
<pre>$ nano /etc/acpi/handler.sh</pre>
+
{{bc|$ nano /etc/acpi/handler.sh}}
  
 
Change line 20, to this:
 
Change line 20, to this:
<pre> SLPB|SBTN)    pm-suspend ;;</pre>
+
{{bc|<nowiki> SLPB|SBTN)    pm-suspend ;;</nowiki>}}
  
 
And Towards the bottom, make lines 58 and 59 look line like this:
 
And Towards the bottom, make lines 58 and 59 look line like this:
<pre>close)
+
{{bc|close)
 
         pm-suspend
 
         pm-suspend
</pre>
+
}}
 
+
  
 
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.
 
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.

Revision as of 08:40, 9 April 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Note: Read the WHOLE guide, it's very verbose

System Specification

  • CPU: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (Sandy Bridge)
  • Memory: 4 GB DDR3 PC1333 - can be expanded to a maximum of 8GB (two DIMM slots)
  • WiFi: Atheros Communications Inc. AR9285
  • Ethernet: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet
  • Bluetooth: Atheros Communications, Inc. AR3011 Bluetooth
  • Hard-Drive: 640GB Hitachi HTS547564A9E384
  • Optical Drive: None
  • Integrated Graphics: Intel 2nd Generation
  • Discrete Graphics: Nvidia GT520M (GF119)
  • Sound: Intel Corporation 6 Series/C200
  • Screen: 13.3" LCD 1366x768)
  • SD Card Reader
  • Webcam: V4L compatible
Note: This page was written for the i3 model but I'm sure the i5 model will not be much different

What DOESN'T work out of the box

  • Sleep/Hibernate (see below)
  • Nvidia GPU (Switchable GPU, see below)
  • Disk optimization (!!!!, See GPT and GRUB2 guide below)

What Works out of the Box / With default configuration

  • CPU (all cores detected)
  • Wireless
  • Ethernet
  • Framebuffer resolution (nouveau and intel xorg drivers provide this)
  • Intel GPU
  • Touchpad
  • Bluetooth
  • Hotkeys (Brightness / Monitor on-off / wifi / sleep)
  • USB

Not Tested

  • HDMI

Installation

Before running the Arch installer, you MUST install and configure a GPT partition scheme. If you do not, you will get terrible performance when writing small files (which should effect most users).

(Pre-install) Configuring GPT (Erasing the whole disk)

You must install some tools that are not included in the installer (you do not have to update pacman):

$ dhcpcd eth0

Update `pacman` and install `gdisk`

$ pacman -Syy 
$ pacman -S gdisk

Launch `gdisk`

$ gdisk /dev/sda

Since you want to start a new GPT table, choose the option to create a new GPT table. The partitioning scheme here is important(!). Since you have to use GRUB2 to boot from a GPT disk, you MUST create a 200MB blank partition that you will never touch again(!). This small partition will hold GRUB2's core.img used for booting.

Using `gdisk`, press `n` to create a new partition, keeping an eye that the start sector should be 2048 and for end sector, enter `+200M`. Do not change the partition type; it should default to 8300. Remember to not format this in the installer.

From here, you can create the rest of your partitions. We will use `parted` to make your drive bootable later. Don't forget to write the changes to disk using the `w` command in `gdisk`.

Here you should reboot. After you boot back into the installer ISO, reinstall `gdisk`.

Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.

Open `gdisk` and press `r`, then press `h`... A common looking process is below:

Note: Pay close attention the answers to the prompt. Partition 2 in this case is the partition that contains /boot.
Note: I gathered this output after the installation, some things might be different for you at this stage

Command (? for help): r
Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): N


Creating entry for GPT partition #2 (MBR partition #1)
Enter an MBR hex code (default 83): 
Set the bootable flag? (Y/N): Y

Creating entry for GPT partition #1 (MBR partition #2)
Enter an MBR hex code (default 83): 
...
Unused partition space(s) found. Use one to protect more partitions? (Y/N): N

Recovery/transformation command (? for help): o

Disk size is 1250263728 sectors (596.2 GiB)
MBR disk identifier: 0x00000000
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1      *              1   1250263727   primary     0xEF


Recovery/transformation command (? for help): p

Disk /dev/sda: 1250263728 sectors, 596.2 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1E222B9C-CF97-474C-AE7A-DB4B71AB163B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1250263694
Partitions will be aligned on 2048-sector boundaries
Total free space is 201421421 sectors (96.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     8300  GRUB2
   2            6144          268287   128.0 MiB   8300  BOOT
   3          268288      1048844287   500.0 GiB   8300  ROOT


Recovery/transformation command (? for help): w

What you just did, was create a Hybrid MBR. You should read more about this if you want to understand it.

At this point, you should reboot again so the kernel is aware of the disk changes.

You do not need to reinstall `gdisk` at this point.

At this point, you should install archlinux with the installer.

(Arch Installer) Installing

  • Assure that you do not install/configure anything on the first 200MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2
  • Do NOT install GRUB or any bootloader via the installer.

(Post-install) Installing GRUB2

  • CHROOT into your new installation

After you have exited the installer, mount the required data in order to use your new installation:

$ mount -o bind /dev /mnt/dev
$ mount -t proc /proc /mnt/proc
$ mount -t sysfs /sys /mnt/sys

Now enter the chroot.

$ chroot /mnt bash

You are now in your new installation. From here, update pacman and install 'gdisk', 'parted', and 'grub2-bios'.

We need to do a few things here. We need change a bios_grub FLAG on that 200M partition, and we need to add a boot FLAG on the partition with your /boot partition.

$ parted /dev/sda
$(parted) set 1 bios_grub on
$(parted) set 2 boot on

Now Install GRUB2

$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda

Lastly, make a grub config. (also do this if you make changes /etc/default/grub)

$ grub-mkconfig -o /boot/grub/grub.cfg

Follow the rest of the Sections below to get all of the hardware working.

Input / Touchpad

The keyboard and touchpad work more or less without problems using the xf86-input-keyboard and xf86-input-synaptics modules, respectively. Right- and left-clicking works, as well as Two-Finger scroll. Tapping is enabled out of the box and can be disabled in
 /etc/X/xorg.conf.d/10-synaptics.

Bluetooth

Installing a tool like "blueman" from the AUR and starting the bluetooth DAEMON allowed communication to bluetooth keyboards and mice. Bluetooth speakers not tested. (*users feel free to add to this)

Nvidia GPU (Optimus)

Note: Your best bet for this part is to install 'yaourt' from the AUR to ease in installing the following packages

Read the Bumblebee/optimus page. I will only outline a few things...

You need to install the packages (and all of their dependencies) :

  • bumblebee
  • nvidia-bumblebee
  • nvidia-utils-bumblebee
  • bbswitch

In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.

Be sure to add 'bumblebeed' to your DAEMONS array in rc.conf.

Once you reboot, you should start seeing huge power saving.

To check and make sure that you aren't using your GPU all the time:

$ lsmod | grep nv

Should return nothing, this means your GPU is off.

You can check your GPU by running glxgears with and without the 'optirun' prefix and comparing the Frames Per Second.

Sound

Install the typical ALSA packages (libs, oss, plugins, utils). After the installation, you need to launch alsamixer

$ alsamixer

And raise the SPEAKER level, pressing ESC to save. You should now have (low quality) sound. This is a work in progress.

Suspend / Hibernate

Attempting to suspend will put your machine into a coma. The issue here is that you need to unload the EHCI module before sleeping.

Note: ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend

Create a script:

$ nano /etc/pm/sleep.d/20-asus-u31sd
#!/bin/sh

BUSES="0000:00:1a.0 0000:00:1d.0"

case "${1}" in
    hibernate|suspend)
    # Switch USB buses off
    for bus in $BUSES; do
        echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind
    done
    ;;
    resume|thaw)
    # Switch USB buses back on
    for bus in $BUSES; do
        echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind
    done
    ;;
esac

Give it executable flag:

$ chmod +x /etc/pm/sleep.d/20-asus-u31sd

If you want sleep your machine when you close your lid, you need to edit ACPI handler script:

$ nano /etc/acpi/handler.sh

Change line 20, to this:

 SLPB|SBTN)    pm-suspend ;;

And Towards the bottom, make lines 58 and 59 look line like this:

close)
        pm-suspend

So now you can use the hotkey (F1) or close your lid and your laptop will sleep.