Bug#342053: Boot-time script to disable DFB's HW acceleration
On Tue, Dec 13, 2005 at 01:02:04PM +0100, Attilio Fiandrotti wrote:
> Sven Luther wrote:
> >> echo "no-hardware" >>/etc/directfbrc
> >>else
> >> for driver in $BAD_LIST; do
> >> if [ $(dmesg|grep $driver |wc -w) -gt 0 ];then
> >
> >
> >I am not sure if dmesg + grep + wc is the best way to do this, but i also
> >don't know how to best map the /proc/fb entries to module names, but we
> >have
> >this one, as well as :
> >
> > /sys/bus/pci/drivers/adeonfb/0000\:00\:10.0/graphics\:fb0
> >
> >Which needs a 2.6 kernel though, but i don't think we are building 2.4
> >graphical d-i anyway.
>
> ok, so i suppose checking if /sys/bus/pci/drivers/<broken fbdev device>
Yep, in the general case, it should be possible to have multiple graphic
cards, and the broken one not being the one used for booting d-i.
Also, of interest is :
/sys/class/graphics/fb0, which has a device/driver symlink to the above path
you suggest, but i don't know how to find the radeonfb driver name information
from this one, which sucks.
> exist is enough to tell if HW acceleration has to be disabled.
> Below is the same script reworked after your and Geert Stappers's
> corrections.
> The user, to manually disable DFB HW acceleration, should boot with
> something like "install NO_DFB_ACCELERATION=TRUE" and this should be
> documented in the d-i manual and/or in the help screen that you see when
> you press F2 at boot time.
Yeah, altough i prefer the lower-case new option format thingy, but maybe they
are reserved for debconf variables ? dfb/no_accel=true ? Do we have access to
debconf already at this early stage ?
> Where this piece of code should be collocated? inside a new "Sxx.sh"
> script or should be better appended to
> /lib/debian-installer.d/S35framebuffer-linux or some other already
> existing script?
Not sure, it has to run early enough (before gtkdi is launched) and late
enough (after the framebuffer drivers have been loaded.
Maybe adding ti to S35framebuffer-linux is a good thing.
> Note that the list of bad fbdev deviced is hardcoded inside this script:
> is this a good idea? but i have no idea of where else those could be
> listed..
It should be a preseedable debconf value maybe, not sure, see my above
comment, dfb/bad_fbdevs="nvidiafb atyfb" would be a good idea. Maybe we could
reverse the script and whitelist the known good graphic cards though, with :
dfb/good_fbdevs="radeonfb vesafb" ?
Friendly,
Sven Luther
Reply to: