NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.89k stars 13.95k forks source link

Gdk-ERROR when starting bottles #229535

Open Wraul opened 1 year ago

Wraul commented 1 year ago

Describe the bug

I wanted to experiment a bit with the bottles application, but I'm getting an error message when I try to start it. I'm not sure if this is an issue with the bottles derivation or if it is something that I'm doing wrong.

Steps To Reproduce

  1. install the bottles package either by adding it to environment.systemPackages or by a temporary shell using nix-shell -p bottles.
  2. Try to start the application from the terminal by running bottles.
  3. An error message is shown and the application doesn't start.

Expected behavior

That the application starts and the graphical UI is shown.

Screenshots

The error message

20:58:40 (INFO) Bottles Started!

(bottles:2): Gdk-ERROR **: 20:58:40.270: The program 'bottles' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
  (Details: serial 370 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
  (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.)

Additional context

I'm using Wezterm and Xmonad,

Notify maintainers

@psydvl @SCOTT-HAMILTON

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.25, NixOS, 23.05 (Stoat), 23.05.20230502.1a411f2`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos-21.03pre262347.257cbbcd3ab"`
 - nixpkgs: `/nix/store/wp85jingfav8k5vr5dgqnzgmyp5zc723-source`
SuperSamus commented 1 year ago

Can't reproduce. Bottles launches successfully on my end (Plasma Wayland). One line in nix-info sticks out to me:

  • channels(root): "nixos-21.03pre262347.257cbbcd3ab"
Wraul commented 1 year ago

I should probably have mentioned that I'm using flakes to manage the entire system and I have the following nixpkgs input

    nixpkgs = {
      url = "github:NixOS/nixpkgs/nixos-unstable";
    };

Could this be the reason that the root channel looks outdated? That I'm not actively using channels, if I understand correct.

Sorry for leaving that out. I'm not that familiar with NixOS yet, so I don't instinctively recognize what is relevant when reporting problems.

Wraul commented 1 year ago

It appears that this was caused by services.xserver.displayManager.autoLogin.enable=true. Once I disabled that and manually logged in instead, Bottles starts as expected.

Though I don't know why the auto login would break an application like this?

SuperSamus commented 1 year ago

Something related to #103746, maybe?