Difference between revisions of "ASUS U31SD"

From ArchWiki
Jump to: navigation, search
(Suspend / Hibernate: remove USB hook)
(32 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
[[Category:ASUS]]
 +
{{Note|Read the WHOLE guide, it's very verbose}}
  
[[Category: Asus (English)]]
+
==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 18: Line 17:
 
*Webcam: V4L compatible
 
*Webcam: V4L compatible
  
{{Note|This page was written for the i3 model but I'm sure the i5 model 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 install guide below)
+
*Fn Volume Keys (see 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 32: Line 31:
 
*Intel GPU
 
*Intel GPU
 
*Touchpad
 
*Touchpad
 +
*Bluetooth
 
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)
 
*Hotkeys (Brightness / Monitor on-off / wifi / sleep)
 
*USB
 
*USB
  
=Installation=
+
==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).
 
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).
  
==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):
+
I assume you are installing Arch as the single OS on your machine. We choose GPT because it's newer, it supports larger partition tables, and the machine in focus here does have UEFI but my revision allows you to turn that off in BIOS
<pre>$ dhcpcd eth0</pre>
+
 
Update `pacman` and install `gdisk`
+
Delete all of your partitions using `cfdisk`. Once you are done with that, run `cgdisk /dev/sda` to load up the GPT partitioner (or gdisk if you feel better that way). Before you make your usual partitions, you want to create '''2 MB''' partition at the very top. In `cgdisk` you create a new partition, assuring the start sector is 2048 (should be by default), and the ending size should be +2MB.
<pre>$ pacman -Syy </pre>
+
 
<pre>$ pacman -S gdisk</pre>
+
This assures that grub2 has it's proper place to store it's core.img needed to boot.
Launch `gdisk`
+
 
<pre>$ gdisk /dev/sda</pre>
+
This partition will not have a filesystem, so start installing Arch on /dev/sda2 or where ever your /boot or /root is.
 +
 
 +
After you are sure your 2MB partition exists and your other partition are created using cgdisk or gdisk, write the changes and run `parted /dev/sda`. You need to set the 'bios_grub' flag on that 2MB partition you made using `set 1 bios_grub on`.
 +
 
 +
 
 +
''' At this point, you should install archlinux with the installer. '''
 +
 
 +
===(Arch Installer) Installing===
 +
*Assure that you do not install/configure anything on the first 2MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2
 +
 
 +
Install everything as usual.
 +
 
 +
Now Install GRUB2
 +
{{bc|1=$ grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda}}
  
Since you want to start a new GPT table, choose the option to create a new GPT table.
+
Lastly, make a grub config. (also do this if you make changes /etc/default/grub)
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.
+
{{bc|$ grub-mkconfig -o /boot/grub/grub.cfg}}
  
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'''.
+
Follow the rest of the Sections below to get all of the hardware working.
  
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`.  
+
==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 {{bc| /etc/X/xorg.conf.d/10-synaptics.}}
  
Here you should '''reboot'''. After you boot back into the installer ISO, reinstall `gdisk`.  
+
==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)
  
Now we need to create an MBR for the GPT disk . This allows GRUB2 to be installed to disk.
+
==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 [https://wiki.archlinux.org/index.php/Bumblebee Bumblebee]/optimus page. I will only outline a few things...
  
Open `gdisk` and press `r`, then press `h`... A common looking process is below:
+
You need to install the packages (and all of their dependencies) :
 +
*bumblebee
 +
*nvidia-bumblebee
 +
*nvidia-utils-bumblebee
 +
*bbswitch
  
{Note|Pay close attention to the bold}
+
In short, Bumblebee allows you to use the switchable GPU and use it only when you want to via the 'optirun' application.
<pre>
+
  
Command (? for help): r
+
Be sure to add 'bumblebeed' to your DAEMONS array in '''rc.conf'''.
Recovery/transformation command (? for help): h
+
  
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
+
Once you reboot, you should start seeing huge power saving.
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
+
To check and make sure that you aren't using your GPU all the time:
added to the hybrid MBR, in sequence: '''2'''
+
{{bc|<nowiki>$ lsmod | grep nv</nowiki>}}
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): '''N'''
+
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.
  
Creating entry for GPT partition #2 (MBR partition #1)
+
==Sound==
Enter an MBR hex code (default 07):
+
Install the typical ALSA packages (libs, oss, plugins, utils).
Set the bootable flag? (Y/N): '''Y'''
+
After the installation, you need to launch alsamixer
 +
{{bc|$ alsamixer}}
  
Creating entry for GPT partition #1 (MBR partition #2)
+
And raise the '''SPEAKER''' level, pressing '''ESC''' to save. You should now have (low quality) sound. This is a work in progress.
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
+
==Suspend / Hibernate==
  
Disk size is 625142448 sectors (298.1 GiB)
+
The USB unbind hook is no longer necessary as of [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=dbf0e4c7257f8d684ec1a3c919853464293de66e Linux 3.5].
MBR disk identifier: 0x00000000
+
MBR partitions:
+
  
Number  Boot  Start Sector  End Sector  Status      Code
+
{{ Note| ACPI by default doesn't call pm-suspend, if we want to customize the sleep process, we need pm-suspend }}
  1      *      566233088    625142414  primary    0x07
+
  2                  2048    566233087  primary    0x83
+
  4                    1        2047  primary    0xEE
+
  
 +
If you want sleep your machine when you '''close your lid''', you need to edit ACPI handler script:
  
Recovery/transformation command (? for help): w
+
{{bc|$ nano /etc/acpi/handler.sh}}
  
</pre>
+
Change line 20, to this:
 +
{{bc|<nowiki> SLPB|SBTN)    pm-suspend ;;</nowiki>}}
  
 +
And Towards the bottom, make lines 58 and 59 look line like this:
 +
{{bc|close)
 +
        pm-suspend
 +
}}
  
 +
So now you can use the '''hotkey (F1)''' or close your lid and your laptop will sleep.
  
 +
==Fn Multimedia Keys==
 +
As with most Asus laptops/netbooks, this laptop sends its Multimedia events via ACPI. Using `acpi_listen`, I was able to discover the button commands the buttons sent to acpi. Add the following to your '''/etc/acpi/handler.sh''' file (make sure you add this after the ;; in the button/lid section):
 +
{{bc|
 +
    button/volumeup)
 +
      amixer set Master 5+
 +
      ;;
 +
    button/volumedown)
 +
      amixer set Master 5-
 +
      ;;
 +
    button/mute)
 +
      amixer set Master toggle
 +
      ;;
 +
}}
  
=Input / Touchpad=
+
You can mess with these values to move your volume at different intervals, 5 seemed to work well for me.
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 /etc/X/xorg.conf.d/10-synaptics.
+

Revision as of 17:49, 2 November 2012

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)
  • Fn Volume Keys (see 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)

I assume you are installing Arch as the single OS on your machine. We choose GPT because it's newer, it supports larger partition tables, and the machine in focus here does have UEFI but my revision allows you to turn that off in BIOS

Delete all of your partitions using `cfdisk`. Once you are done with that, run `cgdisk /dev/sda` to load up the GPT partitioner (or gdisk if you feel better that way). Before you make your usual partitions, you want to create 2 MB partition at the very top. In `cgdisk` you create a new partition, assuring the start sector is 2048 (should be by default), and the ending size should be +2MB.

This assures that grub2 has it's proper place to store it's core.img needed to boot.

This partition will not have a filesystem, so start installing Arch on /dev/sda2 or where ever your /boot or /root is.

After you are sure your 2MB partition exists and your other partition are created using cgdisk or gdisk, write the changes and run `parted /dev/sda`. You need to set the 'bios_grub' flag on that 2MB partition you made using `set 1 bios_grub on`.


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

(Arch Installer) Installing

  • Assure that you do not install/configure anything on the first 2MB partition that you created. You should start modifying and configuring partitions starting after that partition; usually /dev/sda2

Install everything as usual.

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

The USB unbind hook is no longer necessary as of Linux 3.5.

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

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.

Fn Multimedia Keys

As with most Asus laptops/netbooks, this laptop sends its Multimedia events via ACPI. Using `acpi_listen`, I was able to discover the button commands the buttons sent to acpi. Add the following to your /etc/acpi/handler.sh file (make sure you add this after the ;; in the button/lid section):

    button/volumeup)
      amixer set Master 5+
      ;;
    button/volumedown)
      amixer set Master 5-
      ;;
    button/mute)
      amixer set Master toggle
      ;;

You can mess with these values to move your volume at different intervals, 5 seemed to work well for me.