No cursor/Block cursor Ubuntu 12.04/13.04/13.10

Discussion in 'Mac and Linux' started by hvhp, October 18, 2013.

  1. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Okay I'm spend hour of my time and done simple standalone fix for cursor/icons/etc bug with FOSS drivers.
    Script in PHP, so it's should be installed ("apt-get install php5-cli")

    How to:
    1. Download and unpack CURSOR-ICONS-FIX-LINUX.zip
    2. Copy start.sh and fix.php to directory where PA executable located
    3. Run start.sh
    4. Script will be executed 10 seconds after PA.
    Enjoy.

    PS: Script grab Coherent View IDs from JSON output and then init websocket connection to each of them. In result Coherent reload them and everything work like a charm.

    Attached Files:

    Last edited: October 30, 2013
    olivier001 and DeathByDenim like this.
  2. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    This debugger binary isn't required at all because everything you need is done in JavaScript and communicate with Coherent Host though websockets.

    Actually even this HTML not required for workaround, you just need make proper websocket connection and view will be already reloaded.
  3. hvhp

    hvhp Member

    Messages:
    54
    Likes Received:
    2
    Did all that, Didn't work. Will try SXX's fix when i get chance and report back although i won't be playing PA until release now or at least till there's been a few balance issues with the bots but i'm always willing to play around with stuff like this :)
  4. yrrep

    yrrep Member

    Messages:
    67
    Likes Received:
    79
    Inspired by SXX's workaround I created a small PA mod that does more or less the same. If added to the start screen, the issue is fixed automatically every time PA is started.

    When the start screen is loaded, it retrieves all Coherent UI views and opens a WebSocket connection to them. This causes Coherent to properly reload all affected bitmaps.

    Code:
    var DEBUG_HOST = "127.0.0.1";
    var DEBUG_PORT = 9999
    
    $(function()
    {
      $.getJSON(
        "http://" + DEBUG_HOST + ":" + DEBUG_PORT + "/json",
        function(data)
        {
          $.each(data, function(index, view)
          {
            var url = view["webSocketDebuggerUrl"];
            var socket = new WebSocket(url);
            socket.onopen = function() { socket.close(); }
          });
        });
    });
    
  5. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I'm feel like a dumb a bit, I should do that in JS from start. :D
  6. hvhp

    hvhp Member

    Messages:
    54
    Likes Received:
    2
    I feel even dumber, Where's that code have to be put?

    Or i could just use SXX's fix tbh, seems they both work, Ill try both :)
  7. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Actually you can put it anywhere in UI javascript files.

    Or use mine script and wait before somebody build proper mod. :)
  8. yrrep

    yrrep Member

    Messages:
    67
    Likes Received:
    79
    I put that snippet into media/ui/alpha/start/uifix.js and added a reference to the 'start' scene in /media/ui/mods/ui_mod_list.js (according to the readme.txt in that folder).
    Anyone who wants to create a proper mod for this, feel free to use my snippet.
  9. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Ok, here you go. Unzip in media/ui/mods and use the modmanager to enable it like any other mod.

    Attached Files:

    freelikegnu, dirtypants and maxpowerz like this.
  10. miturian

    miturian Member

    Messages:
    75
    Likes Received:
    32
    SXX's fix seems to have no effect for me? I'm on ubuntu 12.10, with nvidia GeForce GT 640M. when I run the start.sh I temporarily get a black window up playing the pa lobby music in the background and with a smudge instead of a cursor on top. this window disappears quickly. launching pa after that just gives me the regular no-cursor experience?
  11. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Can you try to use javascript mod or just put javascript code into start.js?

    Also this fix need to be applied each time after you run game.
  12. miturian

    miturian Member

    Messages:
    75
    Likes Received:
    32
    I'm afraid I don't know how to to that. the javascript mod seems to rely on a mod manager, but googling "planetary annihilation mod manager" I'm lead here: https://forums.uberent.com/threads/rel-pa-mod-manager-v2-0-0.50726/, and that seems to only have a .exe version?

    where is start.js?
  13. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    There Linux version of manager, but you can also install mode manually.

    media/ui/alpha/start/start.js
    You can just copy javascript code on start of file and it's should work.
  14. miturian

    miturian Member

    Messages:
    75
    Likes Received:
    32
    copying the javascript into start.js solved it :)
  15. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    * * * removed * * *
  16. Trelotrino

    Trelotrino New Member

    Messages:
    9
    Likes Received:
    3
    Hi!

    First of all thanks for your home made patch it is very usefull.
    I use FOSS driver for my AMD card, and after a fresh PA install I had a black screen with a broken messed up cursor, and basically game over, I had to use xkill to get out.
    Then I downloaded your cursor fix, now the black screen issue is gone everything in the game is nice and okay, EXCEPT the cursor wich is still messed up. :O

    I'm using build 58197.
  17. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Cursor issue do not related to black screens. Black screen mean that Coherent start failed and it's sometimes occur with no visible reason.

    Also can you please say what GPU you have and where you get drivers from?
  18. Trelotrino

    Trelotrino New Member

    Messages:
    9
    Likes Received:
    3
    I do not understand then because I tried to launch the game many times and I always got the black screen. But I already played multiple matches with your patch with no black screen issues.

    I'm using HD5770 with the standard Xorg opensource driver.
  19. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Might be some coincidence. :(
    If black screen appear again can you try to run PA though command line and then post output here? There will be some Xorg errors.

    What Mesa version you use? Also I just wonder do you have same "broken sun" glitch?

    And yeah can you spend some time on little performance testing? Just wonder how PA perform on other cards with R600. ;)
  20. Trelotrino

    Trelotrino New Member

    Messages:
    9
    Likes Received:
    3
    I launched the game many times is a row but it loads correctly after your cursor fix, however the cursor itself is still broken. I do not know what to say...
    I'm using Mesa 9.2.1
    The sun has some strange behaviour its not a big deal but after a while it starts to look like a planet which has a shadowed side (it has a darker orange color) and the opposite is brighter yellow. I guess it is not normal too.
    I did not have time to run any larger matches, so I do not know its whole performance yet. At the beginning it runs nice at least.

Share This Page