Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

how to install OpenGL / get it to work ?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

how to install OpenGL / get it to work ?

#1 Post by kau-92 »

Hey there, :D

My system : 64 bit / 5.10.0-1-amd64

I'm trying to get OpenGL to work on my machine. It doesn't seem to be functioning right.
I wondered if I could get an opinion on this.


entering ( glxinfo | grep "OpenGL" ) into terminal prints:

bash: glxinfo: command not found



trying to run one of the game packages fails with following print:

--------- Game Map Shutdown ----------
--------- Game Map Shutdown done -----
ERROR:Failed to create OpenGL context



I'm assuming OpenGL is not installed ?

According to system info page, the graphics processor is 'Mesa DRI Intel HD Graphics'.


( lspci | grep VGA ) prints :
VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470]


Wiki says intel drivers come packaged with OS anyway, but for NVIDIA / ATI I have to check their websites.
Checked AMD site, Mesa OpenGL is listed at "AMDGPU-INSTALLATION" page.
they say I have to get in touch with one of their 'representatives' , or from the website. I cant find a AMDGPU under my VG card listing.

I can't find any OpenGL ATI entries on the package manager, ( I'd also rather not get the proprietary software here from the AMD website if possible).
Following a forum thread, I've also installed libgl1-mesa-dri, libgl1-mesa-dev, freeglut3
But I'm not sure which package exactly corresponds to Opengl. ( ??? )


If no such package is available, I can live with it, its not essential, but
it would be nice if I could get this working on the machine, as it may be a graphics development option for me.

Do you know anything about this?
Thanks,

IT-Nerd
Posts: 9
Joined: 2014-03-23 23:44

Re: how to install OpenGL / get it to work ?

#2 Post by IT-Nerd »

Hello,

It seems that you have a setup similar to most laptop with a dedicated GPU, where there is an Intel and AMD chip. Have you tried the recommended instructions here? https://wiki.debian.org/AtiHowTo
You need to add contrib non-free into your Apt sources and install the packages firmware-amd-graphics libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all.

