RPi-Distro / repo

Issue tracking for the archive.raspberrypi.org repo
37 stars 1 forks source link

Trying to change screen orientation crashes Xorg #324

Closed aakoskin closed 1 year ago

aakoskin commented 1 year ago

A fresh up-to-date 64-bit bullseye desktop install on Raspberry Pi 3 Model B with the official 7" touchscreen.

Trying to change the screen orientation with

Preferences > Screen Configuration > Layout > Screens > DSI-1 > Orientation

always results in Xorg server crash. The same happens also when trying with xranrd.

Crash log:

[    14.709] 
X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
[    14.710] Build Operating System: linux Debian
[    14.710] Current Operating System: Linux raspberrypi 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64
[    14.710] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=Composite-1:720x480@60i vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 root=PARTUUID=d018ffcb-02 rootfstype=ext4 fsck.repair=yes rootwait
[    14.710] Build Date: 15 March 2023  02:39:27PM
[    14.711] xorg-server 2:1.20.11-1+rpt2+deb11u5 (https://www.debian.org/support) 
[    14.711] Current version of pixman: 0.40.0
[    14.711]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    14.711] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    14.711] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Mar 26 20:49:36 2023
[    14.740] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    14.788] (==) No Layout section.  Using the first Screen section.
[    14.788] (==) No screen section available. Using defaults.
[    14.788] (**) |-->Screen "Default Screen Section" (0)
[    14.788] (**) |   |-->Monitor "<default monitor>"
[    14.790] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[    14.790] (**) |   |-->Device "kms"
[    14.790] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[    14.790] (**) Option "Debug" "dmabuf_capable"
[    14.790] (==) Automatically adding devices
[    14.790] (==) Automatically enabling devices
[    14.790] (==) Automatically adding GPU devices
[    14.790] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    14.796] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.
[    14.797]    Entry deleted from font path.
[    14.797] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    14.797]    Entry deleted from font path.
[    14.797] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    14.797]    Entry deleted from font path.
[    14.797] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    14.797]    Entry deleted from font path.
[    14.797] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
[    14.797]    Entry deleted from font path.
[    14.797] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    14.797]    Entry deleted from font path.
[    14.797] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    14.797]    Entry deleted from font path.
[    14.797] (==) FontPath set to:
    built-ins
[    14.797] (==) ModulePath set to "/usr/lib/xorg/modules"
[    14.798] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[    14.798] (II) Loader magic: 0x555ded1e28
[    14.798] (II) Module ABI versions:
[    14.798]    X.Org ANSI C Emulation: 0.4
[    14.798]    X.Org Video Driver: 24.1
[    14.798]    X.Org XInput driver : 24.1
[    14.798]    X.Org Server Extension : 10.0
[    14.806] (++) using VT number 7

