How to use accelerated graphics:
$ sudo mv /etc/X11/xorg.conf{,.off}
$ startx
The above startx commands causes a PowerBook5,4 with an "ATI Radeon Mobility M10 NP" to use the "ati" driver, which loads radeon(4) as submodule. See also getconfig(1), xrandr(1). (The default /etc/X11/xorg.conf uses the wsfb(4) driver to draw on the framebuffer from wsdisplay(4). This is vgafb(4) which only uses Open Firmware to provide a 256-color framebuffer at the default resolution.)
When X runs, to change the screen resolution:
$ xrandr -q SZ: Pixels Physical Refresh *0 1280 x 854 ( 322mm x 221mm ) *60 1 640 x 350 ( 322mm x 221mm ) 60 2 640 x 400 ( 322mm x 221mm ) 60 3 720 x 400 ( 322mm x 221mm ) 60 4 640 x 480 ( 322mm x 221mm ) 60 5 800 x 600 ( 322mm x 221mm ) 60 6 1024 x 768 ( 322mm x 221mm ) 60 7 832 x 624 ( 322mm x 221mm ) 60 8 1152 x 768 ( 322mm x 221mm ) 60 Current rotation - normal Current reflection - none Rotations possible - normal Reflections possible - none $ xrandr -s 8
An ADB keyboard has a "Delete" key where a PC or USB keyboard would have a "BackSpace" key. At the OpenBSD console or in an xterm window, a "Delete" key is as well as "BackSpace" key, because it behaves like a traditional vt100 delete key and deletes the character on the left. However, in many other X11 clients, such as Firefox and the KDE applications, a "Delete" key deletes the character on the right. Also, the Ctrl-Alt-BackSpace combination, to reset the X server, does not work with a Delete key.
To help Firefox and the KDE applications, you may use xmodmap to remap the Delete key as a BackSpace key. However, this does not allow you to reset the X server with Ctrl-Alt-BackSpace.
$ xmodmap -e 'keysym Delete = BackSpace'
To implement a better fix, we must understand how the X server accesses the keyboard. You might have expected that the X server would pass ADB keycodes to xkb. However, the "kbd" driver of X.org actually reads the ADB keycodes from the keyboard, translates them into PC keycodes, then passes the PC keycode (plus 8, for some reason) to xkb. So, we want to tell the "kbd" driver to translate ADB "Delete" into PC "BackSpace".
The "kbd" driver contains two protocols, the "Standard" protocol and the "wskbd" protocol. The "wskbd" protocol would open /dev/wskbd, read raw ADB keycodes, then use code in the "kbd" driver to translate them into PC keycodes. I do not know if this would work over OpenBSD. Instead, the default configuration uses the "Standard" protocol.
With the "Standard" protocol, the X server expects its standard input to be the console tty. The X server uses a wscons ioctl to toggle the console tty into raw mode. It then reads PC keycodes from standard input. For this to work, the kernel must translate ADB keycodes into PC keycodes, and this is what happens. Thus we do not change the xkb configuration, we do not change the "kbd" driver, but we change the kernel.
First, cd /usr/src/sys/dev/adb, then do the change shown here:
$ diff -u keyboard.h{.orig,}
--- keyboard.h.orig Tue Aug 1 06:14:03 2006
+++ keyboard.h Thu Jun 28 20:46:05 2007
@@ -106,7 +106,11 @@
#else
RAWKEY_grave,
#endif
+#ifdef POWERBOOK_5_4
+ RAWKEY_BackSpace,
+#else
RAWKEY_Delete,
+#endif
RAWKEY_KP_Enter,
RAWKEY_Escape,
RAWKEY_Control_L,
Then build a new kernel with option POWERBOOK_5_4 (see ObAoaVersusSnapper for instruction).
Page Information
|
Wiki Information |
![]() Update to PBwiki 2.0 An entirely new PBwiki experience, including folders and easier editing. |