Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Want to set up savagefb framebuffer using KMS

Need help with peripherals or devices?
Post Reply
Message
Author
shugyo
Posts: 98
Joined: 2009-08-24 08:56

Want to set up savagefb framebuffer using KMS

#1 Post by shugyo »

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/pro ... 5P4RC.html
  2. Lineup with specs:
    http://dynabook.com/pc/catalog/dynabook ... lineup.htm
  3. Detailed specs comparison:
    http://dynabook.com/pc/catalog/dynabook ... b_spec.htm
  4. Marketing page:
    http://dynabook.com/pc/catalog/dynabook ... b_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/question ... er-431632/
  4. Example of setting framebuffer resolution
    http://forums.debian.net/viewtopic.php? ... 6&p=659598

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Want to set up savagefb framebuffer using KMS

#2 Post by Head_on_a_Stick »

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/GR ... resolution, https://www.gnu.org/software/grub/manua ... xmode.html & https://www.gnu.org/software/grub/manua ... gfxpayload
deadbang

shugyo
Posts: 98
Joined: 2009-08-24 08:56

Re: Want to set up savagefb framebuffer using KMS

#3 Post by shugyo »

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

#4 Post by shugyo »

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.

Post Reply