2016年1月29日 星期五
2015年10月29日 星期四
2015年8月3日 星期一
[C社徵才] 熟 Bluetooth 和 Linux 的人
【職務名稱】 未定/可能是 software engineer
【工作內容】 手機和PC上的bluetooth除錯。主要是 bluez 和相關的 profile (如 obex)。
【徵求條件】 熟 bluetooth(必需) 及 bluez(加分) 和 wifi(加分)
【工作地點】 台北101 46F
【薪資範圍】 年新 100 萬以上開始談。
【應徵方式】 resume 寄到 lexicall@gmail.com
2015年2月17日 星期二
2015年2月8日 星期日
2012年4月27日 星期五
2012年4月18日 星期三
亮度熱鍵和消失的OSD
在這個cycle中,Hardware Enablement team 遇到了好幾款筆電的亮度熱鍵 bug;癥狀為亮度調整功能正常,但是亮度的 OSD 卻沒有出現。
看起來是個小 bug,但是因為牽涉到硬體、kernel 驅動程式和gnome之間行為的互動,而成了有點難解的問題。
主要的問題在於對於亮度鍵的行為在不同的硬體上並沒有統一,有些廠牌的筆電會直接送出 scancode,gnome-settings-daemon 收到 keycode 之後會再去對 driver 產生出來的 sysfs backlight 介面做存取,之後再由 driver 負責來調整亮度。gnome-settings-daemon 在收到 keycode 的同時也會產生 libnotify 的 dbus message,而 notify-osd 收到之後負責畫出 OSD。
但在一些其它的筆電,在按下亮度鍵時並不產生 scancode,而是透過 WMI 通知 OS,kernel driver 在收到後必須負責調整亮度。在這樣的情況下因為沒有 scancode 和 keycode,所以 gnome-settings-daemon不 會收到任何通知,所以也沒有 OSD。
當然我們也可以更改 driver 程式碼,讓 driver 在收到 WMI 時也同時產生 keycode,這樣的確可以讓 OSD 正確的出現;但是因為硬體已經調整了亮度,driver 產生的 keycode 會讓亮度再被調整一次,所以導致只按了一次卻調了兩格亮度的 bug。
一個比較好的解決方式是 gnome-settings-daemon 應該使用 uevent 而不是 keycode(至少在Linux平台上),如 Corentin Chary 在Gnome Bug 672380的comment:
Because what not how it *should be done*. Keys are not notifications at all. Keys are emitted if a user press something that should be interpreted by userspace as "in reponse to this key, please adjust the brightness".
In this case, what we get from the hardware is only a brightness change notification, and it's what we will relay to userspace. It's just how the Linux backlight class works. And, really, the OSD should only pop in response to backlight notification, and never in response to keys, keys should only be used to adjust the backlight (which will pop a notification by itself).
2012年1月13日 星期五
Ubuntu Packaging Guide 和 UDD
Ubuntu Packaging Guide 如果只看文章標題和列表的話,表面上似乎和 debian 沒什麼差別。
但是 Ubuntu 現在都是透過 Ubuntu Distributed Development 的模式來開發,所以裡面許多章節都是重寫過的,新增加了 UDD 的部份。
例如 Uploading a package,裡面提到了在 dput 之面必須用 bazzar 在 launchpad 建立一個 branch 之類的新流程。
取得WMI GUID的三個方式
許多筆記型電腦的熱鍵(hotkey)都是透過WMI介面來控制的,常見的如音量大小、亮度,wifi開關等…。
在實作或是debug時,第一步就是必須取得WMI的GUID。在Linux下我所知道的有三種方式可以取得:
方式一:`ls -l /sys/class/wmi`
這種方式只能列出所有由wmi.ko (ACPI-WMI Mapping Driver)得到的GUID,沒有其它如flag的資訊。
方式二:使用 wmidump
wmidump可以列出詳細的wmi資訊,但是用法比較麻煩,必須先dump DSDT,再用文字編輯器把 _WDG 中的資料複製到另一個文字檔案,然後再餵給 wmidump。wmidump也沒在debian/ubuntu archive中,必須自己從上面的git tree clone下來編繹。
方式三:`sudo fwts wmi`
yeah,最簡單的方式,用 Firmware Test Suite (fwts) \o/。可以列出完整的wmi資訊,用法又簡單。
2012年1月12日 星期四
增加fwts的測項
幫fwts增加一個測項十分簡單,十分類似kernel driver的型式。
下面這段簡單的例子是從 http://kernel.ubuntu.com/git?p=hwe/fwts.git;a=blob;f=src/example/blank/blank.c 刪掉一些 comment 而來。
不過如果你真的要開始coding的話,可以直接從 blank.c 開始,裡面有更多詳細的註解。
#include "fwts.h"
static int example_init(fwts_framework *fw) {
}
static int example_deinit(fwts_framework *fw) {
}
static int example_test1(fwts_framework *fw) {
}
static int example_test2(fwts_framework *fw) {
}
static fwts_framework_minor_test example_tests[] = {
{ example_test1, "Example sub test1 name." },
{ example_test2, "Example sub test2 name." },
{ NULL, NULL }
};
static fwts_framework_ops example_ops = {
.description = "Example name.",
.init = example_init,
.deinit = example_deinit,
.minor_tests = example_tests
};
FWTS_REGISTER(example, &example_ops, FWTS_TEST_ANYTIME, FWTS_BATCH);
2012年1月9日 星期一
Firmware Test Suite (fwts): BIOS測試工具
Firmware Test Suite(fwts)是目前Canonical Hardware Enablement team維護的BIOS測試工具。HWE的日常工作常常遇到許多BIOS的bug,所以我們將常見的BIOS bug的測項寫成這個工具。
在這個Ubuntu release cycle,我開始接下fwts套件的維護工作,歡迎大家的使用。 :-)
git tree: http://kernel.ubuntu.com/git?p=hwe/fwts.git
想使用最新版本,也可在firmware testing team PPA安裝。
2011年11月22日 星期二
apport-bug 某個「癥狀」
apport-bug audio --save=audio.apport會出現視窗,問你幾個和這個bug相關的問題。 這些symptom被包含在apport-symptoms套件中,目前只有「audio」、「storage」、「display」、「storage」四種。
2010年11月9日 星期二
Ubuntu和mainline kernel的版號關係
如果只是想查詢Ubuntu kernel某個版號和mainline kernel的對應關係,請見:
http://kernel.ubuntu.com/~kernel-ppa/info/kernel-version-map.html
2010年6月13日 星期日
UDS-M落幕
在這一星期中,會有滿滿的議程用來討論下一版Ubuntu的藍圖(bluesprints),而討論完成的bluesprints會成為下一版Ubuntu的工作項目,會被持續的追踪進度。 :-)
對於kernel team而言,Jeremy Kerr關於device tree的session十分有趣:Device Tree Overview,ALSA System on Chip (SoC) Flattened Device Tree Bindings和Using Device Tree on ARM。
顯示Canonical是很重視ARM的這塊市場的(如新成立的Linaro,Canonical也有參與)。
![]() |
| Canonical Kernel Team / 攝影者 Acelan |
同時UDS也是Ubuntu開發者和社群間彼此討論、交換心得的一個機會,不只是可以和大廳走廊遇到的開發者閒聊,而是有一大堆的community team的session可以參加。只是可惜從沒遇到來自台灣的與會者。希望在下一次UDS-N可以遇到來自台灣社群的人參加。
如果你仔細看UDS的議程的話,會發現這是一個十分忙碌的一週,從早到晚的session、再加上時差、還有語言的隔閡、還要思考,更別提近20小時的飛行時間,每次回來都像是全身精力被抽光的狀態。
不過UDS的確是十分有生產力的一週,下一版Ubuntu的骨架都在這一週內被討論和決定。
2009年8月30日 星期日
2009年6月12日 星期五
My first week in Canonical
Moving from a local company to an international company, my first challenge is that I got to communicate with other guys in English orally. I've never spoken so much English words as I did this week.
My boss Hugh Blemings came from Australia and we attended to the FreedomHEC together. He is nice guy and easy to get along with. I hope that I am able to contribute to the Ubuntu kernel as he expects me to in the kernel team.
The most thrilling to me is that the Platform Team Sprint & Distro Sprint are coming in August and September. I can't wait to meet all other guys for so many interesting topics.



