# Graphics console with KGI



## bilgey (Sep 30, 2009)

Hello,

For those that are unaware, the Kernel Graphics Interface(KGI) project aims to provide a portable Kernel Graphics Interface (yes kernel mode setting), a new console system (graphics or text) & an input interface.

I've been working on the old FreeBSD (I think 6.x might have been the last release) code[1] for KGI. I'm currently at a stage where the i386 port needs broader exposure. The graphics console system is working (it could use some finer tuning), it currently makes use of FreeBSD's VESA implementation, so yay, a high resolution graphics console 

You can check out some screen shots at http://kgi-project.org/screenshots.html I've tested upto 1280x1024x16 VESA mode without any problems.

To really take full advantage of KGI, a user would be better off using General Graphics Interface (GGI) supported programs. There is currently XGGI (X11 rendering thru GGI), and ggiterm (quite a neat terminal emulator), however, the system, works quite well without any of these, if you're interested please take a look, we need more interested users and or contributors.

You can download the code via CVS and copy the checkout over a local copy of your /usr/src tree.

More documentation can be found at http://kgi-project.org/download.html

I've include one of the recent images I snap'd running KGI in VirtualBox 

Please have a look around at kgi-project.org

1: http://p4db.freebsd.org/changeList.cgi?FSPC=//depot/user/nsouch/kgi6/src/sys/...

Thanks


----------



## SirDice (Sep 30, 2009)

For what version of fbsd is this intended? 6.x, 7.x or 8.x?


----------



## bilgey (Sep 30, 2009)

SirDice said:
			
		

> For what version of fbsd is this intended? 6.x, 7.x or 8.x?



Hey SirDice,

8.x is the current target. I last sync'd the KGI code base with 8.0-RC1 or r197633 from 8-STABLE


----------



## bilgey (Oct 1, 2009)

A patch is now available at http://kgi-project.org/Resources/patches/FreeBSD8-20091001.patch


```
cd /usr/src && patch -p1 ${FOO}
```

Where FOO is the download of FreeBSD8-20091001.patch


```
make kernel KERNCONF=KGI INSTKERNNAME=kernel.KGI
```

When you reboot and are presented with the boot loader, escape to the loader prompt and:


```
unload
load /boot/kernel.KGI/kernel
boot
```

Check out sys/i386/conf/KGI for some options on tuning KGI to your specifics.


----------



## joel@ (Oct 1, 2009)

Make sure that you announce your work on hackers@freebsd.org if you want more testers. There seems to be a few people working on "similar" projects right now (I actually thought the KGI project died years ago).


----------



## bilgey (Oct 1, 2009)

OK, thanks joel.

I made another post to this thread earlier, but it appears to have not come thru the mod system yet. I also can't edit my posts, so my apologies for multiple posts in the one thread.


----------



## bilgey (Oct 1, 2009)

OK, looks like posts aren't held for mod approval any longer. The missing post I made was about obtaining a patch for KGI against 8.0RC1.

It can be downloaded from http://kgi-project.org/Resources/patches/FreeBSD8-20091001.patch


```
cd /usr/src && patch -p1 ${FOO}
```

Where FOO is the location of the downloaded patch


```
make kernel KERNCONF=KGI INSTKERNNAME=kernel.KGI
```

After you reboot and are presented with the boot loader, escape to the loader prompt

```
OK unload
OK load /boot/kernel.KGI/kernel
OK boot
```

There should be a colour full text16 splash screen, then VESA will mode set to whatever kernel option you have chosen, and the system should boot on normal. You will noticed some extra kernel messages.

Check out sys/i386/conf/KGI for a small sample on how you tune KGI to your system


----------



## bilgey (Oct 1, 2009)

joel@ said:
			
		

> ....(I actually thought the KGI project died years ago).



Has NetCraft confirmed that yet? ;-)


----------



## paradox (Oct 1, 2009)

```
http://p4db.freebsd.org/changeList.cgi?FSPC=//depot/user/nsouch/kgi6/src/sys/
```
fixx this url
should be

```
http://p4db.freebsd.org/changeList.cgi?FSPC=//depot/user/nsouch/kgi6/src/sys/...
```


----------



## bilgey (Oct 2, 2009)

I can't edit posts paradox, but thanks for pointing that out.

Also, I should have noted that interested users need to set TERM to xterm to take advantage of the console system. You can get away with out setting xterm, but it proves troublesome. vim, less & tmux play-up without using xterm


----------



## DutchDaemon (Oct 2, 2009)

[fixed that url]


----------



## Helio (Nov 24, 2009)

Very nice! Unfortunately XGGI was a patchset against XFree86, so it's probably been suffering from massive bitrot. Might be interesting to see if it can be made to work against Xorg, like Xvnc can.


----------



## Helio (Dec 1, 2009)

After talking with a ggi developer, XGGI was brought up to Xorg 7.1, and acts as it's own independent X server. It currently does not build on freebsd, but it looks to be mostly Xaw related. Might try to slave it to xorg-server port, and then patch the build script to be more freebsd friendly.


----------



## Helio (Dec 4, 2009)

I have completed an initial, extremely rough XGGI port. It is dangerous to use, please only test it on machines where you are comfortable wiping /var/db/pkg and /usr/local afterwards, and maybe the entire root filesystem.

The port skeleton is here:
http://code.google.com/p/evoke/sour...targets/FreeBSD/share/nports/x11-servers/xggi

You only need to do 'make', and it will populate /usr/local/xggi with the xggi server, and it's matching libraries. (I am aware of how bad that is, all this port does is massage the system to compile and link itself into a working binary. Later on I will clean it up to match other ports.)

Currently it works under Xvnc, and should work under Xorg. It does not work under KGI (some of the header files seem to be missing, so libggi is not built with support).

There's several bugs I can see, fonts, rgb, and some cursor related artifacts in the X server. All to be expected for the code.

Here's an obligatory (ugly) screenshot:




Again, please use with care.


----------



## mdg583 (Feb 5, 2010)

I tried the patch (not XGGI) but without much success. It changed console modes to something higher resolution, but then something went wrong. It seems to hang on the screen with the green dot on the bottom. But the harddrive keeps spinning for a while, like it is still loading in the background.

I believe I applied the patch to the 8.0-RELEASE kernel sources.


----------

