# Gentoo on ASUS G53J

## gr0x0rd

After my adventures with the N53JF and running into the hardware and driver limitations due to optimus, I purchased a different machine, the G53JW.

The good news is, this machine is incredible. It has more horsepower than my desktop. The bad news is, it's almost as big as my truck, and probably weighs about the same. 

For the most part, the hardware configuration wasn't overly challenging. Thanks to pappy's kernel seeds and guide at kernel-seeds.org, the kernel config was a snap. Here's a quick peek at lspci for the system.

```
00:00.0 Host bridge: Intel Corporation Clarksfield/Lynnfield DMI (rev 11)

00:03.0 PCI bridge: Intel Corporation Clarksfield/Lynnfield PCI Express Root Port 1 (rev 11)

00:08.0 System peripheral: Intel Corporation Clarksfield/Lynnfield System Management Registers (rev 11)

00:08.1 System peripheral: Intel Corporation Clarksfield/Lynnfield Semaphore and Scratchpad Registers (rev 11)

00:08.2 System peripheral: Intel Corporation Clarksfield/Lynnfield System Control and Status Registers (rev 11)

00:08.3 System peripheral: Intel Corporation Clarksfield/Lynnfield Miscellaneous Registers (rev 11)

00:10.0 System peripheral: Intel Corporation QPI Link (rev 11)

00:10.1 System peripheral: Intel Corporation QPI Routing and Protocol Registers (rev 11)

00:16.0 Communication controller: Intel Corporation Ibex Peak HECI Controller (rev 06)

00:1a.0 USB Controller: Intel Corporation Ibex Peak USB2 Enhanced Host Controller (rev 06)

00:1b.0 Audio device: Intel Corporation Ibex Peak High Definition Audio (rev 06)

00:1c.0 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 1 (rev 06)

00:1c.1 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 2 (rev 06)

00:1c.3 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 4 (rev 06)

00:1c.4 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 5 (rev 06)

00:1c.5 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 6 (rev 06)

00:1d.0 USB Controller: Intel Corporation Ibex Peak USB2 Enhanced Host Controller (rev 06)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)

00:1f.0 ISA bridge: Intel Corporation Ibex Peak LPC Interface Controller (rev 06)

00:1f.2 SATA controller: Intel Corporation Ibex Peak 4 port SATA AHCI Controller (rev 06)

01:00.0 VGA compatible controller: nVidia Corporation Device 0dd1 (rev a1)

01:00.1 Audio device: nVidia Corporation Device 0be9 (rev a1)

03:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

04:00.0 USB Controller: Device 1b73:1400 (rev 01)

05:00.0 Class ff00: Realtek Semiconductor Co., Ltd. Device 5209 (rev 01)

06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

ff:00.0 Host bridge: Intel Corporation QuickPath Architecture Generic Non-Core Registers (rev 04)

ff:00.1 Host bridge: Intel Corporation QuickPath Architecture System Address Decoder (rev 04)

ff:02.0 Host bridge: Intel Corporation QPI Link (rev 04)

ff:02.1 Host bridge: Intel Corporation QPI Physical 0 (rev 04)

ff:03.0 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller (rev 04)

ff:03.1 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Target Address Decoder (rev 04)

ff:03.4 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Test Registers (rev 04)

ff:04.0 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Channel 0 Control Registers (rev 04)

ff:04.1 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Channel 0 Address Registers (rev 04)

ff:04.2 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Channel 0 Rank Registers (rev 04)

ff:04.3 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Channel 0 Thermal Control Registers (rev 04)

ff:05.0 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Channel 1 Control Registers (rev 04)

ff:05.1 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Channel 1 Address Registers (rev 04)

ff:05.2 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Channel 1 Rank Registers (rev 04)

ff:05.3 Host bridge: Intel Corporation Lynnfield Integrated Memory Controller Channel 1 Thermal Control Registers (rev 04)
```

I have verified that the webcam, hdmi out with dual-head, NIC and wireless are all working flawlessly. The synaptics touchpad was a bit of a pain since I ran into the bug where the downstream version of /usr/share/X11/xorg.conf.d/50-synaptics.conf didn't have the MatchDevicePath "/dev/input/event*" directive so Xorg was loading it twice and it only functioned as a normal mouse. Here's my new /usr/share/X11/xorg.conf.d/50-synaptics.conf:

```
Section "InputClass"

        Identifier "touchpad catchall"

        Driver "synaptics"

        MatchIsTouchpad "on"

        MatchDevicePath "/dev/input/event*"

        Option      "TapButton1" "1"

        Option      "TapButton2" "2"

        Option      "TapButton3" "3"

        Option "VertEdgeScroll" "on"

        Option "VertTwoFingerScroll" "on"

        Option "HorizEdgeScroll" "on"

        Option "HorizTwoFingerScroll" "on"

        Option "CircularScrolling" "on"

        Option "CircScrollTrigger" "2"

        Option "EmulateTwoFingerMinZ" "0"

EndSection
```

