Skip to content

Update graphics and X stack #926

Merged
merged 11 commits into from Oct 18, 2018
Merged

Update graphics and X stack #926

merged 11 commits into from Oct 18, 2018

Conversation

pmenzel
Copy link
Collaborator

@pmenzel pmenzel commented Sep 27, 2018

Update libdrm, and Mesa. The Mesa update required libxcb and libX11 to be updated.

Install with sudo ./scripts/update-graphics-and-x-stack.sh.

Tested on keineahnung (i915 and modesetting DDX), inbetweenmove (AMDGPU) and hmmjaaeh (proprietary Nvidia). With libX11 1.6.7 @donald’s mouse problem couldn’t be reproduced.

@thomas thomas requested review from thomas and removed request for thomas September 28, 2018 05:55
@thomas
Copy link
Collaborator

thomas commented Sep 28, 2018

'Building libxcb crashes bee'
How does it crash / what crashes?
libxcb-1.12-0 did build, and testing 1.13 would require to install xcb-proto >= 1.13.

@pmenzel
Copy link
Collaborator Author

pmenzel commented Sep 28, 2018 via email

@thomas
Copy link
Collaborator

thomas commented Oct 1, 2018

It just hang on bohemianrapsody, when creating the build archive.

Was it reproducible?

@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 1, 2018 via email

@thomas
Copy link
Collaborator

thomas commented Oct 1, 2018

Then I suspect that pbzip choked for some reason, and guess the build succeeded on a machine w less cores?

@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 1, 2018 via email

@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 1, 2018

With -j 20 instead of -j110, it builds in four minutes. Running the command under strace also works around the problem.

403.64user 245.53system 4:14.60elapsed 254%CPU (0avgtext+0avgdata 1217856maxresident)k
0inputs+94232outputs (0major+14140893minor)pagefaults 0swaps

@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 2, 2018

The bee problem also exists with bee update libxcb on every system I tested it so far.

root     32642  0.0  0.0  24416  1952 pts/6    S+   12:19   0:00      |               \_ /bin/bash /usr/libexec/bee/bee.d/bee-install --update xorg-server xf86-video-amdgpu wayland xcb-proo 
root     32644  0.0  0.0  24284  3328 pts/6    S+   12:19   0:00      |               |   \_ /bin/bash /usr/libexec/bee/bee.d/bee-cache print-conflicts libxcb-1.13-0.x86_64 -f1,8-
root     32648  0.0  0.0  24284  1948 pts/6    S+   12:19   0:00      |               |       \_ /bin/bash /usr/libexec/bee/bee.d/bee-cache print-conflicts libxcb-1.13-0.x86_64 -f1,8-
root     32651 99.9 35.1 3686092 2765960 pts/6 R+   12:19   6:40      |               |       |   \_ grep --file=/dev/fd/63 /dev/fd/62
root     32653  0.0  0.0      0     0 pts/6    Z+   12:19   0:00      |               |       |   |   \_ [bee-cache] <defunct>

@pmenzel pmenzel force-pushed the update-graphics-and-x-stack branch from 45f2c5a to efdf3be Compare October 5, 2018 13:35
@donald
Copy link
Collaborator

donald commented Oct 8, 2018

I don't know the stat of this pull request, ( conflict, "not ready for merge" ). I just found, that our current versions of libEGL.so.1.so (mesalib.be0) and libxcb-dri3.so.0 (libxcb.be0) don't seem to fit together:

buczek@theinternet:~$ pip3 install --user PyQt5
Requirement already satisfied: PyQt5 in ./.local/lib/python3.6/site-packages (5.11.3)
Requirement already satisfied: PyQt5_sip<4.20,>=4.19.11 in ./.local/lib/python3.6/site-packages (from PyQt5) (4.19.13)
buczek@theinternet:~$ python3
Python 3.6.6 (default, Aug 31 2018, 15:36:04) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5.QtWebEngineWidgets
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/libEGL.so.1: undefined symbol: xcb_dri3_get_supported_modifiers
>>> 
buczek@theinternet:~$ objdump -t /usr/lib/libEGL.so.1     | grep xcb_dri3
0000000000000000       F *UND*	0000000000000000              xcb_dri3_open_reply
0000000000000000       F *UND*	0000000000000000              xcb_dri3_get_supported_modifiers
0000000000000000       F *UND*	0000000000000000              xcb_dri3_buffers_from_pixmap
0000000000000000       F *UND*	0000000000000000              xcb_dri3_pixmap_from_buffers
0000000000000000       O *UND*	0000000000000000              xcb_dri3_id
0000000000000000       F *UND*	0000000000000000              xcb_dri3_buffers_from_pixmap_reply
0000000000000000       F *UND*	0000000000000000              xcb_dri3_pixmap_from_buffer
0000000000000000       F *UND*	0000000000000000              xcb_dri3_open_reply_fds
0000000000000000       F *UND*	0000000000000000              xcb_dri3_query_version_reply
0000000000000000       F *UND*	0000000000000000              xcb_dri3_get_supported_modifiers_window_modifiers
0000000000000000       F *UND*	0000000000000000              xcb_dri3_get_supported_modifiers_reply
0000000000000000       F *UND*	0000000000000000              xcb_dri3_buffer_from_pixmap_reply_fds
0000000000000000       F *UND*	0000000000000000              xcb_dri3_buffers_from_pixmap_offsets
0000000000000000       F *UND*	0000000000000000              xcb_dri3_open
0000000000000000       F *UND*	0000000000000000              xcb_dri3_buffers_from_pixmap_strides
0000000000000000       F *UND*	0000000000000000              xcb_dri3_get_supported_modifiers_screen_modifiers
0000000000000000       F *UND*	0000000000000000              xcb_dri3_buffer_from_pixmap_reply
0000000000000000       F *UND*	0000000000000000              xcb_dri3_fence_from_fd
0000000000000000       F *UND*	0000000000000000              xcb_dri3_buffer_from_pixmap
0000000000000000       F *UND*	0000000000000000              xcb_dri3_buffers_from_pixmap_reply_fds
0000000000000000       F *UND*	0000000000000000              xcb_dri3_query_version
buczek@theinternet:~$ objdump -t /usr/lib/libxcb-dri3.so.0|grep xcb_dri3
0000000000000d10 g     F .text	0000000000000047              xcb_dri3_query_version
0000000000000e60 g     F .text	0000000000000005              xcb_dri3_open_reply
0000000000000e10 g     F .text	0000000000000047              xcb_dri3_open_unchecked
0000000000000d60 g     F .text	0000000000000044              xcb_dri3_query_version_unchecked
00000000000011c0 g     F .text	0000000000000047              xcb_dri3_fd_from_fence_unchecked
0000000000001220 g     F .text	0000000000000013              xcb_dri3_fd_from_fence_reply_fds
0000000000000e90 g     F .text	0000000000000091              xcb_dri3_pixmap_from_buffer_checked
0000000000001070 g     F .text	0000000000000013              xcb_dri3_buffer_from_pixmap_reply_fds
0000000000000fc0 g     F .text	0000000000000043              xcb_dri3_buffer_from_pixmap
0000000000000db0 g     F .text	0000000000000005              xcb_dri3_query_version_reply
0000000000000dc0 g     F .text	0000000000000047              xcb_dri3_open
0000000000001100 g     F .text	0000000000000066              xcb_dri3_fence_from_fd
0000000000201900 g     O .data	0000000000000010              xcb_dri3_id
0000000000000f30 g     F .text	000000000000008e              xcb_dri3_pixmap_from_buffer
0000000000000e70 g     F .text	0000000000000013              xcb_dri3_open_reply_fds
0000000000001060 g     F .text	0000000000000005              xcb_dri3_buffer_from_pixmap_reply
0000000000001210 g     F .text	0000000000000005              xcb_dri3_fd_from_fence_reply
0000000000001010 g     F .text	0000000000000043              xcb_dri3_buffer_from_pixmap_unchecked
0000000000001170 g     F .text	0000000000000047              xcb_dri3_fd_from_fence
0000000000001090 g     F .text	0000000000000069              xcb_dri3_fence_from_fd_checked

