Sunday, October 12, 2008

Gentoo troubleshootings

After 3 and half days. I got gentoo upgraded on my acer 5102WLMi. Gentoo is a great distro. Love it. Now audio is working, but still not camera.

The Name:
The Gentoo species is the fastest swimming penguin.
Hardware specification
    1. Processors : AMD Turion 64x2 TL50 (1.60GHz, 512K L2 cache)
    2. Chipset: ATI RS480
    3. Displays: 15.4" WXGA (1280 x 800 resolution)
    4. Graphics Card: ATI Radeon Xpress 1100
    5. Optical Drive: DVDRW
    6. Sound Card: integrated, snd-hda-intel, realtek
    7. Wireless Networking: Atheros AR5005G 802.11abg
    8. MMC reader: ENE Technology Inc SD/MMC Card Reader
    9. I/O Ports : 3 USB 2.0, Audio jacks, 15-pin monitor connector, PCMCIA slot.
Useful links
  1. Gentoo documentation
  2. audio setup: http://gentoo-wiki.com/HARDWARE_Acer_Aspire_5102WLMi
  3. articles with gentoo tag: http://kunxi.org/
  4. Google
Notes:
  1. when upgrading, first emerge update all packages, resolve blockings(uninstall or upgrade, if circular blocking, --nodep). Then revdep-rebuild.
  2. use "equery" to look at installed packages
  3. gcc-config, kernel-config, etc to choose from different slots.
  4. make.conf, package.keywords, package.mask, package.unmask, package.use, ...
  5. if use "startx", add "gnome-session" to .xinitrc, else X will not load gnome.
  6. firefox+flash

    sudo echo "net-www/netscape-flash" >> /etc/portage/package.unmask
    sudo emerge -av netscape-flash nspluginwrapper

  7. firefox+mplayerplug-in (UPDATE: "emerge adobe-flash" will do the job)
    sudo echo "net-www/mplayerplug-in -firefox divx quicktime realmedia wmp" >> /etc/portage/package.use
    ## Make sure no browser running
    sudo emerge -av mplayerplug-in

    ln -s /usr/lib/nsbrowser/plugins/mplayerplug-in.so $HOME/.mozilla/plugins/mplayerplug-in.so
  8. cp936 support is not default in kernel, so need to add support in kernel.
    File Systems --->
    DOS/FAT/NT Filesystems --->
    Native Language Support
  9. teTeX set up, "latex" does not come with the package automatically, seems there are a lot of high-level TeX users.
    emerge -av tetex
    texconfig confall ## check all the output
    texconfig rehash
    texconfig init ## will generate all other binaries: latex, omega,...
    emerge -av app-emacs/auctex ## a must-have package for emacs+latex
    emerge -av emacs-update ## as the package suggest
  10. use TuxOnIce to do hibernate and hibernate-ram, just follow this HOWTO. Work like a charm. ATTENTION: if the lid-and-battery script is used, DO NOT put the code directly in `/etc/conf.d/local.conf'. It will run forever and will not act as a child. Instead, paste the script code into a file, say `/etc/lid_battery_suspend', do a `chmod u+x /etc/lid_battery_suspend.sh', and then add one line `/etc/lid_battery_suspend.sh &' to `/etc/conf.d/local.conf'.
    HOWEVER, after one suspend/hibernation, this script will be stopped and not be loaded. An alternative way is to let acpi take care of this. Look at /etc/acpi/events and change the actions for lid and battery. Then restart acpid service. Well, you take the risk.
  11. clean gnome desktop, use gconf-editor (looks like register table in Windows), find apps \ nautilus \ desktop, uncheck, uncheck, uncheck. Nice pure wallpaper.
  12. HOWTO take compiz screen shot: open gimp, go to File > Aquire > Screenshot. You can set a delay of however many seconds to give yourself time to get the cube in the right position. Hold it there until the PC's speaker beeps.
  13. HOWTO_NTP, NTP (Network Time Protocol) is used to synchronize your system's time with an online server.
    echo "net-misc/ntp caps" >> /etc/portage/package.use
    emerge -av ntp
    vi /etc/conf.d/ntp-client # can change the OPTS, change time servers
    /etc/init.d/ntp-client start # start sync
    #rc-update add ntp-client boot # optional
    ntp-client is only a wrapper of ntpdate program. If need to sync automatically, need to start ntpd. Ahh, before setting NTP, check /etc/localtime, if not in the right time zone, copy or link corresponding zone file from /usr/share/zoneinfo/.
  14. (Nov 16,2008) Well, alsa packages(alsa-driver, alsa-lib, alsa-headers, alsa-util) 1.0.18 update is not working and I cannot figure out why, the sound card can not be found. So I downgraded back to 1.0.17, but the alsa-lib remains 1.0.18. And it's back to work! Mask them at once.
xorg-x11 troubleshooting:
  1. "xauth: error in locking authority file /home/usrname/.Xauthority", will result in a dark screen with cursor usable after "startx", but nothing shows up. And the command window keeps prompting:
    xlib: connection to :0.0 refused by X server
    xlib: no specified protocol
    The solution is to use
    xauth -b quit
    to break existing lock, also check the permission of .Xauthority.
  2. ati-drivers
    fglrx(0): incompatible kernel module .......
    update ati-driver, even with the ~ keyword
  3. cannot startx, the error shows
    Synaptics DeviceOn Called
    Can't initialize SocketServer
    Failed to initialize Panel Agent

    It's probably because you have deleted or modified the /tmp directory, please check the permission of this directory, or just do a sudo chmod 777 /tmp.
hibernate troubleshooting:
  1. The Problem: hibernate works under text mode. But under X mode, it resumes at the "Going Atomic" step and gives an error saying
    another suspend already in progress?
  2. The Solution:
    The error in 'Going Atomic' is probably because you need to increase the
    allowance we make for drivers allocating memory during the atomic copy.
    Assuming you're using the hibernate script, this is done by editing
    /etc/hibernate/suspend2.conf. If you cat /sys/power/tuxonice/debug_info
    after an attempt at hibernating, the last line will say something like:

    - Extra pages: 1069/500.

    This means that 1069 pages were needed, but we only allowed for 500. In
    that case, you'd want to add something along the lines of

    ProcSetting extra_pages_allowance 2000

    to /etc/hibernate/suspend2.conf.

    (courtesy from http://lists.tuxonice.net/pipermail/tuxonice-users/2008-February/000202.html)

No comments: