You are not logged in.

#1 2016-10-14 16:09:47

ayylmao
Member
Registered: 2016-10-14
Posts: 2

GTK apps spawning context menus/windows off-screen

Hi folks,

I'm having an issue where GTK-based apps spawn a context menu on the left-most screen, above where the screen actually exists. Everything worked fine on a previous install, but I attempted to switch to nouveau and ended up doing a clean install because I don't use a lot of system packages (thinking I had just effed something up in X).
I've seen this behavior in various programs - but am not sure to the extent of what is affected.

Known issues: nm-applet, virt-manager, nvidia-settings, gnome-screenshot

Qt-based stuff seems to work, so it seems to be purely a GTK issue versus system-wide. Windows spawn correctly, just not menus or windows triggered by buttons (eg gnome-screenshot's "help" button).

At first I thought it had something to do with my Xorg config, but I'm not sure anymore. In brief, my configuration:

- awesomewm
- two NVIDIA cards (970, 610) using xinerama. 970 is the main GPU and hooked up to the monitor physically on the right, 610 is hooked up to a monitor on the left.
- using nvidia driver (stable)
- two differently-sized monitors (1680x1050, 1920x1080)
- stock GTK theme, nothing custom installed whatsoever.

I know that everything works correctly with a single monitor. After moving my nvidia-settings generated configuration and restarting X, context menus correctly appear on-screen rather than a sliver at the top left.

My extra X config (/etc/X11/xorg.conf.d/nvidia.conf):

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 370.28  (builduser@felix)  Fri Sep  9 15:21:20 CST 2016

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" Absolute 1680 0
#    Screen      1  "Screen1" RightOf "Screen0"
    Screen      1  "Screen1" Absolute 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "1"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: unknown, VertRefresh source: unknown
    Identifier     "Monitor1"
    VendorName     "Unknown"
    HorizSync       0.0 - 0.0
    VertRefresh     0.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 970"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 610"
    BusID          "PCI:3:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-1"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection

I've tried a few different configurations (making "Screen1" RightOf "Screen0", etc etc) and nothing seems to do the trick. Debugging various GTK-based programs usually results in something like:

(nm-applet)

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(virt-manager)

Gtk-WARNING **: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node menuitem, owner GtkImageMenuItem)

Gtk-WARNING **: GtkAccelLabel 0x55b8d4279d60 attempted to adjust its size allocation from 31,1400065124 1x1423758096 to 31,2111944162 1x20. adjust_size_allocation must keep allocation inside original bounds
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

I've searched the forum and the wiki, and none of the related threads seem to have any useful information for this issue. Any tips/pointers would be hugely appreciated, this is driving me up the wall.

Last edited by ayylmao (2016-10-14 16:21:32)

Offline

#2 2016-10-14 23:20:42

ayylmao
Member
Registered: 2016-10-14
Posts: 2

Re: GTK apps spawning context menus/windows off-screen

I've tried a few different configurations now to no avail, i.e.:

- Setting both screens to absolute positioning in my xorg.conf (Absolute 0 0 for the left, 610-connected and Absolute 1680 0 for the right).
- Using a different wm (bspwm, i3).

Using a simple xorg.conf, generated by nvidia-xconfig, does not exhibit this behavior. However, it is a single screen rather than utilizing both of the cards in the system.

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

At this point, I'm fairly certain the issue has something to do with NVIDIA/Xinerama - I'm not familiar enough with it to qualify that, though. I dropped a single "Screen" from the original "ServerLayout" (as posted in my original post, not this follow-up), and even then the context menus and various windows are started "off screen" or too high on the active monitor to be reachable.

I will continue to experiment and see if I can figure this out, but any help is appreciated.

Offline

#3 2016-11-16 12:56:20

maiaftv
Member
Registered: 2016-03-01
Posts: 9

Re: GTK apps spawning context menus/windows off-screen

Hello @ayylmao,

It seems to me that I'm facing a similar issue: https://bbs.archlinux.org/viewtopic.php?id=219633.

Have you found any solution yet?

Last edited by maiaftv (2016-11-16 12:56:32)

Offline

Board footer

Powered by FluxBB