On Fri, Feb 28, 2003 at 10:28:31AM -0500, Daniel Burrows wrote:
> On Fri, Feb 28, 2003 at 01:40:09AM -0500, Branden Robinson <branden@debian.org> was heard to say:
> > Well, let's have a look at the code, shall we? Shell scripts are not
> > rocket science.
> >
> > # use fbcon kernel functions?
> > if [ -e /proc/fb ]; then
> > if [ -n "$(cat /proc/fb)" ]; then
> > auto_answer db_input high xserver-xfree86/config/device/use_fbdev "true"
> > fi
> > else
> > db_get xserver-xfree86/config/device/use_fbdev || debug_report_status "db_get xserver-xfree86/config/device/use_fbdev" "$?"
> > if [ "$RET" = "true" ]; then
> > debug_echo "xserver-xfree86/config/device/use_fbdev is \"true\" but /proc/fb does not exist; setting template to \"false\""
> > db_set xserver-xfree86/config/device/use_fbdev false
> > fi
> > fi
> >
> > Before you jump all over that "auto_answer" thing, hold your horses:
>
> [snip]
>
> It doesn't matter -- what I was trying to say (not very clearly)
> earlier is that /proc/fb exists but is empty; thus, all the questions
> above are skipped. "auto_answer" never runs.
You're confusing me. "All the questions above"? There is only one:
xserver-xfree86/config/device/use_fbdev
Here's the same stuff translated to psuedocode
If the framebuffer proc thing exists:
If the framebuffer proc thing says anything:
Assume the X server wants to use it, asking the user if possible
Otherwise:
Find out if the X server is currently configured to use the framebuffer interface
If it is:
Force it to shut off
> I think I may have set the option at some point in the past, and now
> the script won't let me change it.
>
> *pokes around*
>
> aha. If I manually load the framebuffer driver, then (after I get
> control over my console -- seems loading the driver while X is running
> is not such a hot idea) X works with "usefbdev", and the config script
> gives me the option to disable use of the framebuffer. Oh, and /proc/fb
> contains actual data.
>
> Is there a good reason to leave the setting alone if /proc/fb is
> empty? AIUI this corresponds to "no available framebuffer devices", and
> so silently preserving a pre-existing "true" value doesn't make sense.
> (at the least, asking seems like a good idea)
Yes, it would appear that I shouldn't have nested those first two ifs,
but rather anded them together, e.g.:
> > if [ -e /proc/fb ]; then
> > if [ -n "$(cat /proc/fb)" ]; then
should be:
if [ -e /proc/fb -a -n "$(cat /proc/fb)" ]; then
...that way the "else" catches *either* of those tests failing, not just
the first.
If you could test that change, I would appreciate it. Turn that
use_fbdev option back on, unload the driver, and dpkg-reconfigure with
the above change applied to /var/lib/dpkg/info/xserver-xfree86.config.
What should happen is that use_fbdev will be forced off, *and* you won't
be asked about it.
Michel, before I have can have fix that's good enough for
4.2.1-7/4.3.0-1 I need to know how to detect and avoid doing this for
the "generic" framebuffer devices.
--
G. Branden Robinson | The only way to get rid of a
Debian GNU/Linux | temptation is to yield to it.
branden@debian.org | -- Oscar Wilde
http://people.debian.org/~branden/ |
Attachment:
pgphpPJoTCt0Y.pgp
Description: PGP signature