<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>40663</bug_id>
          
          <creation_ts>2021-08-05 18:51:18 +0300</creation_ts>
          <short_desc>gnome-shell не работает на плате TF307 (процессор BE-M1000)</short_desc>
          <delta_ts>2022-08-23 16:48:24 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>mutter</component>
          <version>unstable</version>
          <rep_platform>aarch64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Sheplyakov">asheplyakov</reporter>
          <assigned_to name="Yuri N. Sedunov">aris</assigned_to>
          <cc>aris</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>201263</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-08-05 18:51:18 +0300</bug_when>
    <thetext>Загружаю систему с http://nightly.altlinux.org/p10-aarch64/beta/alt-p10-gnome3-20210728-aarch64.iso

Сразу после попытки запуска GDM - чёрный экран.
В логах полно сообщений вида:

gnome-shell[1608]: meta_drm_buffer_gbm_new_lock_front failed: drmModeAddFB2WithModifiers failed: Invalid argument</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201265</commentid>
    <comment_count>1</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2021-08-06 07:57:10 +0300</bug_when>
    <thetext>На Sisyphus, так как по версиям почти не отличаются.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201266</commentid>
    <comment_count>2</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2021-08-06 08:55:49 +0300</bug_when>
    <thetext>panfrost?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201282</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-08-06 13:49:51 +0300</bug_when>
    <thetext>(In reply to Yuri N. Sedunov from comment #2)
&gt; panfrost?

Да.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201283</commentid>
    <comment_count>4</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2021-08-06 14:02:18 +0300</bug_when>
    <thetext>Попробуйте в /lib/udev/rules.d/61-mutter.rules добавить строчку для вашего драйвера:

DRIVERS==&quot;panfrost&quot;, SUBSYSTEM==&quot;drm&quot;, TAG+=&quot;mutter-device-disable-kms-modifiers&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201373</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-08-09 22:38:12 +0300</bug_when>
    <thetext>(In reply to Yuri N. Sedunov from comment #4)
&gt; Попробуйте в /lib/udev/rules.d/61-mutter.rules добавить строчку для вашего
&gt; драйвера:
&gt; 
&gt; DRIVERS==&quot;panfrost&quot;, SUBSYSTEM==&quot;drm&quot;,
&gt; TAG+=&quot;mutter-device-disable-kms-modifiers&quot;


Всё равно чёрный экран, и всё равно:

gnome-shell[1364]: Failed to open gpu &apos;/dev/dri/card1&apos;: Failed to activate universal planes: Operation not permitted
gnome-shell[1364]: Adding device &apos;/dev/dri/card0&apos; (baikal-vdu) using atomic mode setting.
gnome-shell[1364]: Integrated GPU /dev/dri/card0 selected as primary
gnome-shell[1364]: Disabling DMA buffer screen sharing for driver &apos;baikal-vdu&apos;.

gnome-shell[1364]: meta_drm_buffer_gbm_new_lock_front failed: drmModeAddFB2WithModifiers failed: Invalid argument
gnome-shell[1364]: meta_drm_buffer_gbm_new_lock_front failed: drmModeAddFB2WithModifiers failed: Invalid argument
gnome-shell[1364]: meta_drm_buffer_gbm_new_lock_front failed: drmModeAddFB2WithModifiers failed: Invalid argument


При этом правило таки применилось:

# udevadm info -q all -n  /dev/dri/by-path/platform-2a200000.gpu-card 
P: /devices/platform/soc/2a200000.gpu/drm/card1
N: dri/card1
L: 0
S: dri/by-path/platform-2a200000.gpu-card
E: DEVPATH=/devices/platform/soc/2a200000.gpu/drm/card1
E: DEVNAME=/dev/dri/card1
E: DEVTYPE=drm_minor
E: MAJOR=226
E: MINOR=1
E: SUBSYSTEM=drm
E: USEC_INITIALIZED=369391410
E: ID_PATH=platform-2a200000.gpu
E: ID_PATH_TAG=platform-2a200000_gpu
E: ID_FOR_SEAT=drm-platform-2a200000_gpu
E: DEVLINKS=/dev/dri/by-path/platform-2a200000.gpu-card
E: TAGS=:mutter-device-disable-kms-modifiers:uaccess:master-of-seat:seat:
E: CURRENT_TAGS=:mutter-device-disable-kms-modifiers:uaccess:master-of-seat:seat:

И я перезапустил gdm после того, как проверил, что правило сработало (появился &apos;mutter-device-disable-kms-modifiers&apos;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201374</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-08-09 22:56:02 +0300</bug_when>
    <thetext>При этом драйвер работоспособен в следующем смысле:

1) weston успешно запускается
2) glmark2-es2-wayland --annotate --fullscreen частично работает [1],  сообщает, что GL_RENDERER: Mali T620 (Panfrost), и показывает трёхзначные FPS (что явно недостижимо при программном рендеринге)

[1] Частично - поскольку падает на shadow benchmark</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201379</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-08-10 01:35:56 +0300</bug_when>
    <thetext>(In reply to Alexey Sheplyakov from comment #6)
&gt; При этом драйвер работоспособен в следующем смысле:
&gt; 
&gt; 1) weston успешно запускается

И пишет:

using /dev/dri/card0
DRM: supports atomic modesetting
DRM: does not support GBM modifiers
DRM: supports picture aspect ratio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201380</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-08-10 01:41:30 +0300</bug_when>
    <thetext>Вот такой костыль сработал:

DRIVERS==&quot;baikal-vdu&quot;, SUBSYSTEM==&quot;drm&quot;, TAG+=&quot;mutter-device-disable-kms-modifiers&quot;

Судя по weston, gnome-shell вполне мог бы и сам догадаться, что &quot;does not support GBM modifiers&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201382</commentid>
    <comment_count>9</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2021-08-10 09:13:48 +0300</bug_when>
    <thetext>mutter-1:40.3-alt1.1 -&gt; sisyphus:

 Tue Aug 10 2021 Yuri N. Sedunov &lt;aris@altlinux&gt; 1:40.3-alt1.1
 - data/61-mutter.rules:
   disabled KMS modifiers for &quot;baikal-vdu&quot; driver (ALT #40663)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201416</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-08-11 08:05:15 +0300</bug_when>
    <thetext>&gt; disabled KMS modifiers for &quot;baikal-vdu&quot;

Это, конечно, очень хорошо. Но для каждой платы/видеокарты сочинять костыли - это не здорово. weston как-то догадывается сам:

using /dev/dri/card0
DRM: supports atomic modesetting
DRM: does not support GBM modifiers

А gnome-shell чем хуже?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201417</commentid>
    <comment_count>11</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2021-08-11 08:16:40 +0300</bug_when>
    <thetext>Вешайте на каждую отдельно, сразу в апстрим. Эта бага закрыта.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213944</commentid>
    <comment_count>12</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2022-08-23 16:48:24 +0300</bug_when>
    <thetext>авг 23 17:45:03 asheplyakov-bmlaptop gnome-shell[16138]: meta_drm_buffer_gbm_new_lock_front failed: drmModeAddFB2WithModifiers failed: Недопустимый аргумент
авг 23 17:45:03 asheplyakov-bmlaptop gnome-shell[16138]: meta_drm_buffer_gbm_new_lock_front failed: drmModeAddFB2WithModifiers failed: Недопустимый аргумент
авг 23 17:45:03 asheplyakov-bmlaptop gnome-shell[16138]: Registering session with GDM</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>