Tuesday, July 31, 2007

slackware 12.0 - fvwm, siliconmotion

I did not leave slackware. I downloaded the latest version of FVWM sourcecode, built and gave it an install. Now every thing is fine with FVWM.

Then I spent my rest time digging into the xorg configuration. Slackware did not use the latest FVWM but contains the latest xorg and it broken with my siliconmotion LynxEM+. I tried with a basic VGA driver, the ctrl-alt-backspace worked. With siliconmotion driver,


(II) LoadModule: "siliconmotion"
(II) Loading /usr/lib/xorg/modules/drivers//siliconmotion_drv.so
(II) Module siliconmotion: vendor="X.Org Foundation"
compiled for 1.2.99.901, module version = 1.4.1
Module class: X.Org Video Driver
ABI class: X.Org Video Driver, version 1.1


(II) LoadModule: "vgahw"
(II) Loading /usr/lib/xorg/modules//libvgahw.so
(II) Module vgahw: vendor="X.Org Foundation"
compiled for 1.3.0, module version = 0.1.0
ABI class: X.Org Video Driver, version 1.2
(**) Silicon MotionDepth 16, (--) framebuffer bpp 16
(==) Silicon MotionRGB weight 565
(==) Silicon MotionDefault visual is TrueColor
(**) Silicon MotionOption "NoAccel" "True"
(**) Silicon MotionOption "HWCursor" "False"
(**) Silicon MotionOption "UseBIOS" "False"
(**) Silicon MotionOption: NoAccel - Acceleration disabled
(**) Silicon MotionUsing Software Cursor
(**) Silicon MotionOption: UseBIOS disabled.


As you can see, I disabled accelerator and UseBios options.


And I check packages, here is some difference:
REDHAT

xf86-video-siliiconmotion 1.3.1.5
xorg-server 1.0.1 (X11R6 X server)
I think X11R6 is not correct it should be 7.0.0 as I dumped by Xorg.0.log

===================================
X Window System Version 7.0.0
Release Date: 21 December 2005
X Protocol Version 11, Revision 0, Release 7.0
Build Operating System:Linux 2.6.9-22.18.bz155725.ELsmp i686Red Hat, Inc.
=====================================

Install log (Fc5)
==========================================================
Installing xorg-x11-server-Xorg-1.0.1-8.i386.
nstalling xorg-x11-drv-mouse-1.0.4-1.i386.
Installing xorg-x11-drv-siliconmotion-1.3.1.5-1.1.i386.
Installing libXcursor-1.1.5.2-2.2.i386.
Installing xorg-x11-drivers-7.0-2.i386.

SLACKWARE
X Window System Version 1.3.0
(II) Loading /usr/lib/xorg/modules/extensions//libdri.so
(II) Module dri: vendor="X.Org Foundation"
compiled for 1.3.0, module version = 1.0.0
ABI class: X.Org Server Extension, version 0.3

============================
Xorg web site

7.0 [ ] xf86-video-siliconmotion-X11R7.0-1.3.1.5.tar.gz
xorg-server-X11R7.0-1.0.1.tar.gz
libXcursor-X11R7.0-1.1.5.2.tar.gz
xf86-input-mouse-X11R7.0-1.0.3.1.tar.gz

7.1 xf86-input-mouse-X11R7.1-1.1.0.tar.gz
xf86-video-siliconmotion-X11R7.1-1.4.1.tar.gz
libXcursor-X11R7.1-1.1.6.tar.gz
xorg-server-X11R7.1-1.1.0.tar.gz

7.2 xorg-server-X11R7.2-1.2.0.tar.gz

7.1


On my FC5, the version is use 7.0 but it still use the directory /usr/X11R6 not /usr/X11R7.
XCURSOR -> X11/Xcursor/Xcursor.h

I just don't know I can build the old version 7.0 on Slackware.

Monday, July 30, 2007

linux distro - which one I will choose?

I am in the bind of choosing a linux distro -- Ubuntu, Slackware or Fedora. It seems Ubuntu always failed to me, I tried to install Ubuntu to my thinkpad 130 which is of i1171, but I always failed on harddisk problems, I use the latest vesion 7.04, I don't know why grub-install always failed. and I am very dislike the start of X windows process through CD, that is toooo slow. And from the Web I see some people have some issues with this type of thinkpad especially for the current version - 7.04.

I can install Slackware on my thinkpad. The audio device need to re-configure with ALSA utilities, that's not big deal. There is one problem I still can not figure out, that is when I configure the xorg.conf, the ctrl-alt-backspace key will bring me a blank screen, it never return, the only way to get out of it, is hit ctrl-alt-delete to reboot. Should I set the start level at /etc/inittab to 4 instead of 3. I check /var/log/Xorg.0.log, the only problem seems DRI failed. Another issue is the fvwm setup, my workable fvwm2rc will not work in this version Slackware 12, the default fvwm in slackware is version 2.4.20(or 21), so I have to reconfigure my fvwm2rc or update it. Then is the issue that may not be a problem for an experienced linux user, I don't like the pkgtool which does not support dependences, the user will take the responsiblity.

