Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spyder3 does not render correctly over X #5

Closed
sirredbeard opened this issue Jan 7, 2018 · 15 comments
Closed

spyder3 does not render correctly over X #5

sirredbeard opened this issue Jan 7, 2018 · 15 comments

Comments

@sirredbeard
Copy link

sirredbeard commented Jan 7, 2018

When logged into Clear Linux from an X client, running spyder3 does not render correctly.

Almost all GUI apps on Clear Linux render perfectly fine and incredibly fast over X.

Steps to reproduce:

  1. Install games-dev, python-basic, and openssh-server bundles

  2. Install spyder3 from terminal:
    sudo pip3 install spyder

  3. Run spyder3 from Gnome just to see that spyder3 is working

  4. Enable X forwarding in sshd and restart:
    sudo bash -c "echo 'X11Forwarding yes' >> /etc/ssh/sshd_config && echo 'X11UseLocalhost no' >> /etc/ssh/sshd_config && systemctl restart sshd"

  5. Connect to Clear Linux from macOS 10.13.2 using XQuartz 2.7.11.

    1. Download and install XQuartz on macOS
    2. Run XQuartz
    3. Open xterm
    4. $ ssh -X [username]@[clearlinux IP address]
  6. Run Firefox as a test to see that X forwarding is working:
    $ firefox

  7. Run spyder3
    $ spyder3

Expected results:

spyder3 would load and display properly over X.

It works fine in Fedora, Devuan, and Ubuntu.

Actual results:

The splash page displays and the main window is drawn but it is blank.

Screenshots and logs below.

Attempted Fixes:

swupd bundle-add libX11client games-dev os-utils-gui-dev xfce4-desktop
pip3 install pyopengl

Ideas:

I think this may be an issue with PyQt pointing to the correct OpenGL library.

Users with Nvidia cards encountering these errors online were helped by pointing their libGL.so to the correct Nvidia-provided libGL.so, doesn't help me, I'm using Intel graphics.

Attachments:

Firefox rendering perfectly from Clear Linux X server on macOS X client:

screen shot 2018-01-07 at 1 21 11 am

spyder3 not rendering properly:

screen shot 2018-01-07 at 1 10 37 am

screen shot 2018-01-09 at 2 18 10 pm

xterm output (log attached below):

screen shot 2018-01-07 at 1 20 53 am

Log output on macOS X client:

xterm output log.txt

@fenrus75
Copy link
Contributor

fenrus75 commented Jan 7, 2018 via email

@sirredbeard
Copy link
Author

Thank you.

X forwarding of spyder3 works well on Fedora and Devuan, previous distros I have used.

Does it need libgl1-mesa-glx or libgl1-mesa-swx11?

Thank you again for your assistance and your super fast Linux distro .

@ahkok
Copy link
Contributor

ahkok commented Jan 8, 2018

I can't reproduce. Several things to note:

it's pip3 install spyder that installs spyder3. pip3 install spyder3 gives:

Collecting spyder3
  Could not find a version that satisfies the requirement spyder3 (from versions: )
No matching distribution found for spyder3

but spider works fine.

I used spyder3 directly, as well as over X11 forwarded over ssh (through ssh -Y localhost in my case) and in both cases spyder3 worked correctly.

@sirredbeard
Copy link
Author

@ahkok

You are correct about pip3 install spyder, I edited.

I tested with ssh -Y and that failed too.

Is there any way you can test it on two different machines, not through localhost?

Can I ask if you are using Intel or Nvidia video?

Thank you for your help.

@ahkok
Copy link
Contributor

ahkok commented Jan 8, 2018

Intel gfx in my case.

@ahkok
Copy link
Contributor

ahkok commented Jan 8, 2018

I can't quickly test from another machine, but the effect should be the same whether you ssh to localhost or somewhere far on the internet - the only difference is network lag.

does minetest work for you (games bundle)? That is a good test to see if OpenGL over X11 forwarding is fully functional. If you start a game, you can see in the window title what OpenGL version supported is, as well as get an idea of the supported frame rate. You won't get more than 1fps even over SSH to localhost, and the OpenGL fallback will drop down to version 2.1 as well, but that is to be expected.

I have to also note that we don't have any testing of the OSX X11 display capabilities - we test on ClearLinux and given my reproduction issues, all we can see is that it's fully functional.

@sirredbeard
Copy link
Author

sirredbeard commented Jan 8, 2018

but the effect should be the same whether you ssh to localhost or somewhere far on the internet

One would like to think so but with X I think it really needs to be tested.

we don't have any testing of the OSX X11 display capabilities

macOS X's client, XQuartz, is stable and open source. I have used this specific workflow with spyder3 over X from XQuartz on Ubuntu, Devuan, and Fedora servers, which leads me to believe it is not an XQuartz issue, but something with Clear Linux's Mesa implementation.

we test on ClearLinux

I am going to do some testing from other X clients, including from other ClearLinux and will report back shortly.

@sirredbeard
Copy link
Author

Running minetest over X crashes with similar messages as spyder3.

minetest crash log.txt

I ran Clear Linux in VirtualBox on macOS and was able to successfully, on the second try, run spyder3 over X on my other Clear Linux machine.

Try 1:
screen shot 2018-01-08 at 7 08 28 pm

Try 2: 👍
screen shot 2018-01-08 at 7 10 17 pm

I still suspect there is something amiss in the Mesa/OpenGL setup on Clear Linux because none of the other distros I have tried have a problem with spyder3 over X from XQuartz.

@ahkok
Copy link
Contributor

ahkok commented Jan 9, 2018

The SSH client also comes into play, as it plays an important role in the X11 forwarding process. Since there is the ClearLinux ssh server and the MacOS ssh client, things could be wrong on either end (except it works clear-to-clear).

@sirredbeard
Copy link
Author

sirredbeard commented Jan 9, 2018 via email

@sirredbeard
Copy link
Author

sirredbeard commented Jan 9, 2018 via email

@fenrus75
Copy link
Contributor

fenrus75 commented Jan 9, 2018 via email

@sirredbeard
Copy link
Author

More attempted fixes through trial-and-error testing:

$ sudo swupd bundle-add os-testsuite-phoronix
$ export LIBGL_ALWAYS_INDIRECT=true
$ export LIBGL_ALWAYS_SOFTWARE=true
$ export LIBGL_DRIVERS_PATH=/usr/lib64:/usr/lib32/dri:/usr/lib32:/usr/lib64/haswell
$ sudo chmod 777 /usr/lib64/dri/swrast_dri.so
$ export LIBGL_DRI3_DISABLE=true

Modifying /usr/lib/python3.6/site-packages/spyder/app/start.py as recommended here.

Installing mesa and libglvnd from Linuxbrew and pointing LIBGL_DRIVERS_PATH=/home/linuxbrew/.linuxbrew/Cellar/mesa/17.2.3/lib.

My issue appears similar to this one here. This is a good example of people receiving other errors who are having issues with their Nvidia graphics. I have Intel graphics. According to Mesa documentation EGL should work fine with X and libGL DRI.

I may go back and take some logs on Fedora, which this is known to work on.

@sirredbeard
Copy link
Author

Closing for now.

@betterze
Copy link

any solution for this problem? I meet similar problem. I use ssh -cx server to conect to sever, create a virtual environment, pip3 install spyder. then i try path/spyder3 (for python3), it output

Unrecognized OpenGL version

However, when i try spyder, which use the system default spyder (python2), it works fine.

My code is in python3, so i need spyder with python3. And just change python path from version 2 to version 3 cause kernel in spyder.

Any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants