Tuesday, June 15, 2010

Setup Gentoo on Asus U30JC-QX010X : Part 3 - X

This post is greatly inspired from Gentoo Xorg How-To.

Edit 2010-07-27 :
  • Replaced vesa by intel in VIDEO_CARDS. Using vesa cannot scale X to 1366x768 and it is not compatible with vesa framebuffer.
  • nvidia is not working. It is better to remove it to avoid problems when enabling xorg-x11 opengl (conflict between lib32 and lib64 folders).
Edit /etc/make.conf and define both INPUT_DEVICES and VIDEO_CARDS :
INPUT_DEVICES="evdev synaptics keyboard mouse"
VIDEO_CARDS="nvidia intel"
Edit use flags for a couple of packages needed for X. You can group these settings in /etc/portage/package.use/X :
media-fonts/corefonts X
media-fonts/dejavu X
sys-apps/dbus X
sys-apps/hal laptop X
x11-base/xorg-server hal
x11-drivers/xf86-input-synaptics hal
Emerge Xorg :
emerge xorg-server
env-update && source /etc/profile
Select xorg-x11 (this might be not necessary) ;
eselect opengl set xorg-x11
Emerge hal :
emerge hal
rc-update add hald default
Update keymap if needed :
mkdir -p /etc/hal/fdi/policy
cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy

<merge key="input.xkb.layout" type="string">fr</merge>

/etc/init.d/hald restart
Add yourself to the video group (maybe not needed).

Nvidia (I fail to use Nvidia and the Geforce 310m for now. No better result with 256.35) :

/etc/portage/package.keywords/X :
~sys-kernel/gentoo-sources-2.6.33-r2 ~amd64
~sys-kernel/gentoo-sources-2.6.34-r1 ~amd64
~x11-drivers/nvidia-drivers-195.36.24 ~amd64
~x11-libs/libvdpau-0.3-r2 ~amd64
Emerge kernel, nvidia-drivers, glx tools (like glxgears) :
emerge gentoo-sources-2.6.33-r2
emerge nvidia-drivers-195.36.24
emerge mesa-progs
module-rebuild will rebuild the necessary packages when upgrading your kernel :
emerge module-rebuild
module-rebuild populate
module-rebuild rebuild
Configure Xorg :
Xorg -configure
Copy /root/xorg.conf.new to /etc/X11/xorg.conf. You need to comment the Nvidia section to keep only vesa (Nvidia fails).
#Section "Device"
# Identifier "Card0"
# Driver "nvidia"
# VendorName "nVidia Corporation"
# BoardName "Unknown Board"
# BusID "PCI:1:0:0"
#EndSection
Emerge enlightenment. It is also a good idea to add xterm and some font packages. Set enlightenment default :
emerge enlightenment corefonts dejavu xterm
~/.xinitrc :
exec /usr/bin/e16
At this point, once the new kernel has been installed, you should be able to start enlightenment safely (with intel driver only for now).

For info, small kernel updates :
diff config-2.6.33-r2.0 config-2.6.33-r2.7

< CONFIG_ACPI_VIDEO=y
> CONFIG_ACPI_VIDEO=m
< CONFIG_I2C_ALGOBIT=y
> CONFIG_I2C_ALGOBIT=m
< CONFIG_AGP=y
< CONFIG_AGP_AMD64=y
< CONFIG_AGP_INTEL=y
> CONFIG_AGP=m
> CONFIG_AGP_INTEL=m
< CONFIG_DRM=y
< CONFIG_DRM_KMS_HELPER=y
> CONFIG_DRM=m
> CONFIG_DRM_KMS_HELPER=m
< CONFIG_DRM_I915=y
> CONFIG_DRM_I830=m
> CONFIG_DRM_I915=m
< CONFIG_VIDEO_OUTPUT_CONTROL=y
< CONFIG_FB=y
> CONFIG_VIDEO_OUTPUT_CONTROL=m
> CONFIG_FB=m
> CONFIG_FIRMWARE_EDID=y
< CONFIG_FB_CFB_FILLRECT=y
< CONFIG_FB_CFB_COPYAREA=y
< CONFIG_FB_CFB_IMAGEBLIT=y
> CONFIG_FB_CFB_FILLRECT=m
> CONFIG_FB_CFB_COPYAREA=m
> CONFIG_FB_CFB_IMAGEBLIT=m
< CONFIG_FB_TILEBLITTING=y
< CONFIG_FB_EFI=y
> CONFIG_FB_UVESA=m
< CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
> CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256
< CONFIG_FRAMEBUFFER_CONSOLE=y
> CONFIG_FRAMEBUFFER_CONSOLE=m
> CONFIG_LOGO_LINUX_MONO=y
> CONFIG_LOGO_LINUX_VGA16=y
Nvidia errors :
NVRM: failed to copy vbios to system memory.
NVRM: RmInitAdapter failed! (0x30:0xffffffff:868)
NVRM: rm_init_adapter(0) failed

2 comments:

Filipe Teixeira said...

I'm having the same problem on a UL30VT. Hope this will go away in a newer version of the kernel and/or the BIOS.

BTW, how long does your battery lasts? Mine only lasts for about 4 hours of normal use.

ded said...

More or less 4 hours too. I try to avoid full discharge : http://batteryuniversity.com/learn/article/do_and_dont_battery_table.

The battery design capacity is 84.000 mWh. When I got the laptop 5 months ago it could not charge up to 81.000 mWh. And today, 6 months later, I am close to 78.000 mWh.