LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Driver compatibility & Flexibility (https://www.linuxquestions.org/questions/programming-9/driver-compatibility-and-flexibility-842954/)

hellnest 11-07-2010 11:36 PM

Driver compatibility & Flexibility
 
Hello, i'm a noob here want to ask a questions and hope someone here can help me and give me a proper advice and suggestion.

- Topic : Driver
- Hardware : SIS M671

Introduction :

I have this working driver for SIS M671. It can work for all debian based distribution starting from kernel based .32 until the latest one .35 / .36

This driver is already been tested on ubuntu / debian and Linux Mint. It's works like a charm for native resolution 1280x800 and 1366x768. Overall this is only 2D Driver and it's good enough for me and other SIS user.

Questions / Problem :
1. Since it's made for Debian based, the extension is .so / .la, can it used for other based such as Fedora or other?

2. I was try to use it on latest Open Suse and it's failed to recognize my driver.

3. Can you help me to show how to recompile the driver so it can work for other based? ( i would love to try arch / slackware / fedora ).

4. This driver *if i'm not wrong* first time is compiled from Mandrake / Mandriva SIS tarball. Mandriva is different from debian. So i think that must be some way to recompile it again,


Sorry for my bad grammar and i hope that you can understand what i mean.


Best Regards,

neonsignal 11-08-2010 06:09 PM

Quote:

Originally Posted by hellnest (Post 4152320)
1. Since it's made for Debian based, the extension is .so / .la, can it used for other based such as Fedora or other?

Whether it can be used depends mostly on the kernel version rather than the distro. Ideally you should recompile the driver for the kernel of the distro you plan to use.

Quote:

Can you help me to show how to recompile the driver so it can work for other based? ( i would love to try arch / slackware / fedora ).
Do you have the source for the driver? The process involves getting the kernel header package for your kernel, and then rebuilding the driver (typically there is a makefile provided with the source code).

The exact steps will depend on your distribution and the driver details, so you will need to provide specifics if you require a more detailed answer.

hellnest 11-09-2010 12:21 AM

Quote:

Originally Posted by neonsignal (Post 4153089)
Whether it can be used depends mostly on the kernel version rather than the distro. Ideally you should recompile the driver for the kernel of the distro you plan to use.

Do you have the source for the driver? The process involves getting the kernel header package for your kernel, and then rebuilding the driver (typically there is a makefile provided with the source code).

The exact steps will depend on your distribution and the driver details, so you will need to provide specifics if you require a more detailed answer.

I can't find the tarbal file. But i guess it's come from sidux source. But if you can help me see i will try to send you the driver. Maybe you can help me or teach me how to break down the driver.

You using debian squeeze? I'm facing a problem also with squeeze before maybe if you join debian.net forums you can see my post there

Here's the driver file. So all the driver is related to the kernel right? not the Distribution based?

http://goo.gl/OfLG 32Bit For Maverick 10.10
http://goo.gl/GChg 64Bit For Maverick 10.10

neonsignal 11-09-2010 03:06 AM

Quote:

So all the driver is related to the kernel right? not the Distribution based?
The driver source is not distribution specific (although distros will occasionally tweak the source, to fix issues or make improvements).

However, the binary (such as the ones in the links you provided) is specific to a system, because they have been compiled against a specific kernel and Xorg.

The source for the binary you linked to comes originally from Thomas Winischhofer.

His open source version is already in the Linux distributions (for example, in Debian the package is xserver-xorg-video-sis and in Fedora the package is xorg-x11-drv-sis, not sure about OpenSuse). The source can be downloaded from the Xorg site).

He also had a premium version, but ceased development several years ago (due to lack of support from the manufacturers). The source for that version is also provided on his web page.

SiS have in the past released proprietary binary drivers for Linux, but these did not have 3D support, so there is probably no good reason to use these over the libre driver.

I would suggest choosing the distro that interests you. If it is a major distro, it will probably already have the driver. If it is a more DIY distro such as slackware, then work with the driver source from the Xorg site.

hellnest 11-09-2010 03:20 AM

Wow thanks for the information. Actually i'm interesting with DIY build like arc / slackware. In debian / ubuntu they didn't provide the driver. The link that i gave to you is re-compiled by the community forum. So they didn't support it.

Actually i know that SIS didn't provided any support for Linux driver. I'm just curious how to compile it so can make it work better or at least stable than other one.

So the driver is depend to Xorg version & Kernel Version right?

neonsignal 11-09-2010 04:49 AM

Quote:

Originally Posted by hellnest (Post 4153359)
The link that i gave to you is re-compiled by the community forum. So they didn't support it.

I see you are right, the current Xorg sis driver doesn't support the 671. The source for the imedia one (as used in Mandriva) can be found here. It also requires a kernel patch.

There is also appears to be a resurrected version of the Winischhofer driver, not sure which chipsets it supports, but the 'sis671' in the filename looks promising :-)

If you are serious about using Slackware, then use the vesa driver to get started. Once you have slackware up and running, post a question in the slackware forum on this site asking how to compile an Xorg driver for slackware, and provide the link to a webpage with the 671 driver.

The process will be basically to grab the kernel headers and compile the driver. You will also need to compile your own kernel with the patches. Ideally you should try it before posting the question, so that you can provide details on exactly where you are getting stuck.

hellnest 11-09-2010 05:41 AM

Quote:

Originally Posted by neonsignal (Post 4153418)
I see you are right, the current Xorg sis driver doesn't support the 671. The source for the imedia one (as used in Mandriva) can be found here. It also requires a kernel patch.

There is also appears to be a resurrected version of the Winischhofer driver, not sure which chipsets it supports, but the 'sis671' in the filename looks promising :-)

If you are serious about using Slackware, then use the vesa driver to get started. Once you have slackware up and running, post a question in the slackware forum on this site asking how to compile an Xorg driver for slackware, and provide the link to a webpage with the 671 driver.

The process will be basically to grab the kernel headers and compile the driver. You will also need to compile your own kernel with the patches. Ideally you should try it before posting the question, so that you can provide details on exactly where you are getting stuck.

Thanks once again for the good answer. :) will try a slackware / arch soon. Anyway a little bit OT. You using debian squeeze right? I'm facing a problem with gnome in Debian. Can you help me? I will try to put a code here.

Gnome-appearance-properties
Code:

martin@localhost:~$ gnome-appearance-properties

(gnome-appearance-properties:1576): GdkPixbuf-CRITICAL **: gdk_pixbuf_new: assertion `width > 0' failed

(gnome-appearance-properties:1576): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `GDK_IS_PIXBUF (src)' failed

(gnome-appearance-properties:1576): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(gnome-appearance-properties:1576): GdkPixbuf-CRITICAL **: gdk_pixbuf_new: assertion `width > 0' failed

(gnome-appearance-properties:1576): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `GDK_IS_PIXBUF (src)' failed

(gnome-appearance-properties:1576): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(gnome-appearance-properties:1576): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion `GDK_IS_PIXBUF (pixbuf)' failed

(gnome-appearance-properties:1576): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion `GDK_IS_PIXBUF (pixbuf)' failed

(gnome-appearance-properties:1576): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion `GDK_IS_PIXBUF (pixbuf)' failed

(gnome-appearance-properties:1576): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion `GDK_IS_PIXBUF (pixbuf)' failed
The program 'gnome-appearance-properties' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 476 error_code 11 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
  that is, you will receive the error a while after causing it.
  To debug your program, run it with the --sync command line
  option to change this behavior. You can then get a meaningful
  backtrace from your debugger if you break on the gdk_x_error() function.)

Code:

martin@localhost:~$ gnome-appearance-properties --sync
The program 'gnome-appearance-properties' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 154 error_code 11 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
  that is, you will receive the error a while after causing it.
  To debug your program, run it with the --sync command line
  option to change this behavior. You can then get a meaningful
  backtrace from your debugger if you break on the gdk_x_error() function.)

Ah also back to driver problem. Normally onboard SIS M671 have 2 Different native resolution. 1280x800 & 1366x768 ( Which is only can be displayed 1360x768 ) Both have a different driver. How to tweak or patch driver to work in specify resolution or maybe can work automaticly in both resolution without configuring xorg.conf. :)

neonsignal 11-09-2010 06:24 AM

Quote:

Originally Posted by hellnest (Post 4153451)
gnome-appearance-properties --sync
The program 'gnome-appearance-properties' received an X Window System error.

It would be interesting to know if this error happens with another windows theme (though I'm guessing you can't change it without being able to run the appearance manager!). I wasn't able to duplicate your problem on a machine with gnome.

The first thing to do is make sure you have the latest gnome-control-center testing version (ie, check for any package updates). Because squeeze is not yet a stable release, many packages are still changing. You can check your package version, eg
Code:

apt-cache showpkg gnome-control-center
If you have the latest testing (squeeze/sid) version, then put a bug report in to Debian.

neonsignal 11-09-2010 06:34 AM

Quote:

Originally Posted by hellnest (Post 4153451)
Ah also back to driver problem. Normally onboard SIS M671 have 2 Different native resolution. 1280x800 & 1366x768 ( Which is only can be displayed 1360x768 ) Both have a different driver. How to tweak or patch driver to work in specify resolution or maybe can work automaticly in both resolution without configuring xorg.conf. :)

Normally it is handled automatically by the driver (ie, it is not a fixed setting in the driver). If the driver does not correctly detect the resolution, there is no easy patch (ie, it requires a fix to the way the resolution is detected). Setting the configuration (Sync and Refresh) in xorg.conf to override the driver is usually the easiest way.


All times are GMT -5. The time now is 12:57 PM.