Month: August 2012

  • Setting Up Linux Mint on Fujitsu LH772

    Recently, I bought a new notebook from Fujitsu, the LH772. Before the purchase, I tested that Ubuntu 12.04 supports the computer’s function keys (mostly brightness and volume control), sound card and speakers. I decided to install Linux on it. There are a few problems, mostly regarding display card and wireless network, but I somehow am convinced that I can fix them or, at the least, work around them. This is the result of my research and journey.

    The on-board hard disk drive is preloaded with an OEM Windows 7 installer. I don’t want the Windows 7, mess up the boot loader or get caught installing a non-verified OS and void the warranty. So, I remove the drive and bought an SSD. The drive cover is secured by only two screws, the drive itself another two. Changing drive is very easy on the LH772.

    Original hard disk drive
    I heard you will install Windows on first boot. I won’t let you.

    SSD speed test
    555 MiB/s, about 10 times of what ordinary hard disk drives can achieve. I am impressed. SSDs’ performance varies greatly among different data and usage conditions. Reviews and benchmarks has shown that SP900′s read performance is between… 50MiB/s to 530 MiB/s.

    Wireless network card does not work out of the box. If that is your only way to the internet, feel free to jump to the section about wireless network.

    Display Card (NVIDIA GT640M LE)

    The notebook features an NVIDIA GT640M LE display card, which “supports” Optimus Technology[Wikipedia], a hybrid display and power-saving solution developed by NVIDIA. Essentially, Optimus turns off the discrete display card when you don’t need the processing power. Key benefits of using Optimus, according to NVIDIA, is:

    • completely automatic allowing you to experience longer battery life and amazing visuals without having to manually change settings;
    • behind the scenes and with no interference to what you’re doing, Optimus seamlessly figures out how to best optimize your notebook computing experience.

    The caveat is, the “automatic” and “no interference” part comes only if you are using Windows 7. If you look at the Wikipedia article, you will notice there is no Optimus support under Linux. That is, your discrete NVIDIA display card will run at full speed, draining battery life and overheating your computer. Ironically, at this stage, you cannot use the discrete card, even if you have driver installed.

    NVIDIA. Damn. You.

    So, if even official driver cannot help you, who can? The legendary Linux community. Introduce the Bumblebee Project, “a project aiming to support NVIDIA Optimus technology under Linux,” as stated by the website.

    Ubuntu has a ppa for Bumblebee. This simplifies installation a lot. However, I don’t like the Unity interface and where Ubuntu is going; that’s why I turn to Linux Mint, “Ubuntu done right” deemed by many. I was a Linux Mint Debian Edition (LMDE) user, but I failed to install Bumblebee on an older computer. I might try that again later.

    To get Bumblebee work on Linux Mint 13 Maya, we need to add the ppa into repository. Open a terminal and type
    sudo add-apt-repository ppa:bumblebee/stable

    GT640M LT works only on the official driver version 304 (some say 302) or above, which is not provided by the default repositories, so we need to add another ppa
    sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

    If you did not add the x-swat ppa and got the wrong driver, just first uninstall everything about NVIDIA or Bumblebee: i.e. nvidia-settings, nvidia, nvidia-current, bumblebee and bumblebee-nvidia. bbswitch-dkms can stay as it doesn’t depend on driver.

    Then, install the package bumblebee. apt-get will get all the dependencies for you.

    If the NVIDIA driver changes your X server settings and mess up your resolution, just delete /etc/X11/xorg.conf (or, to be save, just rename it). Modern display drivers and X server don’t need the file.

    Now if you try to turn on the discrete card by, like,optirun glxspheres
    you might get an error message like this:[ 34.776889] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver

    [ 34.776919] [ERROR]Aborting because fallback start is disabled.

    That’s because a setting in bumblebee is wrong. Edit /etc/bumblebee/bumblebee.conf
    sudo nano /etc/bumblebee/bumblebee.confChange the line Driver= to Driver=nvidiaand in the section [driver-nvidia] change the lineKernelDriver=nvidia-currenttoKernelDriver=nvidiaAfter a reboot, optiun should work.

    Wireless LAN Card (Ralink RT3290 PCIe)

    Compared to display card, getting Wifi to work is much simpler. No, it’s not.

    Linux does not come with a driver for this wireless LAN card, so we have to *gasp* build it from source.

    First, download the driver from Ralink. If you don’t want to tell them your e-mail address, just type a@a.a like I did.

    Decompress the archive file to, say, ~/wireless_driver
    tar -xf //2012_0508_RT3290_Linux_STA_v2.6.0.0.bz2 ~/wireless_driver

    Before we can build the driver, we have to make a few changes to the source files.

    Open ~/wireless_driver/os/linux/config.mk

    Change line 27 fromHAS_NATIVE_WPA_SUPPLICANT_SUPPORT=nto HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

    Some say this will not change the compilation, but I did not test what will happen if it is leaved untouched as n.

    In the same file, delete or comment out -DDBG on line 206. This will turn off debug mode. If debug mode is on, the driver will constantly display garbage message on dmesg, hiding real important information and messages. I have no idea why anyone will ship a driver with debug mode on as default.

    Apparently, the developers have not tested how normal users use a driver. With -DDBG flag removed, the source will not compile. What we need to do is open ~/wireless_driver/sta/sta_cfg.c and delete line 4674#endif /* DBG */ and line 4080#ifdef DBGto get the function definitions out of the ifdef block.

    Now the source is ready. Change to the directory of the source in case you are not in the in already:cd ~/wireless_driverIf you have install this driver previously, clean the compiled and installed files before re-installation:sudo make uninstall
    sudo make clean
    Compile and install:sudo make
    sudo make install

    The driver should start automatically when the computer restarts.

    IBus

    As a daily Chinese user, I need a Chinese input method. I have been using IBus since Ubuntu introduce it at version… (I have to check it) 9.10. IBus works flawlessly once installed, except for Skype. The reason is that Skype uses QT4 library, but a normal installation of IBus on Mint doesn’t include bindings (package ibus-qt4) for it. Start ibus (with its XIM server) by ibus-daemon -xEverything should work. If not, change the lineXIM=toXIM=ibusin the file /etc/X11/xinit/xinput/default
    Someone said that other files and options need to be set, but this is the one that did the magic for me.

    Unresolved Problems

    My Logitech M570 wireless trackball uses Logitech’s Unifying receiver. If the computer boots with the receiver plugged in, the mouse will not work. Re-plugging sometimes help, removing then re-adding the hid_logitech_dj module using modprobe sometimes help. Nothing is clear to me now.

    Function keys stop working after suspend. But if you have an SSD like I do, rebooting the computer takes only half a minute. So luckily it’s not that big an issue.

    Bluetooth is nowhere to be found except in lshw and lspci.

    Sound level / mute setting and brightness setting usually won’t survive a reboot.

    The slowest mouse speed is still too fast for my 3500 dpi Razer DeathAdder.

    Cinnamon is unstable with Hot corner enabled, particularly when scrolling fast in Firefox.

    Update (29-8-2012)

    I’m glad I have written this article. My SSD died just one day after I set everything up.

  • 執膠粒

    今個星期係海灘清潔周;歡迎大家帶齊工具、扶老攜幼,到各大海灘幫手,一盡公民責任。

    實情係,清潔海灘同今個星期無關。相信有看新聞的你一定知道,不過我循例都解釋一下。

    事情要講回上個月尾。颱風韋森特襲港,將一艘貨船上六個貨櫃吹跌落海。貨櫃內藏塑膠原材料,聚丙烯 (polypropylene, PP) 粒。好不幸地,貨櫃落海時有所損毀,導致大量膠粒流入海中。

    待續

    連結:

    Plastic Disaster – Hong Kong (Vimeo)

    香港膠粒大災難 Hong Kong’s Plastic Disaster (中文字幕) (YouTube)

    Plastic Disaster – Hong Kong (Facebook page)

    Plastic Disaster (Google Map)

    香港膠災

    清膠指南

    [[ [ [ 執膠行動資訊集中區 ] ] ]]] (香港高登討論區)