Bug 152232 - [syscons] [patch] syscons VGA screensavers don't work on some computers
Summary: [syscons] [patch] syscons VGA screensavers don't work on some computers
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-14 11:50 UTC by crocket
Modified: 2017-12-31 22:34 UTC (History)
0 users

See Also:


Attachments
file.diff (7.68 KB, patch)
2010-11-14 11:50 UTC, crocket
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description crocket 2010-11-14 11:50:08 UTC
All VGA screensaver except logo_saver.ko couldn't be executed on my desktop due to 
module_register_init: MOD_LOAD (XXXX_saver, 0xXXXXXXXX, 0) error 19.

After inspection, I found out that each VGA screensaver probed its own predefined set of video modes only and if the probe failed, they would generate that error.

A quick solution to this problem is to generate a header file that manages the video mode of all VGA screensavers.
If I managed the video mode in one place, it would be easier to change the video mode and build screensaver modules at once.
So I made a patch.
The patch is attached to this problem report.
You should apply the patch in /usr/src/sys.
For example, Execute "diff -p1 < xxx.diff" on /usr/src/sys.

This patch can be applied to 8.1-RELEASE safely.

Fix: Currently, screensavers don't detect video modes automatically.
I'd appreciate it if somebody makes a patch that makes screensavers detect video modes automatically using vidcontrol or something else.
It would be nice if we could change the video mode of screensavers with vidcontrol.

To fix this issue, first apply the attached patch in /usr/src/sys.
Change VIDEO_MODE #define macro in /usr/src/sys/dev/syscons/videomode.h to
one of 8bit video modes shown from "vidcontrol -i mode".
Screensavers, for now, assume 8bit video mode.
After changing VIDEO_MODE to any 8bit video mode, execute "make; make install clean" in /usr/src/sys/modules/syscons.
All syscons screensavers will be installed into /boot/kernel.
You don't have to worry about the currently loaded screensaver since loaded screensaver modules are already in RAM.
Overwriting those screensavers on disk would not affect screensavers loaded onto RAM.
Execute "kldunload (loaded screensaver module); kldload XXX_saver(XXX is the name of a screensaver)" as root.
To test the screensaver, press Shift + PauseBreak. You'll see the new screensaver working.

Patch attached with submission follows:
How-To-Repeat: Load any of VGA screensavers(rain, fire, dragon, etc...) using kldload.
Execute the screensaver by pressing Shift+PauseBreak.
If it didn't execute, then read /var/log/messages, and you'll see the relevant errors.
Comment 1 crocket 2010-11-14 12:21:39 UTC
Be aware that such ascii screensavers as daemon_saver.ko and snake_saver.ko can't be executed in VGA video modes.
Those ascii screensavers are executable on such video modes as 80x25, 80x30, etc...

Available video modes are displayed by "vidcontrol -i mode"
Comment 2 crocket 2010-11-14 23:31:54 UTC
videomode.h contains some wrong content.
VIDEO_MODE doesn't have to be 8bit VGA mode.
If it was 8 bit video mode, it wouldn't matter if the mode was VGA or not.
8bit video modes can be distinguished by "x8" at the end.
For example, 800x600x8, 320x200x8, etc.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:15 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped