The DRI section isn't used at all for aeons now - just been relevant
for DRI1, which is already gone for over a decade now. Thus no practical
need to carry non-functional remains of it for any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These builds just taking too long and slowing down all other builds.
Let's only run them on a few branches (eg. baselines) and not on
each single PR or arbitrary pushes.
It's only running on:
- master
- release/*
- qemu/*
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Found out that vkgears doesn't respect the reported DRI3 modifiers on depth 30.
We could check that the requested modifier is supported in the DRI3 request handler,
but I'm not sure it's worth it.
The glamor issue stands regardless, since gl operations can fail for various reasons.
Signed-off-by: stefan11111 <stefan11111github@gmail.com>
When a transient namespace is deleted, XnsDestroyNamespace() frees the
namespace struct, its name, and its authentication tokens. However, it
leaves the virtual root window active in the server's resource database.
Because the virtual root window is never freed, the server leaks a Window
structure, window attributes, and properties every time a temporary
namespace is destroyed.
Fix this leak by calling FreeResource() on the virtual root window
before destroying the namespace.
Also update the formal TLA+ model in doc/Xnamespace.tla to track
resource cleanup and verify the fix.
Signed-off-by: Mason Green <mason@greenm01.net>
When the configuration file is parsed at server startup, select_ns()
dynamically allocates namespace structures. However, it does not check
whether calloc() or strdup() successfully allocate memory.
If calloc() fails, the server dereferences a NULL pointer and crashes
instantly.
If strdup() fails, the namespace is added to the global list with a
NULL name. When the server later searches for a namespace, it calls
strlen() on the NULL name. This causes a delayed crash of the server
at runtime.
Fix this by adding standard FatalError() checks to handle allocation
failures safely during startup.
Also include a formal TLA+ verification model of the Xnamespace
security isolation extension in doc/Xnamespace.tla.
Signed-off-by: Mason Green <mason@greenm01.net>
input_constrain_cursor() writes pointer-barrier hit/leave events into the
caller-supplied events buffer and bumps *nevents. It dereferenced both
unconditionally (barrier_events->barrier_event = ev; *nevents += 1), so
calling it with a NULL events/nevents pair crashed on the first barrier.
Callers do not pass NULL today (the only NULL call, GetTouchEvents ->
positionSprite(), is hardcoded to Absolute mode where this function's
barrier paths are skipped), but the function is a straightforward
NULL-safety hazard. Guard event emission on a can_emit flag derived from
both pointers, while still performing the barrier clamping so cursor
coordinates are constrained correctly even when no events can be emitted.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This was accidentially exported. No external driver ever had a chance
to use it yet, so unexport it now.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
With commit b778d62b9b these are also used by
the modesetting driver, which failed due them not being _X_EXPORT'ed.
But since they're so small, it's easier to just make them inline, instead
of making extra _X_EXPORT's just for this particular case.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Several important lanes had been silently skipped, thus several broken
commits could pass, which never should have passed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When using `xdotool mouseup 1` in Chromium 136, a slave device is passed
to `drmmode_sprite_set_cursor`.
In `dix/events.c`, `dev->spriteInfo->sprite` for slave devices points to
their master device when they are not floating, allowing these functions
to handle slave device cases correctly.
Similarly, in `mi/misprite.c`, `miSpritePointerFuncs` checks
`IsFloating` for the incoming device, and `GetSprite` converts slave
devices to master devices if a non-floating slave is passed.
By contrast, the `drmmode_sprite_funcs` series functions track
per-screen cursor reference counts. This cursor state should also be
recorded on the master device rather than the non-floating slave device.
This inconsistency between `drmmode_sprite_funcs` and other sprite
handlers leads to the following issues in the drmmode sprite driver:
1. The slave device stores state that it shouldn't record.
2. The master device's record becomes stale. (e.g., `ChangeToCursor` in
`dix/events.c` called for a slave device updates the master's sprite,
causing the subsequent comparison between old and new cursors on the
master device to fail.)
This patch resolves the inconsistency by using GetMaster when the device
is not floating, aligning the behavior with `mi/misprite.c`.
---
The reason physical devices work while XTEST devices fail is that
`ActivateGrab` and `DeactivateGrab` in XTEST devices' `deviceGrab` are
set to `ActivatePointerGrab` and `DeactivatePointerGrab`, respectively.
Physical devices use `ActivateKeyboardGrab` and
`DeactivateKeyboardGrab`. Thus, releasing a physical device will not
trigger `DeactivatePointerGrab`.
The physical device is initialized by `AddInputDevice` using
"KeyboardGrab", whereas the XTEST device is initialized by
`AllocDevicePair`, which overrides the default KeyboardGrab with
"PointerGrab".
(gdb) bt
#0 drmmode_sprite_set_cursor (pDev=0x5555569b88f0, pScreen=0x555555c26990, pCursor=0x55555702c580, x=681, y=181)
at ../xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c:4349
#1 0x00005555555980a6 in miPointerUpdateSprite (pDev=0x5555569b88f0) at ../xorg-server/mi/mipointer.c:490
#2 0x0000555555597877 in miPointerDisplayCursor (pDev=0x5555569b88f0, pScreen=0x555555c26990, pCursor=0x55555702c580) at ../xorg-server/mi/mipointer.c:208
#3 0x000055555568ef1f in CursorDisplayCursor (pDev=0x5555569b88f0, pScreen=0x555555c26990, pCursor=0x55555702c580) at ../xorg-server/xfixes/cursor.c:168
#4 0x0000555555644150 in AnimCurDisplayCursor (pDev=0x5555569b88f0, pScreen=0x555555c26990, pCursor=0x55555702c580) at ../xorg-server/render/animcur.c:197
#5 0x00005555555d5f12 in ChangeToCursor (pDev=0x5555569b88f0, cursor=0x55555702c580) at ../xorg-server/dix/events.c:952
#6 0x00005555555d60ad in PostNewCursor (pDev=0x5555569b88f0) at ../xorg-server/dix/events.c:1003
#7 0x00005555555d79ac in DeactivatePointerGrab (mouse=0x5555569b88f0) at ../xorg-server/dix/events.c:1716
#8 0x000055555569d217 in ProcessDeviceEvent (ev=0x7fffe4073c20, device=0x5555569b88f0) at ../xorg-server/Xi/exevents.c:1955
#9 0x000055555569d433 in ProcessOtherEvent (ev=0x7fffe4073c20, device=0x5555569b88f0) at ../xorg-server/Xi/exevents.c:2020
#10 0x00005555556eb297 in ProcessPointerEvent (ev=0x7fffe4073c20, mouse=0x5555569b88f0) at ../xorg-server/xkb/xkbAccessX.c:756
#11 0x000055555558c86c in mieqProcessDeviceEvent (dev=0x5555569b88f0, event=0x7fffe4073c20, screen=0x555555c26990) at ../xorg-server/mi/mieq.c:503
#12 0x00005555556692d9 in ProcXTestFakeInput (client=0x555556b5bf60) at ../xorg-server/Xext/xtest.c:434
#13 0x000055555566941a in ProcXTestDispatch (client=0x555556b5bf60) at ../xorg-server/Xext/xtest.c:468
#14 0x00005555555c002c in Dispatch () at ../xorg-server/dix/dispatch.c:552
#15 0x00005555555cf546 in dix_main (argc=8, argv=0x7fffffffe9b8, envp=0x7fffffffea00) at ../xorg-server/dix/main.c:274
#16 0x00005555557bbf07 in main (argc=8, argv=0x7fffffffe9b8, envp=0x7fffffffea00) at ../xorg-server/dix/stubmain.c:34
(gdb) p pDev->name
$1 = 0x5555569b9960 "Virtual core XTEST pointer"
(gdb) frame 12
#12 0x00005555556692d9 in ProcXTestFakeInput (client=0x555556b5bf60) at ../xorg-server/Xext/xtest.c:434
434 mieqProcessDeviceEvent(dev, &xtest_evlist[i], miPointerGetScreen(inputInfo.pointer));
(gdb) p client->clientIds[0]->cmdname
$2 = 0x5555570852f0 "xdotool"
(gdb) p client->clientIds[0]->cmdargs
$3 = 0x555557078b30 "mouseup 1"
Closes: #1685
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2282>
(cherry picked from commit e19e86c29f)
(cherry picked from commit 035caac7b2468fd3857e0c2bff74956272993974)
(cherry picked from commit f170a12cdf299f70162eeff458ad84e18f1c0c43)
Signed-off-by: Ben Song <bensongsyz@gmail.com>
XIQueryDevice already reports the current cumulative axisVal for relative scroll valuators. Seed nonzero vertical and horizontal values and verify their FP3232 representation for native and swapped clients.
Signed-off-by: Lukáš Lipinský <18076-Mr-Tao@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2292>
(cherry picked from commit 18dbde8971)
(cherry picked from commit 1688dcf08ee721db3b336677d0530b824b6b43a0)
(cherry picked from commit 7c7748e311ea9ad00d9c71e3d00a7a259d77473d)
NetBSD's CDN doesn't seem to deliver older versions anymore,
so we need to upgrade to 10.2.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This reverts commit b799d88a78.
Breaks CI. We'll have to do some more things, until we can
actually merge that.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Set locale to C before checking log message format to ensure consistent
behavior across all locales. The test was checking for 'en\n' at the end
of log messages, which only works in English locale.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
XQuartz was the last consumer of this 2007 workaround, which made getDrawableDamageRef() route a non-viewable window's
damage to the screen damage list instead of the window pixmap's. Because the answer then changed as a window's
viewability changed, it was a source of exactly the register/unregister list mismatch the previous commit addresses --
CrushTree() clears ->viewable before unrealizing, so a window's damage was inserted on one list and looked for on
another during teardown.
It was disabled for XWin in 20701522be for breaking Composite and removed entirely in
c89f0521044083a11d538ebfeaabee6fc7fb9a03, but that removal was reverted in de32d4dcf5
after a regression report, pending a proper fix in the damage layer. That fix is now in place, so drop the workaround.
Fixes: https://github.com/XQuartz/XQuartz/issues/406
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2277>
(cherry picked from commit cfbc5224a6)
(cherry picked from commit 029735e8a254ed2dd5c565878eb946f1ef684fa1)
(cherry picked from commit 0939e0d745c0ee86e603b23b09cac7ea5e632801)
Port notes
----------
This brings our tree in line with xorg/main, where ROOTLESS_WORKAROUND no longer
occurs at all. Jeremy Huddleston removed it there; this is that change, not a new
proposal.
Scope: the define is set only under `if build_rootless`, and build_rootless is set
only for build_xquartz (meson.build). In a normal -Dwerror=true build of this tree the
generated dix-config.h contains no ROOTLESS_WORKAROUND, so the #ifdef block in
miext/damage/damage.c does not compile there. The affected configuration is macOS
XQuartz.
History: the removal was reverted in de32d4dcf5 after a
regression report, pending a proper fix in the damage layer. That fix has since landed
as #3793 ("use drawable pointer instead of list head pointer"), which is what the
original commit message above refers to. Nothing re-established the workaround's
necessity afterwards: it returned in 2019 only because ecf62b7ba6 added the meson build
and carried the define over from configure.ac, without referring to the 2011 report.
Not verified here: that XQuartz on macOS runs without the workaround. applewm is not
available on this Linux host and no CI lane exercises it.
Not a backport candidate: this removes a workaround rather than fixing a defect.
It corrects no crash, no memory error and no security issue, so it must not be
carried to release/25.2, 25.1 or 25.0. Per the backport policy a release branch takes
bugfixes, not cleanups. If a release branch ever needs this, it has to be a deliberate
maintainer decision with its own justification - not a consequence of this port.
We were telling kdrive core to close the fd for us,
then trying to use that closed fd to ungrab it,
leading to spam to stderr
Signed-off-by: stefan11111 <stefan11111github@gmail.com>
If the CRTC is disabled (VT switch, DPMS off), ms_queue_vblank()
fails with EINVAL. When that happens ms_drm_sequence_handler() logs
"aborting lost events" and drops every pending coalesced vblank for
the CRTC via ms_drm_abort_one(), freeing them without calling
present_event_notify().
A Present client waiting on one of those completions (e.g. a
compositor whose DRI3/Present SwapBuffers is throttled in copy mode)
is then never notified and blocks forever, freezing the desktop while
the server itself stays idle.
When re-arming fails, complete the stranded coalesced waits instead of
dropping them, so their Present completions are still delivered.
Fixes: 2d272b705c ("modesetting: coalesce vblank events to avoid DRM event queue exhaustion")
Fixes: https://github.com/X11Libre/xserver/issues/3766
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: galternat <galternat.twins223@simplelogin.com>
This allows tests to use an xserver_args fixture/parameter to pass
arguments for the xserver fixture they may use.
Assisted-by: Claude:claude-opus-4-6
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2263>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Avoids a gcc warning in every file that includes it,
whether in the server or drivers:
/usr/include/xorg/xf86.h: In function ‘xf86UnblockSIGIO’:
/usr/include/xorg/xf86.h:86:55: warning: unused parameter ‘wasset’ [-Wunused-parameter]
86 | static inline _X_DEPRECATED void xf86UnblockSIGIO(int wasset) { input_unlock(); }
| ~~~~^~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2323>
(cherry picked from commit 306071c0b9)
(cherry picked from commit acb4f9e13d0e5a6528935e1c599dc55797c723d6)
(cherry picked from commit 9450835d68ce2cc767325f46d90d8343fd30fa3b)
When DPMS is active, `mieqProcessInputEvents()` unconditionally
switches the display back to `DPMSModeOn` for every input event.
This prevents systems from keeping the display powered off while still
allowing applications to use input devices when DPMS is externally
managed by disabling all screen-saver and DPMS timeouts.
When all screen-saver and DPMS timeouts are disabled, the current DPMS
state is assumed to be externally managed and should not be overridden
by input activity.
Keep input processing unchanged so devices such as media buttons remain
usable while the display is off.
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2287>
(cherry picked from commit 975453b1aa)
(cherry picked from commit 3daad9945ee4cf750dc2624109096cbfb288be13)
(cherry picked from commit 68481c5b4ee716a8a7d093e1b9ca622d97882156)
Make our checks more consistent, readable, and modern-meson idiomatic
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2313>
(cherry picked from commit 3983c7408c)
(cherry picked from commit acb16385e95d611a83209a26e31e9bcd68df7069)
(cherry picked from commit ca1d1442ce2ef7f28607db0bfd505ff59264523f)
The original fix (*1) introduced a use-after-free vulnerability by caching a pointer
into a realloc()able privates array (pListHead). This fix replaces the pListHead pointer with
pListDrawable, storing the drawable pointer at insertion time and re-deriving the list head
at removal time via getDrawableDamageRef(), avoiding the realloc() UAF.
The fix:
1. Changes pListHead (DamagePtr *) to pListDrawable (DrawablePtr) in damagestr.h
2. Updates damageInsertDamage to store pDamage->pDrawable instead of the list head pointer
3. Updates damageRemoveDamage to take a DrawablePtr and re-derive the list head via getDrawableDamageRef()
4. Updates all call sites to pass the drawable pointer instead of the list head pointer
5. Fixes damagePixmapDestroy to pass the pixmap as the drawable
*1) da72833185
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
DamageRegister() chooses which list a damage is linked onto via getDrawableDamageRef(), but DamageUnregister() and
damageSetWindowPixmap() re-derived that list at removal time. For a window the answer depends on the window pixmap,
which changes while the damage is registered (Composite redirection, rootless drawing and Present flips all swap it), so
the removal could consult a different list than the one the damage was inserted onto. It then silently found nothing --
DAMAGE_VALIDATE_ENABLE is off, so the diagnostic is compiled out -- and left an unregistered, often freed, damage linked
where damageRegionAppend() would later dereference its NULL pDrawable and crash.
Record the list head when linking a damage and always unlink from that, which also drops a use-after-free read of the
old window pixmap in damageSetWindowPixmap(): rootless frees its scratch pixmap before restoring the pre-drawing window
pixmaps, so the pixmap consulted there had already been destroyed.
Fixes: https://github.com/XQuartz/XQuartz/issues/406
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2277>
(cherry picked from commit da72833185)
(cherry picked from commit 07df8459788fa1f73ff173cb4dbd8233a69fddf4)
(cherry picked from commit 3df8dc189e3982038a8672639ab6bffbf6e32ad4)
When every key in a keymap has zero groups, ctrls->num_groups is 0 and each out-of-range action here misbehaves.
XkbWrapIntoRange divides by zero, which is the reported crash. XkbClampIntoRange is worse: it computes -1,
returns it through this function's unsigned type, and the callers truncate it into XkbStateRec's unsigned char
group fields as 255, after which XkbComputeCompatState() reads map->groups[255] out of a four element array and
reports what it finds to clients in the compat state of every core event. The negative-group case adds zero
forever, wedging the server thread, in one path while it holds input_lock. XkbComputeDerivedState() treats group
0 as out of range once num_groups is 0, so all of this is reachable from an ordinary key event.
XQuartz gets there because it asks for model "empty", whose keycodes file declares no key names, so a keymap
compiled at a client's request has no key definitions at all.
Guard the arithmetic itself and not just the places that compute num_groups: groups_wrap selects between these
actions and is client settable, and this is exported for DDXes that supply their own controls.
Fixes: https://github.com/XQuartz/XQuartz/issues/422
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2278>
(cherry picked from commit bdb14dce4b)
(cherry picked from commit b5ea5591d1f514d0eb0cc5f58052a24fd1b06b9e)
(cherry picked from commit eb420bff03b4ae05d00821482c9fcfaf32a2922d)
SDeviceChangedEvent left ValuatorClass.value and every ScrollClass-specific multi-byte field in server byte order. Swapped clients therefore received corrupt current values and scroll metadata.
Swap those fields and extend the protocol event conversion coverage to nonzero relative valuator values and both scroll directions and flags.
Signed-off-by: Lukáš Lipinský <18076-Mr-Tao@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2291>
(cherry picked from commit cf91b97d6c)
(cherry picked from commit 7a7e9c66b17cd0d64d31fa19244f3e4eb162fed7)
(cherry picked from commit f9e486ad1d398fb8dcf48f88cd8923decd291c7c)
SwapScrollInfo converted the other multi-byte ScrollClass fields but left flags in server byte order. Swap it as well and decode the field in the swapped-client protocol test so nonzero flags exercise the wire representation.
Signed-off-by: Lukáš Lipinský <18076-Mr-Tao@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2291>
(cherry picked from commit 8033c4d93e)
(cherry picked from commit 2d1d0b67dc2119507f52e3dae96827b8946d0eca)
(cherry picked from commit db6f28acaa7c7d2a049a92396e1bc35b6f759d8a)
When a later test child is killed by a signal, exit_code may still contain zero from the preceding child. Return EXIT_FAILURE explicitly so Meson cannot report a false success.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2293>
(cherry picked from commit 495ea74203)
(cherry picked from commit 21e4929c355df7f525d0d0299781ccb6daa83780)
(cherry picked from commit d9abd1140755adcee1e2c9ec6d53794fb276f8d1)
Signed-off-by: Lukáš Lipinský <18076-Mr-Tao@users.noreply.gitlab.freedesktop.org>
RegionValidate() copies *badreg into ri[0].reg, so ri[0].reg.data aliases badreg->data. A later
RECTALLOC_BAIL() can realloc() that block and move it, updating ri[0].reg.data but not badreg->data. On
the bail path, freeing ri[0].reg.data and then calling RegionBreak(badreg) frees badreg->data a second
time, which by then is a stale pointer into memory already freed or reallocated to something else.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2281>
(cherry picked from commit 4ef1b4cd26)
(cherry picked from commit bb02769445b1a516f33b4855977cc227f0542cb7)
(cherry picked from commit bc0760d9514fe5f2d9e4f5287ab0318d45c32736)
Clamp the count once per key and use it everywhere the key or the keymap is indexed with it, while still reading
every symbol the file claimed so that the stream stays in step and the symbol array is not left short.
At the other end, a symbols section in which no key defines any group leaves the count at the zero it was
allocated with. This is how XQuartz's keyboard is initialized: model "empty" supplies a symbols section that
defines no keys, and a section that defines nothing is still a section, so XkbInitControls() sees XkmSymbolsMask
and skips its own single-group default. The device only survives because DarwinKeyboardReloadHandler()
immediately pushes a core keymap that raises the count again.
Fixes: https://github.com/XQuartz/XQuartz/issues/422
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2278>
(cherry picked from commit 0c764d98ee)
(cherry picked from commit 173fe333e4c4cec65bf61427827e2f44262c29af)
(cherry picked from commit ea50d2225fb90686987bc45449a3b93decf0054c)
Both places that derive ctrls->num_groups from the widest key in the map can arrive at zero. But a keymap in
which no key defines any symbols is legal, so ensure we declare at least one group.
Fixes: https://github.com/XQuartz/XQuartz/issues/422
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2278>
(cherry picked from commit aa0bc93d27)
(cherry picked from commit a3f4359f33e65d16037d010a875ef93ed8cc6dee)
(cherry picked from commit 8bb68f76e1940dea50e6c4182b45e8ee528cbe62)
XkbInitControls() had a fallback to ensure keymaps that defined no symbols at all still resulted in one group.
Extend this to cover the case where a keymap reports symbols but no groups.
Fixes: https://github.com/XQuartz/XQuartz/issues/422
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2278>
(cherry picked from commit 8e11715024)
(cherry picked from commit c9dd5aa9e505d65036c351c78cd74c5a6fc53535)
(cherry picked from commit 712c3e7497c90a0d9ad6f863abdd2e330623887d)
InitOutput() calls FatalError() when AddGPUScreen() fails, taking
down the whole server even when the primary screen initialized
fine. The hotplug path (xf86platformAddDevice) already treats the
same failure as recoverable: it deletes the screen and carries on.
Do the same at init: log the failure, delete the screen, continue
with the remaining screens.
Seen in practice on a hybrid laptop where a runtime-suspended
secondary GPU fails to wake (kernel bug): the LightDM greeter's
Xorg dies for a GPU screen it never needed.
Closes: #1912
Signed-off-by: Daniel Monteiro <monteiroquiet@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2271>
(cherry picked from commit a5ec3570e1)
(cherry picked from commit 82fd237d12a5ddde62997198721583d826f11060)
(cherry picked from commit 195ff6b8900c5d845aa2d63b6fb1592afd7b78db)
Send a swapped ChangeDeviceControl/DEVICE_RESOLUTION with
num_valuators=255 and no valuator payload. Without the SProc length
check this overruns the request buffer; with it the server returns
BadLength.
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2285>
(cherry picked from commit ddf3edc368)
(cherry picked from commit 3ed09c52d4a9cfe85b5f9d2f64beac022d79b221)
(cherry picked from commit 3f8dfe0169d563e147872a659ff461b95eeea16b)
The DragonFlyBSD lane reports success without ever building. Measured in two
independent runs:
Run 36739123551 (failed overall, 18:25:20 -> 18:47:32, complete log):
the guest-side shell was Killed twice (SIGKILL, OOM on the runner while a
nested QEMU runs), and immediately after each kill the action still emitted
##[end-action ... outcome=success;conclusion=success]. No build ran in any
of the three attempts: "meson" 0 occurrences, "running xserver build" 0.
That is why attempts 1 and 2 were recorded as green.
Run 36763250919 (reported success, 19:11:48 -> 19:15:29, complete log):
the build script started and meson setup completed ("Build targets in
project"), then nothing: "Compiling C" 0, "Linking" 0, "meson install" 0.
Conclusion: success.
So the lane swallows the exit code of the inner command. v1.1.4 is also twelve
tag releases behind; the newest is v1.3.4.
Not a host-load problem, which is why no load metric would have found it: in
run 36762972575 netbsd, freebsd, hurd, gentoo and the image job all succeeded
while dragonflybsd failed, on the same runner class at the same time.
Fixing this restores an actual signal rather than making a broken one louder.
Whether v1.3.4 also fixes the swallowed exit code is to be measured, not
assumed - that is what the CI run on this PR is for.
The other VM lanes are already current: freebsd floats on @v1 and is the most
reliable lane, netbsd was bumped to v1.5.0 when it broke the same way.
Signed-off-by: Enterprise <info@metux.net>