[    14.806] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    14.814] (II) xfree86: Adding drm device (/dev/dri/card0)
[    14.825] (II) no primary bus or device found
[    14.826]    falling back to /sys/devices/platform/soc/soc:gpu/drm/card0
[    14.826] (II) LoadModule: "glx"
[    14.832] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    14.995] (II) Module glx: vendor="X.Org Foundation"
[    14.996]    compiled for 1.20.11, module version = 1.0.0
[    14.996]    ABI class: X.Org Server Extension, version 10.0
[    14.996] (II) LoadModule: "modesetting"
[    14.999] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    15.023] (II) Module modesetting: vendor="X.Org Foundation"
[    15.023]    compiled for 1.20.11, module version = 1.20.11
[    15.023]    Module class: X.Org Video Driver
[    15.023]    ABI class: X.Org Video Driver, version 24.1
[    15.023] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    15.055] (II) modeset(0): using drv /dev/dri/card0
[    15.055] (II) modeset(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[    15.055] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[    15.056] (**) modeset(0): Option "AccelMethod" "msdri3"
[    15.056] (==) modeset(0): RGB weight 888
[    15.056] (==) modeset(0): Default visual is TrueColor
[    15.056] (**) modeset(0): glamor disabled
[    17.105] (II) modeset(0): DRI3 initialized
[    17.108] (II) modeset(0): Output HDMI-1 has no monitor section
[    17.108] (II) modeset(0): Output DSI-1 has no monitor section
[    17.121] (II) modeset(0): EDID for output HDMI-1
[    17.122] (II) modeset(0): EDID for output DSI-1
[    17.122] (II) modeset(0): Printing probed modes for output DSI-1
[    17.122] (II) modeset(0): Modeline "800x480"x59.9   25.98  800 802 804 850  480 487 489 510 -hsync -vsync (30.6 kHz eP)
[    17.122] (II) modeset(0): Output HDMI-1 disconnected
[    17.122] (II) modeset(0): Output DSI-1 connected
[    17.122] (II) modeset(0): Using exact sizes for initial modes
[    17.122] (II) modeset(0): Output DSI-1 using initial mode 800x480 +0+0
[    17.122] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[    17.122] (==) modeset(0): DPI set to (96, 96)
[    17.122] (II) Loading sub module "fb"
[    17.123] (II) LoadModule: "fb"
[    17.123] (II) Loading /usr/lib/xorg/modules/libfb.so
[    17.130] (II) Module fb: vendor="X.Org Foundation"
[    17.130]    compiled for 1.20.11, module version = 1.0.0
[    17.130]    ABI class: X.Org ANSI C Emulation, version 0.4
[    17.148] (==) modeset(0): Backing store enabled
[    17.148] (==) modeset(0): Silken mouse enabled
[    17.172] (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
[    17.172] (==) modeset(0): DPMS enabled
[    17.173] (II) Initializing extension Generic Event Extension
[    17.173] (II) Initializing extension SHAPE
[    17.174] (II) Initializing extension MIT-SHM
[    17.175] (II) Initializing extension XInputExtension
[    17.179] (II) Initializing extension XTEST
[    17.180] (II) Initializing extension BIG-REQUESTS
[    17.181] (II) Initializing extension SYNC
[    17.181] (II) Initializing extension XKEYBOARD
[    17.182] (II) Initializing extension XC-MISC
[    17.183] (II) Initializing extension SECURITY
[    17.183] (II) Initializing extension XFIXES
[    17.184] (II) Initializing extension RENDER
[    17.185] (II) Initializing extension RANDR
[    17.186] (II) Initializing extension COMPOSITE
[    17.187] (II) Initializing extension DAMAGE
[    17.188] (II) Initializing extension MIT-SCREEN-SAVER
[    17.189] (II) Initializing extension DOUBLE-BUFFER
[    17.189] (II) Initializing extension RECORD
[    17.190] (II) Initializing extension DPMS
[    17.191] (II) Initializing extension Present
[    17.191] (II) Initializing extension DRI3
[    17.192] (II) Initializing extension X-Resource
[    17.193] (II) Initializing extension XVideo
[    17.194] (II) Initializing extension XVideo-MotionCompensation
[    17.194] (II) Initializing extension SELinux
[    17.194] (II) SELinux: Disabled on system
[    17.194] (II) Initializing extension GLX
[    17.195] (II) AIGLX: Screen 0 is not DRI2 capable
[    17.283] (II) IGLX: Loaded and initialized swrast
[    17.283] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[    17.283] (II) Initializing extension XFree86-VidModeExtension
[    17.284] (II) Initializing extension XFree86-DGA
[    17.284] (II) Initializing extension XFree86-DRI
[    17.287] (II) Initializing extension DRI2
[    17.289] (II) modeset(0): Damage tracking initialized
[    17.289] (II) modeset(0): Setting screen physical size to 211 x 127
[    17.540] (II) config/udev: Adding input device generic ft5x06 (79) (/dev/input/event5)
[    17.540] (**) generic ft5x06 (79): Applying InputClass "libinput touchscreen catchall"
[    17.540] (II) LoadModule: "libinput"
[    17.541] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[    17.567] (II) Module libinput: vendor="X.Org Foundation"
[    17.567]    compiled for 1.20.8, module version = 0.30.0
[    17.567]    Module class: X.Org XInput Driver
[    17.567]    ABI class: X.Org XInput driver, version 24.1
[    17.567] (II) Using input driver 'libinput' for 'generic ft5x06 (79)'
[    17.567] (**) generic ft5x06 (79): always reports core events
[    17.567] (**) Option "Device" "/dev/input/event5"
[    17.571] (**) Option "_source" "server/udev"
[    17.608] (II) event5  - generic ft5x06 (79): is tagged by udev as: Touchscreen
[    17.612] (II) event5  - generic ft5x06 (79): device is a touch device
[    17.614] (II) event5  - generic ft5x06 (79): device removed
[    17.644] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f205000.i2c/i2c-11/i2c-10/10-0038/input/input5/event5"
[    17.644] (II) XINPUT: Adding extended input device "generic ft5x06 (79)" (type: TOUCHSCREEN, id 6)
[    17.645] (**) Option "AccelerationScheme" "none"
[    17.645] (**) generic ft5x06 (79): (accel) selected scheme none/0
[    17.645] (**) generic ft5x06 (79): (accel) acceleration factor: 2.000
[    17.645] (**) generic ft5x06 (79): (accel) acceleration threshold: 4
[    17.656] (II) event5  - generic ft5x06 (79): is tagged by udev as: Touchscreen
[    17.660] (II) event5  - generic ft5x06 (79): device is a touch device
[    17.666] (II) config/udev: Adding input device generic ft5x06 (79) (/dev/input/mouse1)
[    17.666] (II) No input driver specified, ignoring this device.
[    17.666] (II) This device may have been added with another device file.
[    17.670] (II) config/udev: Adding input device vc4-hdmi (/dev/input/event4)
[    17.670] (**) vc4-hdmi: Applying InputClass "libinput keyboard catchall"
[    17.670] (II) Using input driver 'libinput' for 'vc4-hdmi'
[    17.670] (**) vc4-hdmi: always reports core events
[    17.670] (**) Option "Device" "/dev/input/event4"
[    17.671] (**) Option "_source" "server/udev"
[    17.678] (II) event4  - vc4-hdmi: is tagged by udev as: Keyboard Pointingstick
[    17.679] (II) event4  - vc4-hdmi: device is a pointer
[    17.679] (II) event4  - vc4-hdmi: device is a keyboard
[    17.680] (II) event4  - vc4-hdmi: device removed
[    17.700] (II) libinput: vc4-hdmi: needs a virtual subdevice
[    17.700] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f902000.hdmi/rc/rc0/input4/event4"
[    17.700] (II) XINPUT: Adding extended input device "vc4-hdmi" (type: MOUSE, id 7)
[    17.701] (**) Option "AccelerationScheme" "none"
[    17.701] (**) vc4-hdmi: (accel) selected scheme none/0
[    17.701] (**) vc4-hdmi: (accel) acceleration factor: 2.000
[    17.701] (**) vc4-hdmi: (accel) acceleration threshold: 4
[    17.708] (II) event4  - vc4-hdmi: is tagged by udev as: Keyboard Pointingstick
[    17.709] (II) event4  - vc4-hdmi: device is a pointer
[    17.709] (II) event4  - vc4-hdmi: device is a keyboard
[    17.715] (II) config/udev: Adding input device PS/2+USB Mouse (/dev/input/event0)
[    17.716] (**) PS/2+USB Mouse: Applying InputClass "libinput pointer catchall"
[    17.716] (II) Using input driver 'libinput' for 'PS/2+USB Mouse'
[    17.716] (**) PS/2+USB Mouse: always reports core events
[    17.716] (**) Option "Device" "/dev/input/event0"
[    17.716] (**) Option "_source" "server/udev"
[    17.727] (II) event0  - PS/2+USB Mouse: is tagged by udev as: Mouse
[    17.727] (II) event0  - PS/2+USB Mouse: device is a pointer
[    17.729] (II) event0  - PS/2+USB Mouse: device removed
[    17.748] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:1267:0213.0001/input/input0/event0"
[    17.748] (II) XINPUT: Adding extended input device "PS/2+USB Mouse" (type: MOUSE, id 8)
[    17.749] (**) Option "AccelerationScheme" "none"
[    17.749] (**) PS/2+USB Mouse: (accel) selected scheme none/0
[    17.749] (**) PS/2+USB Mouse: (accel) acceleration factor: 2.000
[    17.749] (**) PS/2+USB Mouse: (accel) acceleration threshold: 4
[    17.759] (II) event0  - PS/2+USB Mouse: is tagged by udev as: Mouse
[    17.760] (II) event0  - PS/2+USB Mouse: device is a pointer
[    17.766] (II) config/udev: Adding input device PS/2+USB Mouse (/dev/input/mouse0)
[    17.766] (II) No input driver specified, ignoring this device.
[    17.767] (II) This device may have been added with another device file.
[    17.773] (II) config/udev: Adding input device Mitsumi Electric Apple Extended USB Keyboard (/dev/input/event1)
[    17.773] (**) Mitsumi Electric Apple Extended USB Keyboard: Applying InputClass "libinput keyboard catchall"
[    17.773] (II) Using input driver 'libinput' for 'Mitsumi Electric Apple Extended USB Keyboard'
[    17.773] (**) Mitsumi Electric Apple Extended USB Keyboard: always reports core events
[    17.773] (**) Option "Device" "/dev/input/event1"
[    17.773] (**) Option "_source" "server/udev"
[    17.785] (II) event1  - Mitsumi Electric Apple Extended USB Keyboard: is tagged by udev as: Keyboard
[    17.786] (II) event1  - Mitsumi Electric Apple Extended USB Keyboard: device is a keyboard
[    17.787] (II) event1  - Mitsumi Electric Apple Extended USB Keyboard: device removed
[    17.804] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4.3/1-1.4.3:1.0/0003:05AC:020C.0002/input/input1/event1"
[    17.804] (II) XINPUT: Adding extended input device "Mitsumi Electric Apple Extended USB Keyboard" (type: KEYBOARD, id 9)
[    17.804] (**) Option "xkb_model" "apple"
[    17.804] (**) Option "xkb_layout" "fi"
[    17.804] (**) Option "xkb_variant" "mac"
[    17.898] (II) event1  - Mitsumi Electric Apple Extended USB Keyboard: is tagged by udev as: Keyboard
[    17.899] (II) event1  - Mitsumi Electric Apple Extended USB Keyboard: device is a keyboard
[    17.907] (II) config/udev: Adding input device Mitsumi Electric Apple Extended USB Keyboard System Control (/dev/input/event2)
[    17.907] (**) Mitsumi Electric Apple Extended USB Keyboard System Control: Applying InputClass "libinput keyboard catchall"
[    17.907] (II) Using input driver 'libinput' for 'Mitsumi Electric Apple Extended USB Keyboard System Control'
[    17.907] (**) Mitsumi Electric Apple Extended USB Keyboard System Control: always reports core events
[    17.907] (**) Option "Device" "/dev/input/event2"
[    17.907] (**) Option "_source" "server/udev"
[    17.919] (II) event2  - Mitsumi Electric Apple Extended USB Keyboard System Control: is tagged by udev as: Keyboard
[    17.919] (II) event2  - Mitsumi Electric Apple Extended USB Keyboard System Control: device is a keyboard
[    17.920] (II) event2  - Mitsumi Electric Apple Extended USB Keyboard System Control: device removed
[    17.948] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4.3/1-1.4.3:1.1/0003:05AC:020C.0003/input/input2/event2"
[    17.948] (II) XINPUT: Adding extended input device "Mitsumi Electric Apple Extended USB Keyboard System Control" (type: KEYBOARD, id 10)
[    17.948] (**) Option "xkb_model" "apple"
[    17.948] (**) Option "xkb_layout" "fi"
[    17.948] (**) Option "xkb_variant" "mac"
[    17.961] (II) event2  - Mitsumi Electric Apple Extended USB Keyboard System Control: is tagged by udev as: Keyboard
[    17.961] (II) event2  - Mitsumi Electric Apple Extended USB Keyboard System Control: device is a keyboard
[    17.969] (II) config/udev: Adding input device Mitsumi Electric Apple Extended USB Keyboard Consumer Control (/dev/input/event3)
[    17.969] (**) Mitsumi Electric Apple Extended USB Keyboard Consumer Control: Applying InputClass "libinput keyboard catchall"
[    17.969] (II) Using input driver 'libinput' for 'Mitsumi Electric Apple Extended USB Keyboard Consumer Control'
[    17.969] (**) Mitsumi Electric Apple Extended USB Keyboard Consumer Control: always reports core events
[    17.969] (**) Option "Device" "/dev/input/event3"
[    17.969] (**) Option "_source" "server/udev"
[    17.982] (II) event3  - Mitsumi Electric Apple Extended USB Keyboard Consumer Control: is tagged by udev as: Keyboard
[    17.982] (II) event3  - Mitsumi Electric Apple Extended USB Keyboard Consumer Control: device is a keyboard
[    17.983] (II) event3  - Mitsumi Electric Apple Extended USB Keyboard Consumer Control: device removed
[    18.004] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4.3/1-1.4.3:1.1/0003:05AC:020C.0003/input/input3/event3"
[    18.004] (II) XINPUT: Adding extended input device "Mitsumi Electric Apple Extended USB Keyboard Consumer Control" (type: KEYBOARD, id 11)
[    18.004] (**) Option "xkb_model" "apple"
[    18.004] (**) Option "xkb_layout" "fi"
[    18.004] (**) Option "xkb_variant" "mac"
[    18.017] (II) event3  - Mitsumi Electric Apple Extended USB Keyboard Consumer Control: is tagged by udev as: Keyboard
[    18.017] (II) event3  - Mitsumi Electric Apple Extended USB Keyboard Consumer Control: device is a keyboard
[    18.057] (**) vc4-hdmi: Applying InputClass "libinput keyboard catchall"
[    18.057] (II) Using input driver 'libinput' for 'vc4-hdmi'
[    18.058] (**) vc4-hdmi: always reports core events
[    18.058] (**) Option "Device" "/dev/input/event4"
[    18.058] (**) Option "_source" "_driver/libinput"
[    18.058] (II) libinput: vc4-hdmi: is a virtual subdevice
[    18.058] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f902000.hdmi/rc/rc0/input4/event4"
[    18.058] (II) XINPUT: Adding extended input device "vc4-hdmi" (type: KEYBOARD, id 12)
[    18.058] (**) Option "xkb_model" "apple"
[    18.058] (**) Option "xkb_layout" "fi"
[    18.058] (**) Option "xkb_variant" "mac"
[    18.109] (II) config/udev: Adding input device generic ft5x06 (79) (/dev/input/mouse1)
[    18.109] (II) No input driver specified, ignoring this device.
[    18.109] (II) This device may have been added with another device file.
[    18.110] (II) config/udev: removing device generic ft5x06 (79)
[    18.110] (II) event5  - generic ft5x06 (79): device removed
[    18.144] (II) UnloadModule: "libinput"
[    18.147] (II) config/udev: Adding input device generic ft5x06 (79) (/dev/input/event5)
[    18.147] (**) generic ft5x06 (79): Applying InputClass "libinput touchscreen catchall"
[    18.147] (II) Using input driver 'libinput' for 'generic ft5x06 (79)'
[    18.147] (**) generic ft5x06 (79): always reports core events
[    18.147] (**) Option "Device" "/dev/input/event5"
[    18.148] (**) Option "_source" "server/udev"
[    18.159] (II) event5  - generic ft5x06 (79): is tagged by udev as: Touchscreen
[    18.163] (II) event5  - generic ft5x06 (79): device is a touch device
[    18.165] (II) event5  - generic ft5x06 (79): device removed
[    18.208] (**) Option "config_info" "udev:/sys/devices/platform/soc/3f205000.i2c/i2c-11/i2c-10/10-0038/input/input5/event5"
[    18.208] (II) XINPUT: Adding extended input device "generic ft5x06 (79)" (type: TOUCHSCREEN, id 6)
[    18.208] (**) Option "AccelerationScheme" "none"
[    18.208] (**) generic ft5x06 (79): (accel) selected scheme none/0
[    18.208] (**) generic ft5x06 (79): (accel) acceleration factor: 2.000
[    18.208] (**) generic ft5x06 (79): (accel) acceleration threshold: 4
[    18.219] (II) event5  - generic ft5x06 (79): is tagged by udev as: Touchscreen
[    18.223] (II) event5  - generic ft5x06 (79): device is a touch device
[    22.820] (II) modeset(0): Disabling kernel dirty updates, not required.
[   135.772] (EE) 
[   135.773] (EE) Backtrace:
[   135.781] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x188) [0x555de30518]
[   135.782] (EE) unw_get_proc_info failed: no unwind info found [-10]
[   135.782] (EE) 
[   135.782] (EE) Segmentation fault at address 0x798a9200798a92
[   135.782] (EE) 
Fatal server error:
[   135.783] (EE) Caught signal 11 (Segmentation fault). Server aborting
[   135.783] (EE) 
[   135.783] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[   135.783] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   135.783] (EE) 
[   135.853] (EE) Server terminated with error (1). Closing log file.
aakoskin commented 1 year ago

Rotation works when glamor is enabled (raspi-config, Advanced Options > Enable/disable glamor graphics acceleration).

XECDesign commented 1 year ago

@popcornmix Is this an issue or is the non-glamour use case no longer supported?

popcornmix commented 1 year ago

I believe using gl is the only way rotation is handled in drm/kms world. So, I would expect rotation to not work when glamor (hence gl rendering) is disabled.

The seg fault shouldn't really happen though. And it might be nice if choosing rotation + no glamor results in a "screen rotation requires glamor, do you want to enable" type dialogue.

aBUGSworstnightmare-rpi commented 1 year ago

I believe using gl is the only way rotation is handled in drm/kms world. So, I would expect rotation to not work when glamor (hence gl rendering) is disabled.

The seg fault shouldn't really happen though. And it might be nice if choosing rotation + no glamor results in a "screen rotation requires glamor, do you want to enable" type dialogue.

Sorry, but can you explain why one would need glamor on devices <2GB RAM in order to rotate the display?

Just posted some results here https://forums.raspberrypi.com/viewtopic.php?p=2094323#p2094323: rotated a display on a Pi3B with no issues - without glamor enabled

aakoskin commented 1 year ago

Just posted some results here https://forums.raspberrypi.com/viewtopic.php?p=2094323#p2094323: rotated a display on a Pi3B with no issues - without glamor enabled

Can you share the Xorg log from the working system?

Just in case, I also tried the 32-bit install image, it was still the same. Then I made a fresh install using 64-bit "Raspberry Pi OS with desktop" image on another RPi3B, using just a HDMI monitor, and again the behavior is the same. Rotation crashes Xorg unless glamor is enabled. I also noticed that during the setup phase, if I select "Reduce the size of the desktop..." with HDMI monitor, there is a similar crash.

So perhaps there is something wrong with the install image? Some module/package/dependency missing etc.

aBUGSworstnightmare-rpi commented 1 year ago

Hmm .. that seems to be 'one time lucky punch'! Tried to replicate it but not possible. X-crashes and restarts with logon-screen.

Sorry, but no idea why it has worked yesterday but refuses to work today. Also tested with a fresh install -> not working.

aakoskin commented 1 year ago

Hmm .. that seems to be 'one time lucky punch'! Tried to replicate it but not possible. X-crashes and restarts with logon-screen.

Sorry, but no idea why it has worked yesterday but refuses to work today. Also tested with a fresh install -> not working.

I found out that it will work if you edit /usr/share/X11/xorg.conf.d/20-noglamor.conf and replace:

Option "AccelMethod" "msdri3" with Option "AccelMethod" "none"

It seems that "msdri3" is something that is newly introduced for older Pi devices (< 4), and the previous disable glamor setting was "none". Probably what happened to you was that you played around with raspi-config so that it rewrote the file with that new setting (and the previous file was from an older install, maybe check from a timestamp of the file).

The acceleration option in raspi-config should be tristate: glamor, msdri3 or none. The current one is totally confusing. Also msdri3 should NOT be enabled by default as it clearly has issues.

aakoskin commented 1 year ago

This is probably the change after which the rotation got broken:

xorg-server (2:1.20.11-1+rpt1+deb11u5) bullseye; urgency=medium

  * glamor: Avoid using GL_QUADS on V3D
  * fb: do not use pixman_blt to perform copies. This is faster on Raspberry
    Pi
  * modesetting: Add DRI3 support to modesetting without glamor
  [ Simon Long ]
  * Enable dmabuf by default

 -- Rob Thomas <rob.thomas@raspberrypi.com>  Thu, 09 Feb 2023 15:15:54 +0000
aakoskin commented 1 year ago

The issue is now fixed in today's xorg-server update. Great job, thanks!

xorg-server (2:1.20.11-1+rpt3+deb11u6) bullseye; urgency=medium

  * modesetting: msdri3 should use dumb buffers for randr
    - https://github.com/RPi-Distro/repo/issues/324

  [ Rob Thomas ]
  * modesetting: Fix DPMS behaviour on all RPi devices
  * glamor: Avoid using GL_QUADS on V3D
  * fb: do not use pixman_blt to perform copies. This is faster on Raspberry
    Pi
  * modesetting: Add DRI3 support to modesetting without glamor

  [ Simon Long ]
  * Enable dmabuf by default

 -- Serge Schneider <serge@raspberrypi.com>  Thu, 30 Mar 2023 14:46:14 +0100