MCMrARM / mcpelauncher-linux

Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
312 stars 46 forks source link

Heavy lag when fullscreen (branch 1.1 - ubuntu 17.04) #131

Closed NyaomiDEV closed 6 years ago

NyaomiDEV commented 7 years ago

Log:

loading native libraries
oslib: libGLESv2.so: 1468739272
oslib: /home/anthony/Scrivania/mcpelauncher-linux-1.1/build/libs/native/libfmod.so.8.2: 1468741304
loading hybris libraries
loading MCPE
loaded MCPE (at 4088778752)
apply patches
original: 85 83 87 86 131
post patch: 233 213 183 220 97
original: 85 83 87 86 131
post patch: 233 190 133 221 97
original: 85 83 87 86 129
post patch: 233 34 131 221 97
original: 83 87 86 131 236
post patch: 233 228 131 221 97
original: 83 131 236 8 232
post patch: 233 218 152 117 96
original: 83 87 86 131 236
post patch: 233 252 159 117 96
original: 85 83 87 86 131
post patch: 233 226 9 106 96
original: 83 87 86 131 236
post patch: 233 168 225 149 96
original: 83 131 236 8 232
post patch: 233 190 212 149 96
original: 83 131 236 8 232
post patch: 233 206 211 149 96
original: 83 86 131 236 20
post patch: 233 64 37 207 97
patches applied!
init app platform vtable
AppPlatform size = 143
init app platform
app platform initialized
init window
libEGL warning: DRI2: failed to authenticate
EGL_VERSION = 1.4 (DRI2)
create minecraft client
current storage path = data/current/
userdata path = data/user/
userdata path = data/user/
fetch patch notes
init minecraft client
userdata path = data/user/
userdata path = data/user/
get data url: assets/
internal storage path = data/private/
internal storage path = data/private/
userdata path = data/user/
userdata path = data/user/
get assert full path: uniforms.json
get data url: assets/
getjvmenv
internal storage path = data/private/
creating fake store <MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqU9snkqLkTCYZQfQgNy9eabP/OcumQTgcoYhuBbmx2isicIX8mSUNJn64yxiA6acqnJzJxGbKW9H+gSWMuRtCtwI3Exb3sCq19EiVtjos4u5BJatzBKXXDDJeeYrejGk8FgT6ffokcilJFY4wgQQxDGFdfE/reAqm6+VKUtoqnjMpG0wVZn+o0bJfxNvE/ydJPlabDmoywEn9zEl0hXo0i+cimVlFZcTT6ed7U9celM2Ywg+7qVIu7fmBHPucTIoUAbipEAIvP2EntOqrhUG6GKJ219Qhdr43fvnyBailudNBiDRqA+x0rCH1JgmV/BvyAHTBylPzroeh9rWJNNPxQIDAQAB>
get product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxget product sku prefix: linuxallows subscriptions: false
get product sku prefix: realmsallows subscriptions: false
get product sku prefix: realmsallows subscriptions: false
get product sku prefix: realmsallows subscriptions: false
get product sku prefix: realmsallows subscriptions: false
get product sku prefix: realmsallows subscriptions: false
restore from cache
register license change callback
userdata path = data/user/
get store id: LinuxStore
get sub platform store id: LinuxStore
get system region: 0xdeadbeef
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
getjvmenv
xbox get app config singleton
xbox config: set sandbox (stub)
xbox get app config singleton
xbox config: set sandbox (stub)
get assert full path: commands/pregame.json
userdata path for levels = data/user/
internal storage path = data/private/
is tablet = true
get system region: 0xdeadbeef
application id = com.mojang.minecraftpe
userdata path for levels = data/user/
[MinecraftPE] VERBOSE RAKNET [IPv6] multicast listen on interface 0

initialized lib
initialized display
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
[MinecraftPE] VERBOSE RAKNET [IPv6] multicast listen on interface 0

__bionic_open_tzdata_path: ANDROID_DATA not set!
__bionic_open_tzdata_path: ANDROID_ROOT not set!
__bionic_open_tzdata_path: ANDROID_DATA not set!
__bionic_open_tzdata_path: ANDROID_ROOT not set!
verifycertchain
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
get system region: 0xdeadbeef
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
verifycertchain
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request
send http request
destroying http request

Using NVIDIA drivers (nvidia-340) and a 9400 GT. Lag isn't hardware-related (last time I played with master branch build the gameplay was fluid)

guppy42 commented 7 years ago

If it's not hardware related then

./mcpelauncher --scale 4

should not noticeable affect it, can you confirm?

NyaomiDEV commented 7 years ago

Yep; same lag

guppy42 commented 7 years ago

In the interest of differential diagnosis; Gtx970 @4k fullscreen with 1.1.0.55 on the 1.1 branch I get no noticeable lag with proprietary drivers v 378.13 on Mint 18.1 (based on Ubuntu 16.04)

MCMrARM commented 7 years ago

Most likely some compositor/driver issue, I'm not really sure what I could do about it.

NyaomiDEV commented 7 years ago

I bet it's something wrong with this

libEGL warning: DRI2: failed to authenticate
EGL_VERSION = 1.4 (DRI2)

