Want to set up savagefb framebuffer using KMS

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Want to set up savagefb framebuffer using KMS

Postby shugyo » 2020-04-19 12:21

Hi all,
I have an old but reliable Toshiba Dynabook DB65P/4RC (seems to be known as Satellite 2801 65P/4RC outside of Japan) with Pentium III and S3 Savage IX graphics card, with Windows 2000 Professional, and Debian installed for dual-boot, which I have upgraded from Lenny through to Buster.
  1. Specs:
    https://www.inversenet.co.jp/pclist/product/TOSHIBA-note/PA%252DDB65P4RC.html
  2. Lineup with specs:
    http://dynabook.com/pc/catalog/dynabook/pa_0010/lineup.htm
  3. Detailed specs comparison:
    http://dynabook.com/pc/catalog/dynabook/pa_0010/db_spec.htm
  4. Marketing page:
    http://dynabook.com/pc/catalog/dynabook/pa_0010/db_hard.htm
  5. lspci information for the card:
    S3 Graphics Ltd. 86C270-294 [Savage IX-MV] (rev 11)
    Subsystem: Toshiba America Info System 86C584 SuperSavage/IXC toshiba
Along the way, the kernel command line parameter vga seems to have met its demise, so I have been stuck with the default resolution GRUB2 screen and default TTY/framebuffer (?) console resolution. I'd dearly like to understand KMS and how to use the savagefb[1,2,3] module properly.

By default, I am not sure what module is being used to provide the framebuffer, as lsmod lists no modules mentioning the strings vga, video, vesa, or savage.

Testing the savagefb module
hwinfo --framebuffer outputs a long list of possible modes[4], but I did not discover any documentation for the details of the output beyond resolution and bits per pixel. My maximum seems to be 16-bpp at 1024x768, although there are several listed modes that offer this, so I am not sure how to select a particular mode.
From the command line, I found I could load the savagefb module with a resolution; but specifying the bpp, e.g., 1024x768-16, in addition did not seem to have any effect, even if it was unsupported, e.g., 1024x768-24.
Code: Select all
modprobe savagefb video=1024x768
resulted in a perfect framebuffer filling the entire screen. So this showed that the kernel module would work.

Setting resolution in GRUB2 configuration
From searching the web I found (on this site to boot)[4] that I could get 1024x768 resolution by editing /etc/default/grub and adding the actual resolutions I wanted:
Code: Select all
GFX_PAYLOAD_LINUX=1024x768
and then executing update-grub2. Note that I did not want to increase the resolution of the GRUB2 screen, so I did not edit that line and use the keep parameter in the line above (apparently one can specify bpp as well using 1024x768x16 for example, not 1024x768-16 like with modprobe).

While the above GRUB configuration works to provide the framebuffer size I want, it does not use the savagefb module (same lsmod results as before). So I am wondering how to get the module to be used---and if that is even a good idea given the things written about the module (e.g., that it interferes with ACPI sleep). On the other hand, not even vesafb is loaded, so I do not know what would be best.

I read that one can add modules to be loaded to /etc/initramfs-tools/modules, and then run update-initramfs -u. Not sure if that is what is required to switch from whatever module is being used not to supply the framebuffer, to the savagefb (or any other, for that matter) module.

Any advice sincerely appreciated.

References
  1. savagefb kernel module for the S3 Savage IX card.
    https://cateee.net/lkddb/web-lkddb/FB_SAVAGE.html
  2. Use of savagefb in IBM Thinkpads
    http://www.thinkwiki.org/wiki/S3_Savage_IX8
  3. Use of savagefb with vga kernel parameter
    https://www.linuxquestions.org/questions/slackware-14/s3-savage-framebuffer-431632/
  4. Example of setting framebuffer resolution
    http://forums.debian.net/viewtopic.php?f=16&t=135406&p=659598
shugyo
 
Posts: 98
Joined: 2009-08-24 08:56

Re: Want to set up savagefb framebuffer using KMS

Postby Head_on_a_Stick » 2020-04-20 11:44

shugyo wrote:From the command line, I found I could load the savagefb module with a resolution; but specifying the bpp, e.g., 1024x768-16, in addition did not seem to have any effect, even if it was unsupported, e.g., 1024x768-24.
Code: Select all
modprobe savagefb video=1024x768
resulted in a perfect framebuffer filling the entire screen. So this showed that the kernel module would work.

You can apply that option in GRUB by using this kernel command line parameter:
Code: Select all
savagefb.video=1024x768

Alternatively, create a configuration file under at /etc/modprobe.d/savagefb.conf to apply the option permanently, like this:
Code: Select all
options savagefb video=1024x768

Then add the module name to /etc/initramfs-tools/modules (which should enable early KMS if the driver supports it) and rebuild the initramfs.

Note that the vga= parameter should still work. See also https://wiki.archlinux.org/index.php/GRUB/Tips_and_tricks#Setting_the_framebuffer_resolution, https://www.gnu.org/software/grub/manua ... xmode.html & https://www.gnu.org/software/grub/manua ... gfxpayload
User avatar
Head_on_a_Stick
 
Posts: 12129
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Want to set up savagefb framebuffer using KMS

Postby shugyo » 2020-04-21 07:37

Huge thanks for that help. So video is a valid kernel command line parameter.
Also, many thanks for explaining the module option setting so clearly, makes perfect sense.

Regarding vga, I read so much I could no longer figure out what the actual latest status is. However, I can tell you that when I previously set
Code: Select all
vga=ask
the kernel told me that ask is no longer a valid parameter, and setting
Code: Select all
vga=0x9999
resulted in a black screen and hung system right away. Thanks for the link to the ArchLinux Wiki indicating that the parameter still works, with my beloved old 792. I note that the third reference explains that the new method replaces the vga parameter, hence my confusion.

According to the ArchLinux Wiki, the GRUB setting for bpp uses either a - sign (the spec as I understand it) or an x (some exceptions), I will try to see whether any have an effect. In the module options I should use a x I think.

I also learnt hereby that I can list several resolutions in the GRUB configuration, wonderful. I presume that exactly the same format is useable in the module options file.

Will test and confirm.
shugyo
 
Posts: 98
Joined: 2009-08-24 08:56

Re: Want to set up savagefb framebuffer using KMS

Postby shugyo » 2020-04-25 14:43

Feedback: all worked out well, I had been spending the last week struggling with the savage driver in X.org, but that is for a different thread. Regarding the savagefb framebuffer driver, all seem fine.

The only thing I should add is that for some reason it appears that video is not actually an option the driver accepts either with the linux kernel command line format, or with the format in the savagefb.conf file. I do not know why I could initially set a 1024x768 screen with modprobe savagefb.

The modinfo command also seems to have changed rather a lot over time and there are no parameters to be found for the savagefb module (the -p parameter is a leftover from the old behaviour apparently, and does not offer any parameter information anymore).
However, the GRUB2 payload resolution setting works fine so the savagefb driver seems to just take that and run with it, as far as I can tell. I still have the video=1024x768x16 (I added the bpp as well later) in savagefb.conf regardless.

As I had been fighting what appears finally to be a losing battle with the savage X.org driver, I now have both savage and savagefb in my /etc/initramfs-tools/modules file.

Thanks very much once again for the education.
shugyo
 
Posts: 98
Joined: 2009-08-24 08:56


Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable