FreeBSD: Replace syscons with vt and get compositing working in KDE after suspend/resume


In my case it was necessary to recompile a kernel with the following options:

#device vga # VGA video card driver
#
#device splash # Splash screen and screen saver support
#
# syscons is the default console driver, resembling an SCO console
#device sc
#options SC_PIXEL_MODE # add support for the raster text mode
#
device vt
device vt_vga

Next, in /boot/loader.conf:

kern.vty=vt
hw.vga.textmode="1"

and in /etc/rc.conf:

#syscons
#keymap="spanish.iso15.acc.kbd"
#vt
keymap="es.kbd"

I modified as well the rc.suspend/rc.resume scripts to be able to get compositing working in KDE after resume (in KDE with integrated intel video, after resume KDE menus and are displayed as black frames). The trick consist of going to console (vt) before suspend and go to graphics after resume (when all other tasks are done).

So in /etc/rc.suspend:

###########################
#go to console before suspend
vidcontrol -s 1 < /dev/console &

/usr/bin/logger -t $subsystem suspend at `/bin/date +'%Y%m%d %H:%M:%S'`
/bin/sync && /bin/sync && /bin/sync
/bin/sleep 3

and in /etc/rc.resume:

/usr/bin/logger -t $subsystem resumed at `/bin/date +'%Y%m%d %H:%M:%S'`
/bin/sync && /bin/sync && /bin/sync


###########################
#go to graphic
vidcontrol -s 9 < /dev/console &

exit 0

About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in Uncategorized and tagged , . 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