Catching an ABRT is kind of ok, catching a SEGV is russian roulette. We
have been quite lucky with it, but I've started hitting crashes inside
malloc() which causes a deadlock when our SEGV handler needs to malloc()
as well (weston_log_timestamp()).
One reason to catch SEGV and ABRT was to attempt to restore the VT on
the DRM-backend. Nowadays that job is done by logind or weston-launch.
The signal handler also printed a backtrace, which for me personally has
been extremely helpful. Arguably it's not necessary though, when we have
core files and services that catch cores. For instance, if using
systemd, 'coredumpctl gdb' is delightfully easy for getting into the
saved core.
Therefore, this code does more harm than it is useful, so remove it. We
also drop an optional dependency to libunwind.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Developers with testing rigs having multiple graphics cards plugged in
often want to test things on a specific card. We have ways to choose a
card through seat assignments, but configuring that run by run is
awkward.
Add a command line option for opening a specific DRM device.
v2: call it --drm-device instead of --device
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Logind has been long supported as means to launch Weston without
weston-launch. It's good to note it in the manual.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
When you need to start Weston via weston-launch, systemd unit, or any
other runner, it is annoying to try to get in with a debugger,
especially if the thing you are interested in happens at start-up. To
make it easy, a new option is introduced.
The new option, implemented both as a command line option and a
weston.ini option, raises SIGSTOP early in the start-up, before the
weston_compositor has been created. This allows one to attach a debugger
at a known point in execution, and resume execution with SIGCONT.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Remove the option, because it is hard to use.
Drm connector ids are hard to reach for users,
and they can change when kernel or device tree
is modified.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
[Pekka: bump WESTON_DRM_BACKEND_CONFIG_VERSION]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The paragraph about pageflip-timeout was added in between the two
paragraphs of idle-time, causing the paragraphs to be associated wrong.
Move the pageflip-timeout paragraph to the end.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100163
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Weston will not repaint until previous update has been acked by a
pageflip event coming from the drm driver. However, some buggy drivers
won’t return those events or will stop sending them at some point and
Weston output repaints will completely freeze. To ease developers’ task
in testing their drivers, this patch makes compositor-drm use a timer
to detect cases where those pageflip events stop coming.
This timeout implementation is software only and includes basic
features usually found in a watchdog. We simply exit Weston gracefully
with a log message and an exit code when the timout is reached.
The timeout value can be set via weston.ini by adding a
pageflip-timeout=<MILLISECONDS> entry under [core]
section. Setting it to 0 disables the timeout feature.
v2:
- Made sure we would get both the pageflip and the vblank events before
stopping the timer.
- Reordered the error and success cases in
drm_output_pageflip_timer_create() to be more in line with the rest
of the code.
v3:
- Reordered (de)arming of the timer with the code around it to avoid it
being rearmed before the current dearming.
- Return the proper value for the dispatcher in the pageflip_timeout
callback.
- Also display the output name in case the timer fires.
v4:
- Reordered a forgotten timer rearming after its drmModePageFlip().
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83884
Signed-off-by: Frederic Plourde <frederic.plourde at collabora.co.uk>
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
It was renamed from panel-location in
55d5701ddf, and gained a few possible
values.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
As it has been discussed in the past [1], running Weston
without any input device at launch might be beneficial for
some use cases.
Certainly, it's best for the vast majority of users (and
the project) to require an input device to be present, as
to avoid frustration and hassle, but for those brave souls
that so prefer, this patch lets them run without any input
device at all.
This introduces a simple configuration in weston.ini:
[core]
require-input=true
True is the default, so no behavioral change is introduced.
[1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This patch completely removes the Raspberry Pi backend and the renderer.
The backend and the renderer were written to use the proprietary
DispmanX API available only on the Raspberry Pi, to demonstrate what the
tiny computer is capable of graphics wise. They were also used to
demonstrate how Wayland and Weston in particular could leverage hardware
compositing capabilities that are not OpenGL. The backend was first
added in e8de35c922, in 2012.
Since then, the major point has been proven. Over time, support for the
rpi-backend diminished, it started to deteriorate and hinder Weston
development. On May 11, I tried to ask if anyone actually cared about
the rpi-backend, but did not get any votes for keeping it:
https://lists.freedesktop.org/archives/wayland-devel/2016-May/028764.html
The rpi-backend is a good example of how using an API that is only
available for specific hardware, even more so as it is only available
with a proprietary driver stack, is not maintainable in the long run.
Most developers working on Weston either just cannot, or cannot bother
to test things also on the RPi. Breakage creeps in without anyone
noticing. If someone actually notices it, fixing it will require a very
specific environment to be able to test. Also the quality of the
proprietary implementation fluctuated. There are reports that RPi
firmware updates randomly broke Weston, and that nowadays it is very
hard to find a RPi firmware version that you could expect to work with
Weston if Weston itself was not broken. We are not even sure what is
broken nowadays.
This removal does not leave Raspberry Pi users cold (for long), though.
There is serious work going on in implementing a FOSS driver stack for
Raspberry Pi, including modern kernel DRM drivers and Mesa drivers. It
might not be fully there yet, but the plan is to be able to use the
standard DRM-backend of Weston on the RPis. See:
http://dri.freedesktop.org/wiki/VC4/
The rpi-backend had its moments. Now, it needs to go. Good riddance!
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Add explanations of scaling that are a bit more approachable for users.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=94824
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This patch enhances the panel clock by adding a config file
option which can be used to either disable the clock or make
it also show seconds in the current clock format.
v2: Implement suggestions from Pekka:
- Include Signed-off-by
- Coding style fixes
- Implement clock widget allocation by using
width from cairo_text_extents
- Highlight config option values in man page
v3: Implement suggestions from Pekka and Bryce:
- Use CLOCK_FORMAT_* instead of FORMAT_* in the enum
- Switch to using fixed clock widget size instead
of one returned from cairo_text_extents
- Fixes to config option highlighting in the man page
v4: Implement more suggestions from Pekka and Bryce:
- Improve patch changelog
- Move the check for CLOCK_FORMAT_NONE into the
caller function
- Fix a memory leak in panel_create introduced by
previous revision of this patch
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57583
Signed-off-by: Armin Krezović <armin.krezovic@fet.ba>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Allow the binding-modifier option in weston.ini to take a value of
"none", meaning that none of the usual Super+Tab, Super+K, Super+Fn,
etc. key bindings will be enabled.
Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Add a new boolean weston.ini option, "allow-zap" to enable or disable
the Ctrl-Alt-Backspace key combination.
Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Add a new boolean weston.ini option, "vt-switching" to enable or
disable Ctrl-Alt-Fn key combinations.
Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
(Derek Foreman changed the prototype for switch_vt_binding to
have a weston_keyboard * instead of weston_seat *. The pointer
wasn't used, so this is just a warning fix.)
This is a follow-up for the patch that removed weston-screensaver. The
aim is to clean up shell.c a little by removing non-essential
components. Vanilla Weston desktop is only a demo, external projects are
encouraged to create user-friendly desktop environments.
The support for launching a screensaver client and the protocol bindings
are removed. With them, all related configuration options are removed,
and the manuals are updated accordingly.
The screensaver protocol definition is left in desktop-shell.xml for
posterity.
This does not affect Weston's or desktop-shells ability to put screens
to sleep after inactivity. The inactivity timer continues to operate as
before. Also screen locking is unaffected.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Add a command line option to specify a file to be read instead of
weston.ini.
IVI-shell testing will at least temporarily need to specify a config
file, because it cannot run without. That is why this is being added,
but should be convenient for everybody, too.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
We have the Weston command line option '--no-config' which is meant to
prevent loading weston.ini at all. It works for Weston itself, but it
does not work for any clients that also want to read weston.ini.
To fix that, introduce a new environment variable WESTON_CONFIG_FILE.
Weston will set it to the absolute path of the config file it loads.
Clients will load the config file pointed to by WESTON_CONFIG_FILE. If
the environment variable is set but empty, no config file will be
loaded. If the variable is unset, things fall back to the default
"weston.ini".
Note, that Weston will only set WESTON_CONFIG_FILE, it never reads it.
The ability to specify a custom config file to load will be another patch.
All programs that loaded "weston.ini" are modified to honour
WESTON_CONFIG_FILE.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Tablet shell is long gone. Might as well list what we have now.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This timer delays the output_repaint towards the end of the refresh
period, reducing the time from repaint to present.
The length of the repaint window can be set in weston.ini.
The call to weston_output_schedule_repaint_reset() is delayed by one
more period. If we exit the continuous repaint loop (set
output->repaint_scheduled to false) in finish_frame, we may call
start_repaint_loop() unnecessarily. The problem case was actually
observed with two outputs on the DRM backend at 60 Hz, and 7 ms
repaint-window. During a window move, one output was constantly falling
off the continuous repaint loop and introducing additional one frame
latency, leading to jerky window motion. This code now avoids the
problem.
Changes in v2:
- Rename repaint_delay_timer to repaint_timer and
output_repaint_delay_handler to output_repaint_timer_handler.
- When computing the delay, take the current time into account. The timer
uses a relative timeout, so we have to subtract any time already gone.
Note, that 'gone' may also be negative. DRM has a habit of predicting
the page flip timestamp so it may be still in the future when we get the
completion event.
- Do also a sanity check 'msec > 1000'. In the unlikely case that
something fails to provide a good timestamp, never delay for more than
one second.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Weston's idle timeout can already be set via the '-i' command-line
option, but this patch lets users specify it also via weston.ini.
Note that the command-line option takes precedence over the .ini,
should the option be set by both.
This patch also Updates weston.ini man page with idle-timeout bits
https://bugs.freedesktop.org/show_bug.cgi?id=83921
Signed-off-by: Frederic Plourde <frederic.plourde@collabora.co.uk>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
This patch fixes a couple of misuses around .TP 7 macros that wrongly
limited right margins and relative identation.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add a new "numlock-on" option in the [keyboard] section of weston.ini
which, if set to true, is used to enable the numlock of the keyboards
attached at startup.
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v2: Different, hopefully better, wording. This patch entirely replaces
the previous similar patch I sent.
v3: Now including the correct patch. Please disregard the "v2" mail.
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This adds a description of the screen-share command configuration key to the
weston.ini man page.
[Pekka Paalanen: removed the sentence about default value, because the
default value is empty, and AFAIU cannot work.]
Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
At the moment when surfaces are destroyed they are faded out but let's
make it configurable!
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This option is so we can disable showing any panel at all. The default
is to continue showing the panel and no example is added to weston.ini
because it's an uncommon request.
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Useful for unit tests. If Weston finds a weston.ini during unit tests,
it will load it and all the modules it asks for. We need a way to
prevent loading arbitrary modules from the command line.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add description of key:shell to CORE SECTION and move a example of desktop-shell from key:modules to key:shell.
Add cms-colord.so to key:modules of CORE SECTION.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
The default can be set by passing WESTON_SHELL_CLIENT as an argument
to configure, similarly to WESTON_NATIVE_BACKEND.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
This commit makes the wayland backend search through the config for
[output] sections with names starting with "WL" and create outputs
accordingly. Outputs created due to the config file support mode, scale,
and transform parameters. It also listens for the --output-count
command-line option.
This brings the wayland backend almost up to par, in terms of functionality
with the X11 backend.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
This patch adds a new weston.ini key, gbm-format, to the [core] section.
This new key can be rgb565, xrgb8888 or xrgb2101010, and makes the
compositor use the corresponding GBM format for the framebuffer.
The new key startup-animation in the [shell] section lets you
control the startup animation. Default is fade, but with this patch
we can also do none, which just show the desktop as fast as possible.
Scale-crop mode scales the wallpaper to tightly fill the whole output,
but preserving wallpaper aspect ratio. If aspect ratio differs from the
output's, the wallpaper is centered cutting it from top/bottom or
left/right.
Add this to the weston.ini man page, and explain all three modes.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>