Wine needs Kernel patch

I just upgraded to OpenSuSE 11.3. Had some issues getting Gnome running, as ATI doesn’t yet have official drivers out for 11.3. Finally got that figured out and tried to load up World of Warcraft in Wine, only to have it crash when i tried to login.

I checked out the Wine page, and it turns out the issue is with any kernel past 2.6.32. OpenSuse 11.3 uses 2.6.34-12.3/ A patch was developed for it, but i’m really not sure how i would go about applying it, or getting it added officially to the Suse version of the kernel. I’ve tried adding the Head repository and using the latest 2.6.35 RC, but it doesn’t seem to have the patch in it, as i still ended up with the same login crash. I’ve also tried adding the SUSE 11.2 repository for 2.6.31, as that kernel did work under 11.2 with Warcraft and Wine. However it doesn’t seem to work with 11.3, as Warcraft/Wine won’t load at all with it.

Here is the bug thread in winehq which describes the issue and here is a link to the patch on the kernel bugzilla. Can this be applied to the suse version, and if so how would i go about it? I’ve never patched a kernel before and don’t want to risk screwing everything up. rotfl!

I got WoW to work with the kernel patch, but now my FPS is all over the place. I get between 9 - 60+ FPS randomly. It doesn’t matter where I am or what I’m doing. I’ve noticed lots of performance issues with SuSE 11.3… this happens just using the desktop too. Sometimes my system will just seem to hang for a second or two before coming back to life again. I can’t see anything interesting with dmesg…

I have a pretty decent system too:
AMD Phenom™ 9950 Quad-Core Processor
8 Gigs of ram
GeForce GTX 260

The performance was much better under SuSE 11.2. I switched to 11.3 hoping that the new kernel would be faster…

I have the same issue. The below patch should be applied to the kernel as this is not a wine bug.

@ dralanmage can you please explain us how such a procedure suppose to be done? Thanks in advance!

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 142d70c..725ef4d 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -526,6 +526,7 @@ asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *eregs)
 dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
 {
 	struct task_struct *tsk = current;
+	int user_icebp = 0;
 	unsigned long dr6;
 	int si_code;
 
@@ -534,6 +535,14 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
 	/* Filter out all the reserved bits which are preset to 1 */
 	dr6 &= ~DR6_RESERVED;
 
+	/*
+	 * If dr6 has no reason to give us about the origin of this trap,
+	 * then it's very likely the result of an icebp/int01 trap.
+	 * User wants a sigtrap for that.
+	 */
+	if (!dr6 && user_mode(regs))
+		user_icebp = 1;
+
 	/* Catch kmemcheck conditions first of all! */
 	if ((dr6 & DR_STEP) && kmemcheck_trap(regs))
 		return;
@@ -575,7 +584,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
 		regs->flags &= ~X86_EFLAGS_TF;
 	}
 	si_code = get_si_code(tsk->thread.debugreg6);
-	if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS))
+	if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS) || user_icebp)
 		send_sigtrap(tsk, regs, error_code, si_code);
 	preempt_conditional_cli(regs);
 

It seems to be an issue with the kernels 2.6.33 and higher. I don’t want to downgrade. Can anyone tell us how to apply such a patch to my lovely suse?? Thanks!

(openSUSE 11.3 x64)

OK… Please keep in mind that you are changing the kernel that is loaded on boot, and this could render your system unbootable/unusable! Use at your own risk!

First you want to have the kernel-source package installed (and of course the development base packages).

As root:

  1. Copy the patch to /usr/src/linux. (In my example, I assume it’s named icebp.patch)
  2. cd to /usr/src/linux and run ‘patch -p0 < icebp.patch
  3. Run ‘make mrproper
  4. Run ‘cp /boot/config-uname -r ./.config’ (It’s important that there are no errors here, otherwise your kernel configuration will not match the default one and you will have problems…) I think there’s a better way to do this, but I’ve forgotten how.
  5. Run ‘make menuconfig
  6. Scroll down to ‘Load an Alternate Configuration File’ and select this.
  7. Choose the default value of “.config” and choose OK, then exit, saving the kernel configuration.
  8. Run ‘make rpm
  9. When this is done, it will build a src rpm and a normal kernel rpm. You’ll want to install the normal rpm, and you’ll likely have to install it with rpm -Uvh --force, since it’s basically the same kernel with a very minor patch.
  10. Not sure if this is needed, but I ran ‘mkinitrd’ just in case.

Now you should be able to reboot, and it should load the patched kernel. Good luck!

I am useing the kernel-desktop (not the default)

I need to install:
kernel-source
kernel-desktop-base
kernel-desktop-devel

Right?

You don’t need the desktop stuff… just the core devel groups and kernel-source… If you do ‘zypper patterns’, I think devel_rpm_build and devel_basis will be enough. If you need more packages, it will fail to build and complain about what you don’t have.

I think you can install patterns with ‘zypper in -t pattern <Pattern Name>’. I always install all of the development packages from the start.

I removed the kernel-desktop-base and kernel-desktop-devel packages.

