Bug 452880 - Canvas not loading/freezing when using openGL canvas acceleration is enabled.
Summary: Canvas not loading/freezing when using openGL canvas acceleration is enabled.
Status: RESOLVED UPSTREAM
Alias: None
Product: krita
Classification: Applications
Component: OpenGL Canvas (show other bugs)
Version: 5.0.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-04-22 20:50 UTC by nugattistjerna
Modified: 2023-07-21 23:24 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nugattistjerna 2022-04-22 20:50:23 UTC
SUMMARY
***
Canvas not loading/freezing when using openGL canvas acceleration is enabled.  
***


STEPS TO REPRODUCE
1.  Open image with opengl canvas enabled resulting in canvas freezing.  
2.  switching to software renderer seems to work. Turning canvas acceleration back on results in freeze.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: arch 5.17.4
                                   sway 1.1.7-2 / gnome 42.0-1
                                   nvidia 510.60.02
Qt Version: 5.15.3

ADDITIONAL INFORMATION

Tested with same result sway/gnome.
Comment 1 Alvin Wong 2022-04-23 09:51:35 UTC
Sounds like a driver issue to me. Does it work with the 5.0.5 AppImage? What about 5.0.2?
Comment 2 nugattistjerna 2022-04-23 11:38:06 UTC
(In reply to Alvin Wong from comment #1)
> Sounds like a driver issue to me. Does it work with the 5.0.5 AppImage? What
> about 5.0.2?

I get the same result testing with the app image. I have had the canvas working once or twice by turning off texture buffer after toggling canvas hardware acceleration on and off.

Will try 5.0.2 and see if there is any difference. 

I get this Error message when trying to open image with canvas acceleration active.
QOpenGLWidget: Failed to make context current.
Comment 3 nugattistjerna 2022-04-23 17:10:32 UTC
Tested 5.0.2 and 5.0.5 Appimage resulting in when opening project :
    Failed to fetch display info: "current platform doesn't support fetching display information"
    The X11 connection broke: No error (code 0)
    XIO:  fatal IO error 0 (Success) on X server ":0"
    after 2679 requests (2679 known processed) with 0 events remaining.
    QObject::disconnect: Unexpected null parameter
    QObject::disconnect: Unexpected null parameter
    zsh: segmentation fault (core dumped)  ./krita-5.0.5-x86_64.appimage

software rendering works thought :}
Comment 4 Bug Janitor Service 2022-04-24 04:35:06 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Alvin Wong 2022-04-26 14:26:15 UTC
Well, it still sounds to me like a problem with the nvidia driver. Had Krita with OpenGL ever worked normally on your system in the past with an older driver?
Comment 6 nugattistjerna 2022-05-02 23:14:43 UTC
(In reply to Alvin Wong from comment #5)
> Well, it still sounds to me like a problem with the nvidia driver. Had Krita
> with OpenGL ever worked normally on your system in the past with an older
> driver?

canvas acceleration seems to be working for me now after updating to 510.68.02 driver :)
Comment 7 Alvin Wong 2022-05-03 07:48:16 UTC
Thanks for the update, cheers.
Comment 8 nugattistjerna 2022-05-07 15:20:11 UTC
Well it was all a lie, I'm still not able to open  any images or interact with canvas with acceleration turned on. Must have had it turned off accidentally..
Comment 9 Alvin Wong 2022-05-12 08:00:09 UTC
Sorry, can't help because I don't have an NVIDIA setup. I can only give some ideas to try:

- Try downgrading to an older release of the NVIDIA driver if possible (I understand it is not straightforward on Arch.)
- If you have been using Wayland (with XWayland), try an Xorg session instead.
- Try asking on https://krita-artists.org/ to see if other NVIDIA users have similar issues.
Comment 10 nugattistjerna 2022-05-12 20:07:24 UTC
No problem and thanks for the suggestions. 
If anyone Else is experiencing  this issue I have gotten krita to work quite well by using nvidia-prime, it also have the added benefit of sway desktop running smoother :) so win-win!
Comment 11 SimplyCorbett 2022-11-18 15:04:06 UTC
This is still an issue. Using the latest nvidia driver with KDE/wayland krita will crash when loading a canvas if opengl hardware acceleration is enabled.
Comment 12 tomtomtomreportingin 2022-11-22 17:51:22 UTC
Krita does crash on document creation/opening if the user is using Wayland + Nvidia drivers + hardware accel. However,there is no crash if the document is opened while on CPU accel and the user changes to hardware accel, which leads me to believe Krita has some issue initializing the canvas in regards to Wayland.
Comment 13 Martin 2023-03-25 18:27:26 UTC
I don't have much to add other than this is still an issue on 5.1.5 with 534.41.03 drivers on a desktop GPU, and that to disable the HW accel one needs to go to Settings -> Configure Krita > Canvas acceleration -> (uncheck) Canvas Graphics Acceleration
Comment 14 Dmitry Kazakov 2023-07-21 16:09:43 UTC
Krita does **not** support wayland compositor at the moment, so we cannot do anything about this bug, I'm afraid.
Comment 15 Martin 2023-07-21 23:24:11 UTC
How is this resolved-upstream if Krita needs to implement support for a Wayland compositor?

Or am I not understanding things correctly?