-->

..:: seize the day ::..

March 29, 2009

Using xbrightness to Manage Screen Brightness

Filed under: IT stuff

In openSUSE 11.1 installation on my HP 2230s laptop, I cannot manage to have Function (fn) keys working. In my other HP laptop which is V3108TU with openSUSE 11.0 the fn keys is working perfectly. I don’t understand why, maybe I should wait for 11.2 with the newer kernel. I don’t want to experiment with newer kernel in this installation, considering it is my working laptop. What I need actually is only the screen brightness function keys which is fn-f7 to decrease it and fn-f8 for increasing the brightness.

I use KDE 4.2 with Battery Monitor / Power Management widget. I set the Power Profile in this widget to Performance when using AC adaptor and become Powersave on battery power. But on those two conditions I cannot manage to manually adjust the screen brightness. I do need to change that manually depend on the light condition. With the fn keys for managing the screen brightness doesn’t work I stuck with this condition.

I do experimenting a bit though :-) I run xev, it captures nothing with fn-f7 and fn-f8 keys. Though it captures fn-f2, fn-f3, fn-f5, fn-f9, fn-f10, fn-f11, fn-f12 but with no effect to the systems.

If I press fn-f2 the xev result is:

KeyRelease event, serial 34, synthetic NO, window 0x3600001,
    root 0x7d, subw 0x0, time 4931507, (-570,455), root:(527,480),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Fn-f5 result is:  

KeyRelease event, serial 34, synthetic NO, window 0x3600001,
    root 0x7d, subw 0x0, time 5005356, (-436,532), root:(661,557),
    state 0x0, keycode 223 (keysym 0x1008ff10, XF86Standby), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

But xev with fn-f7 and fn-f8 results is:

KeyRelease event, serial 34, synthetic NO, window 0x3600001,
    root 0x7d, subw 0x0, time 5050624, (-663,480), root:(434,505),
    state 0x0, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Also the result of "xbacklight -get" is 100.000000 when I use electric power. I try to change "xbacklight -set 60.000000", no result in screen brightness. 

So I try to check a bit deeper. I search for ACPI setting for vga, and found that on /proc/acpi/video there is GFX0 directory that consist of several sub-directory DD01 until DD05 that each of it contains a file named "brightness". What’s strange is the file brightness contain nothing but <not supported> line. I try to google to find another alternatives on how to manage the screen brightness. I come up with this very short site but it is enough to give me the clue. I go to http://software.opensuse.org and find this result. I installed it with the 1-click install and voila …… I can adjust the screen brightness. 

The usage is very simple, and the help gives straightforward information

medwinz@slowhand:~> xbrightness –help
xbrightness builds a brightness ramp for X11.

usage:  xbrightness BRIGHTNESS [ GBASE ]

where BRIGHTNESS is a number from 0 to 65535.
where GBASE is a float number from 0.0 to 10.0. (default=1.0)

For me the settings are:

  • "xbrightness 35000" for low brightness
  • "xbrightness 45000" for medium brightness
  • "xbrightness 55000" for high brightness
  • "xbrightness 65535" for maximum brightness

Please note that the setting with this is not persistent, and you should adjust manually every time you login or reboot. You can make a short script by yourself to automatically call xbrightness to set the screen brightness in the login/restart.

Have a lot of fun :-)

March 25, 2009

Mengikuti openSUSE Forum dengan KNode News Reader

Filed under: IT stuff

openSUSE Forum adalah salah satu tempat diskusi yang sangat menarik yang disediakan oleh openSUSE.org. Pada forum itu juga user dapat bertanya mengenai masalah yang ditemui berkaitan dengan implementasi openSUSE. Atau bisa saja kita sekedar membrowse mencari-cari siapa tahu masalah yang kita hadapi sudah pernah didiskusikan. Emang sih dalam Bahasa Inggris, ya anggap aja latihan English :-)

Forum bisa diakses melalui browser ke alamat http://forums.opensuse.org/.  Dari sana anda dapat memilih berbagai macam pilihan thread openSUSE Help atau bahkan memulai thread baru.

                       

Mungkin yang ngebuat banyak pengguna agak jarang mengakses adalah keinginan untuk tetap anonymous atau tidak ingin login. Soalnya kalau kita mengakses lewat web di sana dikatakan silakan buat account dulu dan login untuk memposting. Ada cara lain dan resmi yang dijelaskan di faq sebenarnya, yaitu mengaksesnya dengan news reader. Ya benar, sebagaimana tercantum di FAQ, openSUSE Forum menyediakan akses NNTP.

