Friday, 15 June 2007

Installing lm-sensors on a Presario 1500

I continue configuring and tweaking my ubuntu 7.04 Feisty Fawn on my Compaq presario 1500US.
Yesterday I configured the lm-sensors package in order to install a desklet or an application to see the current motherboard temperature. Because this laptop has a tendency to overheat! (see my other post :
Notebook overheat problem or Frying Eggs on Presario 1500)

First of all I launched Synaptic and searched "lm-sensors" and installed the package without problem.
(another option is to run in a terminal : sudo apt-get install lm-sensors)
Then I Ran the command :
sudo sensors-detect
and I obtained the following text :

ubuntu@horus:~$ sudo sensors-detect
Password:
# sensors-detect revision 4171 (2006-09-24 03:37:01 -0700)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no): yes
Probing for PCI bus adapters...
Sorry, no known PCI bus adapters found.

We will now try to load each adapter module in turn.
If you have undetectable or unsupported adapters, you can have them
scanned by manually loading the modules before running this script.

To continue, we need module `i2c-dev' to be loaded.
Do you want to load `i2c-dev' now? (YES/no): yes
Module loaded successfully.

We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.

Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no): yes
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM78-J' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... No
Probing for `Winbond W83627HF' at 0x290... No
Probing for `Silicon Integrated Systems SIS5595'... No
Probing for `VIA VT82C686 Integrated Sensors'... No
Probing for `VIA VT8231 Integrated Sensors'... No
Probing for `AMD K8 thermal sensors'... No
Probing for `IPMI BMC KCS' at 0xca0... No
Probing for `IPMI BMC SMIC' at 0xca8... No

Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): yes
Probing for Super-I/O at 0x2e/0x2f
Trying family `ITE'... Yes
Found unknown chip with ID 0xea11
Trying family `National Semiconductor'... Yes
Found `Nat. Semi. PC8739x Super IO'
(no hardware monitoring capabilities)
Trying family `SMSC'... Yes
Found unknown chip with ID 0xea11
Trying family `VIA/Winbond/Fintek'... Yes
Found unknown chip with ID 0xea11
Probing for Super-I/O at 0x4e/0x4f
Trying family `ITE'... No
Trying family `National Semiconductor'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Fintek'... No

Sorry, no sensors were detected.
Either your sensors are not supported, or they are connected to an
I2C or SMBus adapter that is not supported. See doc/FAQ,
doc/lm_sensors-FAQ.html or http://www.lm-sensors.org/wiki/FAQ
(FAQ #4.24.3) for further information.
If you find out what chips are on your board, check
http://www.lm-sensors.org/wiki/Devices for driver status.


So, basically the sensors package didn't detect the sensors.
I read an installation instruction and ran the commands :
sudo gedit makedev.sh
Copy the next lines :

#!/bin/bash
# Here you can set several defaults.
# The number of devices to create (max: 256)
NUMBER=32

# The owner and group of the devices
OUSER=root
OGROUP=root
# The mode of the devices
MODE=600

# This script doesn't need to be run if devfs is used
if [ -r /proc/mounts ] ; then
if grep -q "/dev devfs" /proc/mounts ; then
echo "You do not need to run this script as your system uses devfs."
exit;
fi
fi

i=0;

while [ $i -lt $NUMBER ] ; do
echo /dev/i2c-$i
mknod -m $MODE /dev/i2c-$i c 89 $i exit
chown "$OUSER:$OGROUP" /dev/i2c-$i exit
i=$[$i + 1]
done
#end of file


Then :

sudo chmod +x makedev.sh
sudo ./makedev.sh

Afterwards I ran again sensors-detect but nothing changed... then I remembered that in my M$ Windows I used the motherboard monitor and later the speedfan so I booted M$ Windows and obtained the Speedfan output :

Win9x:NO 64Bit:NO GiveIO:YES SpeedFan:YES
I/O properly initialized
Linked ISA BUS at $0290
SMBus successfully enabled
Linked Intel 82801CAM ICH3 SMBUS at $1200
Scanning ISA BUS at $0290...
SuperIO Chip=PC8739x
Scanning Intel SMBus at $1200...
ADM1031 (ID=$31) found on SMBus at $2C
SMART Enabled for drive 0
Found TOSHIBA MK4018GAP (40,0GB)
Found ACPI temperature (59,0C)
End of detection


After that I found out the chip/sensor for my laptop an Intel 82801CAM ICH3 with an ADM1031. So I checked the www.lm-sensors.org and found that that chip/sensor is supported.
After searching and trying many things I finally found the script "unhide_ICH_SMBus" that show my chip/sensor :
You can download it from :
unhide_ICH_SMBus

Just in case here is the script (you can cut and paste using the gedit) :


#!/bin/bash
# (C) Rudolf Marek ,
# Jean Delvare
#
# Thanks Jean Delvare and Oliver Dreier for testing.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation

pcibus="/sys/bus/pci/slots/"
device="00:1f"

if [ "$UID" -ne 0 ] ; then
echo "You need to be root to run this script!"
exit 252
fi

smbus=`lspci -n -s $device.3 grep -i '0c05: *8086'`
if [ -n "$smbus" ] ; then
echo "ICH SMBus is already there!"
lspci -s $device.3
exit
fi

intel=`lspci -n -s $device.0 grep 8086`

if [ -z "$intel" ] ; then
echo "Not for your chipset - Intel (ICH) only"
exit 255;
fi
modprobe fakephp &> /dev/null

if [ ! -d "$pcibus" ] ; then
echo "You need the fake PCI hotplug driver! (fakephp.ko and 2.6 kernel)"
exit 255;
fi

echo "Enabling SMBus PCI device ..."

newval=$( printf '%x' $((0x$(setpci -s $device.0 f2.w) & 0xfff7)))
setpci -s $device.0 f2.w=$newval

echo "Rescanning the bus ..."
echo 1 > $pcibus/0000:$device.0/power 2>/dev/null
if [ ! -d "$pcibus/0000:$device.3" ] ; then
echo "Failed to enable the SMBUS"
exit 253;
fi

if [ ! -d "/sys/bus/pci/drivers/i801_smbus" ] ; then
echo "Loading i2c-i801 ..."
modprobe i2c-i801
if [ $? -ne 0 ] ; then
exit 251
fi
fi

lspci -s $device.3
echo "Done!"


-----------------------------
I ran the script :
ubuntu@horus:~$ sudo ./unhide_ICH_SMBus
Password:
Enabling SMBus PCI device ...
Rescanning the bus ...
Loading i2c-i801 ...
00:1f.3 SMBus: Intel Corporation 82801CA/CAM SMBus Controller (rev 02)
Done!


Afterwards I ran again :
sudo sensors-detect
And this time it ran Ok.
Here the output :

ubuntu@horus:~$ sudo sensors-detect
Password:
# sensors-detect revision 4171 (2006-09-24 03:37:01 -0700)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no): yes
Probing for PCI bus adapters...
Use driver `i2c-i801' for device 0000:00:1f.3: Intel 82801CA/CAM ICH3

We will now try to load each adapter module in turn.
Module `i2c-i801' already loaded.
If you have undetectable or unsupported adapters, you can have them
scanned by manually loading the modules before running this script.

To continue, we need module `i2c-dev' to be loaded.
Do you want to load `i2c-dev' now? (YES/no): yes
Module loaded successfully.

We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.

Next adapter: SMBus I801 adapter at 1200
Do you want to scan it? (YES/no/selectively): yes
Client found at address 0x2c
Probing for `Myson MTP008'... No
Probing for `National Semiconductor LM78'... No
Probing for `National Semiconductor LM78-J'... No
Probing for `National Semiconductor LM79'... No
Probing for `National Semiconductor LM80'... No
Probing for `National Semiconductor LM85 or LM96000'... No
Probing for `Analog Devices ADM1027, ADT7460 or ADT7463'... No
Probing for `SMSC EMC6D100, EMC6D101 or EMC6D102'... No
Probing for `Analog Devices ADT7462'... No
Probing for `Analog Devices ADT7470'... No
Probing for `Analog Devices ADT7476'... No
Probing for `National Semiconductor LM87'... No
Probing for `National Semiconductor LM93'... No
Probing for `Winbond W83781D'... No
Probing for `Winbond W83782D'... No
Probing for `Winbond W83792D'... No
Probing for `Winbond W83793R/G'... No
Probing for `Winbond W83791SD'... No
Probing for `Winbond W83627HF'... No
Probing for `Winbond W83627EHF'... No
Probing for `Winbond W83627DHG'... No
Probing for `Asus AS99127F (rev.1)'... No
Probing for `Asus AS99127F (rev.2)'... No
Probing for `Asus ASB100 Bach'... No
Probing for `Genesys Logic GL518SM Revision 0x00'... No
Probing for `Genesys Logic GL518SM Revision 0x80'... No
Probing for `Genesys Logic GL520SM'... No
Probing for `Analog Devices ADM9240'... No
Probing for `Dallas Semiconductor DS1780'... No
Probing for `National Semiconductor LM81'... No
Probing for `Analog Devices ADM1026'... No
Probing for `Analog Devices ADM1025'... No
Probing for `Philips NE1619'... No
Probing for `Analog Devices ADM1024'... No
Probing for `Analog Devices ADM1029'... No
Probing for `Analog Devices ADM1030'... No
Probing for `Analog Devices ADM1031'... Success!
(confidence 7, driver `adm1031')
Probing for `Analog Devices ADM1022'... No
Probing for `Texas Instruments THMC50'... No
Probing for `ITE IT8712F'... No
Probing for `ALi M5879'... No
Probing for `SMSC LPC47M15x, LPC47M192 or LPC47M997'... No
Probing for `Winbond W83791D'... No
Client found at address 0x50
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Success!
(confidence 8, driver `eeprom')
Probing for `EDID EEPROM'... No
Probing for `Maxim MAX6900'... No
Client found at address 0x51
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Success!
(confidence 8, driver `eeprom')
Client found at address 0x69

Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no): yes
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM78-J' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... No
Probing for `Winbond W83627HF' at 0x290... No
Probing for `Silicon Integrated Systems SIS5595'... No
Probing for `VIA VT82C686 Integrated Sensors'... No
Probing for `VIA VT8231 Integrated Sensors'... No
Probing for `AMD K8 thermal sensors'... No
Probing for `IPMI BMC KCS' at 0xca0... No
Probing for `IPMI BMC SMIC' at 0xca8... No

Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): yes
Probing for Super-I/O at 0x2e/0x2f
Trying family `ITE'... Yes
Found unknown chip with ID 0xea11
Trying family `National Semiconductor'... Yes
Found `Nat. Semi. PC8739x Super IO'
(no hardware monitoring capabilities)
Trying family `SMSC'... Yes
Found unknown chip with ID 0xea11
Trying family `VIA/Winbond/Fintek'... Yes
Found unknown chip with ID 0xea11
Probing for Super-I/O at 0x4e/0x4f
Trying family `ITE'... No
Trying family `National Semiconductor'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Fintek'... No

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `adm1031' (should be inserted):
Detects correctly:
* Bus `SMBus I801 adapter at 1200'
Busdriver `i2c-i801', I2C address 0x2c
Chip `Analog Devices ADM1031' (confidence: 7)

Driver `eeprom' (should be inserted):
Detects correctly:
* Bus `SMBus I801 adapter at 1200'
Busdriver `i2c-i801', I2C address 0x50
Chip `SPD EEPROM' (confidence: 8)
* Bus `SMBus I801 adapter at 1200'
Busdriver `i2c-i801', I2C address 0x51
Chip `SPD EEPROM' (confidence: 8)

EEPROMs are *NOT* sensors! They are data storage chips commonly
found on memory modules (SPD), in monitors (EDID), or in some
laptops, for example.

I will now generate the commands needed to load the required modules.
Just press ENTER to continue:

To make the sensors modules behave correctly, add these lines to
/etc/modules:

#----cut here----
# I2C adapter drivers
i2c-i801
# Chip drivers
adm1031
eeprom
#----cut here----


Do you want to add these lines to /etc/modules automatically? (yes/NO)


I selected "Yes".
Then in order to test it I ran the commands :

root@horus:/home/ubuntu# sudo modprobe i2c-i801
Password:
root@horus:/home/ubuntu# sudo modprobe adm1031
Password:
root@horus:/home/ubuntu# sudo modprobe eeprom
Password:
root@horus:/home/ubuntu# sudo depmod -a
Password:
root@horus:/home/ubuntu# sudo update-modules
Password:
root@horus:/home/ubuntu# sudo sensors
Password:
adm1031-i2c-0-2c
Adapter: SMBus I801 adapter at 1200
CPU Fan: 12053 RPM (min = 661 RPM, div = 4)
Case Fan: 16875 RPM (min = 661 RPM, div = 4)
SYS Temp: +57.0°C (low = +51°C, high = +70°C)
SYS Crit: +87°C
CPU Temp: +52.5°C (low = +46°C, high = +60°C)
CPU Crit: +75°C
AUX Temp: +0.0°C (low = +0°C, high = +80°C) DISCONNECT
AUX Crit: +100°C


I checked the /etc/modules file and all was correct. So I restarted Ubuntu and after booting I ran :
sudo sensors
But only got "No sensors detected".
To make the sensors work I had to run the unhide_ICH_SMBus first. In order to run the command in every boot I edited the file /etc/init.d/rc.local:
sudo gedit /etc/init.d/rc.local
Then I added the line calling unhide_ICH_SMBus first :

#! /bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin
[ -f /etc/default/rcS ] && . /etc/default/rcS
. /lib/lsb/init-functions

do_start() {
if [ -x /etc/rc.local ]; then
log_begin_msg "Running local boot scripts (/etc/rc.local)"
/etc/rc.local
log_end_msg $?
/home/ubuntu/unhide_ICH_SMBus
fi
}

case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac

Afterwards I restarted Ubuntu and this time the sensors worked!

I decided to install a gdesklet to see the mother/cpu temperature in the desktop, unfortunately after trying every gDesklet that show sensors/temperature I gave up... none of them worked!!!
Finally I found the application that I wanted :

Computer Temperature Monitor


You can download the .deb package for Ubuntu Feisty here :
computertemp_0.9.6.1-0ubuntu1_all.deb
After installed with a simple double-click I right clicked in the task-bar and select "Add to panel" then browsed to
"System and Hardware" and selected "Computer temperature monitor".


Then the temperature reading appeared in the task bar :

Thursday, 14 June 2007

Installing a Weather Desklet on Ubuntu 7.04

Finally I installed a working weather forecast desklet on my ubuntu 7.04 Feisty Fawn.
Here an screenshot :
I found many bogous desklets that only show error messages : Error retrying information, no connection,...
Finally I found a working wheather forecast desklet, if you want to install the same desklet follow the next steps :

First you must have gDesklet installed :
Go to the task-bar and select
System -> Administration -> Synaptic Package Manager
Then in the the top of the Synaptic Package Manager window, click the Search button.
In the search window type : gDesklets
Then select and install the "gDesklets" and "gDesklets-data" packages.
after that go to Applications>gDesklets.
And the gDesklets Shell window appears
(or in a terminal, type : gdesklets)

Afterwards in the menu select "File" and "Install Remote Package" and use the following URL :


After the downloading and installation you will see the GoodWeather desklet in the right panel.

Then double click on it and place it on the desktop.

Then configure the desklet with the right button and selecting configure then use your city code. To find your city code go to http://www.weather.com/ and find your city, then select it and watch the address bar of the browser and write down the code.
In my case was :
So my city code was : ARBA0009
Then paste the location code in the desklet's configuration panel. Then restart desklet.

There are lots of desklets in the site :

Wednesday, 13 June 2007

Running Vice 1.21 Commodore Emulator under Ubuntu 7.04

Last weekend I installed Vice 1.21 - Commodore Emulator on my Ubuntu 7.04 - Festy Fawn.
First I downloaded the tarball (source code) from the site
vice-1.21.tar.gz
The official site of Vice is :
Vice Team
VICE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
So don't be afraid to download it!

Then I opened a terminal and ran the commands In order to obtain the gcc compiler :
sudo apt-get install build-essential

Then I decompressed the file with the command :
tar xvfz vice-1.21.tar.gz
Then I changed the current directory to the /vice-1.21 and ran the command :
sudo ./configure
Then I ran :
sudo make

Then I got the following errors :
../../src/arch/unix/x11/xaw/uiarch.h:33:27: error: X11/Intrinsic.h: No such file or directory
../../src/arch/unix/x11/xaw/uiarch.h:34:28: error: X11/StringDefs.h: No such file or directory
In file included from ../../src/arch/unix/x11/xaw/videoarch.h:5,
from ../../src/arch/unix/videoarch.h:9,
from video-canvas.c:39:

So I Installed the libxt-dev package to fix the problem :
sudo apt-get install libxt-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libice-dev libsm-dev
The following NEW packages will be installed:
libice-dev libsm-dev libxt-dev
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 563kB of archives.
After unpacking 1675kB of additional disk space will be used.
Do you want to continue [Y/n]?

Then I ran again :

sudo make

And another error was reported :
FileSel.c:47:29: error: X11/Xaw/SimpleP.h: No such file or directory
FileSel.c:48:28: error: X11/Xaw/Simple.h: No such file or directory
FileSel.c:49:28: error: X11/Xaw/LabelP.h: No such file or directory
FileSel.c:50:27: error: X11/Xaw/Label.h: No such file or directory
FileSel.c:51:30: error: X11/Xaw/CommandP.h: No such file or directory
FileSel.c:52:29: error: X11/Xaw/Command.h: No such file or directory
FileSel.c:53:27: error: X11/Xaw/FormP.h: No such file or directory
FileSel.c:54:26: error: X11/Xaw/Form.h: No such file or directory
In file included from FileSelP.h:25,
from FileSel.c:71:
DirMgr.h:86: warning: function declaration isn't a prototype
In file included from FileSel.c:71:
FileSelP.h:27:31: error: X11/Xaw/Cardinals.h: No such file or directory
FileSel.c: In function ChildrenCreate:
FileSel.c:767: error: labelWidgetClass undeclared (first use in this function)
FileSel.c:767: error: (Each undeclared identifier is reported only once
FileSel.c:767: error: for each function it appears in.)
FileSel.c:805: error: commandWidgetClass undeclared (first use in this function)
make[7]: *** [FileSel.o] Error 1
make[7]: Leaving directory `/home/ubuntu/vice-1.21/src/arch/unix/x11/xaw/widgets'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/home/ubuntu/vice-1.21/src/arch/unix/x11/xaw'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/ubuntu/vice-1.21/src/arch/unix/x11'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/ubuntu/vice-1.21/src/arch/unix'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ubuntu/vice-1.21/src/arch'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ubuntu/vice-1.21/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/ubuntu/vice-1.21/src'
make: *** [all-recursive] Error 1

So I Installed libxaw7-dev and libxaw-headers packages :

sudo apt-get install libxaw7-dev libxaw-headers

ubuntu@horus:~/vice-1.21$ sudo apt-get install libxaw7-dev libxaw-headers
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libxmu-dev libxmu-headers libxpm-dev
The following NEW packages will be installed:
libxaw-headers libxaw7-dev libxmu-dev libxmu-headers libxpm-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 389kB of archives.
After unpacking 1577kB of additional disk space will be used.
Do you want to continue [Y/n]?

Then I ran again :

sudo make

that finished without errors. So I ran :

sudo make install

I started the emulator via the x64 command to my surprise the screen was always black, If i pressed the left mouse button or the right button a menu appeared but the screeen was always black.
After googling a little I found the solution :
Just a simple change (a 0 for a 1) in the file :
vice-1.21/src/arch/unix/x11/xaw/uicolor.c

So I changed the line :
im = XCreateImage(display, visual, x11ui_get_display_depth(),
ZPixmap, 0, (char *)data, 1, 1, 8, 1);

for :

im = XCreateImage(display, visual, x11ui_get_display_depth(),
ZPixmap, 0, (char *)data, 1, 1, 8, 0);


Then I recompiled again with :
sudo make
then
sudo make install

Then the program worked!!!
Thanks to the open source it was posible to fix the game and play ASYLUM!!!
This is one of the benefits of having the code!!!

Here the screen with the compiling console, gedit with the source, and Asylum (a C64 Adventure Game) !!!



For those who don't know the Asylum game here is a link with the D64 disk image :

http://www.retrosite.de/adventure/asylum/asylum.html

Please, remember don't look up in Asylum!!! ;-)

Monday, 4 June 2007

Data Execution Prevention NIGHTMARE!!!

Last weekend I used three new computers with Windows XP service pack 2.

The computers specs are :

Two Pentium IV Intel 3.0 Dual Core 925 775 with Asus P5V-VM and one Intel Core 2 Duo E6420 4MB with Asus P5N-E SLI

After a while the computers started to randomly restart without any messages.

This is the default behavior of Windows XP, after a major error the system automatically reboots without showing any message or warning, just the same if you unplug/plug the power supply. Yes! another good idea by Bill Gate$ .

In order to know what is happening I first deactivated this default behavior :

In the desktop select the "My Computer" icon, then right-click and select "properties" then in "Advanced" tab. Locate the Startup and Recovery area and click on the Settings button.
In the "Startup and Recovery" window, locate and uncheck the check box next to "Automatically restart". Click OK in the Startup and Recovery window. Click OK in the System Properties window.
So next time the computer won't reboot automatically.

After a few moments I got the first BSOD (Blue Screen of Death) the error was :

STOP: 0x000000FC (0xA8D347C4, 0x0CAAF963, 0xA8D34730, 0x00000001)


After searching the web I found the Micro$oft article 886348 :

http://support.microsoft.com/kb/886348/en-us

It was related to a "bad driver" or "WhoKnowsWhat" that was trying to execute in a memory data range. So the Data Execution Prevention (DEP) decided to reboot the machine without a message. I really hate this kind of "Big Brother's Tool" that monitor and take actions by its own.

Why do we need a monitor of our activities? Why doesn't it show a message to the user? It wasn't a virus, the machines are completely clean with few software installed.

According to Micro$oft site :

"These checks, known as software-enforced DEP, are designed to block malicious code that takes advantage of exception-handling mechanisms in Windows."

But who decides what is malicious code and what isn't. Yes, the decition is taken by the binaries of Micro$oft, that are plagued of bugs, errors and are reduntant and inefficient. So, don't be surprised that DEP takes incorrect actions.


So the OS decided to reboot on its own. And I decided to deactivate for ever this kind of Big Brother's Tools.
To do that I Clicked the "Start" button, clicked "Run" and typed the following command :

bootcfg /raw "/noexecute=alwaysoff /fastdetect" /id 1

That deactivated the DEP forever.

If you want to check if the command finished sucefully :

Click "Start", click "Run", type "sysdm.cpl", and then click OK. Then on the "Advanced" tab, under "Startup and Recovery", click "Settings" and in the "Startup and Recovery" dialog box, see if the line have the "/noexecute=alwaysoff" command.


After that neither computer has restarted again. The problem was M$ DEP.

It seems the PC had DEP activated when they made this commercial :

Monday, 28 May 2007

Ubuntu Installed Grub - Bye Solaris 10!

As usual Solaris suffered when I tried others operating systems.
One of the most common causes of the Solaris destruction is the fact that the Solaris partition ID is 0x82 (the same as the Linux Swap partition). So if you boot from a Live CD (like Ubuntu) it will automatically assign your Solaris partition as a Swap... Yes!!! without a prompt!!! so it will destroy the Solaris installation!.
Later with Solaris 10 Sun changed the partition ID for 0xbf to avoid this problem.

Another problem is the modified grub that Solaris uses.
As you can read in another post I finally decided to install Ubuntu. I have one hard disk with :
Windows XP (that came with the laptop), PC-BSD 1.3.2, Solaris 10, and Slackware 11 (now Ubuntu 7.04).
I have 4 primary partitions :
Windows - Partition 0
Slackware 11 - Partition 1
PC-BSD - Partition 2
Solaris - Partition 3

I was using LILO in my MBR (Master Boot Record / Partition Table). When I Installed Ubuntu over the Slackware partition, it also installed the grub in the MBR. The problem was that I couldn't boot Solaris again.
Yes... I modified the menu.lst of the grub in Ubuntu hundres of times, but nothing worked... I only got different errors messages : Invalid Partition, Filesystem type unknown, etc.
Finally I decided to search in the Sun Web Site and I found the following :

http://www.sun.com/bigadmin/features/articles/grub_boot_solaris.html

GRUB as obtained from sources other than Sun does not currently recognize Solaris on-disk VTOC and UFS formats. Sun has submitted changes to the GRUB project to support this; until they have been integrated, only the Solaris GRUB will work. If Linux installed GRUB on the master boot block, you will not be able to get to the Solaris OS even if you make the Solaris partition the active partition. In this case, you can chainload from the Linux GRUB by modifying the menu on Linux. Alternatively, you can replace the master boot sector with the Solaris GRUB in the above example, by using the installgrub(1M) command:




installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t2d0s3

Before the Solaris VTOC and UFS implementation is propagated to the standard GRUB release, only the Solaris version of GRUB will work.

I tried the installgrub command booting from the Install DVD and selecting option 6. But I only got an error message : /dev/dsk/c0t0d0 : Not a character device. I tried with rdsk and another disk number but neither worked.




So I reinstalled Solaris again. But when I click "Finish" and the system rebooted the Ubuntu Grub menu appears... I was expecting the Solaris grub... what happend??
I don't really know but maybe Solaris got confused with ubuntu's grub in the MBR.
So I had to use and old 3 1/2" diskette with DOS and a Norton Disk Editor 4. I booted DOS ran DE and selected the hard disk as physical disk and saved the MBR in a file. Just to have a backup of the MBR!
Then I booted from the Windows XP CD and used the recovery console and ran the FIXMBR command (with my fingers crossed).
It deleted ubuntu's grub from the MBR.
Then I Rebooted and installed again Solaris. Without the Ubuntu Grub, the Solaris installation wrote the MBR with its grub.
Then I was able to boot Solaris 10 and modified the menu.lst in Solaris with the following :
------------
title Solaris 10 11/06 s10x_u3wos_10 x86
root (hd0,3,a)
kernel /plataform/i86pc/multiboot
module /plataform/i86pc/boot_archive

title ubuntu, Kernel 2.6.20-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=b98c9312-17fb-4e5b-8459-7d4008a8858d ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title ubuntu, Kernel 2.6.20-15-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=b98c9312-17fb-4e5b-8459-7d4008a8858d ro single
initrd /boot/initrd.img-2.6.20-15-generic

title PC-BSD 1.3.2
rootnoverify (hd0,2)
chainload +1

title Windows XP
rootnoverify (hd0,0)
chainload +1

---------



Now I finally can boot Solaris and the others OS again...

Why does my Solaris always get hurt???

Thursday, 24 May 2007

Installing Ubuntu 7.04 on a Compaq Presario 1500 Notebook

Finally I decided to try again the Ubuntu 7.04 live cd.

I booted and selected the "Start or install Ubuntu" option.

When the screen showed a garbled display I pressed "crtl-alt-f2" and ran the command :

sudo dpkg-reconfigure xserver-xorg

Then I chose the following options :

Attempt to autodetect video hardware? : "Yes"
X server driver : "ati"
Identifier for your video card : "ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]"

Video card's Bus identifier : "PCI:1:0:0"
Amount of memory (KB) to be used by the video card : "32768"
Use Kernel Framebuffer device interface : "Yes"
Then a few questions about the Keyboard & mouse
Write default files section to configuration file ? : "Yes"
Attempt Monitor Autodetection ? : "Yes"
Identifier for the monitor : "Generic Monitor"
Video Modes to be used by the X server : "1400 x 1050"
Method for selecting the monitor characteristics ? : "Medium"
Resolution : "1400x1050 @ 60Hz"
Write monitor sync ranges to the configuration file : "Yes"
Desired default color depth in bits : "16"

Then I returned to the console usign the crtl-alt-F7

And pressed the ctrl-alt-backspace twice. Then the gnome restarted with a 1400x1050 @ 60Hz resolution without problem.

I installed the distribution and rebooted.

Then I opened a terminal and I edited manually the /etc/X11/xorg.conf file.

In the following link you can download my xorg.conf.

http://aleks.vigio.pl/?lang=spain&page=show&id=256


The glxgears shows an average of 1000fps.

I pressed the button "Enable Desktop Effect" and activate the options :
"Windows Wobble when Moved"
"Workspaces on a Cube"



But the cube effect didn't work until I ran the following two commands :

gconftool-2 --type int --set /apps/compiz/general/screen0/options/hsize 4

gconftool-2 --type int --set /apps/compiz/general/screen0/options/number_of_desktops 1


Then I pressed the ctrl+alt+left or the ctrl+alt+Button1 and the cube worked!!!

Now I'm using Ubuntu... so... I'm Finally a Human Being!!!

Tuesday, 15 May 2007

Is Ubuntu not for ati mobility beings???

I decided to test the Desktop LiveCd of the most popular linux distribution (according with Distrowatch.com) http://distrowatch.com/

Yes... I tested the Ubuntu Live Cd of the versions 6 (Dapper Drake) and 7.04 (Feisty Fawn).

According to its site (http://www.ubuntu.com/products/WhatIsUbuntu) ubuntu is a linux for human beings and a "linux-based operating system that is perfect for laptops, desktops and servers"...The graphical installer enables you to get up and running quickly and easily...

So I expected to insert the cd, boot from it and just use it.

But as usual I found some problems with these "easy to use" distributions.

My equipment is a Notebook Presario 1500US with a Pentium 4 2.4GHz and an Ati mobility Radeon 7500 32MB a 4-year-old equipment.

I was able to boot and use version 6 (Dapper Drake) but the screen was a little moved up and when I tried to change the resolutions/refresh rate I saw something very strange :

Resolution : 1280x1024
Refresh Rate : -19569 Hz


What??? A 19569 negative Hertz??? what!? My notebook is displaying characters more faster than the speed of light?? or I'm traveling in Warp 10??? One second for the laptop is -1 seconds to me...

I would like to show my notebook to Heinrich Rudolf Hertz but unfortunately that is impossible... roughly 1 Hertz can be defined as 1 cycle per second. So what is a negative hertz? are they the cycles that don't happen in a second? or maybe because the time scale for the notebook is different than mine...

Am I reaching the time dilatation of the Einstein Theory? For Einstein it was the relative motion which caused both observers to see the other's clocks as having slowed down.I'm sitting in a chair It has a small wheel and I admit that sometimes I use it to move in the room, but reaching the speed of light with these small wheels???

In a fast movement I shutdown the X server because I was afraid that I couldn't return to my time (year 2007 BC).

So I inserted the Ubuntu Feisty Fawn Desktop live Cd and I chose the "Start or install Ubuntu" option.These time the screen went worse, I only saw a garbled display.

Here is the image :


I reset and choose the "Start Ubuntu in safe graphics mode" and I got this funny output :
Later I boot again and pressed "F4" and chose a different resolution... I always got the same garbled display.Later still I used the crtl-alt-f2 and ran the "sudo dpkg-reconfigure xserver-xorg" command. Unfortunately I tested a few configurations without success.
(update : I finally made it work. Here is the guide :
)
Really I don't want to download another cd (the alternate cd that has a console installation) burn it, test it and spend four or five hours trying to get the ATI driver to work, because this is "an Easy to setup distribution" if I have to spend four or five hours trying to install a so called "Easy to install distribution" then that make not sense to me.

I can install a new slackware in less time (A so called difficult to install distribution).

So. Is ubuntu not for ati mobility beings??? or maybe I'm not a human being.

Anyway, now I could boot the Dapper Drake with a -19569 Hz frequency and I'm reaching the limits of the reality and the universe...

I'm travelling at the speed of light!!! join me, don't be afraid : "No one can face the infinity without feeling vertigo"