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

GnuCash reports viewer broken with nvidia on Xorg (workaround available) #288641

Open
imrejonk opened this issue Feb 13, 2024 · 9 comments
Open
Labels
0.kind: bug Something is broken

Comments

@imrejonk
Copy link

Describe the bug

Opening any report yields a blank page. Fiddling with report options doesn't help.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install 'gnucash' package from nixos-23.11 channel.
  2. Open a GnuCash file with some transactions, for example the test file below.
  3. Navigate using the menu bar to Reports -> Income & Expense -> Cash Flow. Witness a blank page.

Test file (gzip-compressed in order to pass GitHub upload restrictions):
test.gnucash.gz

Expected behavior

The page should look like this:

gnucash-working

Screenshots

But on NixOS 23.11, it looks like this:

gnucash-broken

Additional context

WORKAROUND: start GnuCash with this environment variable:

WEBKIT_DISABLE_COMPOSITING_MODE=1 gnucash test.gnucash

Possibly related information I've found online:

Notify maintainers

@domenkozar @AndersonTorres @rski @nevivurn

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[imre@oyster:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.77, NixOS, 23.11 (Tapir), 23.11.4195.809cca784b9f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a 👍 reaction to issues you find important.

@imrejonk imrejonk added the 0.kind: bug Something is broken label Feb 13, 2024
@nevivurn
Copy link
Member

Hm, I can't reproduce, nix run github:NixOS/nixpkgs?ref=809cca784b9f72a5ad4b991e0e7bcf8890f9c3a6#gnucash -- test.gnucash works as expected.

image
(numbers are 0 due to my currency settings)

The bugs linked in the askubuntu page you linked (Bug 798486, Bug 798537) suggest it's related with libEGL and possibly video drivers?

@imrejonk
Copy link
Author

You're right, it appears to be some rendering bug. The desktop I tried this on has nvidia drivers and OpenGL enabled. I need some time to read and understand the Launchpad reports and their comments, and I want to do some experimentation with my video settings as there are a number of variables involved. I'll post an update within a week. Thanks for the help so far!

@imrejonk
Copy link
Author

Here's what I've found out so far. I cannot reproduce this bug on my laptop (which has Intel graphics capabilities, unlike my desktop). I also tried exporting the "blank" report on my desktop to HTML and opened it in my web browser, which worked just fine. Same with the PDF export option. I should probably have tried this before claiming that GnuCash reports were "completely broken". Sorry about that.

My desktop has an nvidia GeForce GTX 980 TI graphics card for which I have the nvidia driver installed like so:

services.xserver.videoDrivers = [ "nvidia" ];

Commenting this line out, rebuilding and rebooting also makes the reports render in GnuCash again, under the open source 'nouveau' driver. I also discovered that downgrading the nvidia driver version fixes the reports rendering issue:

hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_390;

Instead of legacy_390 there's also production and legacy_470 available, but these did not have the desired effect. There's also legacy_340 but this one does not support my graphics card.

So now I have identified three workarounds:

  1. Setting the WEBKIT_DISABLE_COMPOSITING_MODE=1 environment variable.
  2. Disabling the nvidia driver.
  3. Downgrading the nvidia driver to version 390. This is probably the worst option because the 390 channel is no longer supported by nvidia and I'm afraid the display server is therefore exposed to known vulnerabilities and other bugs that won't be fixed.

I also have modesetting, OpenGL and accelerated OpenGL rendering through the Direct Rendering Interface (DRI) enabled in my configuration.nix. Disabling modesetting or OpenGL results in a blank screen or failure to start my desktop environment (Xfce) respectively. Disabling DRI doesn't fix the issue.

I should say that I only recently installed NixOS on my desktop, I was running Debian 12 before, with the proprietary nvidia drivers (version 525.147.05) on Xorg, and GnuCash reporting worked just fine there.

I've found an (old, but still open) WebKitGTK issue that appears to be related: https://bugs.webkit.org/show_bug.cgi?id=180739
Which links to this old nixpkgs issue, also still open: #32580

As I don't think this is a gnucash Nix packaging error, I think this issue can best be closed.

@nevivurn what do you think. Should I just post about this in the WebKitGTK Bugzilla and WebKitGTK nixpkgs issue linked above and call it a day? Do you have an idea why this issue would not occur on Debian 12?

Thanks!

@nevivurn
Copy link
Member

Thanks for the detailed report! I tried testing it on my NVIDIA RTX 3060 (relevant config here, gnome Wayland), but was still unable to reproduce your issue. Unfortunately, I'm not too familiar with either the graphics stuff or webkit to investigate this issue much further, sorry.

I agree that this likely caused by an issue outside of GnuCash packaging, but we can leave this issue open as it is a real problem experienced by some GnuCash users.

@imrejonk imrejonk changed the title Reports completely broken in GnuCash (workaround available) GnuCash reports viewer broken with nvidia on Xorg (workaround available) Feb 19, 2024
@imrejonk
Copy link
Author

That's okay, I've updated the issue title to make it as complete and descriptive as possible.
I hope the WebKitGTK issue gets resolved soon.

@StephenWithPH
Copy link
Contributor

The workaround above:

WEBKIT_DISABLE_COMPOSITING_MODE=1 gnucash

... also works for me.

Interestingly, I get the same error logs whether or not that env var is set:

Could not determine the accessibility bus address
DRI driver not from this Mesa build ('23.1.9' vs '24.0.2')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.2')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.2')
failed to bind extensions
Failed to create GBM device for render device: /dev/dri/renderD128: Illegal seek
DRI driver not from this Mesa build ('23.1.9' vs '24.0.2')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.2')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '24.0.2')
failed to bind extensions
Failed to create GBM device for render device: /dev/dri/renderD128: No such file or dire
Failed to get GBM device

https://bugs.gnucash.org/show_bug.cgi?id=799095 seems like the best bug about this over in Gnucash, but it seems like their suggested solution is the same env var workaround.

@StephenWithPH
Copy link
Contributor

https://bugs.gnucash.org/show_bug.cgi?id=799086#c18 suggests that a Nvidia release might solve this for some cases.

@imrejonk
Copy link
Author

Thanks for your input @StephenWithPH. I tried updating my Nix packages to see if maybe an nvidia driver update (545.29.02) would resolve the issue, but that unfortunately didn't make a difference. I also tried downgrading to the legacy 470 driver (the exact same version even, 470.223.02) as mentioned in the bug report comment you refer to.

Here is an overview of the nvidia driver packages currently available in the nixos-23.11 channel:

https://search.nixos.org/packages?channel=23.11&from=0&size=50&sort=relevance&type=packages&query=linuxKernel.packages.linux_6_1.nvidia_x11

@magneticflux-
Copy link
Contributor

magneticflux- commented Dec 7, 2024

This is also an issue with other apps that use WebKitGTK, namely gg-jj. The WEBKIT_DISABLE_COMPOSITING_MODE=1 workaround worked for me on Nvidia driver 565.77 and GNOME X11.

Without it, I see messages like this:

Failed to create GBM buffer of size 1280x693: Invalid argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

4 participants