Bagi yang belum mengetahui NNTP itu, silakan baca lebih lanjut di sini. Bagi user yang sudah menggunakan internet sejak zaman "dark ages" tentu sudah tak asing lagi dengan NNTP, tapi bagi user yang menggunakan internet setelah merebaknya browser dan email client mungkin tidak pernah menggunakan nntp sama sekali. Ada kutipan menarik dari posting di forum yang menjelaskan nntp dengan sangat lucu, kira-kira terjemahannya begini

"Dulu sekali kita-kita cuma punya layar yang gelap …… ini kenapa orang menyebutnya dark ages (zaman kegelapan)…. sebelum Bill Gates mencuri ide antarmuka grafis (GUI) dari Apple (sebetulnya Apple juga pertama kali ngelihatnya di Xerox) layar cuma berwarna hitam dan putih (iya, yang agak gaul warnanya hitam dengan teks berwarna oranye atau hijau). Masa itu belum ada www dan kamu ngemail pada program yang namanya Pine (juga yg lain) ….. dan kamu bisa ikutan forum (group diskusi) di seluruh dunia melalui USer NETwork yang bernama Usnet menggunakan Network News Transfer Protocol (NNTP) melalui Newsreader untuk mengirim / menerima informasi kepada pihak lain yang juga mempunyai ketertarikan yang sama (misalnya SUSE Linux)"

Kalau anda menginstall Thunderbird anda bisa menggunakannya untuk mengaksess nntp dari openSUSE Forum. Saya sendiri menggunakan KNode untuk mengkases nntp. Langkah setupnya cukup sederhana, dibawah ini caranya.

  1. Pastikan komunikasi di port nntp, TCP port 119 tidak diblok oleh pc dan firewall anda. Kalau anda menggunakan jaringan kantor coba tanyakan kepada admin apakah diperbolehkan mengkases nntp.
  2. Install KNode. Saya menggunakan kde4-knode dari repo KDE:KDE4:Desktop:Factory . Lihat gambar 1                                    
  3. Selanjutnya tinggal mengatur konfigurasi di Settings-Configure KNode. Yang penting diperhatikan hanya dua bagian yaitu Identity dan Accounts. Pada bagian Identity silakan isi nama dan email anda. Kalau anda ingin nama anda tidak diketahui silakan diisi nama alias dan fake email, harusnya dibiarkan kosong juga tidak masalah untuk openSUSE Forum (gambar 2)                            
  4. Selanjutnya ke Accounts. Pada tab Newsgroup Server, di sebelah kanan klik Add dan tambahkan Name: openSUSE Forum dan Server: forums.novell.com. Pastikan port 119, dan klik pada Fetch group descriptions (gambar 3 dan 4).                                                                            
  5. Langkah berikutnya adalah melengkapi Tab Identity. Kalau anda sudah mempunyai openSUSE user login dan ingin menampilkan nama anda, anda dapat mengisinya pada Name dan juga isi Email address sesuai dengan email yang anda gunakan saat mendaftar openSUSE. Tetapi anda juga dapat menulis sembarang nama misalnya fulan, dan membuat email anonymous dengan mengisi fulan@no-mx.forums.opensuse.org pada Email address (gambar 5).
  6. Sekarang pilih kembali Tab Newsgroup server pada bagian Accounts dan klik Subscribe di sebelah kanan. Akan muncul dua nama novell dan opensuse. Ekspan opensuse-org-feedback-forums, dan subscribe ke comments-suggestions, support-information,  dan silakan pilih juga pada bagian opensuse-org-help yang anda inginkan. Klik OK 2 kali (gambar 6 dan 7).                                        
  7. Klik kanan di openSUSE Forum dan pilihlah Get New Articles in All Groups. Sekarang KNode akan mendownload semua thread yang masih terpublish di nntp openSUSE Forum, lihat gambar 8.                                                                       
  8. Anda dapat juga menambah subscribe dengan mengulangi langkah 6.
  9. Sekarang anda dapat membaca openSUSE Forum (gambar 9).                                              

 gambar 1 gambar 2

 gambar 3  gambar 4

 gambar 5  gambar 6

 gambar 7  gambar 8

 gambar 9

Have a lot of fun emoticon

March 23, 2009

Device Notifier KDE 4 Tidak Mengenal AudioCD

Filed under: IT stuff

Sebagai pengguna KDE 4.2.1 (tepatnya KDE 4.2.1 Release 104 pada openSUSE 11.1) saya merasakan ada yang kurang kalau saya memasukkan AudioCD ke dalam CD/DVD Drive saya. Widget Device Notifier tidak dapat mendeteksi secara otomatis AudioCD dan tidak memberikan pilihan untuk memainkan musik. Device Notifier hanya menawarkan untuk membuka CD melalui K3B.

Kalau saya memasukkan DVD data, otomatis widget notifier mengenalnya dan menawarkan cara membukanya. Contohnya seperti gambar dibawah.

         

Tetapi kalau saya masukkan AudioCD, device notifier menawarkan untuk membukanya menggunakan K3B. Halah… ;-)

     

Ternyata hal ini terdapat dalam bugs.kde.org. Jadi ternyata kasus ini adalah kasus umum KDE4 bukan hanya di 4.2.1. Silakan dibaca aja sendiri :-)

Setelah saya baca di bko ternyata device notifier ini bekerja berdasarkan file-file .desktop yang diletakkan di direktori solid, tepatnya di /usr/share/kde4/apps/solid/actions. Pada openSUSE 11.1 saya ternyata di direktori tersebut sudah ada beberapa file yaitu:

-rw-r–r– 1 root root 1905 2009-03-21 07:39 digikam-opencamera.desktop
-rw-r–r– 1 root root 2215 2009-03-21 19:44 k3b_audiocd_rip.desktop
-rw-r–r– 1 root root  581 2009-03-21 19:44 k3b_copy_disc.desktop
-rw-r–r– 1 root root 2414 2009-03-21 19:44 k3b_create_audio_cd_from_blank_medium.desktop
-rw-r–r– 1 root root  782 2009-03-21 19:44 k3b_create_data_project_from_blank_medium.desktop
-rw-r–r– 1 root root 2335 2009-03-21 19:44 k3b_videodvd_rip.desktop
-rw-r–r– 1 root root 2812 2009-03-21 05:30 test-predicate-openinwindow.desktop

Berdasarkan diskusi di bko#165544, ternyata memang implementasi solid itu masih belum lengkap. Bahkan developer solid test-predicate-openwindow (Alexis Menard) yang membuat device notifier untuk menawarkan membuka file sistem (hard disk, usb disk, dll) dengan Dolphin mengatakan bahwa ia telah berbicara dengan banyak developer di Akademy untuk melengkapi file solid-predicate untuk masing-masing aplikasi yang dibangun.

Pada komentar #6 dan #11 Tarmo Johannes si pelapor bugs melampirkan beberapa contoh file solid-predicate yang bisa digunakan sebagai workaround sebelum rilis file resminya dilengkapi oleh developer.

Dalam kasus saya, saya menambahkan file bernama kaffeine-open-audio.desktop pada direktori  /usr/share/kde4/apps/solid/actions

medwinz@slowhand:/usr/share/kde4/apps/solid/actions> ll kaffeine-open-audio.desktop
-rw-r–r– 1 root root 237 2009-03-22 20:38 kaffeine-open-audio.desktop

Isinya:

[Desktop Entry]
X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND OpticalDisc.availableContent == ‘Audio’ ]
Type=Service
Actions=open;

[Desktop Action open]
Name=Play CD with Kaffeine
Exec=kaffeine -d %u AudioCD
Icon=kaffeine

Iya memang saya panggil dengan kaffeine-kde3. Saya juga sudah install kaffeine4 tapi belum semua fungsi di kaffeine-kde3 yang selesai dimigrasikan oleh developer, jadi biar tetap lengkap fungsinya saya gunakan kaffeine-kde3.

Setelah itu jangan lupa logout, dan login lagi. Sekarang device notifier sudah mengenal AudioCD dan siap menawarkan secara otomatis untuk membukanya dengan kaffeine.

     

Tertarik mencobanya? Jangan lupa Have a lot of fun.

March 18, 2009

XOrg update for openSUSE 11.1, It Works on Intel GM45!

Filed under: IT stuff

Recently I update the xorg installation on my openSUSE 11.1 to the X11:XOrg repository. Guess what, my openSUSE installation become unstable. If I activate kwin and try to play with the cube, the cube moving become so heavy and then there is a notification from KDE saying that composite become unstable and the system disabled it. Also the 3D application like Google Earth cannot run, it only run if I disabled 3D support on Sax through Yast.

This problem was solved before actually and I wrote a blog about it, but I don’t know why the latest update to that X11:XOrg repo is not working. I’m very disappointed with this condition. Well, my laptop is HP2230s with Intel GM45 and I found a lot of complaint about the xorg support for this Intel graphics on the Net. GM45 is behave like Intel 965GM. There is also at least one discussion on openSUSE Forum about it.

I try to raise the the problem in opensuse-xorg list, and got the answer from suse staff. So I wait for the update and meanwhile revert back all the xorg component to oss version. And to be able to run 3D application like Google Earth I should modified the xorg.conf with the addition of lines below on section "Device":

  Option       "AccelMethod" "exa"
  Option       "MigrationHeuristic" "greedy"
  Option       "EXANoComposite" "on"

It has a drawback, because with that additions my system tray icon on panel is messed up and sometimes totally black.

Finally, tonight there is an update from online-update mentioned that there are some update on xorg component including Mesa, freeglut, Sax2, X11-input-wacom (which is I don’t use), xorg-x11-driver-input, xorg-x11-driver-video, xorg-x11-driver-redeonhd, and xorg-x11-server. I installed the update and voila it becomes stable again. Below are the components version that I have now in my openSUSE 11.1 installation:

  • Mesa-7.2-10.2.1 (from repo update)
  • MesaGLw-7.2-1.25 (from repo oss)
  • libdrm-2.4.1-1.8 (from repo oss)
  • xkeyboard-config-1.5-1.8 (from repo X11:XOrg)
  • xorg-x11-7.4-8.13 (from repo oss)
  • xorg-x11-driver-input-7.4-11.6.1 (from repo update)
  • xorg-x11-driver-video-7.4-19.5.1 (from repo update)
  • xorg-x11-driver-video-radeonhd-1.2.4_121202_4e89726-2.1.1 (from repo update)
  • xorg-x11-driver-video-unichrome-20080807-12.44 (from repo oss)
  • xorg-x11-fonts-7.4-1.32 (from repo oss)
  • xorg-x11-fonts-core-7.4-1.32 (from repo oss)
  • xorg-x11-libfontenc-7.4-1.23 (from repo oss)
  • xorg-x11-libICE-7.4-1.24 (from repo oss)
  • xorg-x11-libs-7.4-8.1 (from repo oss)
  • xorg-x11-libSM-7.4-1.26 (from repo oss)
  • xorg-x11-libX11-7.4-1.25 (from repo oss)
  • xorg-x11-libXau-7.4-1.23 (from repo oss)
  • xorg-x11-libxcb-7.4-1.24 (from repo oss)
  • xorg-x11-libXdmcp-7.4-1.23 (from repo oss)
  • xorg-x11-libXext-7.4-1.25 (from repo oss)
  • xorg-x11-libXfixes-7.4-1.24 (from repo oss)
  • xorg-x11-libxkbfile-7.4-1.25 (from repo oss)
  • xorg-x11-libXmu-7.4-1.26 (from repo oss)
  • xorg-x11-libXp-7.4-1.25 (from repo oss)
  • xorg-x11-libXpm-7.4-1.27 (from repo oss)
  • xorg-x11-libXprintUtil-7.4-1.26 (from repo oss)
  • xorg-x11-libXrender-7.4-1.24 (from repo oss)
  • xorg-x11-libXt-7.4-1.26 (from repo oss)
  • xorg-x11-libXv-7.4-1.25 (from repo oss)
  • xorg-x11-server-7.4-17.4.1 (from repo update)
  • xorg-x11-xauth-7.4-8.13 (from repo oss)
  • freeglut-080721-20.2.1 (from repo update)
  • sax2-8.1-542.8.1 (from repo update)
  • x11-input-synaptics-0.15.2-5.24 (from repo oss)

So basically after I revert back all xorg component to oss, I just doing online update and everything back to normal (same condition with my last blog post). Don’t forget to check the xorg.conf, and make sure it doesn’t contain tree lines I mentioned above. Of course if I want to use Google Earth, I should disable the desktop effect (kwin) in Personal Setting - Desktop - General by deselecting Enable desktop effects button.

Besides that everything runs well, if I enable kwin, the cube spinning is smooth and no complaint again about composite stability. Thanks Stefan Dirsch and other openSUSE person who make it possible again. Here are some picture from my laptop: 

       smplayer  google earth 

       cube 

    Have a lot of fun emoticon