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 :
  1. INPUT_DEVICES="evdev synaptics keyboard mouse"  
  2. 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 :
  1. media-fonts/corefonts X  
  2. media-fonts/dejavu X  
  3. sys-apps/dbus X  
  4. sys-apps/hal laptop X  
  5. x11-base/xorg-server hal  
  6. x11-drivers/xf86-input-synaptics hal  
Emerge Xorg :
  1. emerge xorg-server  
  2. env-update && source /etc/profile  
Select xorg-x11 (this might be not necessary) ;
  1. eselect opengl set xorg-x11  
Emerge hal :
  1. emerge hal  
  2. rc-update add hald default  
Update keymap if needed :
  1. mkdir -p /etc/hal/fdi/policy  
  2. cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy  
  3.   
  4. <merge key="input.xkb.layout" type="string">fr</merge>  
  5.   
  6. /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 :
  1. ~sys-kernel/gentoo-sources-2.6.33-r2 ~amd64  
  2. ~sys-kernel/gentoo-sources-2.6.34-r1 ~amd64  
  3. ~x11-drivers/nvidia-drivers-195.36.24 ~amd64  
  4. ~x11-libs/libvdpau-0.3-r2 ~amd64  
Emerge kernel, nvidia-drivers, glx tools (like glxgears) :
  1. emerge gentoo-sources-2.6.33-r2  
  2. emerge nvidia-drivers-195.36.24  
  3. emerge mesa-progs  
module-rebuild will rebuild the necessary packages when upgrading your kernel :
  1. emerge module-rebuild  
  2. module-rebuild populate  
  3. module-rebuild rebuild  
Configure Xorg :
  1. 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).
  1. #Section "Device"  
  2. # Identifier  "Card0"  
  3. # Driver      "nvidia"  
  4. # VendorName  "nVidia Corporation"  
  5. # BoardName   "Unknown Board"  
  6. # BusID       "PCI:1:0:0"  
  7. #EndSection  
Emerge enlightenment. It is also a good idea to add xterm and some font packages. Set enlightenment default :
  1. emerge enlightenment corefonts dejavu xterm  
~/.xinitrc :
  1. 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 :
  1. diff config-2.6.33-r2.0 config-2.6.33-r2.7  
  2.   
  3. < CONFIG_ACPI_VIDEO=y  
  4. > CONFIG_ACPI_VIDEO=m  
  5. < CONFIG_I2C_ALGOBIT=y  
  6. > CONFIG_I2C_ALGOBIT=m  
  7. < CONFIG_AGP=y  
  8. < CONFIG_AGP_AMD64=y  
  9. < CONFIG_AGP_INTEL=y  
  10. > CONFIG_AGP=m  
  11. > CONFIG_AGP_INTEL=m  
  12. < CONFIG_DRM=y  
  13. < CONFIG_DRM_KMS_HELPER=y  
  14. > CONFIG_DRM=m  
  15. > CONFIG_DRM_KMS_HELPER=m  
  16. < CONFIG_DRM_I915=y  
  17. > CONFIG_DRM_I830=m  
  18. > CONFIG_DRM_I915=m  
  19. < CONFIG_VIDEO_OUTPUT_CONTROL=y  
  20. < CONFIG_FB=y  
  21. > CONFIG_VIDEO_OUTPUT_CONTROL=m  
  22. > CONFIG_FB=m  
  23. > CONFIG_FIRMWARE_EDID=y  
  24. < CONFIG_FB_CFB_FILLRECT=y  
  25. < CONFIG_FB_CFB_COPYAREA=y  
  26. < CONFIG_FB_CFB_IMAGEBLIT=y  
  27. > CONFIG_FB_CFB_FILLRECT=m  
  28. > CONFIG_FB_CFB_COPYAREA=m  
  29. > CONFIG_FB_CFB_IMAGEBLIT=m  
  30. < CONFIG_FB_TILEBLITTING=y  
  31. < CONFIG_FB_EFI=y  
  32. > CONFIG_FB_UVESA=m  
  33. < CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64  
  34. > CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256  
  35. < CONFIG_FRAMEBUFFER_CONSOLE=y  
  36. > CONFIG_FRAMEBUFFER_CONSOLE=m  
  37. > CONFIG_LOGO_LINUX_MONO=y  
  38. > CONFIG_LOGO_LINUX_VGA16=y  
Nvidia errors :
  1. NVRM: failed to copy vbios to system memory.  
  2. NVRM: RmInitAdapter failed! (0x30:0xffffffff:868)  
  3. NVRM: rm_init_adapter(0) failed  

2 comments:

Unknown 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.