Fedora Core 5 is installed on my working machine, it works fine and I never have a problem with it. And it also works fine on my thinkpad. The main reason to choose FC5 is Yum, which compared to pkgtool on slackware, it checks package dependences. I feel Yum is quite suit to me. With yum, FC5 find the most update package for me, for example, the fvwm downloaded by yum is "2.5.21". There could be network problem with one site, but yum can goes to the other site silently. Another reason is I like some scripts in FC5 - they are "system-config-xxxx", I can use these scripts configure my hard ware easyily.

The current version of Fedora is 7, I did not have a chance to use it.

As a result, the debian Ubuntu is beautiful, but I may not use it currently. Slackware is good for learning linux, but it is not friendly to a user, the user will take care too much things which may add a lot of pain. Fedora core 5, is quite suit to me, if the yum and system-config-xxxx work all the time.

The story is not end. Shake said "To be or not to be, that's a question". Slackware bring me both pains and pleasure. For FVWM, I can download fvwm 2.5.21 which supports "decor", build and install the new fvwm will solve my fvwm2rc problem I think. but it is not very easy to build xorg the x server. Even on FC5, will it be Ok if I am using a thinkpad R61?

Will I use Slackware or FC5? That is a problem of Linux.

Thursday, July 26, 2007

slackware - audio config on thinkpad 130

Yesterday I have successfully made audio working with slackware 12 on my thinkpad. When install, I did not select arts (lib), even I don't install most components of KDE,because I would like my thinkpad running with FVWM2. The important thing is I have to choose to install alsa components to the thinkpad, otherwise the audio would not work. After installation, the audio does not work, so I have to do some extra work:

1 runs "alsaconf" to select snd-intel8x0 which is detected by alsa.
2 check the result with "aplay -l" and "aplay sound_sample.wav"
3 runs "alsactl store" to save.


The following is the dump I got from FC5. The slackware will be the same but using some other things like "/etc/modprobe.d" blah blah.


------- lspci --------
00:00.0 Host bridge: Intel Corporation 82440MX Host Bridge (rev 01)
00:00.1 Multimedia audio controller: Intel Corporation 82440MX AC'97 Audio Controller
00:00.2 Modem: Intel Corporation 82440MX AC'97 Modem Controller
00:02.0 VGA compatible controller: Silicon Motion, Inc. SM712 LynxEM+ (rev a0)
00:03.0 CardBus bridge: O2 Micro, Inc. OZ6812 CardBus Controller (rev 05)
00:06.0 Ethernet controller: Intel Corporation 82557/8/9 [Ethernet Pro 100] (rev 08)
00:07.0 ISA bridge: Intel Corporation 82440MX ISA Bridge (rev 01)
00:07.1 IDE interface: Intel Corporation 82440MX EIDE Controller
00:07.2 USB Controller: Intel Corporation 82440MX USB Universal Host Controller
00:07.3 Bridge: Intel Corporation 82440MX Power Management Controller

