Gentoo config files

Friday, May 19. 2006

Here are my most recent config files:

config-linux-2.6.16-gentoo-r7 - Linux kernel configuration settings
make.conf - Portage custom settings
theme.cfg - Fluxbox configuration settings

HP-OfficeJet_7200-hpijs.ppd - HP Officejet 7210 All-in-One Postscript Printer Definition file

Xorg and Fonts

Thursday, May 18. 2006

Here is a good article on how to make XFree fonts look better: http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts.

.gtkrc

Thursday, May 18. 2006

After my recent Gentoo upgrade, all the GTK windows had annoyingly large fonts. The workaround to the problem was to create ~/.gtkrc and ~/.gtkrc-2.0 files specifying a smaller font:

gtk-theme-name = "Default"
gtk-font-name = "sans 8"


Of course the upgrade broke my wireless connection again, just like the last time. But this time I set ACCEPT_KEYWORDS="~x86" in /etc/make.conf and emerged ndiswrapper 1.15 using portage. Much better.

Missing zoneinfo

Thursday, May 11. 2006

I just finished updating my Gentoo OS, the first time in quite awhile. Needless to say there were alot of packages to be updated. But since Portage does it automatically it makes it a breeze:

emerge --sync
emerge world


Then let the machine alone for several hours.

But when it was finished the time was incorrect. Somehow, the /usr/share/zoneinfo/Americal/New_York time zone file got blown away. Not sure how. Anyway I found another one quickly and put it into place and reset the time. I saved the New_York zone file here.

Ndiswrapper

Wednesday, January 4. 2006

Having just upgraded my Gentoo version of GCC from 3.3 to 3.4, I decided it was time to rebuild my kernel. The upgrade went very smoothly, except for one small problem: my wireless card no longer worked.

I use ndiswrapper and that was what seemed to be broken, so I tried to unmerge and remerge it. But alas, it would not compile, with the following information:

localhost ndiswrapper-1.7 # emerge ndiswrapper
Calculating dependencies ...done!
>>> emerge (1 of 1) net-wireless/ndiswrapper-1.2 to /
>>> md5 files \;-) ndiswrapper-1.2.ebuild
>>> md5 files \;-) ndiswrapper-1.5.ebuild
>>> md5 files \;-) files/ndiswrapper-1.2-suspend2.patch
>>> md5 files \;-) files/digest-ndiswrapper-1.2
>>> md5 files \;-) files/digest-ndiswrapper-1.5
>>> md5 src_uri \;-) ndiswrapper-1.2.tar.gz
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 2.6.14-gentoo-r5
* Checking for suitable kernel configuration options:
>>> Unpacking source...
>>> Unpacking ndiswrapper-1.2.tar.gz to /var/tmp/portage/ndiswrapper-1.2/work
* Applying ndiswrapper-1.2-suspend2.patch ... [ ok ] * The only kernels that will work are gentoo-sources, vanilla-sources, and suspend2-sources.
* No other kernels are supported. Kernels like the mm kernels will NOT work.
* Converting ndiswrapper-1.2/driver/Makefile to use M= instead of SUBDIRS= ... [ ok ]>>> Source unpacked.
cc -Wall -g -DNDISWRAPPER_VERSION=\"1.2\" -c -o loadndisdriver.o loadndisdriver.c
gcc -o loadndisdriver loadndisdriver.o
* Preparing ndiswrapper module
make -C //usr/src/linux M=/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver \
NDISWRAPPER_VERSION=1.2 \
EXTRA_VERSION= modules
make[1]: Entering directory `/usr/src/linux-2.6.14-gentoo-r5'
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/hal.o
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/iw_ndis.o
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.o
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.c: In function `register_devices':
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/loader.c:963: warning: assignment from incompatible pointer type
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/misc_funcs.o
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ndis.o
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ndis.c:1721:5: warning: "LINUX_KERNEL_VERSION" is not defined
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/ntoskernel.o
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/pe_linker.o
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/proc.o
CC [M] /var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.o
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c:287:47: macro "halt" passed 1 arguments, but takes just 0
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c: In function `miniport_halt':
/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.c:287: warning: statement with no effect
make[2]: *** [/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver/wrapper.o] Error 1
make[1]: *** [module/var/tmp/portage/ndiswrapper-1.2/work/ndiswrapper-1.2/driver] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.14-gentoo-r5'
make: *** [default] Error 2

!!! ERROR: net-wireless/ndiswrapper-1.2 failed.
!!! Function linux-mod_src_compile, Line 505, Exitcode 2
!!! Unable to make KSRC=//usr/src/linux KVERS=26 all.
!!! If you need support, post the topmost build error, NOT this status message.


I failed to mention that I also upgraded my kernel from 2.6.12-gentoo-r10 to 2.6.14-gentoo-r5, which may have attributed to the problem.

The resolution: To download the latest ndiswrapper (1.7) from Source Forge and compile. This seemed to work, with a warning message:

localhost ndiswrapper-1.7 # make
make -C driver
make[1]: Entering directory `/var/tmp/ndiswrapper/ndiswrapper-1.7/driver'
make -C /lib/modules/2.6.14-gentoo-r5/build SUBDIRS=/var/tmp/ndiswrapper/ndiswrapper-1.7/driver \
DRIVER_VERSION=1.7
make[2]: Entering directory `/usr/src/linux-2.6.14-gentoo-r5'
LD /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/built-in.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/hal.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/iw_ndis.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/loader.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/misc_funcs.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/ndis.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/ntoskernel.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/ntoskernel_io.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/pe_linker.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/pnp.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/proc.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/wrapndis.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/wrapper.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/usb.o
CC [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/divdi3.o
LD [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/ndiswrapper.o
Building modules, stage 2.
MODPOST
CC /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/ndiswrapper.mod.o
LD [M] /var/tmp/ndiswrapper/ndiswrapper-1.7/driver/ndiswrapper.ko
make[2]: Leaving directory `/usr/src/linux-2.6.14-gentoo-r5'


