[SOLVED] Can't use GPU inside Wine 4.0

Anything related to gaming on Linux Mint including game discussion or questions concerning Steam or Wine.
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Mintymandy34

[SOLVED] Can't use GPU inside Wine 4.0

Post by Mintymandy34 »

My Wine version.

Code: Select all

$ wine --version
wine-4.0
My system info.

Code: Select all

$ inxi -Fxz
System:
  Host: user-PC Kernel: 4.18.0-15-generic x86_64 bits: 64 compiler: gcc 
  v: 7.3.0 Desktop: Cinnamon 4.0.9 Distro: Linux Mint 19.1 Tessa 
  base: Ubuntu 18.04 bionic 
Machine:
  Type: Laptop System: HP product: OMEN by HP Laptop 15-dc0xxx v: N/A 
  serial: <filter> 
  Mobo: HP model: 84DA v: 93.21 serial: <filter> UEFI: AMI v: F.07 
  date: 10/30/2018 
Battery:
  ID-1: BAT0 charge: 47.9 Wh condition: 47.9/47.9 Wh (100%) 
  model: HP Primary status: Full 
CPU:
  Topology: 6-Core model: Intel Core i7-8750H bits: 64 type: MT MCP 
  arch: Kaby Lake rev: A L2 cache: 9216 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 52992 
  Speed: 800 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 
Graphics:
  Device-1: Intel vendor: Hewlett-Packard driver: i915 v: kernel 
  bus ID: 00:02.0 
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] 
  vendor: Hewlett-Packard driver: nvidia v: 390.77 bus ID: 01:00.0 
  Display: x11 server: X.Org 1.19.6 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1920x1080~144Hz 
  OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 390.77 
  direct render: Yes 
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
  Sound Server: ALSA v: k4.18.0-15-generic 
Network:
  Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi 
  v: kernel port: 5000 bus ID: 00:14.3 
  IF: wlo1 state: up mac: <filter> 
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8169 v: 2.3LK-NAPI port: 3000 
  bus ID: 03:00.0 
  IF: eno1 state: down mac: <filter> 
