Debugging GLFW display settings - haskell

In my project, I would like to use GLFW for the window supporting. It works fine on my laptop and office PC, but my home desktop does not let me open a window (All of them Ubuntu 12.04). I tried with GLUT also, which at least gives me an error message, but all I was able to find out was that the settings of the window were not supported by the X-Server (something with glXChooseFBConfig).
However, I was able to open a window using SDL. Now I'm very curious as to why SDL can open an OpenGL window, but GLUT and GLFW can't. How can I debug these graphics settings in a Haskell program? Is that even possible to figure out or do I have to simply accept it?
I have a bunch of game on this desktop and never had any trouble with OpenGL. What is different here?

Related

Why does latest Android Studio emulator crash or get stuck

Since I upgraded my Android Studio installation to Bumblebee, the emulator has become unusable. It either crashes during startup or gets itself stuck so that the UI is unresponsive and the debugger either cannot install or cannot launch an app. The way in which it fails varies from time to time for no reason that I can understand. although different virtual devices seem to behave differently. I tried deleting my old virtual devices and creating new ones, but that didn't help.
I can't debug my code on a real phone because of a different problem, see my recent answer to Source code does not match the bytecode for Android's View.java.
When it crashes I send a crash report to Google, but they don't seem to be fixing it. The problems started with the first official Bumblebee release 2021.1.1, which seemed to have a complete new version of the emulator, and I'm now on the latest stable version 2021.1.1 Patch 2.
My environment is a Dell Precision M4800 with 16GB of RAM and an 8-core Intel processor, using an external 4K monitor and an external full-size keyboard, running Linux openSUSE Leap 15.3 with all recommended patches installed.
Does anyone have any suggestion short of throwing away my entire Android Studio installation and reverting back to Arctic Fox? Has anyone else seen similar problems?
Tintin's answer didn't work for me: Device Frame wasn't enabled anyway because I had noticed that it had caused problems before.
However the following sequence rather surprisingly, at least to me, did fix the problem.
First make sure that the toolbar is visible at the top of the emulator window: if it isn't, click on the gear settings icon at the top right of the emulator window and enable Show Toolbar.
Start up an emulated virtual device, and before it crashes click on the three dots at the right hand end of the toolbar: this will bring up the extended controls window.
Choose Settings from the list at the left of the extended controls list.
Set the OpenGL ES renderer to Desktop native OpenGL, and the OpenGL ES API to Compatibility (OpenGL ES 1.1/2.0).
Close the extended controls window and then close the Android Emulator window.
Check if there are any zombie emulator or qemu processes still running. If there are, kill them: you'll need kill -9 on Linux.
Try to cold boot an emulated virtual device: it will probably crash before it even gets started up properly.
Close the Android Emulator window and repeat step 6
Try to cold boot an emulated virtual device again, but click on the three dots quickly before it crashes.
When the extended controls list comes up, choose Settings from the list at the left.
Set the OpenGL ES renderer back to SwiftShader, and the OpenGL ES API back to Renderer maximum (up to OpenGL ES 3.1).
Repeat steps 5 and 6.
Now try to boot up an emulated virtual device again. It should work: at least it does for me.
If it doesn't work on your configuration, try all possible combinations of the OpenGL ES settings: you may find one that works.
Logically, changing the OpenGL ES settings and then changing them back again shouldn't do anything, but it does. My guess is that perhaps some needed bit of initialisation for the OpenGL isn't being done by the installer, but it gets done when you change the configuration.
I also faced this problem in both updates in 2021.1.1 it was not working at all. Updated to patch 2 again faced problems turned off Enabled Device Frame it is working OK now

eglfs - multiple windows

Working on a embedded linux device with touch screen. Compiled Qt with eglfs support and using tslib for the touch screen. All good up until here. Now, I need to add a virtual keyboard. I've this keyboard as platforminputcontextplugin which works very well on my development linux machine. How can this be done on the embedded device? eglfs is forcing the top window (main window) to full screen and the keyboard is struck behind this window.
What are the options available to me? we need eglfs as it supports OpenGL ES which in turn used by Qt Quick (QML).

GUI (Window) mono application goes into hang condition after switching GUI window tab to another window and get back to GUI window on mono

I am running one .NET binary using mono on my Linux platform PC and it is working fine on process startup.
But when i moved my running GUI window to another window and get back to that windows at that time , My GUI Application goes into the hang state because i can not press any button on My GUI window.
I have also used all the optimization option step by step while running .NET binary using mono but still causes the GUI hang issue.
I have debug my .NET binary with some debugging options and found that whenever GUI window application goes into stuck condition at that GDIplus library code is running. so, it seems that there is something is going wrong into the GDIplus library.
does any one have idea what is happening here or any one have faced this issue before?
Please let me know if anyone need any more information and give valuable feedback as sson as possible.

Minimizing application with qt

I created (in Qt5 under Linux) a small QMainWindow app.
I noticed that when I'm clicking on the minimizing button, I cannot see my app anymore. In other term, I cannot see it in the bar !?
I tried with docky, cairo-dock and native Mint bar and... nothing work !)
Any idea ?
Is this running it in the debug mode inside of Qt Creator? Maybe you have to deploy it and run it outside of Qt Creator for it to get its own button on the dock/taskbar.
If not, you might have a bug that should be reported to qt.

How to use OpenGL without a window manager in Linux?

I've just finished the LFS book and my Linux system is working right now. I want to use OpenGL to display graphics on the screen, while the only installed package right now are those described on http://www.linuxfromscratch.org/lfs/view/stable/chapter03/packages.html.
I don't want to install something like Gnome, KDE or X.org. Instead, I want to use OpenGL directly from my software. Is this possible, and how can I do this? Or is it just as easy (I don't think so :'p) as writing an OpenGL application which runs full screen?
You don't have to install Gnome or KDE. These are used to managed windows, and you can launch graphical applications without having a window manager.
Therefore, you'll have to install a X server. The X server is responsible of drawing things on your screen. Without X server, you can't launch graphical applications.
Once X has been installed, launch it, export your DISPLAY environment variable, and the rest is like writing an OpenGL application which runs full screen :-)
You can use Pygame as well to create custom launch UI. Also try looking at Wayland compositor as it has replaced XServer in verisons like Fedora and Ubuntu.
kmscube DRM example
https://github.com/robclark/kmscube
This is possibly the most popular demo available, it uses OpenGL and EGL.
Unfortunately, the Ubuntu 18.04 package with NVIDIA proprietary drivers it does not work for me after going into Ctrl + Alt + F3:
drmModeGetResources failed: Invalid argument
failed to initialize legacy DRM
bug report: https://github.com/robclark/kmscube/issues/12
But I did get it working on emulator.
It takes over the entire display, and shows a colorful spinning cube.

Resources