*** WARNING: Kernel seems to have 4K size stack option (CONFIG_4KSTACKS) removed; many Windowsdrivers will need at least 8K size stacks. You should read wiki about 4K size stack issue. Don't complain about crashes until you resolve this.


make[1]: Leaving directory `/var/tmp/ndiswrapper/ndiswrapper-1.7/driver'
make -C utils
make[1]: Entering directory `/var/tmp/ndiswrapper/ndiswrapper-1.7/utils'
gcc -g -Wall -DUTILS_VERSION=\"1.7\" -o loadndisdriver loadndisdriver.c
make[1]: Leaving directory `/var/tmp/ndiswrapper/ndiswrapper-1.7/utils'


I followed the rest of the ndiswrapper installation instructions and got the wireless card working again in a jiffy. But...

I think whoever is in charge of ndiswrapper at Gentoo needs to get on the ball. The latest version available is still only 1.2. What is up with that?

xorg.conf

Tuesday, October 18. 2005

Here is the /etc/X11/xorg.conf file I use when my external 2000FP monitor is plugged in:

Section "Module"
Load     "GLcore"
     Load     "bitmap"
     Load     "dbe"
     Load     "ddc"
     Load     "dri"
     Load     "extmod"
     Load     "freetype"
     Load     "glx"
     Load     "int10"
     Load     "record"
     Load     "type1"
     Load     "vbe"
EndSection

Section "ServerLayout"
     Identifier "ServerLayout0"
     Screen "Screen0"
     InputDevice "Mouse0" "CorePointer"
     InputDevice "Keyboard0" "CoreKeyboard"
     InputDevice "Mouse0" "SendCoreEvents"
EndSection

Section "InputDevice"
     Identifier "Keyboard0"
     Driver "kbd"
EndSection

Section "InputDevice"
     Identifier "Mouse0"
     Driver "mouse"
     Option      "Protocol" "ExplorerPS/2"
     Option "Device" "/dev/input/mice"
     Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
     Identifier "Monitor0"
     VendorName "Dell"
     ModelName "Flat Panel 1600x1200"
     HorizSync 75.0
     VertRefresh 60.0
     Modeline "1600x1200" 162.00 1600 1664 1856 2160 1200 1201 1204 1250
     Modeline "1400x1050" 162.00 1400 1664 1856 2160 1050 1201 1204 1250
EndSection

Section "Device"
     Identifier "Card0"
     Driver "radeon"
     VendorName "ATI"
     BoardName "ATI Radeon Mobility 7500"
     BusID "PCI:01:00:0"
     #Option MonitorLayout "LVDS,TMDS"
     Option "MergedFB" "On"
     Option "DPMS" "On"
     Option "CRT2HSync" "75.0"     
     Option "CRT2VRefresh" "60.0"
     Option "CRT2Position" "Clone"
     Option "MetaModes" "1400x1050-1600x1200"
     Option "PanelSize" "1600x1200"
EndSection

Section "Screen"
     Identifier "Screen0"
     Device "Card0"
     Monitor "Monitor0"
     DefaultColorDepth 24

     SubSection "Display"
          Depth 24
          Modes "1600x1200"
          Virtual 1600 1200
     EndSubSection
EndSection