Reproduction of cursor bug

Discussion in 'Mac and Linux' started by SXX, August 23, 2013.

  1. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Currently I'm doing some Qt-programming and I decided to reproduce problem with cursor. I just add cursor to Grabber demo from Qt SDK and same problem occur, so it's mean Qt handle cursor by the same way as PA.

    This is bad news because it's confirm my suggestion that it's driver problem and not problem of PA.
    You can download source code in attachment. It's can be built using Qt 5.1 (download here).

    I also created topic on AMD forums:
    http://devgurus.amd.com/message/1299500#1299500
    It's on moderation, but when it's will be available please register here and post your system information and other details!

    It's also will be super helpful if some Nvidia user who have problems with cursor test this code and if some flickering happen report it on Nvidia forums:
    https://devtalk.nvidia.com/default/board/98/linux/

    Attached Files:

  2. natewiebe13

    natewiebe13 New Member

    Messages:
    25
    Likes Received:
    0
    Then why is it that this is the *only* game that I've played that has this issue?
  3. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I already answered on that question to other person. Other games are using fullscreen (PA won't use fullscreen, ever) mostly or handle cursor differently (as rooly find they only replace cursor inside window). PA is designed to be multi-window game when 99.99% of games use one window. As I understand Uber want to make new window for each viewpoint.

    I can assume that might be Uber fault (it's their first work with Linux), but Qt developers are professional Linux programmers, there big bunch of Qt which done by KDE community. No, I don't think they that cursor problem is their bug. It's why we need go to AMD and Nvidia and ask them to fix their crap.

    I agree that Uber need to create bypass for the problem before drivers are fixed, but it's not reason to ignore obvious drivers bug.
  4. rooly

    rooly New Member

    Messages:
    20
    Likes Received:
    2
    Your sample just confirms what I've already said: PA is replacing the system cursor.

    This is the wrong way to do cursor replacement in a GL context.
    you should instead disable cursor draw, load a texture, and draw a quad overlay at mouse_x/y.

    This is also present on my quadro gpu, just not as severe as it only flickers a small square, not the entire window.

    Uber may not HAVE this option atm thanks to coherent ui which probably does the cursor replacement for them. If that's the case then Uber should raise the issue with them.
  5. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I understand that you're right, but why Qt handle cursor by the same way? And why is this working on open source drivers?
  6. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I'm totally sure cursor handled by PA and not by Coherent.
  7. redstar427

    redstar427 Member

    Messages:
    46
    Likes Received:
    0
    Other games also use custom cursor, and while many games play in fullscreen by default, most will also play in a window.
    I play Crusader Kings II, and Expeditions: Conquistador both in a window, instead of fullscreen, and both have a custom cursor. Both play well in a window, without any cursor issues, using the standard, proprietary Nvidia driver and the standard OpenGL window and compositing manager.

    So if these other games can do it properly, so should Uber be able to.

    This bug has been posted for over 2 months, which is most of the Alpha duration.
    Had a bug this big been found on the Windows version, there would have been a riot by the Windows Alpha testers, until it was fixed.
  8. natewiebe13

    natewiebe13 New Member

    Messages:
    25
    Likes Received:
    0
    I mostly play games in windowed mode. This is not the issue. It's either PA, Coherent, WM/Compositor, or Video driver.

    My money is on a PA issue. Why they haven't at least given us some sort of update, I don't know. As far the same thing happening in your Qt demo, I think rooly answered this already.
  9. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I don't sure it's need to be called "properly". Game just handle cursor by other way and probably it's done for reason (probably because multi-window idea).

    Again: I don't argue about issue, there should be fix/bypass by Uber. But I ask other Linux users to report real bug in dirvers, which is main reason of this problem.

    There no same bug in Windows build, but I totally sure PA handle cursor by exactly same way. E.g on Windows game don't replace cursor inside window. I usually see same "black box" on my Intel HD notebook with Windows 7.
  10. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I'm not Uber employee and probably you have every right to blame that for this.

    But this topic is about driver bug... or Qt bug if somebody explain me why it's not problem of drivers.
  11. natewiebe13

    natewiebe13 New Member

    Messages:
    25
    Likes Received:
    0
    I don't think this is a driver bug. See AFAIK the standard GL convention of replacing the cursor is done like rooley said where you hide the system cursor and use it's position. This way you can treat the cursor like a GL surface. It also ensures that you don't get strange results if a conflict happens with the WM/compositor. So for a vendor to "fix" a case where it shouldn't be done in the first place, doesn't seem like a solution.
  12. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I don't argue about that because I'm know only a bit about GL programming and I really have no idea how is XServer handle cursor. But it's all not explain why Qt developers did it by the same way.
  13. rooly

    rooly New Member

    Messages:
    20
    Likes Received:
    2
    I don't want you to feel like you're being attacked, but the QCursor replaces the system cursor for when you are interacting with generic widgets. The Qt devs probably never anticipated using QCursor and GL in the same widget because that's simply not the way its done.

    I agree though that this bug is more than just PA's fault as you can easily replicate it.

    The fault probably lies somewhere in the way the proprietary drivers handle GL-replaced cursors, GL overlays, and GL contexts all inside a single window. Since the open source drivers use Gallium, they may have a better solution to GL-context + cursor replacement that NVidia or AMD never actually saw.
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I am not really into this topic, but this cursor was the reason why I stopped trying to play PA on Linux after a few minutes. It was simply unplayable due to buggy cursor.
    What is the reason why this is done like this? Why not just do what rooly said: Draw a texture on mouse x/y. No matter what Coherent does, the task of draw texture on position X/Y on top of everything else doesn't sound too hard to me.
    So what is the advantage of the current solution?
  15. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    If I understand neutrino idea right Uber want to use multiple windows for game for multiple viewpoints.

    For example: when you have one large windows (in pseudo fullscreen) and 4 small windows (e.g four viewpoints on different planets) on top of it that might be hard to handle cursor by traditional way because cursor might be on top of two or three windows in the same time.
  16. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Even if you stack 20 windows on top of each other the user can only see one of them, which is the one that should display the cursor?
  17. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    As I understand (probably I'm wrong) this is not true for PA which will use window in window design. As I understand it's will looks like that:
    windoiw_in_window.png

    Where each viewpoint it's different borderless window.
    Last edited: August 23, 2013
  18. natewiebe13

    natewiebe13 New Member

    Messages:
    25
    Likes Received:
    0
    I personally would prefer a tiling system similar to what is used in Blender, but I don't think he is talking about system windows, but windows inside of PA's actual window. Even if it is system windows, I don't think that is the reason they want to replace the system cursor. The same effect could be done using the method described above.
  19. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I want to believe neutrino won't be offended, but I think reason is this: :rolleyes:
  20. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I don't feel attacked and actually you did a great job when find why is that problem occur, but everyone else...

    I just can't understand people who met the problem and not even try report anything to Nvidia/AMD. Every Linux user know that proprietary drivers are buggy crap and there is multiple bugs which not fixed for years, but when some real problems happen nobody report them.
    Last edited: August 23, 2013

Share This Page