If I run zypper patterns I have the two mentioned patterns but if I run the patch I get:

linux-c79o:/usr/src/linux # patch -p0 < icebp.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
|index 142d70c..725ef4d 100644
|--- a/arch/x86/kernel/traps.c
|+++ b/arch/x86/kernel/traps.c
--------------------------
File to patch: 

I am running 64 bit suse. I hope this doesn not make any difference :S

Try -p1. I thought it was at level 0, but looking at your diff it might be at level 1.

Edit for:
Sorry, I just had a look at kernel-desktop-devel (which I already had installed from the main openSuSE installation without realizing it), and I think you will need that package.

The thread title “Wine needs kernel patch” is INCREDIBLY misleading. This may be true for one game (Warcraft) with wine, but it definitely is NOT true for some applications I just tested with wine on openSUSE-11.3.

On a 32-bit openSUSE-11.3 (KDE-4.4 install with a nVidia GeForce 8400GS and proprietary nVidia driver) I just installed and tested the MS-Windows programs :

  • autostitch
  • VirtualDub - where to get VirtualDub to run with the deshaker plugin, I also had to install the following 4 apps/libraries in this list:
  • Microsoft ffdshow (free download).
  • mfc42 - mfc42.dll is a process belonging to the Microsoft Visual Studio program (free download)
  • Microsoft Visual C++ 2005 SP1 Redistrib Package (free download)
  • Koepi’s Media Development Homepage - Xvid (free download)

No kernel patch needed !!

I’m used wine-1.2-4.1.i586. I followed this guide for the VirtualDub install : HowTo install VirtualDub under wine with deshaker plugin

AFAIK there is a valid kernel bug which needs patching, and it doesn’t affect just one game. It’s just that there’s one game which is prominent enough to merit attention… :wink:

Fair enough, but the global title is still incredibly misleading.

I recommend those wanting this bug ‘fixed’ write a bug report on the openSUSE-11.3 kernel, and point to the wine HQ bug and the kernel-bugzilla bug report, else it may not be fixed anytime soon in openSUSE if the SuSE-GmbH packagers have not noticed it. Writing an openSUSE bug report is one way to bring it to their attention.

Edit: There is guidance here on how to raise bug reports on openSUSE: openSUSE:Submitting bug reports - openSUSE Wiki

Did you get it working kisrokus? I’m guessing you either didn’t get it working and had to re-install, or got it working and are now busily playing wow instead of posting your results here on the forums… :smiley:

Edit: oldcpu, I think it should be renamed to “WoW-Wine needs kernel patch”.

It took me so long because I fall asleep around 2 AM German Time :stuck_out_tongue:
-p1 was the solution. I think it was successful without the kernel-desktop-devel because I removed the package before and there were no errors this morning when I woke up. ^^

make rpm is done. I got Two RPMs:
Wrote: /usr/src/packages/SRPMS/kernel-2.6.3412desktop-1.src.rpm
Wrote: /usr/src/packages/RPMS/x86_64/kernel-2.6.3412desktop-1.x86_64.rpm

I guess the first one is the source. I will install the RPM soon.

With all due respect, just because its not crasing MSpaint the issue is present. This kernel bug was reported and confirmed by all of that geeks on the wine bugzilla. I know because I red all the 162 comments.

Can you please rename the topic to "Wine needs Kernel patch - wow crash at login"

This does read to be a very valid thread. … Apologies for my confusion wrt the Title. I think the subsequent posts make it clear this impacts some wine users, but not all.

Can someone write a bug report on openSUSE-11.3 kernel ?

OK. The patch worked for me.
Thanks dralanmage!

I will report the buf for the SUSE kernel too. However the issue is not only with 11.3 but for every kernel newer then 2.6.32. The #32 was still fine.

The bug has sometin to do with the network connections :slight_smile:

ps.: I am curious now if other issues will occur because of my home made kernel :S

https://bugzilla.novell.com/show_bug.cgi?id=623304

Many thanks for raising the bug report. Maybe keep an eye on it, in case they produce a temporary kernel for testing (its difficult to say which way the SUSE-GmbH packager will go from here).

As the OP on this thread, I can say that I did open a bug report on the novell Bugzilla at the same time as i did this: https://bugzilla.novell.com/show_bug.cgi?id=623304. I haven’t tried the patch yet, as I’m relatively new to Linux as it pertains to stuff that technical. I downgraded for now back to 11.2 until i can play around in a vbox install and make sure i can do it right, or the patch gets added to the official kernel release. Thank you dralanmage for what appears to be an easily accomplished step by step through it.

Slightly OT, So feel free to PM me with the answer rather than derail the conversation, what ARE the differences between the ‘flavours’ of kernel avaliable. i.e. -desktop -pae -xen? I’ve tried googling, but haven’t really found a good answer.

PAE is a feature to allow x86 processors to access a RAM larger than 4 gigabytes
Correct me if I am wrong but Xen is for virtual machine hosts.
So I can imagine the Desktop is optimized for normal (non laptop PC).