@donald
Copy link
Collaborator

donald commented Oct 8, 2018

sudo bee update libxcb takes forever ( longer, that I ever had the patience to wait )
libxcb contains 10908 files. In print_conflicts() from /usr/libexec/bee/bee.d/bee-cache, print_conflicting_files "${pkg}" | cut -d ' ' -f8- | sed -e 's,.*, &$,' build a list of 8249 patterns, which are applied to the output of tmp_merge_install_inventory_files "${TMPINSTALL[@]}" which contains 339184 files. With the 8249 patterns, the grep will spit out about 10 lines a seconds, so my estimate for that step alone is about 15 minutes, but I'm sure I waited longer forbee update` to complete.

When print_conflicts is disabled, the bee update takes no time at all. The bee cache code is ugly and a big abuse of grep.

@donald
Copy link
Collaborator

donald commented Oct 8, 2018

When I update libxcb (only) to libxcb-1.13-0, restart the X-Server by log-out/log-in, then use the mouse wheel to scroll a long firefox page, the mouse wheel and the mouse buttons suddenly become unresponsive (e.g. after 30 seconds activity for 10 seconds). Typing any key immediately unfreezes the mouse.

EDIT: clarified, that the X-Server needs to be restarted and that mouse wheel scrolling is the trigger.

@thomas
Copy link
Collaborator

thomas commented Oct 8, 2018

The bee cache code is ugly and a big abuse of grep.

Why so harsh? Jepp, it's just a N^2 thingy and we should replace it with something hash-based I guess.

@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 8, 2018 via email

@donald
Copy link
Collaborator

donald commented Oct 9, 2018

bee issue: mariux64/bee#26

@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 9, 2018 via email

@donald
Copy link
Collaborator

donald commented Oct 9, 2018

I've rebased to master and fixed the conflicts. Also I added nvidia 390.87 and a script for easy install for testing. Everything is in the update-graphics-and-x-stack-v2 branch, if you want to work from there, you can reset this PRs branch to update-graphics-and-x-stack-v2.

X-Server comes up on theinternet and everything looks fine. But, unfortunately, the mouse wheel problem is still present. I'll try libxcb1.13.1.

@donald
Copy link
Collaborator

donald commented Oct 9, 2018

Problem persists with libcbx1.13.1 😞

Change-log from [announcement][1]:

> Benjamin Gaignard (2):
>       tests/modetest: Add atomic support
>       tests/util: Add support for stm module
>
> Christian König (7):
>       amdgpu: stop using the hash table for fd_tab
>       amdgpu: add handle table implementation v2
>       amdgpu: use handle table for KMS handles
>       amdgpu: use handle table for flink names
>       amdgpu: remove the hash table implementation
>       amdgpu: always add all BOs to handle table
>       amdgpu: fix off by one in handle_table_insert
>
> Junwei Zhang (5):
>       amdgpu: add bo from user memory to handle table
>       amdgpu: add a function to find bo by cpu mapping (v2)
>       tests/amdgpu: add test for finding bo by CPU mapping
>       amdgpu: free flink bo in bo import
>       amdgpu: add a function to create amdgpu bo internally (v4)
>
> Kristian H. Kristensen (1):
>       Bump to version 2.4.94
>
> Likun Gao (1):
>       amdgpu: Disable deadlock test suite for RV
>
> Michel Dänzer (2):
>       amdgpu: Use uint32_t i in amdgpu_find_bo_by_cpu_mapping
>       amdgpu: Eliminate void* arithmetic in amdgpu_find_bo_by_cpu_mapping
>
> Mike Lothian (1):
>       libdrm: Fix amdgpu build failure
>
> Rob Clark (2):
>       freedreno: don't leak stateobj rb refs
>       freedreno: fix use-after-free with stateobj rb's
>
> Rodrigo Vivi (1):
>       intel: Add a new CFL PCI ID.
>
> Tanmay Shah (1):
>       libdrm: add msm drm uapi header

