NetBSD: modular Xorg in Thinkpad R61


It’s not difficult to install modular Xorg in a NetBSD. In my case I was working with the standard Xorg and XFCE4 when I moved to modular. In fact, XFCE4 and GNOME are able to run when compiled against standard Xorg and then you launch the modular one.

So, to install modular Xorg simply follow this document:


http://wiki-static.aydogan.net/How_to_install_modular_Xorg

A new xorg.conf is needed. You can transform your previous one to adapt it to the modular paths (/usr/pkg/lib/X11) or create a new one with:

X -configure

Here how my xorg.conf looks like:

Section “ServerLayout”
Identifier “X.org Configured”
Screen 0 “Screen0” 0 0
InputDevice “Mouse0” “CorePointer”
# InputDevice “Mouse1” “CorePointer”
InputDevice “Keyboard0” “CoreKeyboard”
EndSection

Section “Files”
RgbPath “/usr/pkg/lib/X11/rgb”
ModulePath “/usr/pkg/lib/xorg/modules”
FontPath “/usr/pkg/lib/X11/fonts/misc/”
FontPath “/usr/pkg/lib/X11/fonts/TTF/”
FontPath “/usr/pkg/lib/X11/fonts/Speedo/”
FontPath “/usr/pkg/lib/X11/fonts/Type1/”
FontPath “/usr/pkg/lib/X11/fonts/CID/”
FontPath “/usr/pkg/lib/X11/fonts/75dpi/”
FontPath “/usr/pkg/lib/X11/fonts/100dpi/”
FontPath “/usr/pkg/lib/X11/fonts/TTF/”
FontPath “/usr/X11R7/lib/X11/fonts/TTF/”
EndSection

#Section “Module”
# Load “GLcore”
# Load “cfb”
# Load “cfb32”
# Load “dbe”
# Load “dri”
# Load “extmod”
# Load “glx”
# Load “mfb”
# Load “record”
# Load “shadow”
# Load “xtrap”
# Load “freetype”
# Load “type1”
#EndSection

Section “Module”
Load “dbe”
Load “dri”
Load “dri2”
Load “extmod”
Load “glx”
########################
#Jes
Load “freetype”
Load “type1”
########################
EndSection

Section “InputDevice”
Identifier “Keyboard0”
Driver “kbd”
Option “XkbRules” “xorg”
Option “XkbModel” “pc105”
Option “XkbLayout” “es”
# Option “AutoRepeat” “200 30”
EndSection

Section “InputDevice”
Identifier “Mouse0”
Driver “mouse”
# Option “Protocol” “auto”
# Option “Device” “/dev/mouse”
Option “Protocol” “wsmouse”
Option “Device” “/dev/wsmouse”
Option “ZAxisMapping” “4 5 6 7”
EndSection

#Section “InputDevice”
# Identifier “Mouse1”
# Driver “mouse”
# Option “Protocol” “auto”
# Option “Device” “/dev/mouse”
# Option “Protocol” “wsmouse”
# Option “Device” “/dev/wsmouse”
# Option “ZAxisMapping” “4 5 6 7”
#EndSection

Section “Monitor”
#DisplaySize 300 190 # mm
Identifier “Monitor0”
VendorName “LEN”
ModelName “4031”
Option “DPMS”
EndSection

Section “Device”
### Available Driver options are:-
### Values: : integer, : float, : “True”/”False”,
### : “String”, : ” Hz/kHz/MHz”
### [arg]: arg optional
#Option “NoAccel” # []
#Option “SWcursor” # []
#Option “ColorKey” #
#Option “CacheLines” #
#Option “Dac6Bit” # []
#Option “DRI” # []
#Option “NoDDC” # []
#Option “ShowCache” # []
#Option “XvMCSurfaces” #
#Option “PageFlip” # []
#######################
#TEST 3D
#http://www.netbsd.org/~jmcneill/index.html
#Intel 82915GM/GMS,82910GML,82965PM Integrated Graphics Device (i915drm)
#Please note that the xf86-video-intel 2.1.1 driver must be used with modular-xorg-server 1.3.0, newer
#drivers are unsupported.
#Option “AccelMethod” “XAA”
#Option “XAANoOffscreenPixmaps” “true”
###################
#http://imil.net/wp/tag/dri/
Option “DRI” “true”
# Option “AccelMethod” “XAA”
Option “AccelMethod” “EXA”
Option “XAANoOffscreenPixmaps” “true”
Option “AllowGLXWithComposite” “true”
Option “XVideo” “true”

#######################

Identifier “Card0”
Driver “intel”
VendorName “Intel Corporation”
BoardName “Mobile GM965/GL960 Integrated Graphics Controller”
BusID “PCI:0:2:0”

EndSection

Section “ServerFlags”
Option “AIGLX” “true”
EndSection

Section “DRI”
Mode 0666
EndSection

Section “Extensions”
Option “Composite” “Enable”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Card0”
Monitor “Monitor0”
SubSection “Display”
Viewport 0 0
Depth 1
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 4
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 8
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 15
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 16
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 24
EndSubSection
EndSection

My laptop is a Thinkpad R61 with a i965GM card. There is some bug or lack of support for this card in the DRI implementation of intel module, so I have to use EXA acceleration method instead of XAA. It doesn’t matter too much: compiz runs fine with it.

In case you use gnome GDM, it’s needed to configure it to launch modular X. Simply edit ‘/usr/pkg/etc/gdm/custom.conf’ and put the following lines:

server-Standard]
name=Standard server
command=/usr/pkg/bin/X vt05 -audit 0
flexible=true

To install “compiz”, simply take care you have in “/etc/mk.conf”:

X11_TYPE=modular

and follow this document:

http://wiki-static.aydogan.net/DRI,_AIGLX,_Composite_and_Compiz

Note: Some ‘pkgsrc’ packages don’t compile with X11_TYPE=modular. Don’t ask me why. They throw an error regarding something like a problem to ‘ld -lXcomposite’. So, when I get this kind of error, simply comment the X11_TYPE=modular and everything runs fine.

About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in BSD, NetBSD, Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s