Open SebDE opened 2 years ago
@SebDE A couple of things to check:
--platform=drm
, Cog will take care of handling the video output directly, a graphics server/compositor is not needed.G_MESSAGES_DEBUG=Cog-DRM
in the environment and run Cog again? The log could be useful to determine what the issue is.Thanks in advance!
@aperezdc Many thanks for your reply and the tipps:
There was already a weston process running - I was thinking that COG needs / uses a weston session, but now you made it clear for me. Now cog starts without the permission denied warning and renders something to the screen - but it looks very strange:
The imx8m-mini should have the following GPUs: Graphic Processing Unit: Vivante GCNanoUltra for 3D acceleration, Vivante GC320 for 2D acceleration
In case of the driver I'm not really sure: If I look at the loaded kernel modules I see the galcore module, which should be the driver for the vivante gpus
root@imx8mm-var-dart:~# lsmod
Module Size Used by
rfcomm 53248 12
bnep 28672 2
hci_uart 40960 1
btbcm 20480 1 hci_uart
brcmfmac 253952 0
cfg80211 393216 1 brcmfmac
brcmutil 16384 1 brcmfmac
hid_generic 16384 0
bluetooth 450560 41 hci_uart,btbcm,bnep,rfcomm
usbhid 32768 0
ecdh_generic 16384 1 bluetooth
ecc 32768 1 ecdh_generic
libaes 16384 1 bluetooth
mcp251xfd 45056 0
ads7846 20480 0
can_dev 36864 1 mcp251xfd
spidev 24576 0
ci_hdrc_imx 24576 0
ci_hdrc 61440 1 ci_hdrc_imx
ehci_hcd 65536 1 ci_hdrc
ulpi 16384 1 ci_hdrc
udc_core 32768 1 ci_hdrc
roles 16384 1 ci_hdrc
usbcore 266240 3 usbhid,ehci_hcd,ci_hdrc
phy_generic 16384 2
usbmisc_imx 24576 1 ci_hdrc_imx
snd_soc_simple_card 20480 0
snd_soc_simple_card_utils 16384 1 snd_soc_simple_card
snd_soc_fsl_sai 32768 2
snd_soc_wm8904 65536 1
imx_pcm_dma_v2 16384 1 snd_soc_fsl_sai
snd_soc_core 180224 5 imx_pcm_dma_v2,snd_soc_simple_card_utils,snd_soc_simple_card,snd_soc_fsl_sai,snd_soc_wm8904
snd_pcm_dmaengine 20480 2 imx_pcm_dma_v2,snd_soc_core
snd_pcm 126976 5 imx_pcm_dma_v2,snd_soc_core,snd_soc_fsl_sai,snd_soc_wm8904,snd_pcm_dmaengine
snd_timer 45056 1 snd_pcm
snd 81920 4 snd_timer,snd_soc_core,snd_pcm,snd_soc_wm8904
imx_sdma 36864 2
spi_imx 28672 0
hx280enc 24576 0
extcon_usb_gpio 16384 0
hantrodec_845s 36864 0
nfsd 106496 1
galcore 421888 0
fuse 131072 1
ipv6 454656 50
root@imx8mm-var-dart:~# find /dev -group video /dev/galcore /dev/fb0 /dev/dri/card1 /dev/dri/card0 /dev/video0
Here is the output of:
root@imx8mm-var-dart:~# G_MESSAGES_DEBUG=Cog-DRM cog http://neverssl.com Cog-INFO: 08:23:42.021: com.igalia.Cog.Platform: Cog-INFO: 08:23:42.026: drm - 200/CogDrmPlatform (cog:863): Cog-DEBUG: 08:23:42.047: platform_setup: Platform name: (null) (cog:863): Cog-DRM-DEBUG: 08:23:42.055: init_config: overriding device_scale value, using 1.00 from shell (cog:863): Cog-DRM-DEBUG: 08:23:42.056: init_drm: enumerated device 0xaaaaecefeab0, available_nodes 5 (cog:863): Cog-DRM-DEBUG: 08:23:42.056: init_drm: DRM_NODE_PRIMARY: /dev/dri/card1 (cog:863): Cog-DRM-DEBUG: 08:23:42.056: init_drm: DRM_NODE_RENDER: /dev/dri/renderD128 (cog:863): Cog-DRM-DEBUG: 08:23:42.056: init_drm: enumerated device 0xaaaaecefefd0, available_nodes 1 (cog:863): Cog-DRM-DEBUG: 08:23:42.056: init_drm: DRM_NODE_PRIMARY: /dev/dri/card0 (cog:863): Cog-DRM-DEBUG: 08:23:42.056: init_drm: using device 0xaaaaecefefd0, DRM_NODE_PRIMARY /dev/dri/card0 (cog:863): Cog-DRM-DEBUG: 08:23:42.056: init_drm: 1 connectors available (cog:863): Cog-DRM-DEBUG: 08:23:42.057: init_drm: connector id 35, type 16, connected, 1 usable modes (cog:863): Cog-DRM-DEBUG: 08:23:42.057: init_drm: [0]: '800x480', 800x480@68, flags 10, type 72 (preferred) (cog:863): Cog-DRM-DEBUG: 08:23:42.057: init_drm: using connector id 35, type 16 (cog:863): Cog-DRM-DEBUG: 08:23:42.057: init_drm: using mode [0] '800x480' libinput error: event4 - ADS7846 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE (cog:863): Cog-DEBUG: 08:23:42.160: platform_setup: Selected CogDrmPlatform @ 0xaaaaecea06a0
(cog:863): GLib-GIO-WARNING **: 08:23:42.174: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal. It should do one of these. Cog-Core-Message: 08:23:42.407: http://neverssl.com/ Load started. Cog-Core-Message: 08:23:42.414: http://neverssl.com/ Loading... Cog-Core-Message: 08:23:42.427: http://neverssl.com/ Loaded successfully. Cog-Core-Message: 08:23:42.428: http://neverssl.com/ Load started. Cog-Core-Message: 08:23:42.609: http://funclearsublimesong.neverssl.com/online Loading... Cog-Core-Message: 08:23:42.696: http://funclearsublimesong.neverssl.com/online Loaded successfully.
Many thanks !
Ps: But if I remeber right @philn wrote somewhere else that he has already an imx8 module with a running configuration? Maybe he can share the configuration or have a quick look?
Sorry I can't help much about this, I haven't worked on imx8 for a couple years and it was on a downstream, heavily patched BSP anyway.
@SebDE: Thanks for commenting and trying out things 😺 — a couple of observations:
galcore
kernel module is part of it. The other option would be using the etnaviv
driver (which is the open source one). While in theory things should work, the proprietary driver with the DRM plug-in is not as tested as other setups, which is why we have this issue still open: https://github.com/Igalia/cog/issues/211G_MESSAGES_DEBUG=Cog-DRM
there aren't further hints about the reason for the garbled screen.800x480@68
being the mode) is a little bit suspicious, I would expect a more standard refresh rate like 60, 72, or 75Hz. If you run Weston, does it also report 68Hz being used? Your output seems to be a touch screen panel (as indicated by the libinput warning), I am curious to know how it is connected to the SoC, maybe it is using the LVDS interface? If that's the case, is there any chance that the touch screen panel video timings are a bit off? (for example the way in which they are declared in the device-tree are slightly out of spec, or the timer being assigned in the device-tree for the LVDS bus cannot be used to produce a standard frequency?) — Note that I am not saying things are necessarily wrong in your case: if Weston can produce output, we should be able to fix Cog to be able to drive your panel; I am just curious about the strange 68Hz refresh rate 😺 @SebDE One more comment: after I fix #401 another option will be to try building Cog from the repository and running with cog -P drm -O renderer=gles
which should be somewhat more compatible with certain drivers and has some additional checks that allow that mode be more careful choosing buffer formats that the driver can handle.
Same issue here. How to change the pixel format? @aperezdc
cog http://localhost:8081
[ 205.508219] imx-drm 32c00000.bus:display-subsystem: sn65dsi83_connector_mode_valid: mode: 800*480@25000 is valid
[ 205.518614] imx-drm 32c00000.bus:display-subsystem: sn65dsi83_connector_mode_valid: mode: 800*480@25000 is valid
(cog:1498): GLib-GIO-WARNING **: 07:31:02.304: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal. It should do one of these.
Cog-Core-Message: 07:31:02.624: <http://localhost:8081/> Load started.
[ 205.956077] sn65dsi83 1-002d: DSI clock [ 75000000 ] Hz
[ 205.961383] sn65dsi83 1-002d: GeoMetry [ 800 x 480 ] Hz
Cog-Core-Message: 07:31:02.864: <http://localhost:8081/> Loading...
Cog-Core-Message: 07:31:04.254: <http://localhost:8081/> Loaded successfully.
My display seems to be at 25kHz even, which can't be right.
@jclsn Could you set G_MESSAGES_DEBUG=Cog-DRM
in the environment and re-run? I am curious to see if there are other modes enumerated in your case.
I am not familiar with the sn65dsi83
driver, but doesn't this indicate that 75Hz gets picked in the end?
[ 205.956077] sn65dsi83 1-002d: DSI clock [ 75000000 ] Hz
@aperezdc Will try on Monday.
I btw hear often that you are focusing more on Chromium than on this project. Is that true? Asking because I need to evaluate cog
@aperezdc I set the environment variable you asked for. Here is the output
Cog-INFO: 08:01:13.836: com.igalia.Cog.Platform:
Cog-INFO: 08:01:13.845: drm - 200/CogDrmPlatform
(cog:813): Cog-DEBUG: 08:01:13.980: platform_setup: Platform name: (null)
(cog:813): Cog-DRM-DEBUG: 08:01:13.990: init_config: overriding device_scale value, using 1.00 from shell
(cog:813): Cog-DRM-DEBUG: 08:01:13.992: init_drm: enumerated device 0xaaaae670d6b0, available_nodes 5
(cog:813): Cog-DRM-DEBUG: 08:01:13.992: init_drm: DRM_NODE_PRIMARY: /dev/dri/card1
(cog:813): Cog-DRM-DEBUG: 08:01:13.993: init_drm: DRM_NODE_RENDER: /dev/dri/renderD128
(cog:813): Cog-DRM-DEBUG: 08:01:13.993: init_drm: enumerated device 0xaaaae670dbd0, available_nodes 1
(cog:813): Cog-DRM-DEBUG: 08:01:13.993: init_drm: DRM_NODE_PRIMARY: /dev/dri/card0
(cog:813): Cog-DRM-DEBUG: 08:01:13.993: init_drm: using device 0xaaaae670dbd0, DRM_NODE_PRIMARY /dev/dri/card0
(cog:813): Cog-DRM-DEBUG: 08:01:13.993: init_drm: 1 connectors available
(cog:813): Cog-DRM-DEBUG: 08:01:14.004: init_drm: connector id 35, type 16, connected, 1 usable modes
(cog:813): Cog-DRM-DEBUG: 08:01:14.004: init_drm: [0]: '800x480', 800x480@59, flags 10, type 72 (preferred)
(cog:813): Cog-DRM-DEBUG: 08:01:14.014: init_drm: using connector id 35, type 16
(cog:813): Cog-DRM-DEBUG: 08:01:14.015: init_drm: using mode [0] '800x480'
(cog:813): Cog-DEBUG: 08:01:14.040: platform_setup: Selected CogDrmPlatform @ 0xaaaae66af6a0
(cog:813): GLib-GIO-WARNING **: 08:01:14.086: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal. It should do one of these.
Cog-Core-Message: 08:01:14.662: <http://localhost:8081/> Load started.
Cog-Core-Message: 08:01:14.939: <http://localhost:8081/> Loading...
Cog-Core-Message: 08:01:16.381: <http://localhost:8081/> Loaded successfully.
I am not familiar with the sn65dsi83 driver, but doesn't this indicate that 75Hz gets picked in the end?
Not sure. It says Hz not µHz. I would assume that everything is correct here though, because Chromium works without issues.
@aperezdc - Thanks for the hints and explanation. I will try to make a build with the etnaviv driver (at the moment I don't know how, but hopefully I will find the needed informations). I also collected some informations about the lcd, but first of all: I'm able to run a session with a wayland terminal without problems. But your totally right, the 68Hz are very weird. I'm using an evaluation kit from Variscite and there is also a wiki with some informations.
... equipped with SN65DSI84 MIPI-DSI to LVDS bridge ... evaluation kit comes with 800x480 LCD panel. DART-MX8M-MINI DTS file was created with this panel in mind
Here is the configuration from the device-tree
dsi_lvds_bridge: sn65dsi84@2c {
compatible = "ti,sn65dsi83";
reg = <0x2c>;
ti,dsi-lanes = <4>;
ti,lvds-format = <1>;
ti,lvds-bpp = <24>;
ti,lvds-channels = <1>;
ti,width-mm = <154>;
ti,height-mm = <87>;
enable-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lvds>;
status = "okay";
display-timings {
lvds {
clock-frequency = <33000000>;
hactive = <800>;
vactive = <480>;
hback-porch = <40>;
hfront-porch = <40>;
vback-porch = <29>;
vfront-porch = <13>;
hsync-len = <48>;
vsync-len = <3>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
port {
lvds_in: endpoint {
remote-endpoint = <&dsi_out>;
};
};
};
I also searched for some informations in /var/log/messages
Mar 01 17:14:25 imx8mm-var-dart kernel: sn65dsi83 0-002c: DSI clock [ 99000000 ] Hz
Mar 01 17:14:25 imx8mm-var-dart kernel: sn65dsi83 0-002c: Resolution [ 800 x 480 ]
Mar 01 17:14:25 imx8mm-var-dart kernel: sn65dsi83 0-002c: lvds_clk=33000000 lvds_clk_range=0x0
Mar 01 17:14:25 imx8mm-var-dart kernel: sn65dsi83 0-002c: dsi_clk_range=0x13
Mar 01 17:14:25 imx8mm-var-dart kernel: sn65dsi83 0-002c: dsi_clk_div=0x2
...
Mar 01 17:15:47 imx8mm-var-dart kernel: sn65dsi83 0-002c: DSI clock [ 99000000 ] Hz
Mar 01 17:15:47 imx8mm-var-dart kernel: sn65dsi83 0-002c: Resolution [ 800 x 480 ]
Mar 01 17:15:47 imx8mm-var-dart kernel: sn65dsi83 0-002c: lvds_clk=33000000 lvds_clk_range=0x0
Mar 01 17:15:47 imx8mm-var-dart kernel: sn65dsi83 0-002c: dsi_clk_range=0x13
Mar 01 17:15:47 imx8mm-var-dart kernel: sn65dsi83 0-002c: dsi_clk_div=0x2
Mar 01 17:16:05 imx8mm-var-dart kernel: sn65dsi83 0-002c: DSI clock [ 99000000 ] Hz
Mar 01 17:16:05 imx8mm-var-dart kernel: sn65dsi83 0-002c: Resolution [ 800 x 480 ]
Mar 01 17:16:05 imx8mm-var-dart kernel: sn65dsi83 0-002c: lvds_clk=33000000 lvds_clk_range=0x0
Mar 01 17:16:05 imx8mm-var-dart kernel: sn65dsi83 0-002c: dsi_clk_range=0x13
Mar 01 17:16:05 imx8mm-var-dart kernel: sn65dsi83 0-002c: dsi_clk_div=0x2
Mar 01 17:20:44 imx8mm-var-dart kernel: sn65dsi83 0-002c: DSI clock [ 99000000 ] Hz
Mar 01 17:20:44 imx8mm-var-dart kernel: sn65dsi83 0-002c: Resolution [ 800 x 480 ]
Mar 01 17:20:44 imx8mm-var-dart kernel: sn65dsi83 0-002c: lvds_clk=33000000 lvds_clk_range=0x0
Mar 01 17:20:44 imx8mm-var-dart kernel: sn65dsi83 0-002c: dsi_clk_range=0x13
Mar 01 17:20:44 imx8mm-var-dart kernel: sn65dsi83 0-002c: dsi_clk_div=0x2
@jclsn : What module / panel do you use? Did you make a custom board?
I try to get cog on an imx8-mini platform up and running on a wayland / weston only system to act as a fullscreen html/js gui
I used the meta-webkit yocto layer:
meta-webkit = "hardknott:56b0544f7d9610866ca67ee574b7bf01b7fded34"
with the following build configuration:and here is my local.conf
But if I try to start cog I just got those messages and no website appears on the attached lcd
Is the following warning the problem?
(cog:574): Cog-DRM-WARNING **: 20:14:20.415: failed to schedule a page flip: Permission denied
Here is the version info
Hope someone can point me in the right direction - many thanks !