------- lsmod --------
Module Size Used by
ppdev 8645 0
autofs4 19013 1
hidp 15937 2
rfcomm 34517 0
l2cap 23617 10 hidp,rfcomm
bluetooth 44069 5 hidp,rfcomm,l2cap
sunrpc 136573 1
video 14917 0
button 6609 0
battery 9285 0
ac 4933 0
ipv6 225569 12
lp 12297 0
parport_pc 25445 1
parport 34313 3 ppdev,lp,parport_pc
nvram 8393 0
uhci_hcd 28881 0
snd_intel8x0m 16077 0
snd_intel8x0 30301 1
snd_ac97_codec 83937 2 snd_intel8x0m,snd_intel8x0
snd_ac97_bus 2497 1 snd_ac97_codec
snd_seq_dummy 3781 0
snd_seq_oss 28993 0
snd_seq_midi_event 7105 1 snd_seq_oss
snd_seq 47153 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 8909 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 45009 0
snd_mixer_oss 16449 1 snd_pcm_oss
i2c_piix4 8529 0
snd_pcm 76869 4 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pcm_oss
i2c_core 20673 1 i2c_piix4
snd_timer 22597 2 snd_seq,snd_pcm
snd 50501 12 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 9377 1 snd
e100 33093 0
snd_page_alloc 10441 3 snd_intel8x0m,snd_intel8x0,snd_pcm
mii 5313 1 e100
dm_snapshot 16237 0
dm_zero 2241 0
dm_mirror 19985 0
dm_mod 50521 6 dm_snapshot,dm_zero,dm_mirror
ext3 116809 2
jbd 53077 1 ext3
------- /etc/modprobe.conf --------
alias eth0 e100
alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
options snd-intel8x0 index=0
remove snd-intel8x0 { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-intel8x0

------- /etc/asound.conf --------
javascript:void(0)

------- aplay -l --------
**** List of PLAYBACK Hardware Devices ****
card 0: I440MX [Intel 440MX], device 0: Intel ICH [Intel 440MX]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Modem [Intel 440MX Modem], device 0: Intel ICH - Modem [Intel 440MX Modem - Modem]
Subdevices: 1/1
Subdevice #0: subdevice #0


Tuesday, July 24, 2007

slackware & ubuntu - a little update

Yesterday, I continue the setup with Slackware, the new thing for me is xorgcfg which generate xorg config file, I can use my xorg config file from FC5, so it is not too hard for me to config X window. The second thing is the audio setup, the artds sends failure every time I restart the sound service, and what is artds? I don't know. I don't know what is wrong with my audio setup. I have to figure out way with FC5. Slackware is good for learnning linux, because there is something broken.

And another thing I have tied yesterday was ubuntu, ubuntu 7.04 only contains one cd that is very good, and Ubuntu is very impressive in the GUI, the desktop is so wonderful, it is as good as Windows. I thought linux is not as good as Windows in the general opinion, it has a lot lot of bugs in its code (I mean system code) compared to Windows, the good thing is the architecture is simple, but it is so simple not as NT which is carefully designed. Linux is not designed while NT is carefully designed.

In the Linux world, what I can believe? gcc, make, emacs, gdb, cscope. There are a lot of tools that were built with UNIX philosophy. And on GUI, there are gnome and KDE, now gnome seems also became stable then before. I believe C, but not C++. Maybe a linux devloper that don't use debug tools, they found bug thorough code review? gdb is not very good I think, especially in C++, cscope is also not good at C++. So I would not use C++ myself in linux world. It is unbelievable to see Qt in the Linux world.

Linux for me is a great place to learn programming. For example I learn python to configure my own FVWM.

Monday, July 23, 2007

slackware

Yesterday as Sunday, I spent all my day on the download and install of slackware, all the 6CD need to be download, and I also experience burning failure with my download using bittorrent, is that a bug in my bittorrent or record sonic? -- sometimes it report failure but it actually download completely in the termarilly folder as I checked. The six iso are in the same name (of directory) cause the problem? Maybe I have to set them to different folders manually?

The install process keep the same -- I feel the way did not change too much as I first use Slackware about six or seven years ago. For example, I use fdisk to config swap (82), and the linux disk (83), luckly I know those before, it is totally inconvenient compared with FC5.

The X setup is also a nightmare, and I did not have too much the time to do that yesterday, so I will continue setup X today.

Why I have given SlackWare another chance, should I abandoned it since FC5 was quite fit my need. Because Slckware is my first chioce when I hit to linux world? Because some people they are not abandoned it?

Thursday, July 19, 2007

Amarok -- GNU's itune

Several days ago I watched some video presented by RMS, he suggests don't buy Microsoft's, Apple's blah blah, he even mentioned itunes and ipods. Don't use them, because they are against FREE SOFTWARE's spirit. Actually I owned an iPod, and don't have a plan to buy an iPhone. I can't reject the beautiful things from Microsoft and Apple's, even my life is bind ed to Microsoft a lot -- I am a programmer. On the other hand, I respect RMS, I like GNU software such as using emacs every day. Are free software my future? I don't know, but I liked GNU software, that is the trueth, and I want to participate in GNU area, and I am quite happy currently programming with GNU tools, although my product is a commercial software with license needed. (I think that's a problem for future, I have to take steps to make things happen, I mean to be a FREE SOFTWARE programmer.)

Today, I found Amarok, which is an audio player built with KDElibs, so it can only be used by linux.

Wednesday, July 18, 2007

gdb - c++ on the virtual class

Sometimes I feel I waste a lot of time stuck in one single point. If I have a class IFoo, it is just an abstract interface, so it defines foo function but never implements it. The implementation of foo was in the concreate classes, such as CFooConcreateA and CFooConcreateB. The problem of gdb is, if I use a pointer to IFoo, as "IFoo* pFoo", gdb only reports the type of pFoo is IFoo, I have no way to get the real concreate object by pFoo, so if i do "print *pFoo", gdb will response with "incomplete type". I search the internet, read gdb manual again and again, even read gdbinit macro about QString, still no help (QString contains a 'd' to store the string data which is different than IFoo). Am I something wrong, learning gdb not enough, or there is really no way to figure it out.

The only way right now is leave it:-(