Bug 1803361 - weston-launch fails in Fedora 31
Summary: weston-launch fails in Fedora 31
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: weston
Version: 31
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: WaylandRelated
TreeView+ depends on / blocked
 
Reported: 2020-02-15 14:20 UTC by Kevin
Modified: 2020-02-27 17:28 UTC (History)
4 users (show)

Fixed In Version: weston-8.0.0-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-27 17:28:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
journal.log (517.44 KB, text/plain)
2020-02-17 17:00 UTC, Kevin
no flags Details
lspci.out (1.64 KB, text/plain)
2020-02-17 17:00 UTC, Kevin
no flags Details
packages.out (21.35 KB, text/plain)
2020-02-17 17:01 UTC, Kevin
no flags Details

Description Kevin 2020-02-15 14:20:30 UTC
Description of problem:
In Fedora 31 Server, running weston-launch from virtual console does not launch weston as expected based on https://fedoraproject.org/wiki/How_to_debug_Wayland_problems#Testing_under_different_compositors

Version-Release number of selected component (if applicable):
standard Fedora 31 components

How reproducible:
Always

Steps to Reproduce:
1. Install Fedora 31 Server
2. sudo dnf install weston
3. weston-launch

Actual results:
weston does not launch. command returns to virtual console bash prompt with error.

Expected results:
weston launches

Additional info:

Comment 1 Gerd Pokorra 2020-02-16 13:40:55 UTC
I conjecture that you try to start weston in the wrong way.

The second thing is that I am not sure what you mean that you enter the command from a virtual console. Do you mean a real virtual console were you switch with Crtl+Alt+Fn between the device special files /dev/tty1, /dev/tty2, etc. There you have to enter the command 'startx' if you are in runlevel 3 without a DisplayManager.

Or do you have GNOME running and enter the command from the gnome-terminal?

Comment 2 Gerd Pokorra 2020-02-17 09:39:18 UTC
On my laptop I have installed Fedora 31 Workstation Edition.
I entered:

- init 3
- logged in to the virtual console
- starting Weston works with the commands 'weston' and 'weston-launch'

Comment 3 Gerd Pokorra 2020-02-17 12:50:24 UTC
Now I tested it also on a Fedora 31 Server system. There also starts Weston.

Let me know your error message. Perhaps is a dependency missing that I have installed.

Comment 4 Kevin 2020-02-17 16:09:53 UTC
Thanks for your quick replies, Gerd.

It is indeed one of the real ncurses-based virtual consoles that can be switched between with Ctrl+Alt+F1/F2/F3/F4/F5/F6. After installing Fedora 31 Server out-of-the-box, that's all I have for a UI. And that's ok. I'm comfortable working at the CLI, but I'd like to have a GUI like X or Wayland and I think Wayland is a better choice. I don't have startx installed and I think that's because I don't need it to start weston (I think it's associated with X.org, right?).