Drives:
  Local Storage: total: 1.03 TiB used: 170.34 GiB (16.2%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLW128HEGR-000H1 
  size: 119.24 GiB 
  ID-2: /dev/sda vendor: HGST (Hitachi) model: HTS721010A9E630 
  size: 931.51 GiB 
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci 
  v: 3.0 bus ID: 00:17.0 
Partition:
  ID-1: / size: 98.04 GiB used: 9.96 GiB (10.2%) fs: ext4 
  dev: /dev/nvme0n1p2 
  ID-2: /home size: 902.43 GiB used: 160.38 GiB (17.8%) fs: ext4 
  dev: /dev/sda1 
  ID-3: swap-1 size: 18.63 GiB used: 0 KiB (0.0%) fs: swap 
  dev: /dev/nvme0n1p3 
Sensors:
  System Temperatures: cpu: 74.0 C mobo: N/A gpu: nvidia temp: 49 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 317 Uptime: 4h 28m Memory: 15.48 GiB used: 3.73 GiB (24.1%) 
  Init: systemd runlevel: 5 Compilers: gcc: 7.3.0 Shell: bash v: 4.4.19 
  inxi: 3.0.27 
While running graphics intensive program inside Wine I can't access the GPU for rendering, it's using CPU and there's no other option available.
Using the same applications outside Wine, in Linux native allows me to switch to GPU rendering.

There are some applications I would need to have GPU rendering for and they're not developed for Linux.
So, if anybody has any idea, please let me know.

SOLUTION:
0. Completely remove any previous version of PlayOnLinux you might be having by using Synaptic Package Manager.
1. Download and install the latest version of PlayOnLinux from here.
2. Open PlayOnLinux (POL), then goto Tools, then Manage Wine versions.
3. Install both x86 and amd64 versions of a Wine version. (say 4.0-staging, newer is better)
4. Now, install a program from within POL using manual installation method.
5. While installing, you can choose a different version of Wine, there don't choose System and instead go for the new version of Wine you installed.
Explained in detail here, with pictures
6. Choose to create a shortcut when prompted.
7. Now, finish with the installation and start the application from that shortcut.
8. You'll be able to use GPU by installing applications in Wine this way.

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
NevyNeverKnowsBest

Re: Can't use GPU inside Wine 4.0

Post by NevyNeverKnowsBest »

I'm confused per your system info here:

Code: Select all

OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 390.77 
direct render: Yes
Just wondering, are you using Winetricks, POL, or a Wine frontend at all?
Mintymandy34

Re: Can't use GPU inside Wine 4.0

Post by Mintymandy34 »

NevyNeverKnowsBest wrote: Sat Feb 23, 2019 1:40 am I'm confused per your system info here:

Code: Select all

OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 390.77 
direct render: Yes
Can you please point out the anomaly?
I'm new here, so yet to understand how things work.
NevyNeverKnowsBest wrote: Sat Feb 23, 2019 1:40 am Just wondering, are you using Winetricks, POL, or a Wine frontend at all?
Yes, Q4Wine.
I'm not using it much, though, can get rid of it if required.
And should I really use a frontend at all?
NevyNeverKnowsBest

Re: Can't use GPU inside Wine 4.0

Post by NevyNeverKnowsBest »

Well, in my thinking, if the OS recognizes your GPU hardware like that, then Wine should be utilizing the proper driver software to make things work. I asked about a Wine frontend because many of them will make it a lot easier to setup hardware drivers just for this purpose.

Nothing wrong with using a frontend, but Q4Wine appears to be a relatively new frontend that I have little experience with. Sadly, I have no solution.
Mintymandy34

Re: Can't use GPU inside Wine 4.0

Post by Mintymandy34 »

NevyNeverKnowsBest wrote: Sat Feb 23, 2019 8:55 pm Well, in my thinking, if the OS recognizes your GPU hardware like that, then Wine should be utilizing the proper driver software to make things work. I asked about a Wine frontend because many of them will make it a lot easier to setup hardware drivers just for this purpose.

Nothing wrong with using a frontend, but Q4Wine appears to be a relatively new frontend that I have little experience with. Sadly, I have no solution.
About that, do you know if there's a way to find out which graphics card is used inside a Wine Application?
If you can recommend some other frontend that I could use, I could give it try, I'm a noob, so your experience really helps.

Thanks for your response, it doesn't look good but I'm still not giving up on hope.
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: Can't use GPU inside Wine 4.0

Post by trytip »

Code: Select all

winetricks physx
this may solve your graphics issue but depends on the application or game. wine also needs a .netframework installed but it's a mess trying to figure out which one will install correctly

the way wine usually works is when you have nvidia correctly installed in linux wine will utilize the gpu according to wine specs. but since ditectx and direct sound barely works in linux this may also be an issue

along with nvidia physx you may also need to run
winetricks > Select the default wineprefix > Install a Windows DLL or component and choose
vcrun2003
vcrun2005
vcrun2008
vcrun2010
vcrun2012
vcrun2013
vcrun2017 (do not install 2015)

don't go crazy and install things in winetricks gui for now physx and vcrun engines are ok
Image
Mintymandy34

Re: Can't use GPU inside Wine 4.0

Post by Mintymandy34 »

trytip wrote: Sun Feb 24, 2019 12:52 pm

Code: Select all

winetricks physx
this may solve your graphics issue but depends on the application or game. wine also needs a .netframework installed but it's a mess trying to figure out which one will install correctly

the way wine usually works is when you have nvidia correctly installed in linux wine will utilize the gpu according to wine specs. but since ditectx and direct sound barely works in linux this may also be an issue

along with nvidia physx you may also need to run
winetricks > Select the default wineprefix > Install a Windows DLL or component and choose
vcrun2003
vcrun2005
vcrun2008
vcrun2010
vcrun2012
vcrun2013
vcrun2017 (do not install 2015)

don't go crazy and install things in winetricks gui for now physx and vcrun engines are ok
Not sure if I totally understand this, but I'll try these and let you know if I find some difficulty.
Thanks for the response. :D
Mintymandy34

Re: Can't use GPU inside Wine 4.0

Post by Mintymandy34 »

trytip wrote: Sun Feb 24, 2019 12:52 pm
along with nvidia physx you may also need to run
winetricks > Select the default wineprefix > Install a Windows DLL or component and choose
vcrun2003
vcrun2005
vcrun2008
vcrun2010
vcrun2012
vcrun2013
vcrun2017 (do not install 2015)

don't go crazy and install things in winetricks gui for now physx and vcrun engines are ok
Tried this, didn't work. :(
I was really hopeful.
trytip wrote: Sun Feb 24, 2019 12:52 pm the way wine usually works is when you have nvidia correctly installed in linux wine will utilize the gpu according to wine specs. but since ditectx and direct sound barely works in linux this may also be an issue
Could it be my Wine installation isn't correct?
Applications do run fine, but they can't use the GPU, the same apps run fine in Linux and have access to the GPU.
Is there a way to know if nvidia is correctly installed in my Linux system?
I don't have much idea about all these, so I don't know how to resolve this, would surely like to learn.

Thanks for helping out. :)
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: Can't use GPU inside Wine 4.0

Post by trytip »

winetricks physx did you try this first? the vcrun files help out in games that don't open.
Image
Mintymandy34

Re: Can't use GPU inside Wine 4.0

Post by Mintymandy34 »

trytip wrote: Sun Feb 24, 2019 5:03 pm winetricks physx did you try this first? the vcrun files help out in games that don't open.
Yes, I did try, it did install successfully, I tried the rendering, no available GPU, then tried with installing vcrun, didn't change anything.
Mintymandy34

Re: Can't use GPU inside Wine 4.0

Post by Mintymandy34 »

NevyNeverKnowsBest wrote: Sat Feb 23, 2019 8:55 pm Well, in my thinking, if the OS recognizes your GPU hardware like that, then Wine should be utilizing the proper driver software to make things work. I asked about a Wine frontend because many of them will make it a lot easier to setup hardware drivers just for this purpose.

Nothing wrong with using a frontend, but Q4Wine appears to be a relatively new frontend that I have little experience with. Sadly, I have no solution.
Thanks for recommending PlayOnLinux.
I installed the latest version from their website and then installed Wine 4.0 staging and now I can use my GPU as well as CPU for rendering inside Wined applications.
Thanks, POL is great, I've multiple Wine versions now to test what works for which app.
It's fabulous. :)
trytip wrote: Sun Feb 24, 2019 5:03 pm winetricks physx did you try this first? the vcrun files help out in games that don't open.
Thanks for helping out, your tips did help. :D
Locked

Return to “Gaming”