cryinkfly / Autodesk-Fusion-360-for-Linux

This is a project, where I give you a way to use Autodesk Fusion 360 on Linux!
https://github.com/cryinkfly/Fusion-360---Linux-Wine-Version-/wiki
MIT License
1.91k stars 120 forks source link

Laggy selection and highlight on Nvidia proprietary drivers #73

Open blazej222 opened 3 years ago

blazej222 commented 3 years ago

OS: ArchLinux 5.13.13 GPU: Nvidia GTX 980, Nvidia 940mx on laptop GPU drivers used : nvidia (proprietary), nvidia-utils, lib32-nvidia-utils I also have installed mesa, lib32-mesa, mesa-utils.

I was able to reproduce the issue on my PC and laptop.

After selecting an object with lmb(sketch line or object face) it stays highlighted until you click twice somewhere else. If you draw an empty selection, it also remains visible until you click somewhere else. Examples:

Line clicked: line_clicked

Line unclicked first time: line_unclicked_first_time

Line unclicked second time: line_unclicked_second_time

Selection drawn (please note I'm not holding lmb anymore - I'm hovering over Finish Sketch button, but unfortunately my screenshot app won't show my cursor). It will stay that way until I click somewhere else in the workspace. selection

blazej222 commented 3 years ago

This issue persists only on Nvidia proprietary drivers, I was unable to reproduce it on nouveau or intel drivers. It doesn't matter if I run Fusion with OpenGL or DX9 as Renderer (so it's clearly driver-related). Here's the output of glxinfo -Bon my laptop with Nvidia Card, since I'm currently away from home and main PC.

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 2048 MB
    Total available memory: 2048 MB
    Currently available dedicated video memory: 1998 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce 940MX/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 470.63.01
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 470.63.01
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 470.63.01
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
cryinkfly commented 3 years ago

@blazej222 I have found your post here: https://bbs.archlinux.org/viewtopic.php?id=269268

… and I think this configuration is a better solution for your system: https://github.com/cryinkfly/Fusion-360---Linux-Wine-Version-/issues/79

blazej222 commented 3 years ago

… and I think this configuration is a better solution for your system: #79

