GDK errors after the last update

Edit: Solved - see the last post in this thread.

Hi fine Manjaro people :slight_smile:
After the last update (2019.11.05) some of programs started to behave strangely - namely Calibre and Foliate (e-book viewers). The programs either don't start, or they don't open the epub files. When I run the programs in terminal, here is what I get.

Calibre ebook viewer (doesn't even start):

$ ebook-viewer 
qt5ct: using qt5ct plugin
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
QGLXContext: Failed to create dummy context
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
Aborted (core dumped)

Foliate (doesn't open a book):

$ foliate test_ebook.epub 
Gjs-Message: 07:56:46.877: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/main.js 72]: test for equality (==) mistyped as assignment (=)?

(WebKitWebProcess:12012): Gdk-ERROR **: 07:56:47.897: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 234 error_code 2 request_code 152 (GLX) minor_code 34)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

(com.github.johnfactotum.Foliate:11996): Gjs-CRITICAL **: 07:56:48.347: JS ERROR: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data @ resource:///com/github/johnfactotum/Foliate/js/main.js:1839

(com.github.johnfactotum.Foliate:11996): Gjs-WARNING **: 07:57:39.566: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
  @resource:///com/github/johnfactotum/Foliate/js/main.js:237:1
  @/usr/bin/foliate:9:1

It seems it's somehow related to graphics. Here is my glxinfo output:

$ glxinfo
name of display: :0.0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  37
  Current serial number in output stream:  38

mhwd -lh -d (I'm using the open source driver):

11: PCI 100.0: 0300 VGA compatible controller (VGA)
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: graphics card
  Model: "ATI Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]"
  Vendor: pci 0x1002 "ATI Technologies Inc"
  Device: pci 0x6779 "Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]"
  SubVendor: pci 0x174b "PC Partner Limited / Sapphire Technology"
  SubDevice: pci 0xe204 
  Driver: "radeon"
  Driver Modules: "radeon"
  Memory Range: 0xe0000000-0xefffffff (ro,non-prefetchable)
  Memory Range: 0xf7e20000-0xf7e3ffff (rw,non-prefetchable)
  I/O Ports: 0xe000-0xe0ff (rw)
  Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 31 (5740 events)
  I/O Port: 0x00 (rw)
  Module Alias: "pci:v00001002d00006779sv0000174Bsd0000E204bc03sc00i00"
  Driver Info #0:
    Driver Status: radeon is active
    Driver Activation Cmd: "modprobe radeon"
  Attached to: #9 (PCI bridge)

Any help will be appreciated.

Please add the output of

inxi -Sxxxc0
$ inxi -Sxxxc0
System:    Host: adhimoksha Kernel: 5.2.21-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 Desktop: Xfce 4.14.1 
           tk: Gtk 3.24.12 info: xfce4-panel wm: xfwm4 dm: LightDM 1.30.0 Distro: Manjaro Linux

Please update your kernel to latest stable. You can use either linux-latest or linux53.

The first will keep your kernel up-to-date on latest stable.

Actually, I have both linux53 and linux52 kernels installed. I tried again with linux53, but I get the same errors.

I remember I have seen these errors before - I just can't remember what causes them.

Is your Gtk package gtk3 or gtk3-classic?

Depending on which on you may try installing the other.

It's gtk3. Should I install gtk3-classic instead (I see it's "patched for classic desktops...")?

Thanks for your help!

The patch thing just means that client side decorations has been removed/disabled.

Yes - try installing the gtk3-classic package.

Nope - still the same.
It's strange that these two unrelated programs are affected - one QT and the other GTK. I even tried running them with fresh config files in home.

Both apps fails in the web rendering.

E-pub format is really a one file web site with pages and navigation.

It the issue with a specific e-pub or with all e-pub files?

As you already suspect your graphics - it could be mesa - 19.2.2 - as I recall - maybe depending on branch - I am not sure.

Edit:
On a system running Openbox (unstable branch) I have installed Calibre - downloaded an e-pub - I have no problems loading it into Calibre and reading it.

I am using a purely Intel based system - so your suspicion on graphics may be well founded - but I have no way of verifying your issue.

1 Like

Yes, all epub files are affected. It doesn't matter which one I open (for example, they open OK with Sigil epub editor).
I installed FBreader just to further investigate, and it opens epub files without any problem.

Yes, somehow I suspect graphics judging from this output:

$ glxinfo
name of display: :0.0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  37
  Current serial number in output stream:  38

It seems from the activity on the forum that AMD graphics has taken a hit with the latest update - so your issue could be the interaction between Mesa and your AMD graphics.

1 Like

UPDATE:
I managed to fix the problem. It was definitely related to graphics, but it wasn't due to faulty Manjaro update or anything like that. I waited until the next Manjaro update, but the issue wasn't fixed by updating the system, so I did a quick fresh install and that fixed it.

I know it's not an ideal way to solve problems in Linux, but I just didn't have the time to investigate this in depth. I suspect the problem occurred when I was removing Blender software and I was a bit too thorough and probably removed some graphics-related packages that shouldn't be removed.

Now all aforementioned e-book programs run OK.

This method is a viable method - I use it myself - simply because it is an easy cleanup method :slight_smile:

I have done it so many times that I have scripted my restore process.

Yes, I have a similar system: root, home, and data partitions.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by