When I do weston-launch at the console (virtual console), I see (I'm manually transcribing this below from the server ncurses-based interface into Firefox on my laptop, so there's a chance I'll make some mistakes in this):

==================
$ weston-launch
2020-02-17 EST
[10:11:42.630] weston 7.0.0
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: 7.0.0
[10:11:42.630] Command line: /usr/bin/weston
[10:11:42.630] OS: Linux, 5.3.7-301.fc31.x86_64, #1 SMP Mon Oct 21 19:18:58 UTC 2019, x86_64
[10:11:42.630] Starting with no config file. [Kevin adds: I also tried it with a config file containing only "[core] modules=xwayland.so" and it also failed]
[10:11:42.653] Output repaint window is 7 ms maximum.
[10:11:42.660] Loading module '/usr/lib64/libweston-7/drm-backend.so'
[10:11:42.679] initializing drm backend
[10:11:42.682] logind: session control granted
[10:11:42.684] using /dev/dri/card0
[10:11:42.684] DRM: supports universal planes
[10:11:42.684] DRM: supports atomic modesetting
[10:11:42.685] DRM: supports picture aspect ratio
MESA-LOADER: failed to open i965 (search paths /usr/lib64/dri)
failed to load driver: i965
MESA-LOADER: failed to open kms_swrast (search paths /usr/lib64/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /usr/lib64/dri)
failed to load swrast driver
[10:11:42.738] failed to initialize egl
[10:11:42.738] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.
==================

Having now read this very carefully, one thing is now clear to me: the reason it's failing to start is because it's failing to load a driver. That said however, I took it for granted that "sudo dnf install weston" would automatically identify all needed software (including drivers) and install them. I'm reluctant to go manually trying to install this driver or that driver without some kind of guidance. If you can give me some specific install driver suggestions I'm happy to try them. I already tried "dnf search i965" and "dnf search swrast" and even "dnf search weston" in search of drivers and found nothing that seemed relevant. Just in case it would help, I also rebooted the server after installing weston. Still no success.

Thanks again for your quick response. Any suggestions for me?

Comment 5 Kevin 2020-02-17 16:39:45 UTC
In an attempt to continue troubleshooting this myself, I did some additional searching and found this RESOLVED NOTOURBUG bug report:

https://bugs.freedesktop.org/show_bug.cgi?id=94476

But after reading it, I think it's not closely (or at all) related to my problem.

Comment 6 Kevin 2020-02-17 17:00:12 UTC
Created attachment 1663573 [details]
journal.log

Comment 7 Kevin 2020-02-17 17:00:37 UTC
Created attachment 1663574 [details]
lspci.out

Comment 8 Kevin 2020-02-17 17:01:16 UTC
Created attachment 1663576 [details]
packages.out

Comment 9 Kevin 2020-02-17 17:01:51 UTC
Based on https://docs.fedoraproject.org/en-US/quick-docs/debug-wayland-problems/ I also attached some logs in case it helps.

Comment 10 Gerd Pokorra 2020-02-17 17:53:05 UTC
The files 

$ ls /usr/lib64/dri/*_dri.so 
/usr/lib64/dri/i915_dri.so           /usr/lib64/dri/r300_dri.so
/usr/lib64/dri/i965_dri.so           /usr/lib64/dri/r600_dri.so
/usr/lib64/dri/iris_dri.so           /usr/lib64/dri/radeon_dri.so
/usr/lib64/dri/kms_swrast_dri.so     /usr/lib64/dri/radeonsi_dri.so
/usr/lib64/dri/nouveau_dri.so        /usr/lib64/dri/swrast_dri.so
/usr/lib64/dri/nouveau_vieux_dri.so  /usr/lib64/dri/virtio_gpu_dri.so
/usr/lib64/dri/r200_dri.so           /usr/lib64/dri/vmwgfx_dri.so

belong to the package 'mesa-dri-drivers'.

Would you please install this package and try it again.

Comment 11 Gerd Pokorra 2020-02-17 19:10:27 UTC
At the URL:

https://koji.fedoraproject.org/koji/taskinfo?taskID=41557977

a scratch build of the newer Weston version 8.0.0 is done for F31.

I added the line:
Requires:       mesa-dri-drivers

in the spec file.
So the package 'mesa-dri-drivers' will automatic installed when you download the weston rpms for x86_64 form
https://koji.fedoraproject.org/koji/taskinfo?taskID=41558032

and install 

weston-8.0.0-1.fc31.x86_64.rpm, weston-libs-8.0.0-1.fc31.x86_64.rpm

Comment 12 Kevin 2020-02-17 19:28:39 UTC
Thank you Gerd! :)

I'll do that.

Three questions:

1. I'm not sure, but I get the impression that if I install weston-8.0.0-1.fc31.x86_64.rpm and weston-libs-8.0.0-1.fc31.x86_64.rpm from rpms then I should NOT bother with your previous suggestion to install mesa-dri-drivers (because you added the line to require mesa-dri-drivers). Is that correct?

2. Also, if I install weston-8.0.0-1.fc31.x86_64.rpm and weston-libs-8.0.0-1.fc31.x86_64.rpm from rpms then should I first use dnf to UNinstall weston (7.0.0) from the existing package infrastructure that I installed immediately after installing F31 Server? (It seems like doing this might unnecessarily also uninstall all the many prerequisite packages that were also automatically installed as dependencies when I did "sudo dnf install weston" when I'm guessing that weston 8.0.0 probably needs a lot of the same software.)

3. Or will weston-8.0.0-1.fc31.x86_64.rpm and weston-libs-8.0.0-1.fc31.x86_64.rpm installed from rpms just overwrite weston 7.0.0 that I earlier installed using dnf?

Comment 13 Kevin 2020-02-17 20:42:44 UTC
Please disregard my last.

I downloaded the rpm files you pointed me to at https://koji.fedoraproject.org/koji/taskinfo?taskID=41558032

Then, in two different virtual consoles (one logged in as root and one logged in as a non-root user) I did:

# rpm -ivh weston-libs-8.0.0-1.fc31.x86_64.rpm
# rpm --erase --nodeps weston (because when I tried to install weston at this point, there were conflicts with weston 7.0.0)
# rpm -ivh weston-8.0.0-1.fc31.x86_64.rpm (kevin adds: this did not automatically pull in mesa-dri-drivers like I thought it would, so I installed mesa-dri-drivers manually as in next line)
# dnf install mesa-dri-drivers
# rpm -ivh weston-8.0.0-1.fc31.x86_64.rpm
$ weston-launch

and I'm pretty sure weston did start, based on launching an xterm and doing:
$ echo $WAYLAND_DISPLAY
wayland-0

I then killed weston with Ctrl-Alt-Backspace.

Thanks so much for your help with this, Gerd! I'm also glad to be using weston-8 over weston-7. I'm sure there are dramatic improvements.

I now need to figure out why (since weston is installed and running) when I do "dnf install gdm" it wants to pull in all kinds of xorg-x11 packages, but that's another problem, so I'm closing this bug report now.

Comment 14 Kevin 2020-02-17 20:44:54 UTC
Actually, although you helped me solve my problem, I think I'll let you close this issue because I'm not sure what status to assign to the issue itself.

Comment 15 Samuel Sieb 2020-02-17 22:20:27 UTC
Kevin, when you are installing rpm files from the command line, you should still be using dnf, not directly rpm.  That would have been a lot easier for you because it would have automatically removed the old version when installing the newer one.  It will also install any dependencies the rpm file requires if some are not already installed.

Comment 16 Fedora Update System 2020-02-18 00:39:36 UTC
FEDORA-2020-180a2fdc1c has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-180a2fdc1c

Comment 17 Gerd Pokorra 2020-02-18 00:49:31 UTC
Thank you for testing the packages of the new version. I have now done an official build of version 8.0.0 for Fedora 31. When the weston packages will go to the updates repository then this ticket will be closed automatically.

Comment 18 Fedora Update System 2020-02-19 02:30:51 UTC
weston-8.0.0-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-180a2fdc1c

Comment 19 Fedora Update System 2020-02-27 17:28:34 UTC
weston-8.0.0-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.