Sunday, May 25, 2008

Wireless interface rename and suspending when upgrading debian lenny/sid to kernel 2.6.24

I found two issues when upgrading to kernel 2.6.24 in my Dell Latitude D620. The first one was related to the wireless interface. With kernel 2.6.24 the new Intel driver iwl is already included in stock kernel, so the ipw driver and regulatory daemon are no longer necessary. After kernel installation and reboot, the wireless interface was recognized as wmaster0_rename, wich made unusable my wpa configuration as it was referring the eth1 interface. This is a udev issue. The solution is to edit the file /etc/udev/rules.d/z25_persistent-net.rules an replace this line:

# PCI device 0x8086:0x4222 (ipw3945)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:18:de:8b:7c:b4", NAME="eth1"


with this one:

# PCI device 0x8086:0x4222 (ipw3945)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:18:de:8b:7c:b4", ATTR{type}
=="1", NAME="eth1"

Suspending was failing for me as well, due to the nvidia driver. To correct it, go to file /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-dell.fdi and change D620 section to read like this:



<match key="system.hardware.product" contains_outof="CPx J800GT;D410;D420;D520;C610;D620;D830">
<match key="info.linux.driver" string="nvidia">
<merge key="power_management.quirk.none" type="bool">true</merge>
</match>
<!-- <merge key="power_management.quirk.vbe_post" type="bool">true</merge>
<merge key="power_management.quirk.vbemode_restore" type="bool">true</merge>
-->
</match>

Labels: , , , , ,


Sunday, March 16, 2008

Eclipse Europa on Debian
I've been struggling until recently settting up and running Eclipse Europa on Debian GNU/Linux. If you are using the Sun JVM you'll probably get lots of out of memory errors due to permanent generation space problems. This is a known problem, and the suggested solution is to increase the permanent generation memory size with the -XX:MaxPermSize option. This didn't work for me. I finally switched to the IBM JVM 6 for Linux and now Eclipse runs flawlessly.

Labels: , , , ,


Friday, July 20, 2007

VMWare and libX11.so.6 on Debian amd64

If you get:

/usr/lib/vmware/bin/vmware-vmx: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

when launching vmware player on Debian for AMD64 platform, don't panic. Just:

# apt-get install ia32-libs

and go on. Easy!

Labels: , ,


Saturday, April 14, 2007

Getting SQL statistics from Hibernate

It is important to be able to see the SQL queries hibernate is generating. There are two suitable options here:

  1. Get them via log4j: just add the following logger to the log4j properties file: "log4j.logger.org.hibernate.SQL=DEBUG, SQLappender", where SQLappender is a log4j appender defined somwhere else.
  2. Use the hibernate statistics package: there are some useful classes and interfaces under the org.hibernate.stat package which you can use to get query statistics (http://www.hibernate.org/hib_docs/v3/api/org/hibernate/stat/package-summary.html)

Labels: , ,


Friday, September 08, 2006

Installing Solaris 10 on a Dell D620 laptop

It can be a little tricky to get Solaris 10 running on a Dell D620 laptop. Here you will find my personal experience. Try this under your own risk and backup first!

We should start by getting Solaris. That's an easy task, just follow the steps from http://www.sun.com/software/solaris/get.jsp and burn a DVD. I installed Solaris 10 x86 release 06/06.

Installation
Solaris won't install (nor run) in an Intel Core Duo pc with BIOS A04, so we have to disable the core duo capability from the BIOS. Go to the performance section and disable it. If you upgrade your bios to A05 you can go ahead and two virtual processor will be reported by Solaris. Now we can boot from the DVD and the installation process will begin.It should work without problems. I just changed the keyboard layout to Spanish. Don't try to configure the video card to optimum values now, we will install nvidia official drivers later on. Keep in mind that you have to install Solaris in a primary partition, it is not possible to install it in a extended partition. Choose/create a primary partition and install Solaris in it. It is not necessary to specify an additional partition as swap area, Solaris will provide the necessary layout in the same partition to accommodate swap area. Of course, you have the option to specify the slices layout. Go ahead, install your favorite software cluster and reboot.

After booting, the Solaris installed GRUB menu will appear. In my case, I already had Windows and Debian GNU/Linux installed, with the Linux GRUB menu in place. Solaris writes its own GRUB menu in the master boot record, so the original Linux GRUB is now lost. No problem, we'll see how to solve this.

If you try to boot the default option (Solaris) you'll see a reboot. This can be fixed by editing the GRUB Solaris entry and change:

kernel /platform/i86pc/multiboot

into

kernel /platform/i86pc/multiboot kernel/unix

or

kernel /platform/i86pc/multiboot kernel/unix -v

if you prefer a verbose booting process.

Now Solaris should boot flawlessly. Remember: you have to boot in "single" core processor.

After booting, Solaris will show a 640x480 desktop and no network card detection.

Video drivers
First of all, let's install the nvidia drivers for Solaris x86. Go to http://www.nvidia.com/object/unix.html and download them from another networked machine. You can copy them to a USB flash memory. Solaris will automount the flash memory under /rmdisk/unnamed_rmdisk. Just install the drivers as Solaris software packages following the instructions at http://download.nvidia.com/solaris/1.0-9629/README/chapter-01.html. It is not necessary to create an xorg config file. After reboot, I got a perfect 1440x900 display.

NIC Drivers
The Dell D620 comes with a Broadcom NetXtreme Gigabit Ethernet BCM95752 NIC. Solaris drivers can be downloaded from http://www.broadcom.com/support/ethernet_nic/downloaddrivers.php. Installation instructions come with the downloaded files and are easy to follow. After rebooting, the NIC will be detected as bcme0. I wanted this interface to be configured with DHCP, so I created an empty /etc/dhcp.bcme0 file. There's a strange behavior with the NIC that I still have to solve. When booting, it reports a link down:


Nov 19 17:04:47 pcjfernan bcme: [ID 702911 kern.notice] NOTICE:
Nov 19 17:04:47 pcjfernan Broadcom NetXtreme Gigabit Ethernet Driver (32-bit) v9.7.0
Nov 19 17:04:47 pcjfernan bcme: [ID 539534 kern.notice] NOTICE:
Nov 19 17:04:47 pcjfernan bcme0 : Broadcom NetXtreme Gigabit Ethernet BCM95752 (Copper) is detected
Nov 19 17:04:47 pcjfernan bcme: [ID 796738 kern.notice] NOTICE: bcme0 : Firmware version 5752-v3.19
Nov 19 17:04:47 pcjfernan bcme: [ID 289540 kern.notice] NOTICE: bcme0 : No Link
Nov 19 17:04:47 pcjfernan pcplusmp: [ID 637496 kern.info] pcplusmp: pci14e4,1600 (bcme) instance 0 vector 0x12 ioapic 0x1 intin 0x12 is bound to cpu 0
Nov 19 17:04:47 pcjfernan pcie_pci: [ID 586369 kern.info] PCIE-device: pci1028,1c2@0, bcme0
Nov 19 17:04:47 pcjfernan genunix: [ID 936769 kern.info] bcme0 is /pci@0,0/pci8086,27d4@1c,2/pci1028,1c2@0


Then the dchpagent tries to configure it but, of course, cannot:

Nov 19 17:04:47 pcjfernan /sbin/dhcpagent[46]: [ID 479412 daemon.error] insert_ifs: SIOCGIFFLAGS for bcme0: No such device or address
Nov 19 17:04:47 pcjfernan svc.startd[7]: [ID 652011 daemon.warning] svc:/network/physical:default: Method "/lib/svc/method/net-physical" failed with exit status 96.


Just after this, the link is up:

Nov 19 17:04:49 pcjfernan bcme: [ID 289540 kern.notice] NOTICE: bcme0 : Link is Up (100Mbps, Full Duplex, Rx & Tx Flow Control ON)

More on this when I come with a solution. Anyway, the NIC can be configured by hand with:

# ifconfig bcme0 plumb
# ifconfig bcme0 dhcp

Sound Drivers
The Dell D620 comes with an Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller. Solaris drivers can be downloaded from www.opensound.com. Go to downloads and, in the form, type ICH7 an select Solaris 10 (x86/AMD64). You'll be redirected to the download link. Follow installation instructions an reboot. Dmesg will show you this:


Nov 19 17:04:52 pcjfernan pseudo: [ID 129642 kern.info] pseudo-device: ossaudios0
Nov 19 17:04:52 pcjfernan genunix: [ID 936769 kern.info] ossaudios0 is /pseudo/ossaudios@0
Nov 19 17:04:52 pcjfernan pseudo: [ID 129642 kern.info] pseudo-device: ossaudios0
Nov 19 17:04:52 pcjfernan genunix: [ID 936769 kern.info] ossaudios0 is /pseudo/ossaudios@0
Nov 19 17:04:52 pcjfernan pseudo: [ID 129642 kern.info] pseudo-device: rsm0
Nov 19 17:04:52 pcjfernan genunix: [ID 936769 kern.info] rsm0 is /pseudo/rsm@0
Nov 19 17:04:52 pcjfernan pseudo: [ID 129642 kern.info] pseudo-device: devinfo0
Nov 19 17:04:52 pcjfernan genunix: [ID 936769 kern.info] devinfo0 is /pseudo/devinfo@0
Nov 19 17:04:53 pcjfernan rootnex: [ID 349649 kern.info] xsvc0 at root
Nov 19 17:04:53 pcjfernan genunix: [ID 936769 kern.info] xsvc0 is /xsvc
Nov 19 17:04:53 pcjfernan pcplusmp: [ID 637496 kern.info] pcplusmp: asy (asy) instance 0 vector 0x4 ioapic 0x1 intin 0x4 is bound to cpu 0
Nov 19 17:04:53 pcjfernan isa: [ID 202937 kern.info] ISA-device: asy0
Nov 19 17:04:53 pcjfernan genunix: [ID 936769 kern.info] asy0 is /isa/asy@1,3f8
Nov 19 17:04:53 pcjfernan pseudo: [ID 129642 kern.info] pseudo-device: pseudo1
Nov 19 17:04:53 pcjfernan genunix: [ID 936769 kern.info] pseudo1 is /pseudo/zconsnex@1
Nov 19 17:04:53 pcjfernan unix: [ID 954099 kern.info] NOTICE: IRQ21 is being shared by drivers with different interrupt levels.
Nov 19 17:04:53 pcjfernan This may result in reduced system performance.
Nov 19 17:04:53 pcjfernan npe: [ID 236367 kern.info] PCI Express-device: pci1028,1c2@1b, hdaudio0
Nov 19 17:04:53 pcjfernan genunix: [ID 936769 kern.info] hdaudio0 is /pci@0,0/pci1028,1c2@1b

And the audio kernel modules can be seen with a modinfo:

150 f813c000 2a7c 209 1 ossaudios (OSS 4.0rc2 (build 177/200610310)
152 f8176558 b2ec - 1 amsrc2 (Audio Sample Rate Conv. #2 1.2)
153 f8177000 216c - 1 audiosup (Audio Device Support 1.23)
154 f8179000 1262c - 1 mixer (Audio Mixer 1.63)
164 f81ca000 ea54 206 1 hdaudio (OSS 4.0rc2 (build 177/200610310)


Battery Status
Now, let's install the gnome battery status applet monitor. We need the proper acpi drivers. We'll get everything with frkit from http://www.opensolaris.org/os/community/laptop/frkit/. Download the script, execute it and it'll be done. Add the battery status applet to the gnome panel. I found that after a little while the applet will get 8-9% cpu time. That's something I have to investigate further.

TODO
Support for the wireless card is a work in progress (http://www.opensolaris.org/jive/thread.jspa?threadID=9208&tstart=0). Stay tuned!

Labels: ,


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]