The one problem I haven't solved yet is backlight dimming. On the N53JF I recently sold, I was able to easily set the brightness when running on battery using the command 

```
echo -n <value> > /proc/acpi/video/GFX0/LCDD/brightness
```

 in my /etc/acpi/default.sh or by using the fn-f5 and fn-f6 keys.

This isn't the same on the G53JW. The fn-f2 key works in disabling the wireless adapter, the fn-f1 key broadcasts and acpi event to call sleep, and the fn-f7 disables the display. However, the fn-f5 and fn-f6 keys don't decrease/increase the brightness as they should- at least not while gentoo is running. They do work at the grub screen so I know the hardware is not at fault. When I press them after the kernel has loaded, I get the following in /var/log/messages:

```
Jan 10 18:38:39 warpath logger: ACPI event unhandled: video LCDD 00000086 00000000

Jan 10 18:38:39 warpath logger: ACPI event unhandled: video LCDD 00000087 00000000
```

I'm able to view and change the value via /proc/acpi/video/GFX0/LCDD/brightness, but the changes have no effect on the lcd brightness. 

This seems like a kernel or acpi issue: any ideas as to what I might be missing here? The screen is so bright! My eyes, the goggles, they do nothing!

----------

## gr0x0rd

I did some experimentation with this. Some googling found that passing 

```
acpi_backlight=vendor acpi_osi="!Windows 2009"
```

to the kernel at boot fixed this for some asus notebooks. Sadly, this didn't work for me. 

I also thought to try the nouveau driver with this passed to the kernel after seeing it now has its own method for backlight dimming. I couldn't get the nouveau driver to recognize my card with the 2.6.35-r15 kernel, so I gave the 2.6.36-r5 kernel a try. With that kernel, the nouveau driver did recognize my card (and set the framebuffer to 1980x1080 while the kernel was loading! cool!) but the backlight still didn't work. Neither did compiz. But I'm not expecting any 3D support from nouveau with such a new card. 

I tried removing the parameters passed to the kernel with nouveau as well. No luck.

I thought I'd try 2.6.36-r5 with the nvidia binary driver again, but in this version of the kernel, the nouveau driver seems to take control of the card, so the nvidia module can't load. So I recompiled the kernel with nouveau as a module. With this configuration, the kernel took almost 3 minutes to process udev events, then hung while trying to load my wireless card (ath9k as a module). I also tried removing all staging drivers entirely, but this yielded the same effect. Very strange. Sounds like a question for Pappy.

Still stuck with a very bright screen. My eyes, the goggles do nothing.

----------

## niblifar

You want to compile the module asus_laptop in your kernel. It's under  Device Drivers ->   X86 Platform Specific Device Drivers -> ASUS Laptop Extras. From there, you can set the value from 1 to 15 at

```

 /sys/class/backlight/asus_laptop/brightness
```

Hope this helps.

----------

## ssteinberg

 *niblifar wrote:*   

> You want to compile the module asus_laptop in your kernel. It's under  Device Drivers ->   X86 Platform Specific Device Drivers -> ASUS Laptop Extras. From there, you can set the value from 1 to 15 at
> 
> ```
> 
>  /sys/class/backlight/asus_laptop/brightness
> ...

 

This for keyboard lighting.

I have the G73JW which is identical hardware wise to the G53. For display dimming use this (using nvidia binary blobs):

/sys/class/backlight/acpi_video0/brightness

Display dimming including keyboard function keys work through KDE just fine. For keyboard I use acpi hooks, I can post the scripts if you need.

----------

## vapor

Can you please share your kernel .config?

The G53JW is Awesome!  So far, everything except for the card reader works in Ubuntu... I can't seem to get my kernel right to boot Gentoo.  It hangs right after loading synaptics touchpad.  I don't wanna make an initrd and pappy's kernel-seeds.org is down. Please help?

----------

## cach0rr0

 *vapor wrote:*   

>  I don't wanna make an initrd and pappy's kernel-seeds.org is down. Please help?

 

I don't know about the original problem (you have done more research than I have!), but he does have failover servers with the kernel seeds

http://62.3.120.142/~pappy/

http://kernel-seeds.bloodnoc.org/

----------

## gqman69

Hey I got a a G73JW and I use the head drivers/staging/rts_pstor driver for my card reader.

Just get the snapshot or git and copy rts_pstor into your 2.6.38 kernel, change drivers/staging/{Kconfig,Makefile}.

It works good.

BTW as of 2.6.38-git4 rts_pstor is included.

----------

## jpc22

did you manage to get keyboard backlight on and battery status?

i have a similar laptop (g53sx) and i am struggling with thoses. 

got brightness keys to work by enabling wmi and acpi extras but i still dont get the keyboard to light except at power on self test during boot

----------

