[HowTo] Fix the Anaconda DPI scaling and MESA LOADER failed to open iris - issues in Gnome

Hi,

I’m doing AI developments and moved from Ubuntu to Manjaro, which works really, really great; love it.
So, after installing Anaconda, I was facing issues regarding the DPI scaling of Anaconda on my 4K Display. Fonts / Icons are way too large.

0.0 Just in case here are the steps to install it:

Install some packages, needed by Anaconda with:

pacman -Sy libxau libxi libxss libxtst libxcursor libxcomposite libxdamage libxfixes libxrandr libxrender mesa-libgl  alsa-lib libglvnd

Download the package from https://www.anaconda.com/products/individual

https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh

After Download, change the execution flag

chmod +x ~/Downloads/Anaconda3-2021.11-Linux-x86_64.sh

and start the script, saying “yes” to everything. However, after installation I was facing the issues as described above.

Here’s how I fixed it; hope it may help some others:

1.0 Edit the Anaconda config:

nano ~/.anaconda/navigator/anaconda-navigator.ini

and set:

enable_high_dpi_scaling = True

2.0 Create an Anaconda startup file

nano ~/anaconda.desktop"

and paste the following lines into it:

[Desktop Entry]
Version=1.0
Type=Application
Name=Anaconda
Exec=/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=1.5 /home/uwuertz/anaconda3/bin/anaconda-navigator Icon=/home/uwuertz/anaconda3/lib/python3.9/site-packages/anaconda_navigator/app/icons/Icon1024.png
Terminal=false

Even if you have this already:
There is a different command line for starting up Anaconda: “Exec=/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=1.5 /home/uwuertz/anaconda3/bin/anaconda-navigator” !

Please check and change the directory “/home/uwuertz/…” to your needs and double check the python version.

Install it with:

sudo desktop-file-install anaconda.desktop

Caution: This fix will only work, if you start Anaconda via the icon.

2.1 If you want to execute Anaconda from cli, you have to set the scaling factor manually

export QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCALE_FACTOR=1.5 anaconda-navigator

2.2 In case you get messages after executing Anaconda, such as:

“libGL error: MESA-LOADER: failed to open iris:…”

then execute:

mv ~/anaconda3/lib/libstdc++.so.6 ~/anaconda3/lib/libstdc++.so.6.bck

to fix this issue.

At least on my Manjaro, this has worked perfect for me. Hope it helps for some others.

4 Likes

Renamed the title a little bit to move it to Tutorials category. Please revert back if you have any problem with it.:slightly_smiling_face:

1 Like

Hi,

I am new to linux and don’t how nano works. So i am stucked at point “2.0”

I have copied and pasted the commands but

can you please look into this ? so that i can create a shortcut for anaconda-navigator

Thanks for your help.

There is a typo in their instructions ( ending " ), and it seems that your command might have been malformed beyond that too, with '^J^ etc.

It should be exactly:

nano ~/anaconda.desktop

That said … you can use any editor you want … the files are in HOME, so you dont need sudo or anything either.

i got the typo in the end. Thanks
But the icon is not launching the anaconda-navigator and anaconda icon is also not showing
can you help in this

They have another typo in the Desktop file …
the Icon= section should be on its own line.

…also … is there a reason this is downloading manually instead of using anaconda* packages?

I am going to unlist this topic until it is cleaned up …

It’s not working even after correcting the icon typo…

Just for info:

Exec=/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=1.5 /home/uwuertz/anaconda3/bin/anaconda-navigator

This line is working fine for launching anaconda-navigator from terminal.
And this is error message or whatever this is

Exec=/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=1.5 /home/alok/anaconda3/bin/anaconda-navigator
2022-01-16 23:01:35,136 - WARNING linux_scaling.get_scaling_factor_using_dbus:42
Can't detect system scaling factor settings for primary monitor.

libGL error: MESA-LOADER: failed to open iris: /home/alok/anaconda3/lib/python3.9/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /home/alok/anaconda3/lib/python3.9/site-packages/PyQt5/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2
XmbTextListToTextProperty result code -2

Let me know if anyone make a correction for app launcher

@cscs Thanks buddy

You cant literally use the same text … you need to use your path, which is at least different because of your username.
Example:
/home/uwuertz/anaconda3/bin/anaconda-navigator
/home/sahlaork/anaconda3/bin/anaconda-navigator

Not entirely sure, though it is noticeable it is using dated python. (system uses 3.10 now)
Also … who knows about your system in particular … are you up to date?

Again though, I am not sure that this approach is even a good-practice suggestion in its current form.
For one thing - Anaconda packages exist, and it is almost universally true that packages should be preferred over manually downloading from some website.
(not to mention all the other stuff like unpacking in HOME, messing with permissions, creating symlinks, and then needing to remember to do it all again whenever an update is required, et al)

Yes, my system is up to date.

If this will not work then i will try to look into AUR if it is available there

It is … multiples

https://aur.archlinux.org/packages/?K=anaconda

Thanks for the link and somehow launch icon is created and working.