You are not logged in.

#1 2018-10-21 21:40:28

duaner
Member
Registered: 2018-10-13
Posts: 16

xf86-video-intel / Wine Slower On Arch [Solved]

I've been using gentoo on my cheap acer e15 laptop since I bought it, but I thought I'd try arch for fun, so I installed it on another partition, and everything's working pretty well so far. However, I've noticed that games run noticeably slower. Glmark2 shows about 18% better results on the gentoo side, which doesn't seem to jibe with the common wisdom that recompiling doesn't offer significant improvement -- is 18% not significant to most people? Game framerates differ about the same amount.

Anyway, I'm puzzled about this, so I've gone through and implemented the relevant optimization hints in the wiki, to no effect:

https://wiki.archlinux.org/index.php/Im … erformance
https://wiki.archlinux.org/index.php/Intel_graphics

I'm only using intel graphics on this device, since the nvidia gpu doesn't work all that well with prime under any flavor of linux. I've set grub up so that I can boot arch with the same kernel I'm using under gentoo, and it seems to make no difference in 3D speed at all vs the stock arch kernel. I start both with startx, from the command line. Neither runs X as root, since I'm using the intel driver. I don't have any xorg.conf files on either.

The Xorg..log files look basically the same, with differences for the later versions running on arch and systemd (which is not installed under gentoo). Both load dri2 and dri3. Arch loads all the glx extensions that gentoo does, and a few extra. Both are accelerated, with direct rendering and the same video memory, naturally.

I've already installed the following:

libvdpau-va-gl
libva-intel-driver
libva-mesa-driver
mesa
mesa-demos
vulkan-intel
xf86-video-intel
xf86-video-nouveau (even though I don't use it)
(and 32-bit versions)

I've enabled GuC and HuC. I've tried using the framebuffer video driver, but that gives me worse results (and it's not what I'm using on gentoo). /etc/drirc files are the same on both sides.

Does anyone have any other suggestions for closing the gap? Would recompiling mesa do it? I can't believe I'd have to recompile everything (certainly not the kernel, since I've been testing the same one).

Last edited by duaner (2018-10-23 21:53:40)

Offline

#2 2018-10-21 21:51:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,904
Website

Re: xf86-video-intel / Wine Slower On Arch [Solved]

duaner wrote:

... which doesn't seem to jibe with the common wisdom

How common is this wisdom?  Where is it from?

It shouldn't be surprising at all that compiling the entire system with hardware specific optimizations could have an effect.

Just compiling from source will not have an effect if you were to use generic optimizations - and many packages may not benefit in any notable way, but some will.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-10-22 07:25:27

seth
Member
Registered: 2012-09-03
Posts: 9,824

Re: xf86-video-intel / Wine Slower On Arch [Solved]

Another thing that could interfere is power saving.

However, according to amaozon, this device doesn't provide an optimus config, so to get a better idea on your actual setup comparability:
- glxinfo
- lspci
- dmesg
- xorg logs
(the actual data, no excerpts or paraphrases)

Offline

#4 2018-10-22 13:03:50

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,592

Re: xf86-video-intel / Wine Slower On Arch [Solved]

https://github.com/glmark2/glmark2 wrote:

glmark2 is an OpenGL 2.0 and ES 2.0 benchmark.

You do realise OpenGL ES 2.0 was released in 2007 and the numbers it shows have very little relevance for recent applications ?


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#5 2018-10-22 21:28:32

duaner
Member
Registered: 2018-10-13
Posts: 16

Re: xf86-video-intel / Wine Slower On Arch [Solved]

Trilby wrote:

How common is this wisdom?  Where is it from?

It shouldn't be surprising at all that compiling the entire system with hardware specific optimizations could have an effect.

Just compiling from source will not have an effect if you were to use generic optimizations - and many packages may not benefit in any notable way, but some will.

I suspect that you're right, so I've rebuilt the following packages with makepkg, with it's configuration file using the same cpu flags I use under gentoo (just -march=native -- I'm not much for tweaking). This includes all the libraries glmark2 links to, and anything else I thought might help. After rebuilding gcc, I went ahead and rebuilt the others again, just in case. So far, the difference isn't noticeable, but I might be getting slightly better framerates.

gcc
glibc
glu
lib32-mesa
libglvnd
libpng
libx11
libxau
libxext
llvm
mesa
xf86-video-intel
xorg-server

Of course, I realize there's a lot of other factors at play -- different versions (though you'd think the later versions would be faster, generally), different patches, etc.

Offline

#6 2018-10-22 21:31:37

duaner
Member
Registered: 2018-10-13
Posts: 16

Re: xf86-video-intel / Wine Slower On Arch [Solved]

seth wrote:

Another thing that could interfere is power saving.

Yes, I need to look into that. I've checked the cpu frequency/governor settings, which are all the same, but not much else.

Here are the files you asked for:

https://pastebin.com/KzecduNy
https://pastebin.com/ikUK04Zn
https://pastebin.com/B83uGKAK
https://pastebin.com/vxD7FkhC

Offline

#7 2018-10-22 21:37:26

duaner
Member
Registered: 2018-10-13
Posts: 16

Re: xf86-video-intel / Wine Slower On Arch [Solved]

Lone_Wolf wrote:
https://github.com/glmark2/glmark2 wrote:

glmark2 is an OpenGL 2.0 and ES 2.0 benchmark.

You do realise OpenGL ES 2.0 was released in 2007 and the numbers it shows have very little relevance for recent applications ?

It's still a very good benchmark, and much easier to port to different computers than some I could name. Have you tried it lately? At any rate, it's a strong predictor of the framerates I get in my games. Maybe my games are too old-school. : )

In the world of warcraft client, for example, I get framerates around 50fps under gentoo, and around 43fps under arch, in the same circumstances.

Offline

#8 2018-10-23 06:52:55

duaner
Member
Registered: 2018-10-13
Posts: 16

Re: xf86-video-intel / Wine Slower On Arch [Solved]

I've fixed most of the slowdown by rebuilding the xf86-video-intel package with the default arguments. (i.e. --disable-dri3 -- For some reason, dri3 is not an improvement on this machine.) None of the packages I rebuilt showed much improvement with arch=native instead of generic.

Wine programs are better, but still a tad anemic. Unfortunately, wine has a lot more options than the intel driver, so it's hard to know where to start with it. I'm going to try removing the vulkan drivers too.

Offline

#9 2018-10-23 07:01:37

seth
Member
Registered: 2012-09-03
Posts: 9,824

Re: xf86-video-intel / Wine Slower On Arch [Solved]

Ok, so it's an optimus system. Intel is driven by the intel ddx driver and nvidia by the nouveau module and ddx driver. Both chips are active, setup looks prepared for https://wiki.archlinux.org/index.php/PRIME

Now let's see glxinfo and xorg log on the gentoo system.

Offline

#10 2018-10-23 10:27:21

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 6,592

Re: xf86-video-intel / Wine Slower On Arch [Solved]

I've fixed most of the slowdown by rebuilding the xf86-video-intel package with the default arguments. (i.e. --disable-dri3 -- For some reason, dri3 is not an improvement on this machine.)

No need to rebuild to disable dri3 , see https://wiki.archlinux.org/index.php/In … RI3_issues

Waiting to see if gentoo uses intel DDX or modesetting driver.

As for the GLmark2 benchmark : nope , not ran it in 4-5 years.
My (now broken) desktop had a radeon HD 4870, benchmarks mainly told me my card was old and to slow for the benchmark.
(unigine heaven is not fun to watch with average fps below 10)


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#11 2018-10-23 21:53:16

duaner
Member
Registered: 2018-10-13
Posts: 16

Re: xf86-video-intel / Wine Slower On Arch [Solved]

Lone_Wolf wrote:

No need to rebuild to disable dri3 , see https://wiki.archlinux.org/index.php/In … RI3_issues

Yes, and if I'd been paying attention, it says the same thing and quotes exactly what you need to enter in the install text for the intel driver. /facepalm  Of course, the first time I read it, I had no idea what I was looking for.

Alright, here are the gentoo files:

gentoo glxinfo: https://pastebin.com/bC71X7Kr
gentoo xorg..log: https://pastebin.com/fanHDxVp

seth wrote:

Ok, so it's an optimus system. Intel is driven by the intel ddx driver and nvidia by the nouveau module and ddx driver. Both chips are active, setup looks prepared for https://wiki.archlinux.org/index.php/PRIME

I've set up prime under gentoo a few times before, and it works under arch without any setup, but you have to manually set the power state of the nvidia gpu (often several times) to get any performance, and it doesn't load the gallium drivers for some reason. The gallium-nine patches to wine run, but very slowly. Since I could never get results much better than the intel driver on its own, I just gave up on it.

So here's where I am now. All packages are stock arch. I've got intel and nouveau drivers loaded, and everything else I listed above. I can run dri2 or 3 based on the xorg.conf.

arch xorg..log (dri2): https://pastebin.com/Js8EjkQ4
arch xorg..log (dri3): https://pastebin.com/GVi9b9K7

When I run dri3, the nvidia gpu obviously runs, and if I set its powerstate to the best performance option, it gives me slightly better framerates, but overheats quickly. Without it, everything runs slower than gentoo (but still tolerable).

arch glxinfo (dri3): https://pastebin.com/SBJPVeWE
arch glxinfo (dri3, prime): https://pastebin.com/XKvSvE2Q

When I limit the intel driver to dri2, glxinfo does not indicate that DRI_PRIME has any effect. The output is exactly the same no matter what DRI_PRIME is set to. However, wine games run faster (as fast as on gentoo) with DRI_PRIME=1 than with it set to 0, and there's no overheating. At the point I tested this, the nvidia gpu was still (theoretically) set to best performance, but I don't know what the default is, so I haven't checked it that way.

arch glxinfo (dri2): https://pastebin.com/teUXLFyv

Gentoo should be using dri2, since dri3 is explicitly disabled in the portage settings. I think that DRI_PRIME makes some change on arch that gentoo makes implicitly.


To recap for any onlookers, I've installed xf86-video-intel, xf86-video-nouveau, wine-staging-nine, and I use the following "/etc/X11/xorg.conf.d/20-intel.conf". I run wine games with "DRI_PRIME=1".

Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "DRI" "2"             # DRI3 is now default 
    #Option      "AccelMethod"  "sna" # default
    #Option      "AccelMethod"  "uxa" # fallback
EndSection

That solves the initial problem, though I can't say I understand what prime is doing. (Thanks for the help, guys.)

Last edited by duaner (2018-10-23 22:07:17)

Offline

Board footer

Powered by FluxBB