The guide that you followed (https://wiki.debian.org/AMDGPUDriverOnStretchAndBuster2) is not recommended:
Unsupported, generally poorer quality, and can cause instability with later system updates. Avoid using without good reason.
Once you setup the required packages you should be able to set the "priority" usage with

Code: Select all

xrandr --setprovideroffloadsink radeon Intel
Unfortunately I do not have a similar setup to perform the same steps.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: how to install OpenGL / get it to work ?

#3 Post by Head_on_a_Stick »

The AMDGPU-PRO drivers are not recommended for that card anyway. The open source version works better. Check the Debian wiki again, there is a better page for AMD cards that doesn't provide "advice" that breaks your system.
deadbang

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: how to install OpenGL / get it to work ?

#4 Post by kau-92 »

I've followed the instructions on that wiki page you suggested and installed the packages.

Did xrandr --setprovideroffloadsink radeon Intel , but had to replace 'radeon' and 'Intel'
had to do xrandr --listproviders , then get the full provider name text for ATI (provider #1),
had to put escape slashes to get it to recognize spaces within the name.
had to replace 'Intel' with name 'modesetting' because that was the text under name for provider #0

after this the xrandr completes without compaint


I installed Mesa-utils to get glxinfo command.


DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
prints : OpenGL renderer string: AMD CEDAR (DRM 2.50.0 / 5.10.0-3-amd64, LLVM 11.0.1)

??? Hopefully this means OpenGL is present?


The previous game application crashes anyway. But that could be a configuration error in its install process.
(following a similar issue thread, I did ldd program-executable-name ,
and apparently there has to be something like this : libGL.so.1 => /usr/lib/nvidia-current/libGL.so.1 (0x00007f9d4bdf5000)
I see no entry beginning or containing libGL
(I did find that in directory : " /usr/lib/xorg/modules/drivers/ " , there are some files that have familiar names : radeon_drv.so / intel_drv.so / ati_drv.so / amdgpu_drv.so among others -- but have no idea what I could do with them )

I think I'm just going to discard that game installation.
Hopefully OpenGL is present. if not I downloaded the Mesa packages so maybe I could do something along that one sometime.

Thanks for the answers. :)

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: how to install OpenGL / get it to work ?

#5 Post by sunrat »

If you provide the name of the game you may get more help from someone else who has installed it.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: how to install OpenGL / get it to work ?

#6 Post by stevepusser »

Also, it would probably help to let us know exactly what AMD hardware you're trying to use, and if you're using Buster with a 5.10 kernel, or testing/sid. Otherwise, any answers are going to be guesses.
MX Linux packager and developer

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: how to install OpenGL / get it to work ?

#7 Post by kau-92 »

Hey,

Well, the game is " the dark mod " (the stealth game) - there is an option for a Linux install.
I used the file " tdm_installer.linux64.zip " from here : https://www.thedarkmod.com/downloads/
after the install I tried to run the file " thedarkmod.x64 "


About the hardware :

System info in settings gives following : 5.10.0-3-amd64 , 64-bit
System info also says -- Graphics processor : Mesa DRI Intel(R) HD Graphics

But on the laptop hardware itself, on a small red label there is the text : " ATI Mobility Radeon Premium Graphics "

Running " lspci | grep VGA " prints the following:

00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470]


So I'm guessing the AMD hardware is " ATI Mobility Radeon HD 5430/5450/5470 "

I'm not sure exactly which number it is (5430/5450/5470). Checking AMD website I saw that there was some similarity between these models.
I guess I could say "5470" if I have to pick a number (no clear reason but 5470 had an advantage, I think.).

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: how to install OpenGL / get it to work ?

#8 Post by kau-92 »

from /etc/apt/ directory, the sources.list file, I see that the repository that's enabled is : bullseye

thx.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: how to install OpenGL / get it to work ?

#9 Post by stevepusser »

Can you install inxi and pci.ids as needed and give us the result of

Code: Select all

inxi -Gxx

apt policy firmware-misc-nonfree firmware-amd-graphics
The last line checks for firmware required by AMD and recent Intel GPUs.
MX Linux packager and developer

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: how to install OpenGL / get it to work ?

#10 Post by kau-92 »

Ok...

( inxi -Gxx ) prints :

Graphics: Device-1: Intel Core Processor Integrated Graphics vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0
chip ID: 8086:0046
Device-2: Advanced Micro Devices [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470] vendor: Hewlett-Packard
driver: radeon v: kernel bus ID: 01:00.0 chip ID: 1002:68e0
Device-3: Quanta HP Webcam type: USB driver: uvcvideo bus ID: 2-1.5:4 chip ID: 0408:03b2
Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: loaded: ati,modesetting,radeon unloaded: fbdev,vesa
resolution: 1366x768~60Hz s-dpi: 96
OpenGL: renderer: Mesa DRI Intel HD Graphics (ILK) v: 2.1 Mesa 20.3.4 direct render: Yes


( apt policy firmware-misc-nonfree firmware-amd-graphics ) prints :

firmware-misc-nonfree:
Installed: (none)
Candidate: 20210208-3
Version table:
20210208-3 500
500 http://deb.debian.org/debian bullseye/non-free amd64 Packages
firmware-amd-graphics:
Installed: 20201218-3
Candidate: 20210208-3
Version table:
20210208-3 500
500 http://deb.debian.org/debian bullseye/non-free amd64 Packages
*** 20201218-3 100
100 /var/lib/dpkg/status

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: how to install OpenGL / get it to work ?

#11 Post by kau-92 »

I thought I'd also provide that last bit of the message given at the game-crash at start up:
(there was some text before this, but this is the last bit).
thx.



----- Initializing OpenAL -----
Setup OpenAL device and context
OpenAL: found device 'ALSA Default' [ACTIVE]
OpenAL: found device 'HDA Intel MID, 92HD81B1X5 Analog (CARD=MID,DEV=0)'
OpenAL: found device 'HDA ATI HDMI, HDMI 0 (CARD=HDMI,DEV=3)'
OpenAL: device 'ALSA Default' opened successfully
OpenAL: HRTF is available
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
OpenAL vendor: OpenAL Community
OpenAL renderer: OpenAL Soft
OpenAL version: 1.1 ALSOFT 1.19.1
OpenAL: found EFX extension
OpenAL: HRTF is enabled (reason: 1 = ALC_HRTF_ENABLED_SOFT)
OpenAL: found 256 hardware voices
----- Initializing OpenGL -----
Setup X display connection
Using screen 0 of 0x54d3dd0 display
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
AL lib: (EE) ALCplaybackAlsa_mixerNoMMapProc: available update failed: Broken pipe
Initializing OpenGL display
Using XFree86-VidModeExtension Version 2.2
Free86-VidModeExtension Activated at 800x600
Chosen visual: 0x021
...creating GL context: core-fc
Fatal X Error:
Major opcode of failed request: 152
Minor opcode of failed request: 34
Serial number of failed request: 49
GLXBadFBConfig
TODO: Sys_SetClipboardData
--------- Game Map Shutdown ----------
--------- Game Map Shutdown done -----
ERROR:Failed to create OpenGL context
--------------------------------------
signal caught: Segmentation fault
si_code 1
Trying to exit gracefully..
About to exit with code 0

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: how to install OpenGL / get it to work ?

#12 Post by stevepusser »

Looks like the AMD card is handling the display while the integrated Intel tries to handle openGL, which is not what you want at all.

Code: Select all

Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: loaded: ati,modesetting,radeon unloaded: fbdev,vesa
resolution: 1366x768~60Hz s-dpi: 96
OpenGL: renderer: Mesa DRI Intel HD Graphics (ILK) v: 2.1 Mesa 20.3.4 direct render: Yes
If this is a desktop, see if you can disable the iGPU in the UEFI "BIOS" setup, so that the AMD card handles both.
MX Linux packager and developer

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: how to install OpenGL / get it to work ?

#13 Post by mm3100 »

Try to run game from terminal with environmental variable DRI_PRIME=1

Code: Select all

DRI_PRIME=1 game.exec

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: how to install OpenGL / get it to work ?

#14 Post by kau-92 »

Hi,

1//
My machine is a laptop. I took it apart once to clean it up, I don't think there were external cards attached to the motherboard, it was one whole thing.
I went into the bios, unfortunately did not see any option to disable graphics in any of the menus.

I looked around the search engine, found a similar thread here:
https://www.linuxquestions.org/question ... 029-print/
one of the commenters say : blacklist the intel module i915_bpo

following another thread, I did the terminal command : lsmod
and on the list is also this entry:
video 53248 1 i915

if I make a file "blacklist.conf" in the directory : /etc/modprobe.d/
and add entry : blacklist i915

will that have the effect you told about? I thought I'd ask before I do it, to be cautious.


2//
I ran the game with "DRI_PRIME=1 game.exec" and this time it did reach the main menu!

Image

as you see there is still some problem with graphics. I can also hear the menu music.

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: how to install OpenGL / get it to work ?

#15 Post by mm3100 »

Can you tell what is output of

Code: Select all

xrandr --listproviders 
If you associated them with xrandr --setprovideroffloadsink, try to disassociate them and run game again with DRI_PRIME, just to see if that was a problem. I had some issues with associated cards before.

To disassociate run xrandr --setprovideroffloadsink again but change sink to 0x0. Or restart your device, it will go back to default.

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: how to install OpenGL / get it to work ?

#16 Post by kau-92 »

Hello sorry its been a while.

( xrandr --listproviders ) prints the following :

Code: Select all

Providers: number : 2
Provider 0: id: 0x43 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 2 associated providers: 0 name:modesetting
Provider 1: id: 0xbc cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 3 associated providers: 0 name:ATI Mobility Radeon HD 5000 Series @ pci:0000:01:00.0

( xrandr --setprovideroffloadsink 0x43 0x0 ) prints following :

Code: Select all

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  34 (RRSetProviderOffloadSink)
  Value in failed request:  0x43
  Serial number of failed request:  16
  Current serial number in output stream:  17
( xrandr --setprovideroffloadsink 0xbc 0x0 ) command completes without complaint, seems to work.

For both above I also tried to set 'provider' argument to ' name' (modesetting / ATI\ Mobility\ Radeon\ HD\ 5000\ Series\ @\ pci:0000:01:00.0 )

But when DRI_PRIME=1 ./thedarkmod.x64 is run, the same image quality comes up. Tried to start a gameplay but I can't see any start buttons clearly.
Also the visible text options are now in a language I don't know. could be I clicked some alternative language option.

how would you describe that grainy multi colour image quality? what does it imply the problem is? :?:

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: how to install OpenGL / get it to work ?

#17 Post by mm3100 »

I used to see such grainy distorted images when playing old Anno games on wind 10. Game started in wrong resolution or wrong bit depth. Usually fix was to change resolution of the game so try that first if that helps, as for some reason some resolutions weren't working well with my system.

As for those igpu/dgpu connections, it seems you need to run it on dgpu, it shouldn't be needed to connect it through igpu. So in anyway you should run the game with DRI_PRIME=1 no matter what.

For test try to do this and then run the game, seems that your radeon dgpu's id is 0xbc, not 0x43 as I wrote, my bad I didn't read it well.

Code: Select all

xrandr --setprovideroffloadsink 0xbc 0x0
Then run the game. This is just to be sure the game is still broken when dgpu is not connected to igpu.

Then compare to when connected.

Code: Select all

xrandr --setprovideroffloadsink 1 0
And run again. In this case game is offloading opengl rendering to dgpu, while rest is done on igpu.

I hope that both will produce same result, that way you know it is not the combination or where the game is running but some other configuration at fault.

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: how to install OpenGL / get it to work ?

#18 Post by kau-92 »

I ran ( xrandr --setprovideroffloadsink 0xbc 0x0 )
the graphics quality is grainy the same as before

I ran ( xrandr --setprovideroffloadsink 1 0 )
the graphics quality is identical, its the same grainy menu


I found a file in the directory called Darkmod.cfg ,
found a line lang which was set to russian, I set it to "english" and now I can read
parts of the menu options. Some of it is still obscured by the glitchy graphics.

There is following options :
seta r_aspectRatio "1"
seta r_customHeight "768"
seta r_customWidth "1366"

changing this height and width changes the game window size, but it did not fix the glitch issue.
(some height/width settings give a different glitchy look - eg. I see a magenta strip across the top)
Image from a small screen setting :

Image

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: how to install OpenGL / get it to work ?

#19 Post by mm3100 »

Can you place screenshot or copy what is the text in terminal after you run the game, maybe there is some clues there. Another thing is you could try to click on settings in the game and try to change resolution from inside the game.

And we have confirmed now that it is not combination of graphic cards which is the issue, but something else.

Post Reply