[Gentoo] X201 Black Screen Solution

Friday, October 29, 2010
0 意見
According to my experiments, while using kernel version between 2.6.32-gentoo-r10 and 2.6.35-gentoo-r9, my Thinkpad X201 always got a black screen, but by applying the following patch, I can boot into framebuffer console with KMS(Kernel ModSetting) on.
  1. Under $KERNEL_ROOT/drivers/gpu/drm/i915/intel_display.c
  2. 858 intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    859 int target, int refclk, intel_clock_t *best_clock)
    860 {
    861 struct drm_device *dev = crtc->dev;
    862 struct drm_i915_private *dev_priv = dev->dev_private;
    863 intel_clock_t clock;
    864 int max_n;
    865 bool found;
    866 /* approximately equals target * 0.00585 */
    867 int err_most = (target >> 8) + (target >> 9)
    868 // patch for KMS black screen
    869 err_most += 50;
    870 found = false;

But now, this bug/issue seems to be fixed in kernel version 2.6.36, I just emerge the gentoo-sources-2.6.36 without applying above patch, and it works.

Keywords: ThinkPad, X201, Gentoo, Black Screen, KMS

[Gentoo] iBus broke Konsole "Ctrl+Shift+C/V"

Tuesday, August 24, 2010
0 意見
Situation:

After I upgrade my iBus to v1.3.7,the hotkey "Ctrl+Shift+C"(Copy) and "Ctrl+Shift+C"(Paste) in Konsole was broken. For example, I selected something in Konsole and pressed "Ctrl+Shift+C", and then switched the input focus to Chromium search bar and pressed "Ctrl+V", NOTHING pasted!

Enviroment:

gentoo-sources: 2.6.32-gentoo-r10 x86_64
kdebase-meta: 4.4.4
qt-core: 4.6.3
ibus: 1.3.7

Solution:

After trying few old version of ibus, I found the v1.3.4 works. I guess there might be something wrong with the "key-snooper" function, because ibus releases that came without "key-snooper" function enabled could work in my Gentoo box; however, I didn't spend much time on debugging this.
The following are just steps for a temporarily workaround:

  1. Download ibus-1.3.4.tar.gz from Google iBus Project.
  2. $ sudo cp ibus-1.3.4.tar.gz /usr/portage/distfiles
  3. $ cd /usr/portage/app-i18n/ibus/
  4. $ sudo cp ibus-1.3.7.ebuild ibus-1.3.4.ebuild
  5. $ sudo ebuild ibus-1.3.4.ebuild digest
  6. $ sudo ebuild ibus-1.3.4.ebuild merge

By using ebuild to install packages, we can still benefit from portage management (unmerge, gentoolkit…etc).

P.S.:

In the past, I usually put xx-input under /etc/X11/xinitrc/xinitrc.d/, but now I moved those variables settings to ~/.xprofile as suggestion during ibus installation.

export XMODIFIERS="@im=ibus"
export GTK_IM_MODULE="ibus"
export QT_IM_MODULE="xim"
ibus-daemon -d -x

Keywords: ibus, Gentoo, Copy&Paste Broken

[Gentoo] Trackpoint under Xorg-1.8

Friday, June 11, 2010
0 意見
環境:ThinkPad X201

Xorg1.8中多了udev support,原本透過HAL來config(/etc/hal/fdi/policy/)的Keyboard & mouse等
現在搬到/etc/X11/xorg.conf.d。(Ubuntu: /usr/share/X11/xorg.conf.d/)

為了讓Trackpoint可以動,在/etc/X11/xorg.conf.d新增20-trackpoint.conf,內容如下:

Section "InputClass"
Identifier "thinkpad_trackpoint_wheel_emu"
MatchIsPointer "on"
MatchProduct "TrackPoint"
Driver "evdev"
Option "EmulateWheelButton" "2"
Option "EmulateWheel" "on"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
Option "ZAxisMapping" "4 5 6 7"
Option "Emulate3Buttons" "on"
EndSection

重新啟動X Server就搞定了。