Monday, February 16, 2009

Just wanted to blog about the final step when connecting Vista to Samba servers, after switching off all the "requiresign..." and "signsecure..." values in the registry:

- Click start
- Type: regedit
- Press enter
- In the left, expand these folders:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\

- In the left, click on the folder named:

Lsa

- In the right, double-click "LmCompatibilityLevel"
- Type the number 1 and press enter
- Restart your computer

Friday, January 09, 2009

Yey! I've solved my php-mysql problem!!!

After googling and visiting so many times and so many websites, I figured out from this page (HAMSTEG's post) that I only needed to point php to the new modules directory in /etc/php.ini:

extension_dir = /usr/lib/php/modules (in my server's case it's /usr/lib/php4)

It's where the following modules are located:

imap.so
ldap.so
mysql.so
pgsql.so

... et voila! My PHP scripts are working again!!! Praise God!
Hmmm... looks like I discovered the REAL reason behind our gateway slowing down.

It wasn't the old LAN card(s)! Our web server had been hacked! It seems there was TCP flooding (IRC?) when it was hacked (vulnerable php version).

No wonder the gateway would just work after a few hours of tinkering! I can now conclude that the illegal connections would stop after timing out (the gateway is brought down).

The problem is, after updating php, my php scripts wouldn't work anymore because of this error, which I've googled endlessly to no avail:

Fatal error: Call to undefined function: mysql_connect() in /dir/file.php on line xx

sigh...

So after finding no solution, I decided to just brew a new windows-based program that allows the user to view all bills of any customer and quickly copy to the clipboard the VAT details of a range of bills.

See my other blog for the details.

Tuesday, November 18, 2008

Ubuntu Intrepid hanging Thinkpad X61 no more.

Yey! It seems that I didn't really notice that the hangs only occurred at home, where I had an 802.11n router, and not at the office where my nearest router was only an 802.11g router.

So I followed the advice of others and installed the linux-backports drivers *AND* disabled the n capabilities of my Intel 4965agn wireless transmitter. (Miss the high speeds when transferring files).

Now the only remaining issue is this: klogd eating CPU and disk space.

Monday, November 17, 2008

Ubuntu Intrepid hangs Thinkpad X61.

I've reinstalled Ubuntu Intrepid this morning, and I've since upgraded it to the latest updates, including thinkfinger and trackpoint scrolling.

No hangs yet (crossing my fingers).

The only difference from my old installation, though, is I haven't reinstalled conky on this one. I think I'm 99% sure it was conky indirectly causing the hanging because of the repeated ACPI calls. Come to think of it, I think the thinkpad never hung prior to installing conky on it.

Here's my .conkyrc, for reference (just in case I lose the file in some careless reinstall):

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

alignment top_right
own_window yes
own_window_transparent yes
own_window_type override
gap_y 15
gap_x 5
total_run_times 0
update_interval 3
cpu_avg_samples 5
net_avg_samples 5
use_xft yes
default_color lightblue
xftfont URW Bookman L:size=10
#xftfont Dejavu Sans Mono:size=10
top_cpu_separate yes
stippled_borders 10
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
maximum_width 400

TEXT
$alignc${color white}All right, Jun! ${color }Uptime : $color $uptime ${color }
$alignc${color }${time %A %d %B %Y} - ${time %H:%M:%S}
$alignc$sysname $kernel - $machine $freq_g GHz
$alignc${color #FDFF00}${exec acpi -b | sed -e 's/^\ *//'}
$color$stippled_hr
$alignc${color }Network
${color }IP Adress : ${color }${addr wlan0}
${color }Download : ${color #00FF00} ${downspeed wlan0} kB/s${alignr}${color }Upload : ${color #FF0000}${upspeed wlan0} kB/s
${color black}${downspeedgraph wlan0 25,180 404080 00FF00} $alignr${color black}${upspeedgraph wlan0 25,180 404080 FF0000}
$color$stippled_hr
$alignc${color }System Resources
${color }CPU Temp : ${color blue}${acpitemp}°C ${color } ${alignr}Fan Speed: ${color blue}${ibm_fan}
${color }Core 1 : ${color #00FF00} ${cpu cpu1}% ${cpubar cpu1}
${color }Core 2 : ${color #00FF00} ${cpu cpu2}% ${cpubar cpu2}
${color }RAM : ${color #FDFF00} $memperc% $membar
${color }Swap : ${color #FF0000} $swapperc% ${swapbar}
$color$stippled_hr
$alignc${color }Disk Space
${color #00FF00}Linux / ${fs_used /}/${fs_size /}${alignr}${fs_used_perc /}%
${fs_bar 8 /}
${color #FDFF00}Windows ${fs_used /media/SW_Preload}/${fs_size /media/SW_Preload}${alignr}${fs_used_perc /media/SW_Preload}%
${fs_bar 8 /media/SW_Preload}
${color #FF0000}Home ${fs_used /home}/${fs_size /home}${alignr}${fs_used_perc /home}%
${fs_bar 8 /home}
$color$stippled_hr
$alignc${color }Processes${font Dejavu Sans Mono:size=10}
${color light blue}NAME$color ${color light blue}PID$color ${color light blue}CPU%$color ${color light blue}MEM%$color
${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${font}$alignc${color}Mem usage${font Dejavu Sans Mono:size=10}
${color #ddaa00}${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey}${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey}${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color lightgrey}${top_mem name 4} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
${font}$color$stippled_hr
$alignc${exec rhythmbox-client --no-start --print-playing-format "%tt - %ta"}
$alignc${exec rhythmbox-client --no-start --print-playing-format "%te / %td"}

Saturday, November 15, 2008

Ubuntu Intrepid hanging my Thinkpad X61.

While I was using the X61, it hung on me. Same type of hanging as the previous two, but this time the screen was on (on the previous two, the screen was blank because the lid was closed) since I was using it. I switched to another workspace and left it for a few seconds to watch TV but when I tried to move the trackpoint/mouse, bam! Dead machine. Normal temperature though.

Sigh... I'm suspecting either Transmission (bittorrent client) or the Vista partition being mounted (grin)... maybe even VLC 0.9.4, which was also left in memory (paused or stopped) when the hangs occurred.
Ubuntu Intrepid on Thinkpad X61 issue

I just want to keep a record of this here for historical purposes, while I can still find it in the logs:

Nov 15 00:35:16 x61 kernel: [ 5364.027521] bad: scheduling from the idle thread!
Nov 15 00:35:16 x61 kernel: [ 5364.027527] Pid: 0, comm: swapper Not tainted 2.6.27-7-generic #1
Nov 15 00:35:16 x61 kernel: [ 5364.027529] [] ? printk+0x1d/0x1f
Nov 15 00:35:16 x61 kernel: [ 5364.027533] [] dequeue_task_idle+0x2a/0x40
Nov 15 00:35:16 x61 kernel: [ 5364.027536] [] dequeue_task+0xcf/0x130
Nov 15 00:35:16 x61 kernel: [ 5364.027540] [] deactivate_task+0x1a/0x30
Nov 15 00:35:16 x61 kernel: [ 5364.027543] [] schedule+0x4b3/0x790
Nov 15 00:35:16 x61 kernel: [ 5364.027546] [] ? notifier_call_chain+0x35/0x70
Nov 15 00:35:16 x61 kernel: [ 5364.027550] [] ? clockevents_notify+0x35/0x80
Nov 15 00:35:16 x61 kernel: [ 5364.027553] [] cpu_idle+0xbd/0x140
Nov 15 00:35:16 x61 kernel: [ 5364.027556] [] start_secondary+0x9d/0xcc
Nov 15 00:35:16 x61 kernel: [ 5364.027559] =======================
Nov 15 00:35:16 x61 kernel: [ 5364.033725] bad: scheduling from the idle thread!
Nov 15 00:35:16 x61 kernel: [ 5364.033730] Pid: 0, comm: swapper Not tainted 2.6.27-7-generic #1
Nov 15 00:35:16 x61 kernel: [ 5364.033732] [] ? printk+0x1d/0x1f
Nov 15 00:35:16 x61 kernel: [ 5364.033736] [] dequeue_task_idle+0x2a/0x40
Nov 15 00:35:16 x61 kernel: [ 5364.033738] [] dequeue_task+0xcf/0x130
Nov 15 00:35:16 x61 kernel: [ 5364.033742] [] deactivate_task+0x1a/0x30
Nov 15 00:35:16 x61 kernel: [ 5364.033744] [] schedule+0x4b3/0x790
Nov 15 00:35:16 x61 kernel: [ 5364.033747] [] ? notifier_call_chain+0x35/0x70
Nov 15 00:35:16 x61 kernel: [ 5364.033751] [] ? clockevents_notify+0x35/0x80
Nov 15 00:35:16 x61 kernel: [ 5364.033755] [] cpu_idle+0xbd/0x140
Nov 15 00:35:16 x61 kernel: [ 5364.033758] [] start_secondary+0x9d/0xcc
Nov 15 00:35:16 x61 kernel: [ 5364.033761] =======================
Nov 15 00:35:16 x61 kernel: [ 5364.039736] bad: scheduling from the idle thread!
Nov 15 00:35:16 x61 kernel: [ 5364.039741] Pid: 0, comm: swapper Not tainted 2.6.27-7-generic #1
Nov 15 00:35:16 x61 kernel: [ 5364.039743] [] ? printk+0x1d/0x1f
Nov 15 00:35:16 x61 kernel: [ 5364.039747] [] dequeue_task_idle+0x2a/0x40
Nov 15 00:35:16 x61 kernel: [ 5364.039750] [] dequeue_task+0xcf/0x130
Nov 15 00:35:16 x61 kernel: [ 5364.039754] [] deactivate_task+0x1a/0x30
Nov 15 00:35:16 x61 kernel: [ 5364.039757] [] schedule+0x4b3/0x790
Nov 15 00:35:16 x61 kernel: [ 5364.039760] [] ? notifier_call_chain+0x35/0x70
Nov 15 00:35:16 x61 kernel: [ 5364.039764] [] ? clockevents_notify+0x35/0x80
Nov 15 00:35:16 x61 kernel: [ 5364.039768] [] cpu_idle+0xbd/0x140
Nov 15 00:35:16 x61 kernel: [ 5364.039771] [] start_secondary+0x9d/0xcc
Nov 15 00:35:16 x61 kernel: [ 5364.039774] =======================
Nov 15 00:35:16 x61 kernel: [ 5364.046134] bad: scheduling from the idle thread!
Nov 15 00:35:16 x61 kernel: [ 5364.046140] Pid: 0, comm: swapper Not tainted 2.6.27-7-generic #1
Nov 15 00:35:16 x61 kernel: [ 5364.046142] [] ? printk+0x1d/0x1f
Nov 15 00:35:16 x61 kernel: [ 5364.046147] [] dequeue_task_idle+0x2a/0x40
Nov 15 00:35:16 x61 kernel: [ 5364.046151] [] dequeue_task+0xcf/0x130
Nov 15 00:35:16 x61 kernel: [ 5364.046154] [] deactivate_task+0x1a/0x30
Nov 15 00:35:16 x61 kernel: [ 5364.046158] [] schedule+0x4b3/0x790
Nov 15 00:35:16 x61 kernel: [ 5364.046161] [] ? notifier_call_chain+0x35/0x70
Nov 15 00:35:16 x61 kernel: [ 5364.046165] [] ? clockevents_notify+0x35/0x80
Nov 15 00:35:16 x61 kernel: [ 5364.046169] [] cpu_idle+0xbd/0x140
Nov 15 00:35:16 x61 kernel: [ 5364.046172] [] start_secondary+0x9d/0xcc
Nov 15 00:35:16 x61 kernel: [ 5364.046176] =======================

... ad nauseum...

This causes my thinkpad to heat up tremendously : up to 80 deg Celsius (!) -- simply unacceptable. Not to mention eating up the CPU cycles...

When, oh when, are they gonna fix this???

Oh, and now I remember the state of my X61 on the first time Ubuntu Intrepid hung my X61:

The HDD LED, Numlock, and Standby (crescent moon) were all off (the battery was fully charged but laptop is still plugged in) and the CAPSLOCK was blinking repeatedly along with the WiFi LED (darn it, I forgot if the Wifi LED was blinking or steady! I think it was steady...). Oh, and the laptop would not respond to anything but the power button (4-sec shutdown).

How did I remember? It happened again, before 6am today. :-(

Plus, when I hibernated it before leaving the house, it got stuck on a CLI screen with the ff. two lines, and didn't power off.

[xxxxx] btusb_intr_complete: hci0 urb f617a680 failed to resubmit (19)
[xxxxx] btusb_intr_complete: hci0 urb f66ed600 submission failed
When I turned it on again at the office, it started the "Waking up..." process but didn't manage to complete it. So I turned it off again, then restarted and immediately killed klogd.

Friday, November 14, 2008

Ubuntu klogd issue:

This morning, I left my Thinkpad X61 on my desk, downloading some files. After more than 3 hours, I came back to it and noticed that it was TOO HOT, even though the fan is working. I anxiously thought that the fan was failing AGAIN (yes, it has failed twice on me already). Aside from the abnormally high temperature, the Ubuntu startup logo (with the orange gauge) was also displayed. I think it was on the verge of shutting down because of low battery charge.

This was the second time Ubuntu hung, but I can't remember on what stage it was on during the first time (yesterday or the day before, early morning).

Anyway, I waited for it to respond but just like the first time, it wouldn't respond. I didn't bother to check if there was disk activity. So I forced it to switch off and let it cool down for a few minutes in one of the coolest areas of our office.

When I used it again with the same set of apps running, I noticed it was again getting too hot for comfort. And I also noticed that in conky, firefox was not the top CPU hogger, it was reporting my top two (2) apps as dd and klogd! I immediately googled for "ubuntu dd klogd eating CPU" and found this page which basically confirmed a kernel and/or iwlagn module issue/bug.

Sigh... so for now, I hope I will remember to stop klogd everytime I boot into Ubuntu... and that they fix it asap...

Thursday, November 13, 2008



This is an entry about my new-found motivation for using Linux. I'm using a Lenovo Thinkpad X61 (7676A14) and Ubuntu Intrepid Ibex (8.10).

Early August, 2008: I tried Doc Mana's method to setup a USB Flash Drive. It worked! I could connect fine with my Linksys 300N wireless router. But that was it. I just used it about 2 times and forgot about it. The 2GB Kingston USB Flash Drive just sat inside my pocket or my bag ever since.

Until I witnessed the exchange of 2 cyber friends on a web forum I frequent.

We were having fun lambasting each other's OS (they hated Vista, I pretended to hate XP). Then I brought up Linux, since I can't bring up my first love, OS/2, anymore.

The young one was convinced by the other friend to try Ubuntu on his Dell laptop. After a few days of watching endless exchanges about desktop themes and Compiz Fusion, this young 'un kept asking me about some Gnome things I couldn't possible answer, because I haven't really accustomed myself to it. Heck, I've never really used Linux as my desktop of choice because my work involves maintaining Windows workstations. I would only encounter Linux from time to time.

So, not wanting to disappoint my young friend, I decided to fire up my Ubuntu-on-a-flash-drive. Lo and behold, the networking devices weren't working!!! :-(

I dunno what has changed after I forgot about Ubuntu-on-a-flash-drive, but even the wired LAN (eth0) wouldn't work!!!

That's it, I told myself. I'm shrinking my Vista partition to make room for Ubuntu!!!

That's when I spent almost 2 full days wrestling with Vista's Defrag and some 3rd party Defrag software. Frustration built-up because I forgot that hiberfil.sys and pagefile.sys cannot be moved. Until I disabled both and backed up my files, I got 45GB free space! Yey!

Just one more thing... after using a home edition of a 3rd party partition manager to create my ubuntu partitions (Windows Disk Management just kept denying me access when I tell it to shrink my Vista partition! Aaarrgghh!), I restarted the laptop and found out that my Vista partition was damaged and couldn't boot! I didn't see it fail, actually, cuz it was lunch time and I left the laptop to eat, but when I came back for it, I saw the Thinkvantage software repairing my damaged Vista partition. Isn't IBM/Lenovo cool???

To cut to the chase, I was finally able to install Ubuntu 8.10 and everything just worked! Well, almost everything, because the fingerprint reader doesn't work and I couldn't scroll with the built-in trackpoint system...

After a bit of googling around, I found the following webpages on the fingerprint reader and the scrolling issue:

On the fingerprint reader:

https://wiki.ubuntu.com/ThinkFinger


On the scrolling issue:

http://psung.blogspot.com/2008/09/scrolling-with-thinkpads-trackpoint-in.html

The scrolling failed on me once today, but I didn't really know how and what I did to cause it to stop scrolling.

Hmmm... just now my wireless connection stopped responding. The LED was still blinking but there was nothing being transmitted. I know because conky said so.

Oh, BTW, here's my simple conky layout for now... adapted from someone else's .conkyrc

Aaarrggh... my wireless connection stopped again! I unplugged the nearest Range Expander and re-plugged it. I hope that was the only problem, and not my laptop.

Another issue I noticed was that the laptop wouldn't respond this morning when I woke up. I was watching a movie using VLC 0.9.4 in Fullscreen mode and just paused it when I felt sleepy. Nothing responded. Not even the 3-fingered salute. :-( I just turned it off with the power button (oops, that one responded to my 4-second press... hehehe) and restarted it.

Oh, yeah, about the fingerprint reader... there were 2 updates this morning, but no descriptions yet. I hope they've fixed the screensaver problem in gnome.