[1]: https://lists.freedesktop.org/archives/dri-devel/2018-August/187286.html
Mesa 18.2.1 requires this version.

checking for WAYLAND_EGL... no
configure: error: Package requirements (wayland-egl-backend >= 3) were not met:

No package 'wayland-egl-backend' found
libxcb 1.13 requires this version.
donald and others added 5 commits October 15, 2018 12:56
Change-logs are available online.

1.  https://www.mesa3d.org/relnotes/18.2.0.html
2.  https://www.mesa3d.org/relnotes/18.2.1.html

Built with the command below.

    sudo BEE_TMP_TMPDIR=/dev/shm BEE_TMP_BUILDROOT=/dev/shm/bee-root BEE_MAKEFLAGS='-j120' prun python ./mesalib.be0 -c

This fixes the error below.

    configure: error: Python mako module v0.8.0 or higher not found

Python environment:

    $ prun python python --version
    Python 2.7.15
Address the warning below.

    configure: WARNING: unrecognized options: --enable-texture-float
Change-log from the announcement:

> Bhavi Dhingra (1):
>      XcmsLookupColor: fully initialize XColor structs passed to _XColor_to_XcmsRGB
>
> Matt Turner (1):
>      libX11 1.6.7
>
> Michel Dänzer (2):
>      poll_for_response: Call poll_for_event again if xcb_poll_for_reply fails
>      poll_for_event: Allow using xcb_poll_for_queued_event

This might fix [Bug 108301 - Unresponsive mouse wheel and buttons after
update to 1.13{,.1}][1].

[1]: https://bugs.freedesktop.org/show_bug.cgi?id=108301
@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 15, 2018

On Nvidia systems Linux kernel 4.14.74 is needed, as the new Nvidia driver is only built for that version.

My tests were successful. GDM starts up and no scrolling problem could be reproduced using Firefox and https://github.molgen.mpg.de/mariux64/bee-files/.

@donald, it’d be great if you tested this again on your system.

@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 15, 2018

I tested it with the user molgen on theinternet, and couldn’t reproduce the problem in Firefox. The bug seems to have been fixed in libX11 1.6.7.

@pmenzel pmenzel force-pushed the update-graphics-and-x-stack branch 4 times, most recently from a2a2be6 to 6761275 Compare October 16, 2018 15:34
@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 16, 2018

This is good to go.

Systems using the proprietary Nvidia driver need to be reboot with Linux 4.14.74. The other systems do not have a problem, and can be easily updated.

@pmenzel
Copy link
Collaborator Author

pmenzel commented Oct 17, 2018

I split out the X.Org X Server 1.20.x update into the separate merge/pull request #939.

This should be fine to go in, and does not require a restart of the system, which might be required for the proprietary Nvidia driver.

@pmenzel pmenzel merged commit 4f8b913 into master Oct 18, 2018

sudo bee update wayland-1.16.0-0
sudo bee install xcb-proto-1.13-0
sudo bee update libxcb-1.13-0.x86_64
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the wrong version, and libxcb-1.13.1-0.x86_64 should have been installed.

$ sudo bee remove libxcb-1.13-0.x86_64
removing libxcb-1.13-0.x86_64 ..
$ sudo bee install libxcb-1.13.1-0.x86_64
installing /src/mariux/beeroot/packages/libxcb-1.13.1-0.x86_64.bee.tar.bz2 ..

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants