LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   HOW to apply an xfree86 patch for a video driver? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-apply-an-xfree86-patch-for-a-video-driver-125195/)

andhar 12-12-2003 07:20 AM

HOW to apply an xfree86 patch for a video driver?
 
Hello all,

When you're new to Linux, sometimes find the solutions only raises more questions; case in point:


I'm fairly certain that I'm being plagued by the following driver bug:

http://bugs.xfree86.org/show_bug.cgi?id=213


For the bug, there is a driver patch, this one:

http://bugs.xfree86.org/attachment.c...12&action=view


What is the proper way to apply this patch?

--Does this new code supersede the old driver?
--Does this new code need to be added to the old driver?
--Is there some kind of compiling involved?
--How do I do this in such a way that it doesn't disrupt my KDE session in progress? Is this even an issue?

Thanks in advance for any help. It's frustrating to have the solution and not know what to do with it.


Andrew

bureado 12-12-2003 10:08 AM

Seems that you will need to compile. It shouldn't disturb your session but in order to get the patch to work you'll probably need to restart the X server (which includes shutting off KDE). I don't think you'll need to 'add' the code to the old driver, it will probably need only a replacing (backup your old driver :)) - try to find README or INSTALL textfiles in the packages you download, expect an answer of an expert in this forum and, in last resort, go to the KDE support. Greetings.

andhar 12-17-2003 04:24 AM

Hmmmm...

Okay, but HOW do I recompile? From what source? The whole X? Just a driver?

: - (

- Andrew

andhar 01-01-2004 07:58 AM

All the info...still no go!
 
I still haven't been able to work out how I actually use the information I have on patching my video driver!

Can anyone help?

- Andrew

Demonbane 01-01-2004 10:53 AM

IMO the safest way would be grabbing the source RPM, install it, patch the source tree then rebuild it. Using just the vanilla Xfree86 source is definitely not recommended, since Mandrake uses a number of patches on their XFree86. Obviosuly you'll need a compiler to do this so install GCC if you haven't already.

Grab the SRPM from any of Mandrake mirrors, here's one for you: ftp://mirrors.secsup.org/pub/linux/m...-23mdk.src.rpm
install it
Code:

rpm -ivh XFree86-4.3-23mdk.src.rpm
The installed files are inside the /usr/src/RPM directory.
At this point switch to one of the virtual consoles then shutdown X (init 3),
also make sure you know where you downloaded the i810_drv patch you mentioned in your original post.

cd into /usr/src/RPM/SOURCES then extract XFree86-4.3.tar.bz2, which contains the vanilla XFree86 source tree.
Code:

tar xvjf Xfree86-4.3.tar.bz2
It will be extracted into a directory called 'xc'
Now cd into "/usr/src/RPM/SOURCES/xc/programs/Xserver/hw/xfree86/drivers/i810", which is where the i810 driver source is located, then apply the patch.
Code:

patch -p0 < /fullpath/to/the/patch
If it patches successfully you should see something like "Hunk #1 SUCCESS"
Now cd back into /usr/src/RPM/SOURCES, then tar the xc directory, replacing the original XFree86-4.3.tar.bz2
Code:

tar cvjf XFree86-4.3.tar.bz2 xc
Lastly rebuild the package using the SPEC file
Code:

rpmbuild -bb /usr/src/RPM/SPECS/XFree86.spec
The -bb option implies that a binary package will be built, in addition to the installation. If you don't want to keep a binary package you can use -bi, but I'd say its a good idea to have one, in case you need to reinstall. Note that the binary package will appear in /usr/src/RPM/RPMS. Also you may run into dependency problems when you invoke the rpmbuild command, if that is the case just install the packages it asks for from your Mandrake CDs. The build procedure will probably take more than an hour depending on the speed of your machine, since XFree86 takes a long time to compile.

If that didn't fix your problem(either the patch didnt work as intended or something went wrong), you might want to try the DRI cvs drivers: http://dri.sourceforge.net/

Good luck and Happy New Year!

andhar 03-28-2004 02:32 PM

Still can't close this problem!
 
Hello again,

Since the last time I brought this issue up, I've tried everything to get around having to re-complile my kernel, since it just absolutely scares the b-geezus out of me.

* I switched from Mandrake to MEPIS linux (MEPIS is Debian-based -- and *wonderful*, btw)

* I briefly tried the Mandrake 10 Community release (based on the 2.6 kernal)

I had the same blue bars with these distros!! So, I'm currently back with the latest MEPIS distribution, and still have the same driver problem!!

Questions:

1. I didn't have this problem with Mandrake 9.1; why is this problem recurring? The fis should be there!

2. Is there some non-scary way to patch my kernel now that I'm using a Debian-based distro?

Thanks,

- Andrew ("I want my DVD!")

ryeman 04-30-2004 11:07 PM

I know this may seem a bit odd, but what does your /etc/X11/xdm/Xservers file list?

it should have a line like the following:

:0 local /bin/nice -n -10 /usr/X11R6/bin/X -deferglyphs 16 -depth 16 -nolisten tcp

If yours is missing anything from the list, (like -depth 16, for example) then try to see if this fixes your movie player(s)

hope this helps :D


All times are GMT -5. The time now is 06:38 PM.