tag:blogger.com,1999:blog-71219395161131921482024-03-14T17:46:52.424+08:00碎金Keng-Yu Lin's Blog /
林耕宇的網誌Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.comBlogger54125tag:blogger.com,1999:blog-7121939516113192148.post-31245499755659117062018-04-27T03:37:00.001+08:002018-04-27T03:46:41.126+08:00Seagate Seatools 4 DOS 的 USB dd 檔Seagate 只有提供 ISO。非 hybrid ISO,所以只有真的燒成光碟才能用。<br />
我做了一個 USB 的 dd 檔。直接 dd 進 USB 隨身碟再它來開機就可進 SeaTools4DOS。 <br />
<br />
下載位置:<a href="https://drive.google.com/file/d/1-8vJEH7nLs0RzUkP4t2OVrU7uSMk87Tt/view?usp=sharing" rel="nofollow" target="_blank">Seatools4DOS.20180427.usb.dd.lzma</a><br />
<br />
P.S. 請在 BIOS 中將 SATA 模式從 AHCI 改為 IDE。這樣 Seatools 4 DOS 才認得到硬碟。Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-67287189090771511372017-07-04T22:36:00.003+08:002018-05-12T03:08:48.239+08:00用 caff + gmail 簽署別人的金鑰雖然已經簽了很多次,但時隔太久,沒想到還是忘光了。還是寫在 blog 作個紀錄。<br />
<br />
先安裝 caff:<br />
<pre><code class="bash">$ sudo apt install caff
</code></pre><br />
caff 應該會自己把你系統上已有的 GPG key 寫在 ~/.caffrc,確認一下有沒有舊的或 revoke 的 key。加入自己的姓名和 Email。為了使用 msmtp,所以加入下面這行:<br />
<pre><code class="bash">$ENV{'PERL_MAILERS'} = 'sendmail:/usr/bin/msmtp';
</code></pre><br />
接下來,按照 <a href="https://support.google.com/mail/answer/185833?hl=zh-Hant">Google 的說明網頁</a>產生一組應用程式密碼。必須要先打開兩階段驗證才能產生應用程式密碼。 然後安裝 msmtp-mta:<br />
<pre><code class="bash">$ sudo apt install msmtp-mta
</code></pre><br />
然後 ~/.msmtprc 的設定如下: <br />
<pre><code class="apache">account gmail
host smtp.gmail.com
port 587
auth on
protocol smtp
tls on
tls_certcheck off
domain lexical.tw #代換成你的 Email domain
from kengyu@lexical.tw #代換成你的 Email
user kengyu@lexical.tw #代換成你的 Email
password 你的應用程式密碼
syslog LOG_MAIL
account default: gmail
</code></pre><br />
接下來就用 <span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">gpg --recv-keys KEY_ID</span>,把你想簽的人的 Key 抓下來,然後確認一下 fingerprint 正不正確。如果沒問題就可以簽署: <br />
<pre><code class="bash">$ caff KEY_ID
</code></pre><br />
因為我們前面已經把 .msmtprc 和 .caffrc 設定好了,簽過的 key 會直接寄給那個人的 Emails。<br />
<br />
Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-79312638284596123402016-06-14T19:14:00.000+08:002017-05-23T19:15:20.961+08:00新公司 HPE 報到!<div class="separator" style="clear: both; text-align: left;">
真不好意思,剛到新公司沒多久就送我一個新背包。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_uUNczMWGfAY5Cs_OvQKXvufjwG-qWSZ3fPxZwaruo0tIwjQP7VLEP3HOI4ZT30FqEhJ8lYvHHns1UXRhSKnxxxen6xcfoQBq4s2dQyFcVaFOQi-ecd_avO4HFFsGDxLDlK5Amiezb0Ix/s1600/20160614_111301.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_uUNczMWGfAY5Cs_OvQKXvufjwG-qWSZ3fPxZwaruo0tIwjQP7VLEP3HOI4ZT30FqEhJ8lYvHHns1UXRhSKnxxxen6xcfoQBq4s2dQyFcVaFOQi-ecd_avO4HFFsGDxLDlK5Amiezb0Ix/s640/20160614_111301.jpg" width="360" /></a></div>
<br />Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-69648295895467291002016-01-29T18:58:00.000+08:002017-05-23T19:01:22.366+08:002016 Canonical 尾牙<div class="separator" style="clear: both; text-align: left;">
再會啦!大家。今天是尾牙也是我的最後一天上班日。大家後會有期了。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwYk1jUnVS7rXztOlDeq_F81_l8IyvfaTVj7WDweKss-andYfk7pjLmyukP-VHa65k-PAqfttZ2Ll6BewC9MTtCQVmUcJPTLXO9snC-W7E0xWCU3XHLnFAQE5odN0RHrwnUipURUnwD4Q9/s1600/DSC_4137_%25E5%25B7%25B2%25E4%25BF%25AE%25E6%2594%25B9.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="420" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwYk1jUnVS7rXztOlDeq_F81_l8IyvfaTVj7WDweKss-andYfk7pjLmyukP-VHa65k-PAqfttZ2Ll6BewC9MTtCQVmUcJPTLXO9snC-W7E0xWCU3XHLnFAQE5odN0RHrwnUipURUnwD4Q9/s640/DSC_4137_%25E5%25B7%25B2%25E4%25BF%25AE%25E6%2594%25B9.JPG" width="640" /></a></div>
<br />Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-86467686621506643692015-10-29T21:15:00.000+08:002015-10-29T21:15:54.346+08:00祝福伯符和琬晴天下無不散的筵席。很高興在幾十年的人生中、大家有幸能在同家公司共事了好幾年。也祝伯符和 Tammy 都能追尋到自己的夢想…<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikC3f0Lrwn7szNOIKUgAchxm-kjsOSIJ01m4kxzP-V1FnJUlcZMt44Na3q-Z42Az_cR4SwvpE0SYVhIj4gZ-GGYSDGwZhB465Pi6LKvN2OL5L_j-rp17Vb1oeoIGW0_YSYMbcEuDtOWaY_/s1600/20151029_145617.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikC3f0Lrwn7szNOIKUgAchxm-kjsOSIJ01m4kxzP-V1FnJUlcZMt44Na3q-Z42Az_cR4SwvpE0SYVhIj4gZ-GGYSDGwZhB465Pi6LKvN2OL5L_j-rp17Vb1oeoIGW0_YSYMbcEuDtOWaY_/s640/20151029_145617.jpg" /></a></div>
<br />
琬晴、孟修、建玎、伯符、文謙、耕宇、大大Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com2台灣臺北25.0329694 121.5654177000000124.5725269 120.91997070000001 25.493411899999998 122.21086470000002tag:blogger.com,1999:blog-7121939516113192148.post-55380391583886763202015-08-03T22:55:00.000+08:002015-08-03T22:55:21.284+08:00[C社徵才] 熟 Bluetooth 和 Linux 的人【公司名稱】 Canonical (Ubuntu 的母公司)<br />
【職務名稱】 未定/可能是 software engineer<br />
【工作內容】 手機和PC上的bluetooth除錯。主要是 bluez 和相關的 profile (如 obex)。<br />
<br />
【徵求條件】 熟 bluetooth(必需) 及 bluez(加分) 和 wifi(加分)<br />
【工作地點】 台北101 46F<br />
【薪資範圍】 年新 100 萬以上開始談。<br />
【應徵方式】 resume 寄到 lexicall@gmail.comKeng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-85479890202041849532015-03-03T18:52:00.000+08:002015-03-03T18:52:25.974+08:00Gamma Radio 0.1-2 釋出<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx__A1qLCrASFycvqIPN9rLszE05JNbzuaVoN64qCqJ_pKNypGJvzF2Iqk3_yAaF9KWinyYQWisFo_Gd1uAc4zMyRaQuAIo9-h3Si6Yikf6Lno7oGIvcZmR__rnXXb6o_NP3kf6JoK4Ys-/s1600/gammaradio.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx__A1qLCrASFycvqIPN9rLszE05JNbzuaVoN64qCqJ_pKNypGJvzF2Iqk3_yAaF9KWinyYQWisFo_Gd1uAc4zMyRaQuAIo9-h3Si6Yikf6Lno7oGIvcZmR__rnXXb6o_NP3kf6JoK4Ys-/s400/gammaradio.png" /></a></div><br />
可在這個 PPA <a href="https://launchpad.net/~lexical/+archive/ubuntu/gammaradio">https://launchpad.net/~lexical/+archive/ubuntu/gammaradio</a> 下載。Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-87657744705986967692015-02-17T17:33:00.000+08:002015-02-17T17:33:25.901+08:00Canonical 台北 Office<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvipfo60f5zU37vQHPqZYj4EkQ9oS62raSwUh881Iunpx92r-Kpx1E1HKck_PbQ6xZhpI-GVUkkD3eVr7-ssFUFxPmBeVMg9iww937aihwfYEJpogVwpD3ODOw0azI3JOtdroXcnMxEwkv/s1600/11002696_10152816800587585_5513700492188224358_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvipfo60f5zU37vQHPqZYj4EkQ9oS62raSwUh881Iunpx92r-Kpx1E1HKck_PbQ6xZhpI-GVUkkD3eVr7-ssFUFxPmBeVMg9iww937aihwfYEJpogVwpD3ODOw0azI3JOtdroXcnMxEwkv/s640/11002696_10152816800587585_5513700492188224358_o.jpg" /></a></div><br />
-- 活動 Kevin Huang 歡送會 @ 隨意吧 2015Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-10510707595422433562015-02-08T22:59:00.001+08:002015-02-08T22:59:22.238+08:00Canonical Hardware Enablement team, 2015<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0oxzVhFsILXCzaugBUYWEHAIY0CmNHh3bMapI-zAbSTakL2_5OAo-EfBLNI5qGFHhja71tTrb9Gk7IyP9EN6O7pWhWGwMGz9kxqHfZfzVhW9zW-g7J0OGm5l7RHwKgQYqAWXEUZC_gqY/s1600/DSC_2414m.JPG" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0oxzVhFsILXCzaugBUYWEHAIY0CmNHh3bMapI-zAbSTakL2_5OAo-EfBLNI5qGFHhja71tTrb9Gk7IyP9EN6O7pWhWGwMGz9kxqHfZfzVhW9zW-g7J0OGm5l7RHwKgQYqAWXEUZC_gqY/s640/DSC_2414m.JPG" /></a><br />
<br />
-- 活動 HWE Sprint、攝於 Canonical Lexington Office, MA Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-50830948484270752582014-12-05T18:27:00.000+08:002014-12-05T18:27:17.231+08:00Gamma Radio 第一版釋出一個收聽 HiChannel 廣播的小程式。<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpOqxt7Ao_BOxQxEWRL09nNrGA7ovVJ0RnLingx7DjhUyMyCnKXnTZ8OR6Fv1USLUa9ag0oM2_28VTrzGA4HDnfFtgXjsPP6LRFigaVorC3_sgyXTSTTm2aofahJ7x3Rk_x_z22UlLYvk2/s1600/2014-12-05+18:22:21+%E7%9A%84%E8%9E%A2%E5%B9%95%E6%93%B7%E5%9C%96.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpOqxt7Ao_BOxQxEWRL09nNrGA7ovVJ0RnLingx7DjhUyMyCnKXnTZ8OR6Fv1USLUa9ag0oM2_28VTrzGA4HDnfFtgXjsPP6LRFigaVorC3_sgyXTSTTm2aofahJ7x3Rk_x_z22UlLYvk2/s320/2014-12-05+18:22:21+%E7%9A%84%E8%9E%A2%E5%B9%95%E6%93%B7%E5%9C%96.png" /></a><br />
<br />
PPA: <a href="https://launchpad.net/~lexical/+archive/ubuntu/gammaradio/">https://launchpad.net/~lexical/+archive/ubuntu/gammaradio/</a><br />
原始碼: <a href="https://github.com/lexical/gammaradio">https://github.com/lexical/gammaradio</a>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-85004245750115879982014-03-20T20:43:00.000+08:002014-03-20T20:43:36.588+08:00反服貿訊息蒐集<a href="http://wiki.lexical.tw/318:home">直播網址蒐集,訊息蒐集,有用的資訊蒐集。</a><br />
<br />
<a href="http://wiki.lexical.tw/318:home">http://wiki.lexical.tw/318:home</a>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-29494999309827180282012-06-11T10:24:00.000+08:002012-06-11T10:24:05.589+08:00在 Ubuntu 上執行 Diablo 3 (暗黑破壞神)<p>首先我的顯示卡是 AMD Radeon HD7750,可惜這麼新的硬體在 Ubuntu 中的支援一向不是很好。</P>
<table style="width:auto;"><tr><td><a href="https://picasaweb.google.com/lh/photo/jR_tYoY3x21ZZHPtHhPlLNMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img src="https://lh3.googleusercontent.com/-O-8hf8-Zn90/T9VOoeME30I/AAAAAAAAD_4/-8Ud03fhekg/s400/IMG_20120608_202904.jpg" height="299" width="400" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right"></td></tr></table>
<p>所以需要 <a href="http://support.amd.com/us/kbarticles/Pages/AMDCatalyst126beta.aspx">AMD Catalyst™ 12.6 Beta Driver (fglrx 8.980)</a>,<a href="http://www2.ati.com/drivers/hotfix/catalyst_12.6_hotfixes/amd-driver-installer-8.98-x86.x86_64.zip">Linux 版驅動程式下載位置</a>。</P>
<p>下載下來解壓縮,再將它轉成 .deb 套件,再安裝。</P>
<pre class="brush: bash;">
./amd-driver-installer-8.98-x86.x86_64.run --buildpkg Ubuntu/precise
sudo dpkg -i fglrx-amdcccle_8.980-0ubuntu1_amd64.deb fglrx_8.980-0ubuntu1_amd64.deb
</pre>
<table style="width:auto;"><tr><td><a href="https://picasaweb.google.com/lh/photo/SzgMWIjAD-yZI8ThdnjCM9MTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img src="https://lh6.googleusercontent.com/-XfFqycH1s8Q/T9VQMO0MJ-I/AAAAAAAAEAA/rZA6Lt453Cs/s400/IMG_20120610_171538.jpg" height="400" width="299" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right"></td></tr></table>
<p>接下來要為 wine apply 幾個給 Diablo 3 用的 patch;還有一個為了 HD7750 我寫的 patch;因為我也有玩 WoW,所以也加了一個魔獸的 patch。</p>
<p>PPA下載位置: <a href="https://launchpad.net/~lexical/+archive/diablo3">https://launchpad.net/~lexical/+archive/diablo3</a> </p>
<p>直接裝應該就可以。接下來再用下列的 script 來啟動。因為我是用 playonline 做出來的 prefix,請自行代換。<p>
<pre class="brush: bash;">
#!/bin/sh
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
WINEPREFIX=~/.PlayOnLinux/wineprefix/DiabloIII/ WINENOPULSE=1 force_s3tc_enable=true taskset -c 0-1 setarch i386 -3 wine ~/.PlayOnLinux/wineprefix/DiabloIII/drive_c/Program\ Files/Diablo\ III/Diablo\ III -launch -opengl -w
</pre>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-56601965102676321572012-04-27T11:27:00.000+08:002012-04-27T11:27:15.789+08:00fwts 0.25.01版釋出<p>重要更新:<br/>
<ul>
<li>新版的ACPICA</li>
<li>修正 _WDG 的parsing錯誤</li>
</ul>
</p>
<p>
下載位置:<br/>
<ul>
<li>PPA: <a href="https://launchpad.net/~firmware-testing-team/+archive/ppa-fwts-devel">https://launchpad.net/~firmware-testing-team/+archive/ppa-fwts-devel</a></li>
<li>tarball: <a href="https://launchpad.net/~firmware-testing-team/+archive/ppa-fwts-devel/+files/fwts_0.25.01.tar.gz">https://launchpad.net/~firmware-testing-team/+archive/ppa-fwts-devel/+files/fwts_0.25.01.tar.gz</a></li>
<li>fwts-live: <a href="http://odm.ubuntu.com/fwts-live/images/">http://odm.ubuntu.com/fwts-live/images/</a> (<a href="https://wiki.ubuntu.com/HardwareEnablementTeam/Documentation/FirmwareTestSuiteLive">用法介紹</a>)
</ul>
</p>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-44866035123420582712012-04-18T18:22:00.001+08:002012-04-18T18:22:51.351+08:00亮度熱鍵和消失的OSD<p>在這個cycle中,<a href="https://launchpad.net/~canonical-hwe-team">Hardware Enablement team</a> 遇到了好幾款筆電的亮度熱鍵 bug;癥狀為亮度調整功能正常,但是亮度的 OSD 卻沒有出現。</p>
<p>看起來是個小 bug,但是因為牽涉到硬體、kernel 驅動程式和gnome之間行為的互動,而成了有點難解的問題。</p>
<p>主要的問題在於對於亮度鍵的行為在不同的硬體上並沒有統一,有些廠牌的筆電會直接送出 scancode,gnome-settings-daemon 收到 keycode 之後會再去對 driver 產生出來的 sysfs backlight 介面做存取,之後再由 driver 負責來調整亮度。gnome-settings-daemon 在收到 keycode 的同時也會產生 libnotify 的 dbus message,而 notify-osd 收到之後負責畫出 OSD。</p>
<p>但在一些其它的筆電,在按下亮度鍵時並不產生 scancode,而是透過 <a href="http://en.wikipedia.org/wiki/Windows_Management_Instrumentation">WMI</a> 通知 OS,kernel driver 在收到後必須負責調整亮度。在這樣的情況下因為沒有 scancode 和 keycode,所以 gnome-settings-daemon不 會收到任何通知,所以也沒有 OSD。</p>
<p>當然我們也可以更改 driver 程式碼,讓 driver 在收到 WMI 時也同時產生 keycode,這樣的確可以讓 OSD 正確的出現;但是因為硬體已經調整了亮度,driver 產生的 keycode 會讓亮度再被調整一次,所以導致只按了一次卻調了兩格亮度的 bug。</p>
<p>一個比較好的解決方式是 gnome-settings-daemon 應該使用 uevent 而不是 keycode(至少在Linux平台上),如 Corentin Chary 在<a href="https://bugzilla.gnome.org/show_bug.cgi?id=672380#c6">Gnome Bug 672380</a>的comment:</p>
<blockquote><p>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".</p>
<p>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).</p></blockquote>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-67601837710700455492012-01-13T16:43:00.001+08:002012-02-22T22:59:00.630+08:00Ubuntu Packaging Guide 和 UDD<p><a href="http://developer.ubuntu.com/packaging/html/">Ubuntu Packaging Guide</a> 如果只看文章標題和列表的話,表面上似乎和 debian 沒什麼差別。</p>
<p>但是 Ubuntu 現在都是透過 <a href="http://developer.ubuntu.com/packaging/html/udd-intro.html">Ubuntu Distributed Development</a> 的模式來開發,所以裡面許多章節都是重寫過的,新增加了 UDD 的部份。</p>
<p>例如 <a href="http://developer.ubuntu.com/packaging/html/udd-uploading.html">Uploading a package</a>,裡面提到了在 dput 之面必須用 bazzar 在 launchpad 建立一個 branch 之類的新流程。</p>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-4826663751056085402012-01-13T05:38:00.000+08:002012-01-13T05:39:43.321+08:00取得WMI GUID的三個方式<p>許多筆記型電腦的熱鍵(hotkey)都是透過WMI介面來控制的,常見的如音量大小、亮度,wifi開關等…。</p>
<p>在實作或是debug時,第一步就是必須取得WMI的GUID。在Linux下我所知道的有三種方式可以取得:</p>
<p>方式一:`ls -l /sys/class/wmi`</p>
<p>這種方式只能列出所有由wmi.ko (ACPI-WMI Mapping Driver)得到的GUID,沒有其它如flag的資訊。</p>
<p>方式二:使用 <a href="https://github.com/iksaif/wmidump/blob/master/README">wmidump</a></p>
<p>wmidump可以列出詳細的wmi資訊,但是用法比較麻煩,必須先dump DSDT,再用文字編輯器把 _WDG 中的資料複製到另一個文字檔案,然後再餵給 wmidump。wmidump也沒在debian/ubuntu archive中,必須自己從上面的git tree clone下來編繹。</p>
<p>方式三:`sudo fwts wmi`</p>
<p>yeah,最簡單的方式,用 Firmware Test Suite (fwts) \o/。可以列出完整的wmi資訊,用法又簡單。</p>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-76277096416658966242012-01-12T17:45:00.000+08:002012-01-12T17:45:07.684+08:00增加fwts的測項<p>幫fwts增加一個測項十分簡單,十分類似kernel driver的型式。</p>
<p>下面這段簡單的例子是從 <a href="http://http://kernel.ubuntu.com/git?p=hwe/fwts.git;a=blob;f=src/example/blank/blank.c">http://kernel.ubuntu.com/git?p=hwe/fwts.git;a=blob;f=src/example/blank/blank.c</a> 刪掉一些 comment 而來。</p>
<p>不過如果你真的要開始coding的話,可以直接從 blank.c 開始,裡面有更多詳細的註解。</p>
<pre class="brush: cpp;">
#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);
</pre>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-74452030675864574262012-01-09T21:58:00.000+08:002012-01-09T21:58:37.476+08:00Firmware Test Suite (fwts): BIOS測試工具<p><a href="https://launchpad.net/ubuntu/+source/fwts">Firmware Test Suite(fwts)</a>是目前<a href="https://launchpad.net/~canonical-hwe-team">Canonical Hardware Enablement team</a>維護的BIOS測試工具。HWE的日常工作常常遇到許多BIOS的bug,所以我們將常見的BIOS bug的測項寫成這個工具。</P>
<p>在這個Ubuntu release cycle,我開始接下fwts套件的維護工作,歡迎大家的使用。 :-)</P>
<p>git tree: <a href="http://kernel.ubuntu.com/git?p=hwe/fwts.git">http://kernel.ubuntu.com/git?p=hwe/fwts.git</a></P>
<p>想使用最新版本,也可在<a href="https://launchpad.net/~firmware-testing-team">firmware testing team PPA</a>安裝。</P>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-48248026528673174282011-12-29T01:22:00.000+08:002011-12-31T18:00:54.543+08:00從人口統計看青貧族<p>台灣產業外流也許是目前年輕人失業率高的原因之一,但也許台灣目前的人口分布也是影響的因素之一。</p>
<p>30到35歲是一個區間是台灣人口最多的一個區間,有近百萬人。</p>
<p>接下來是25到29歲這個區間,為第二多。</p>
<p><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdoPsMy0Iu5rbpKwoF87RMhrcEGuBotn86So0wYeznbugyr0xTKNAyUS84FOrrRe-lTeaXLCIUFebPM90eSq6eK68Hw2C1ISoABOm8ujuWGJaHnx7mc4w8dTzCLyPFMHF6MNRs96m1z5at/s1600/tw_population.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="400" width="303" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdoPsMy0Iu5rbpKwoF87RMhrcEGuBotn86So0wYeznbugyr0xTKNAyUS84FOrrRe-lTeaXLCIUFebPM90eSq6eK68Hw2C1ISoABOm8ujuWGJaHnx7mc4w8dTzCLyPFMHF6MNRs96m1z5at/s400/tw_population.png" /></a></div></p>
<p>這表示這個世代的年輕人比其它世代面臨更多同輩的竸爭。純以人口數來看的話,比上一個世代約多了10%的競爭。</p>
<p>而接下來馬上要出社會的這個世代(20-24歲),比30-34歲這個世代少了近20%的人口。</p>
<p>根據2010年的人口普查,目前5-9歲這個世代只有60萬,只有30-34歲這個世代的60%。</p>
<p>15~20年後台灣將面臨嚴重的勞動力不足問題,而且可能會越來越嚴重。</p>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-80917941497991549832011-12-15T19:53:00.000+08:002011-12-15T19:53:59.968+08:00Ubuntu Hardware Summit 2011<p>今年的<a href="http://blog.canonical.com/2011/11/15/ubuntu-hardware-summit-2011-on-december-8th-in-taipei/">Ubuntu Hardware Summit (UHS)</a> 的<a href="http://odm.ubuntu.com/uhs/2011/">投影片已經可以下載</a>。</p>
<p>今年也發送了一本關於<a href="http://odm.ubuntu.com/uhs/2011/Ubuntu-Debugging_A5-booklet.pdf">常用的debug技巧的小書</a>給大家。</p>
<p><a href="http://odm.ubuntu.com">http://odm.ubuntu.com</a>是Canonical Hardware Enablement team (我目前所在的部門)維護的公開網站。在<a href="http://odm.ubuntu.com/uhs/2011/Upstreaming%20Enablement%20and%20components.pdf">這篇投影片</a>中蠻詳細說明了本部門在Ubuntu開發中的角色:</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0tePT3E-g5Fwt6N17xoBRQ2rbKLD_lbYv4bXWTmdxlQ9W3PgrfEmVWZ8Pxp-UYgfDOB0SSwBrE3wSrQ3bvltKpDiYy7pHdmdf_QRRun4WpC34BzZZdfYqxpV8i7rGhSCGu8OIDV6t_4RR/s1600/%25E6%2593%25B7%25E5%258F%2596%25E9%2581%25B8%25E5%258F%2596%25E5%258D%2580%25E5%259F%259F_001.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="265" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0tePT3E-g5Fwt6N17xoBRQ2rbKLD_lbYv4bXWTmdxlQ9W3PgrfEmVWZ8Pxp-UYgfDOB0SSwBrE3wSrQ3bvltKpDiYy7pHdmdf_QRRun4WpC34BzZZdfYqxpV8i7rGhSCGu8OIDV6t_4RR/s400/%25E6%2593%25B7%25E5%258F%2596%25E9%2581%25B8%25E5%258F%2596%25E5%258D%2580%25E5%259F%259F_001.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDCme1WbdN7_msMXHRdKpV1NxkhsVcw64BhWYJ0gZs5xkmvvVN-G8eqoe-JtBZjQbiwHGFfmbYcZ5OqmExrNdkTxBntzj8FlNqJ9a_pIsI4Zo9Mep1HDLzY9-6QjEVkPz-OnYBE-lugMtW/s1600/%25E6%2593%25B7%25E5%258F%2596%25E9%2581%25B8%25E5%258F%2596%25E5%258D%2580%25E5%259F%259F_002.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="235" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDCme1WbdN7_msMXHRdKpV1NxkhsVcw64BhWYJ0gZs5xkmvvVN-G8eqoe-JtBZjQbiwHGFfmbYcZ5OqmExrNdkTxBntzj8FlNqJ9a_pIsI4Zo9Mep1HDLzY9-6QjEVkPz-OnYBE-lugMtW/s400/%25E6%2593%25B7%25E5%258F%2596%25E9%2581%25B8%25E5%258F%2596%25E5%258D%2580%25E5%259F%259F_002.png" /></a></div>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-41754545704174646582011-12-03T15:36:00.001+08:002011-12-03T15:39:44.800+08:00ibus-array patch-applied tree<p>目前 ibus-array 有許多未 merge 到 upstream 的 patch,主要是在製作 debian 套件時放在 debian/patches 中的 quilt patch。</p>
將這些 patch 做了些整理,放在 <a href="https://github.com/lexical/ibus-array/tree/patch-applied">https://github.com/lexical/ibus-array/tree/patch-applied</a>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-52756204359668272012011-12-02T19:47:00.000+08:002011-12-02T19:51:23.617+08:00煩人的google+廙告<p>Google對於自己的google+的產品推廣真是不遺於力,以致於本人對於google+的恨意達到100%。</p>
<a href="http://goo.gl/photos/XCA2zx7OEI" imageanchor="1" style="clear:right;margin-bottom:1em;margin-left:1em"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsR0V0uS1L7NF40pRAeGmrucf6375_lEbO-2Ab6hsABnd_pLHdCHoh92WP59ZnY-47Cqt2cyFVlFIa26hiMhVdnhWKKUWTJgcSJcgyn-YO85qrsKc0xU1NX8ZhDRbaBtC_E1HaRR8FIcEL/s512/googleplus.png"></a>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-68068091790765825802011-12-02T19:20:00.001+08:002011-12-02T19:32:42.582+08:00betaradio libindicator port<p>我是 <a href="fourdollars.blogspot.com">Fourdollars</a> 的 <a href="http://code.google.com/p/betaradio/">Betaradio</a> 的愛用者,但是<a href="http://design.canonical.com/2010/04/notification-area/">Ubuntu目前只支援indicator</a>,而原本的 betaradio 需要 notification area,在Ubuntu預設是不顯示的。</p>
<p>隨手寫了一個betaradio indicator的版本:</p>
<p>
git branch: <a href="https://github.com/lexical/betaradio/tree/indicator">https://github.com/lexical/betaradio/tree/indicator</a><br/>
ppa: <a href="https://launchpad.net/~lexical/+archive/indicator-betaradio">https://launchpad.net/~lexical/+archive/indicator-betaradio</a>
</p>Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-79411448363663591162011-11-22T23:55:00.001+08:002011-11-23T00:35:10.078+08:00apport-bug 某個「癥狀」apport-bug後面也可以接目前bug的「癥狀」(symptom),例如我要收集對解audio問題有用的apport log,可以用下列指令:
<blockquote>apport-bug audio --save=audio.apport</blockquote>
會出現視窗,問你幾個和這個bug相關的問題。
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhih1Uu326Tkk3a_xsxRJWDp9620swnXod-G8KtyXciNo9eqat_fibLFNE_BO0hBbFMYwccgSWZ7iegzsEDc4F3XfErFSPLp2t2Tc2x0nlKfYd141xJmfNSgOwnJWpy3dUDCgM6MAcqeXCw/s1600/apport.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="333" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhih1Uu326Tkk3a_xsxRJWDp9620swnXod-G8KtyXciNo9eqat_fibLFNE_BO0hBbFMYwccgSWZ7iegzsEDc4F3XfErFSPLp2t2Tc2x0nlKfYd141xJmfNSgOwnJWpy3dUDCgM6MAcqeXCw/s400/apport.png" /></a></div>
這些symptom被包含在apport-symptoms套件中,目前只有「audio」、「storage」、「display」、「storage」四種。Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0tag:blogger.com,1999:blog-7121939516113192148.post-58255404073866315922011-11-17T12:58:00.002+08:002012-06-27T04:02:19.885+08:00將apport的資料存下來apport是Ubuntu中一套用來回報除錯資訊的軟體,一般的用法是後面直接接launchpad的bug number即可:<br />
<pre class="brush: bash;">apport-collect 888888</pre><br />
這樣就會自動把一些有用的debug資訊送到launchpad上。<br /><br />但是有個限制是你必須是原始的bug回報者才能回報這些debug資訊。<br />
<br />
如果想將debug log貼到別人回報的bug上,可以把apport log存下來,再手動的處理:<br />
<br />
<pre class="brush: bash;">apport-bug linux --save=./apport.log</pre><br />
解開的指令:<br />
<pre class="brush: bash;"> mkdir mylog; apport-unpack ./apport.log mylog</pre><br />
之後可自行將有用的log貼在launchpad上,或是直接整個tar之後貼上。Keng-Yu Lin / 林耕宇http://www.blogger.com/profile/01175230987408315878noreply@blogger.com0