While it would be a perfect solution for my laptop (well, more like workaround since I'm forced to use Intel GPU) I cannot apply it on my main PC, because I have only Nvidia Card there, and switching OpenGL to DX9 unfortunately doesn't change anything :cry:

NZRosto commented 2 years ago

I too have this issue, I am running fusion360 on PopOS using Nvidia Drivers. I have tried both OpenGL and DX9 modes, clean installs both times, and no change. I feel that the interface is marginally better using DX9, however both modes have the selection and highlight problems.

TN-1 commented 2 years ago

Have eiither @NZRosto or @blazej222 tried to use DXVK?

NZRosto commented 2 years ago

I am using DX9 through DXVK I think, still got the issue using DXVK with DX9 and OpenGl

blazej222 commented 2 years ago

I've tried DXVK, native DX9 wine emulation and OpenGL. Still same issue.

cryinkfly commented 2 years ago

@NZRosto and @blazej222 Okay, that's interesting. 🧐

fradinni commented 2 years ago

Same issue here, RTX 3080 with Nvidia proprietary drivers installed on latest version of Linux Mint, tried with DX9 or OpenGL, laggy selection and highlight problems.

blazej222 commented 2 years ago

I've noticed something interesting when running fusion from the terminal

043c:fixme:d3d_shader:print_glsl_info_log Info log received from GLSL shader #10:
043c:fixme:d3d_shader:print_glsl_info_log     Vertex info
043c:fixme:d3d_shader:print_glsl_info_log     -----------
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[2].zw" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[3]" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[4]" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[5]" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[6]" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[7]" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[8]" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[9]" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[10]" might be used before being initialized
043c:fixme:d3d_shader:print_glsl_info_log     0(25) : warning C7050: "vs_out[11]" might be used before being initialized

I have no idea what it means, but maybe it is related somehow?

cryinkfly commented 2 years ago

@blazej222 Thank you for this post here: https://forums.developer.nvidia.com/t/autodesk-fusion-360-on-wine-glitches-only-when-using-proprietary-nvidia-driver/189560 :+1:

I hope that maybe someone there can help with our problem. 💡

blazej222 commented 2 years ago

I've also written posts on Arch forums and Wine forums, anyone interested might share more information here (or maybe bump the threads :smile: ) https://bbs.archlinux.org/viewtopic.php?id=269733 https://forum.winehq.org/viewtopic.php?f=8&t=35678

vendeta44 commented 2 years ago

Any update on this? I'm suffering the same issue with gtx 1080 on pop os 21.10 wine 7.0. Its borderline usable by quickly zooming in or out to update the selection set, but still not ideal and hard to deal with small selections/highlights.

fradinni commented 2 years ago

@vendeta44 no news on this issue, I'm also having it with a RTX 3080. Fusion is not usable with these glitches for serious projects. Its good for designing a cube, that's all. Best solution for now is running a Windows VM with GPU Passthrough, that's what I'm doing, i can live with it.

cryinkfly commented 2 years ago

Can any body make a video of this issue for me, please?

vendeta44 commented 2 years ago

@cryinkfly here's a short clip https://imgur.com/a/6bTxkJa . To me its almost like its one frame behind at all times, its easiest to see when i extrude a section and drag to a position, when I let go of mouse click the visual will update and snap the extrude farther then what was visible before I let go of the mouse(but to the correct location as defined by the measurement). Its also pretty apparent when trying to select sides or edges.

I noticed a lot of unsupported packet type errors in the cmd, which i thought could possibly mean wine was having trouble identifying my graphics card, or possible wasn't able to access the 32bit libraries of the nvidia propriety driver, so i tried using regedit to manually define my card as well reloading my gfx driver and installing any 32bit nvidia libraries I could but never had any success.

NZRosto commented 2 years ago

I'm still having this problem, and it is well described by @vendeta44. For me, the most noticeable thing is when scrolling to zoom, the zoom will lag behind by one mouse wheel tick. Eg when you zoom in by one tick, nothing will happen, then another tick and it will zoom in slightly, then try one tick the other way and it will keep zooming in a little, then keep ticking backwards and it will start zooming out. It's like when the UI updates, it's lagging the mouse events by one update. Changing the render API doesn't seem to make much difference. I have an Nvidia GTX 1660 Super using driver 510.47.03

vendeta44 commented 2 years ago

I discovered this same bug or one very similar in simplify 3d in the slicers model view when running via the same wine install as i have for fusion(easily reproduced by clicking the center model on buildplate button and it wont graphically update the displayed position until you zoom in or out). I'd guess wine is struggling with a 3d window contained within only a portion of the window or something else related between the two programs?

cryinkfly commented 2 years ago

Maybe I have a idea ... I have seen that wine use gdi as the standard renderer:

Bildschirmfoto_2022-02-11_10-11-12

And this can be the reason why we get some of these errors.

I think we must testing Autodesk Fusion 360 with the other options! For example: vulkan

You can do this with winetricks:

WINEPREFIX="$HOME/.wineprefixes/fusion360" sh winetricks vulkan

@vendeta44 Very good information! :+1:

fradinni commented 2 years ago

@cryinkfly Just tried with the rederer set to "vulkan" but it's not working, I also tried with the "vulkan-1" ddl override but it's the same.

Here is a screenshot with the vulkan renderer, the navigation menu is not displayed and design view is not working well. Capture d’écran du 2022-02-11 10-32-36

The WINEPREFIX="$HOME/.wineprefixes/fusion360" sh winetricks vulkan is not working on my side, I had to do it manually.

vendeta44 commented 2 years ago

Still a issue on vulkan for me, but fusion was otherwise acting the same (in my short test anyway) no UI rendering errors like fradinni

I enabled vulkan via winetricks renderer=vulkan

Likewise setting renderer=gl or gdi had no affect.

vendeta44 commented 2 years ago

Some more potentially useful info as I've been digging on google. I found reference to the same bug "one event behind bug" in 2018 for google sketchup, https://forums.linuxmint.com/viewtopic.php?t=282852, and digging deeper on winehq I can find references to the bug as far back as 2012!

https://bugs.winehq.org/show_bug.cgi?id=25912 this thread seems to have the most information on the bug I can find in one spot, some potential fixes I'm not exactly sure how to implement are as follows

https://bugs.winehq.org/show_bug.cgi?id=25912#c67 / https://forums.developer.nvidia.com/t/multiple-wine-applications-dont-display-the-last-drawn-frame-promptly-with-nvidia-driver/74676 ^ To allow for triple buffering. Setting this env variable is restricting the driver to double buffering. If that env var fixes things, this points to a bug in the application (wine?) accidentally using triple buffering but only taking care of double buffers. Nouveau per default only uses double buffering, triple buffering has to be enabled in xorg.conf, so with it the issue is not triggered.

https://www.winehq.org/pipermail/wine-devel/2012-February/094251.html / https://bugs.winehq.org/show_bug.cgi?id=25912#c19

HakonHarnes commented 1 year ago

As suggested in https://bugs.winehq.org/show_bug.cgi?id=25912#c67, setting the __GL_MaxFramesAllowed=1 environment variable resolved the issue for me.