This used to appear when I didn't symlink nvidia-340 libs to /usr/lib/i386-linux-gnu/ but if I do that now the game simply crashes.

IMO the game itself should use nvidia-XXX drivers located in /usr/lib32/nvidia-XXX/ instead of mesa-egl ones

MCMrARM commented 7 years ago

The launcher currently links to whatever the system provides by default. It's hard to find a generic solution that works for everyone.

NyaomiDEV commented 7 years ago

cmake or make argument? like cmake . -USE_NVIDIA=340 maybe.. 340 is my driver version btw

NyaomiDEV commented 7 years ago

@guppy42 can you do ldd to the mcpelauncher executable?

guppy42 commented 7 years ago

@AryToNeX Later today I can - any particular version?

NyaomiDEV commented 7 years ago

@guppy42 1.2, no matter the version you use, I only want to know which libEGL.so.1 it uses

guppy42 commented 7 years ago
$ ldd 1.2_beta2/mcpelauncher 
    linux-gate.so.1 =>  (0xf7705000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76cd000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf76b0000)
    librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf76a6000)
    libEGL.so.1 => /usr/lib32/nvidia-378/libEGL.so.1 (0xf7694000)
    libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7549000)
    libuuid.so.1 => /lib/i386-linux-gnu/libuuid.so.1 (0xf7543000)
    libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf73cc000)
    libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf73ae000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf71f8000)
    /lib/ld-linux.so.2 (0x5663c000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf71a3000)
    libGLdispatch.so.0 => /usr/lib32/nvidia-378/libGLdispatch.so.0 (0xf710c000)
    libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf70e6000)
    libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf70e1000)
    libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf70da000)
MCMrARM commented 7 years ago

@AryToNeX what is displayed at the top of the screen as the renderer? NVIDIA something or LLVM PIPE/Gallium?

NyaomiDEV commented 7 years ago

LLVM Pipe @MCMrARM

Sent from my Xiaomi Redmi Note 3 using FastHub

NyaomiDEV commented 7 years ago

@guppy42 Yep I know the issue now. Mcpelauncher doesn't link to /usr/lib/nvidia-340/libEGL.so.1

Sent from my Xiaomi Redmi Note 3 using FastHub

MCMrARM commented 7 years ago

It should not matter where it links, it should use the library provided by ld.

NyaomiDEV commented 7 years ago

Yep but Nvidia doesn't provide its 32bit libs to ld, only 64bit ones. I tried to modify it myself but then when I recompile it tells me EGLUT: failed to create context

Sent from my Xiaomi Redmi Note 3 using FastHub

MCMrARM commented 7 years ago

@AryToNeX actually, what was the last version when the whole thing used the proper NVIDIA drivers?

NyaomiDEV commented 7 years ago

@MCMrARM as far as I can remember it was before 1.x release, when mcpelauncher didn't use system provided libraries but it guessed the correct path

Sent from my Xiaomi Redmi Note 3 using FastHub

MCMrARM commented 7 years ago

@AryToNeX looking at the error you get, it looks like you have a version mismatch between the kernel module and the 32 bit NVIDIA library

MCMrARM commented 7 years ago

Also, it's very likely you may be using GLVND (GL Vendor Neutral Dispatch library) which automatically uses a software renderer as a fallback. TL;DR you have an issue with nvidia drivers and perhaps it's even correct that this links to /usr/lib32/libEGL.so

NyaomiDEV commented 7 years ago

Okay I got it. Since reinstalling the drivers actually does nothing how should I solve this problem?

Sent from my Xiaomi Redmi Note 3 using FastHub

guppy42 commented 7 years ago

@AryToNeX you can force it to use a specific library; http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80

Are you using the bumblebee nvidia thing?

NyaomiDEV commented 7 years ago

@guppy42 I'm only using nvidia-340 drivers that are in ubuntu repository

NyaomiDEV commented 7 years ago

After debugging with the help of @MCMrARM I just discovered that it's sufficient to tell mcpelauncher the right libs directory.

$ LD_LIBRARY_PATH=/usr/lib32/nvidia-XXX ./mcpelauncher

I'm searching a way to force Nvidia drivers at linking time instead of running time. This issue should be referenced in the wiki for those who get mcpelauncher lagging because of LLVM Pipe.

Sent from my Xiaomi Redmi Note 3 using FastHub

guppy42 commented 7 years ago

As I suggested you do 3 days ago xD ( the link )

NyaomiDEV commented 7 years ago

@guppy42 yep; btw this isn't the fix, this is the workaround. The fix will be when mcpelauncher dinamically links to nvidia libs.

MCMrARM commented 7 years ago

MCPELauncher will not dynamically link to the NVIDIA libs, that's troublesome on my side and no apps do that.

NyaomiDEV commented 7 years ago

@MCMrARM I want to force linking when make builds the binary, by specifying library path. I'm not sure how

Sent from my Xiaomi Redmi Note 3 using FastHub

MCMrARM commented 6 years ago

I don't think fixing this is within the scope of the project, so I'm closing it. This is a messed up system config, any system with libglvnd should not have issues.