Skip to content

XLibre crashes when changing resolution via xrandr in QEMU/KVM VM #2107

@rickyrich85

Description

@rickyrich85

Select the version

25.1.X

Describe your issue

When running XLibre inside a QEMU/KVM virtual machine, attempting to change the display resolution using xrandr causes the X server to terminate immediately and the graphical session exits back to the TTY.

The issue occurs regardless of the selected virtual GPU model or whether 3D acceleration is enabled or disabled.

If the resolution remains at the default value provided at session start (1280×800), the display functions normally.

Environment

Guest OS:

Gentoo Linux x86_64
Kernel: 6.18.12-gentoo
Packages: ~861
Shell: zsh 5.9

Virtualization:

QEMU/KVM
Machine type: Q35
Display protocol: SPICE
Host CPU: Intel i5-6300U (host-passthrough)

Guest hardware presented to VM:

GPU: RedHat Virtio GPU
Display: Virtual-1
Resolution (default): 1280x800

XLibre pkg:
[ebuild R ~] x11-base/xlibre-server-25.1.2:0/25.1.2::xlibre USE="elogind glx glx-dri udev xinerama xorg -debug -minimal -seatd (-selinux) -suid -systemd -test -unwind -xcsecurity -xephyr -xfbdev -xnest -xvfb*" 0 KiB

VM configuration is attached (qemu-machine-setup.log).

This issue is related to the Gentoo port report: X11Libre/ports-gentoo#114

Steps to reproduce

Steps to reproduce

Reproduction Steps

  1. Boot the virtual machine.

  2. Start XLibre normally.

  3. Run:

xrandr --output Virtual-1 --mode 1920x1080


Observed Behaviour

The X server terminates immediately and the graphical session exits back to the TTY.

Client output from xrandr:

X connection to :0 broken (explicit kill or server shutdown).

What did you expect?

Expected Behaviour

The resolution should change normally via the RandR interface without terminating the X server.


xrandr Output

Example display modes reported:

Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
Virtual-1 connected primary 1280x800+0+0

1280x800 74.99*
1920x1080 60.00
3840x2160 60.00
4096x2160 50.00
5120x2160 50.00
...

Full verbose output is attached.


GPU / Video Model Testing

The behaviour was tested across multiple QEMU virtual GPU models:

Video Model Result
Virtio GPU (3D disabled) X server crashes when resolution is changed
Virtio GPU (3D enabled) Same behaviour
QXL Same behaviour
Bochs Same behaviour
Ramfb Same behaviour
VGA XLibre does not start (only works until GRUB)

Therefore the issue does not appear to be tied to a specific virtual GPU implementation.

Additional Information

Additional Notes

  • The display functions normally as long as the resolution is not changed.

  • The issue occurs for any resolution change, not a specific mode.

  • Kernel and DRM logs show no obvious GPU driver failure preceding the X server exit.


Attached Logs

The following logs are attached for investigation:

loaded-modules.log
system.log
vm-gpu-info.log
qemu-machine-setup.log

xlibre-full.log
xlibre-errors.log
xlibre-last-session.log
xlibre-last-ext-session.log

xlibre-dmesg.log
xlibre-gpu-dmesg.log

xrandr-output.log
xrandr-verbose.log
xrandr-crash-session.log
xrandr-modset-crash-session.log

Additional Diagnostics

Two additional diagnostic files are included to provide further visibility into the graphics stack and kernel display configuration at the time of testing.

DRM State Dump

drm-state.log

This file was captured from the kernel DRM debug interface:

cat /sys/kernel/debug/dri/0/state

This reflects the kernel display configuration while XLibre is running prior to triggering the crash.


PCI GPU Driver Binding

pci-gpu-driver.log

This file confirms which kernel driver is bound to the virtual GPU device while the driver stack is being used by the virtual machine during testing.


Notes for Maintainers

The issue appears to occur during RandR mode switching. The xrandr client loses its connection because the X server exits rather than returning a mode configuration error.

drm-state.log
loaded-modules.log
pci-gpu-driver.log
qemu-machine-setup.log
system.log
vm-gpu-info.log
xlibre-dmesg.log
xlibre-driver.log
xlibre-errors.log
xlibre-full.log
xlibre-gpu-dmesg.log
xlibre-last-ext-session.log
xlibre-last-session.log
xrandr-crash-session.log
xrandr-modset-crash-session.log
xrandr-output.log
xrandr-verbose.log

Extra fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageThis needs to be reviewed and categorized.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions