denysvitali / linux-on-pixel-c

Documentation on how to run a Linux Distro on the Google Pixel C (2015)
MIT License
60 stars 5 forks source link

Graphics Acceleration Is Missing #2

Open denysvitali opened 7 years ago

denysvitali commented 7 years ago

Currently Linux on Pixel C is missing GPU Acceleration, therefore the UI is laggy dmesg is available here

[root@alarm /]# cat /var/log/Xorg.0.log
[   899.733] 
X.Org X Server 1.19.3
Release Date: 2017-03-15
[   899.733] X Protocol Version 11, Revision 0
[   899.733] Build Operating System: Linux 3.14.65-16-ARCH aarch64 
[   899.733] Current Operating System: Linux alarm 4.13.0-rc4+ #13 SMP PREEMPT Wed Aug 9 20:46:38 UTC 2017 aarch64
[   899.733] Kernel command line: cros_secure vpr=0x08000000@0xf6800000 earlycon
[   899.733] Build Date: 13 August 2017  04:10:10PM
[   899.733]  
[   899.733] Current version of pixman: 0.34.0
[   899.733]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[   899.733] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   899.733] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Aug 16 12:00:35 2017
[   899.734] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   899.734] (==) No Layout section.  Using the first Screen section.
[   899.734] (==) No screen section available. Using defaults.
[   899.734] (**) |-->Screen "Default Screen Section" (0)
[   899.734] (**) |   |-->Monitor "<default monitor>"
[   899.734] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[   899.734] (==) Automatically adding devices
[   899.734] (==) Automatically enabling devices
[   899.734] (==) Automatically adding GPU devices
[   899.734] (==) Automatically binding GPU devices
[   899.734] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   899.734] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[   899.734]    Entry deleted from font path.
[   899.734] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[   899.734]    Entry deleted from font path.
[   899.734]    (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[   899.734] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[   899.734]    Entry deleted from font path.
[   899.734]    (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[   899.734] (==) FontPath set to:
        /usr/share/fonts/misc/,
        /usr/share/fonts/TTF/,
        /usr/share/fonts/OTF/
[   899.734] (==) ModulePath set to "/usr/lib/xorg/modules"
[   899.734] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[   899.734] (II) Loader magic: 0x1207d4d20
[   899.734] (II) Module ABI versions:
[   899.734]    X.Org ANSI C Emulation: 0.4
[   899.734]    X.Org Video Driver: 23.0
[   899.734]    X.Org XInput driver : 24.1
[   899.734]    X.Org Server Extension : 10.0
[   899.736] (++) using VT number 7

[   899.736] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[   899.737] (II) xfree86: Adding drm device (/dev/dri/card0)
[   899.742] (II) no primary bus or device found
[   899.742]    falling back to /sys/devices/platform/50000000.host1x/drm/drm/card0
[   899.742] (II) LoadModule: "glx"
[   899.742] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   899.751] (II) Module glx: vendor="X.Org Foundation"
[   899.751]    compiled for 1.19.3, module version = 1.0.0
[   899.751]    ABI class: X.Org Server Extension, version 10.0
[   899.751] (==) Matched modesetting as autoconfigured driver 0
[   899.751] (==) Matched fbdev as autoconfigured driver 1
[   899.751] (==) Assigned the driver to the xf86ConfigLayout
[   899.751] (II) LoadModule: "modesetting"
[   899.751] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   899.751] (II) Module modesetting: vendor="X.Org Foundation"
[   899.751]    compiled for 1.19.3, module version = 1.19.3
[   899.751]    Module class: X.Org Video Driver
[   899.751]    ABI class: X.Org Video Driver, version 23.0
[   899.752] (II) LoadModule: "fbdev"
[   899.752] (WW) Warning, couldn't open module fbdev
[   899.752] (II) UnloadModule: "fbdev"
[   899.752] (II) Unloading fbdev
[   899.752] (EE) Failed to load module "fbdev" (module does not exist, 0)
[   899.752] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   899.758] (II) modeset(0): using drv /dev/dri/card0
[   899.759] (II) modeset(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[   899.759] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[   899.759] (==) modeset(0): RGB weight 888
[   899.759] (==) modeset(0): Default visual is TrueColor
[   899.759] (II) Loading sub module "glamoregl"
[   899.759] (II) LoadModule: "glamoregl"
[   899.759] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[   899.761] (II) Module glamoregl: vendor="X.Org Foundation"
[   899.761]    compiled for 1.19.3, module version = 1.0.0
[   899.761]    ABI class: X.Org ANSI C Emulation, version 0.4
[   899.761] (II) glamor: OpenGL accelerated X.org driver based.
[   899.872] (II) glamor: EGL version 1.4 (DRI2):
[   899.872] EGL_MESA_drm_image required.
[   899.873] (EE) modeset(0): glamor initialization failed
[   899.873] (II) modeset(0): ShadowFB: preferred NO, enabled NO
[   899.873] (II) modeset(0): Output DSI-1 has no monitor section
[   899.873] (II) modeset(0): EDID for output DSI-1
[   899.873] (II) modeset(0): Printing probed modes for output DSI-1
[   899.873] (II) modeset(0): Modeline "2560x1800"x60.0  304.42  2560 2640 2720 2800  1800 1804 1808 1812 (108.7 kHz)
[   899.873] (II) modeset(0): Output DSI-1 connected
[   899.873] (II) modeset(0): Using sloppy heuristic for initial modes
[   899.873] (II) modeset(0): Output DSI-1 using initial mode 2560x1800 +0+0
[   899.873] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[   899.873] (==) modeset(0): DPI set to (96, 96)
[   899.873] (II) Loading sub module "fb"
[   899.873] (II) LoadModule: "fb"
[   899.874] (II) Loading /usr/lib/xorg/modules/libfb.so
[   899.874] (II) Module fb: vendor="X.Org Foundation"
[   899.874]    compiled for 1.19.3, module version = 1.0.0
[   899.874]    ABI class: X.Org ANSI C Emulation, version 0.4
[   899.874] (==) Depth 24 pixmap format is 32 bpp
[   899.897] (==) modeset(0): Backing store enabled
[   899.897] (==) modeset(0): Silken mouse enabled
[   899.897] (II) modeset(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[   899.897] (==) modeset(0): DPMS enabled
[   899.897] (--) RandR disabled
[   899.909] (II) AIGLX: Screen 0 is not DRI2 capable
[   899.909] (EE) AIGLX: reverting to software rendering
[   899.913] (II) IGLX: enabled GLX_MESA_copy_sub_buffer
[   899.915] (II) IGLX: Loaded and initialized swrast
[   899.915] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[   899.915] (II) modeset(0): Damage tracking initialized
[   899.915] (II) modeset(0): Setting screen physical size to 677 x 476
[   900.025] (II) config/udev: Adding input device hid-over-i2c 06CB:3370 (/dev/input/event0)
[   900.025] (**) hid-over-i2c 06CB:3370: Applying InputClass "libinput touchscreen catchall"
[   900.025] (II) LoadModule: "libinput"
[   900.026] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[   900.029] (II) Module libinput: vendor="X.Org Foundation"
[   900.029]    compiled for 1.19.3, module version = 0.25.1
[   900.029]    Module class: X.Org XInput Driver
[   900.029]    ABI class: X.Org XInput driver, version 24.1
[   900.029] (II) Using input driver 'libinput' for 'hid-over-i2c 06CB:3370'
[   900.029] (**) hid-over-i2c 06CB:3370: always reports core events
[   900.029] (**) Option "Device" "/dev/input/event0"
[   900.029] (**) Option "_source" "server/udev"
[   900.030] (II) event0  - (II) hid-over-i2c 06CB:3370: (II) is tagged by udev as: Touchscreen
[   900.031] (II) event0  - (II) hid-over-i2c 06CB:3370: (II) device is a touch device
[   900.031] (II) event0  - (II) hid-over-i2c 06CB:3370: (II) device removed
[   900.064] (**) Option "config_info" "udev:/sys/devices/platform/7000c000.i2c/i2c-0/0-0020/0018:06CB:3370.0001/input/input0/event0"
[   900.064] (II) XINPUT: Adding extended input device "hid-over-i2c 06CB:3370" (type: TOUCHSCREEN, id 6)
[   900.064] (**) Option "AccelerationScheme" "none"
[   900.064] (**) hid-over-i2c 06CB:3370: (accel) selected scheme none/0
[   900.064] (**) hid-over-i2c 06CB:3370: (accel) acceleration factor: 2.000
[   900.064] (**) hid-over-i2c 06CB:3370: (accel) acceleration threshold: 4
[   900.065] (II) event0  - (II) hid-over-i2c 06CB:3370: (II) is tagged by udev as: Touchscreen
[   900.065] (II) event0  - (II) hid-over-i2c 06CB:3370: (II) device is a touch device
[   900.066] (II) config/udev: Adding input device hid-over-i2c 06CB:3370 (/dev/input/mouse0)
[   900.066] (II) No input driver specified, ignoring this device.
[   900.066] (II) This device may have been added with another device file.
[   900.067] (II) config/udev: Adding input device gpio-keys (/dev/input/event1)
[   900.067] (**) gpio-keys: Applying InputClass "libinput keyboard catchall"
[   900.067] (II) Using input driver 'libinput' for 'gpio-keys'
[   900.067] (**) gpio-keys: always reports core events
[   900.067] (**) Option "Device" "/dev/input/event1"
[   900.067] (**) Option "_source" "server/udev"
[   900.068] (II) event1  - (II) gpio-keys: (II) is tagged by udev as: Keyboard Switch
[   900.068] (II) event1  - (II) gpio-keys: (II) device is a keyboard
[   900.068] (II) event1  - (II) gpio-keys: (II) device is a switch device
[   900.068] (II) event1  - (II) gpio-keys: (II) device removed
[   900.088] (**) Option "config_info" "udev:/sys/devices/platform/gpio-keys/input/input6/event1"
[   900.088] (II) XINPUT: Adding extended input device "gpio-keys" (type: KEYBOARD, id 7)
[   900.089] (II) event1  - (II) gpio-keys: (II) is tagged by udev as: Keyboard Switch
[   900.089] (II) event1  - (II) gpio-keys: (II) device is a keyboard
[   900.089] (II) event1  - (II) gpio-keys: (II) device is a switch device
[   900.884] (II) modeset(0): Disabling kernel dirty updates, not required.
[   914.720] (II) event0  - (II) hid-over-i2c 06CB:3370: (II) device removed
[   914.756] (II) event1  - (II) gpio-keys: (II) device removed
[   915.900] (II) event0  - (II) hid-over-i2c 06CB:3370: (II) is tagged by udev as: Touchscreen
[   915.900] (II) event0  - (II) hid-over-i2c 06CB:3370: (II) device is a touch device
[   915.901] (II) event1  - (II) gpio-keys: (II) is tagged by udev as: Keyboard Switch
[   915.901] (II) event1  - (II) gpio-keys: (II) device is a keyboard
[   915.901] (II) event1  - (II) gpio-keys: (II) device is a switch device
Echelon9 commented 7 years ago

[ 4.355693] nouveau 57000000.gpu: NVIDIA GM20B (12b000a1) [ 4.361115] nouveau 57000000.gpu: imem: using IOMMU [ 4.366069] nouveau 57000000.gpu: Direct firmware load for nvidia/gm20b/gr/gpccs_inst.bin failed with error -2 [ 4.376079] nouveau 57000000.gpu: gr: failed to load gr/gpccs_inst [ 4.382260] nouveau 57000000.gpu: gr ctor failed, -2
[ 4.387387] nouveau: probe of 57000000.gpu failed with error -2

The nouveau graphics driver is looking for, but not finding, the GPU firmware files. That particular binary blob has been released in a redistributable form by nvidia.

See:

Depending upon your bootloader, those files will need to be put on your initramfs or whatever the Android bootloader looks for.

denysvitali commented 7 years ago

Thank you for your comment, I'll try to integrate the blob file in the kernel, or put it in the /lib folder.
I'll report back my findings

denysvitali commented 7 years ago

Mmm, @Echelon9 that doesn't seem to be the problem. The file is available at /usr/lib/nvidia/gm20b/gr/gpccs_inst.bin (/lib is symlinked to /usr/lib), but apparently fails to load for some (to me unknown) reason

Echelon9 commented 7 years ago

You'll want the full path to resolve to /lib/firmware/nvidia/gm20b/gr/gpccs_inst.bin in order for the kernel module to find it.

So in your approach, /lib/firmware symlinked to /usr/lib.

Echelon9 commented 7 years ago

@denysvitali any update from your further testing?

denysvitali commented 7 years ago

I'm trying to port the 4.14-rc1 kernel right now, afterwards I'll try with your suggestions. I'll report back soon! πŸ‘

denysvitali commented 7 years ago

Here is the new 4.14-rc1 dmesg

/lib is symlinked to /usr/lib

[root@alarm alarm]# ls -l /lib
lrwxrwxrwx 1 root root 7 Sep 21 19:07 /lib -> usr/lib

gpccs_inst.bin exists in /usr/lib/firmware/nvidia/gm20b/gr

[root@alarm alarm]# ls -la /usr/lib/firmware/nvidia/gm20b/gr/
total 76
drwxr-xr-x 2 root root  4096 Sep 21 19:47 .
drwxr-xr-x 5 root root  4096 Sep 21 19:08 ..
-rw-r--r-- 1 root root   576 Sep 13 19:58 fecs_bl.bin
-rw-r--r-- 1 root root  1964 Sep 13 19:58 fecs_data.bin
-rw-r--r-- 1 root root 17021 Sep 13 19:58 fecs_inst.bin
-rw-r--r-- 1 root root    76 Sep 13 19:58 fecs_sig.bin
-rw-r--r-- 1 root root  2068 Sep 13 19:58 gpccs_data.bin
-rw-r--r-- 1 root root  9964 Sep 13 19:58 gpccs_inst.bin
-rw-r--r-- 1 root root  7616 Sep 13 19:58 sw_bundle_init.bin
-rw-r--r-- 1 root root  5448 Sep 13 19:58 sw_ctx.bin
lrwxrwxrwx 1 root root    33 Sep 13 19:58 sw_method_init.bin -> ../../gm200/gr/sw_method_init.bin
-rw-r--r-- 1 root root  1432 Sep 13 19:58 sw_nonctx.bin
[root@alarm alarm]# cat /sys/module/nouveau/parameters/modeset
-1

Some users on Arch Linux Forums suggest to set this kernel flag: nouveau.config=NvGrUseFW=1

I tried to add it, but the result is exactly the same. I also tried to add drm.atomic=1 firmware_class.path=/lib/firmware, but I get the same results: the binary doesn't get loaded

denysvitali commented 7 years ago

May be helpful later: https://www.phoronix.com/scan.php?page=news_item&px=Tegra-2-Video-Decode-Driver-V3

Echelon9 commented 7 years ago

Probably not, that relates to the older Tegra 2 GPUs. This device has a Maxwell series GPU.

denysvitali commented 7 years ago

Yeah, realized after I posted. Brainfart :P

mirh commented 7 years ago

Ideas

denysvitali commented 7 years ago

Maybe @Gnurou can help us, somehow

Gnurou commented 7 years ago

Mmm, everything seems to be in place, so I am not sure what happens here. I happen to own a Pixel C, so maybe I can try to reproduce and investigate. However I would like to avoid flashing it since I use it for work too. Has someone ever tried to boot off an external SD card and using just fastboot boot, instead of flashing?

I also think X may still require some extra patching to take advantage of HW acceleration, I can check that once the firmware issue is solved.

denysvitali commented 7 years ago

@Gnurou The cleanest way to do it is to format the system partition (doesn't contain any personal data) and put the Arch Linux Arm files there (rootfs). I'll post my system.img here in a few minutes, so you can try it out.

For the kernel, you can try with my latest build (from lightbar-fix branch). This kernel boots from /system/, therefore your /data partition isn't touched at all.

Kernel

This build assumes you have the rootfs on /system (/dev/block/mmcblk0p4, limited to 3.7GB) lightbar-fix-fd6389ade197_20171029_232625.tar.gz

Boot w/ fastboot boot boot-lightbar-fix-fd6389ade197_20171029_232625.img.unsigned, keep in mind that flashing this without signing it won't work, therefore if you keep it unsigned you'll be able to boot it only via fastboot boot

Ramdisk

In case you want to boot from sdcard / whatever, you'll need to repack the kernel with the new ramdisk. Edit this to suit your needs , repack and you're good to go.

System

I will upload it here in a few minutes (refresh the page every 10 minutes if it isn't up yet) There you are

Flash it w/ fastboot flash system system.img

Revert back to the original state

To return to a fully functional Pixel C, download the version you had on your Pixel C, extract the zip file, go to the extracted folder, unzip image-*..zip, fastboot flash system system.img, fastboot reboot. If that doesn't work, flash recovery (fastboot flash recovery recovery.img) too

Gnurou commented 7 years ago

Thanks for the instructions, although I'd rather not mess with my work device at all :) I remember booting to a SD card rootfs on my old SHIELD device, let me see if I can reproduce that result on the Pixel C too since USB seems to work. I suppose that kind of setup could be useful to other users as well.

Or maybe I can put my hands on another device just for this issue. I will come back once I have results.

opendata26 commented 7 years ago

You could try adding drm.debug=31 to cmdline for more debugging

opendata26 commented 7 years ago

@denysvitali also try building as a module

Gnurou commented 7 years ago

It indeed looks like the firmware files are not present on the initramfs, which would explain why the firmware loading function returns -ENOENT.

Building Nouveau as a module should definitely do the trick. An alternative would be to include the firmware files directly within the kernel image using CONFIG_EXTRA_FIRMWARE, but that's definitely not clean. I see no reason to not built Nouveau as a module since nobody should need it until the root FS is mounted anway.

denysvitali commented 7 years ago

It works indeed. I've selected nouveau as a module, added drm.debug=31 (to add more debugging) insmoded the moduleit and tadΓ : Accleration is now available

It is still laggy with GNOME and videos are choppy, but it seems to be accelerated πŸ‘

Thank you!

Gnurou commented 7 years ago

Oh wow, that's fantastic! Try setting the GPU clock to a higher speed, performance should increase:

echo b >/sys/class/drm/card1/device/pstate

... or something like that. cat pstate to see which values are acceptable.

Is this X? I would be surprised if it works out-of-the-box, last time I checked it (and Mesa) required a few external patches to connect the display and render nodes together. But maybe this has been taken care of in the meantime.

denysvitali commented 7 years ago

@Gnurou Yes, it is X. Although GNOME runs on Wayland. Unfortunately I don't have any pstate in /sys/class/drm/card1/device.
Apparently the GM20b doesn't support clocking via nouveau

Little hope of reclocking becoming available for GM20x and newer GPUs as firmware now needs to be signed by NVIDIA to have the necessary access.

Here is the tree output of /sys/class/drm. I still can't figure it out why there are two cards, and why the screen looks like this on boot, instead of showing the kernel messages (and is not available until I restart lightdm a couple of times or wait a few minutes). In previous versions I was able to show the screen content by writing "1" and then "0" to /sys/class/graphics/fb0/blank. Reading on the NVIDIA forums this is used when some configuration changes (/sys/class/graphics/fb0/mode) are made. But since our implementation only supports a single mode, the only thing we can do is to blank the framebuffer, which unfortunately doesn't always help.

I can't figure out why after some minutes I get the green bars (#1) either.

Tree of /sys/class/drm:

/sys/class/drm/
|-- card0 -> ../../devices/platform/50000000.host1x/drm/drm/card0
|   |-- card0-DSI-1
|   |   |-- device -> ../../card0  [recursive, not followed]
|   |   |-- dpms
|   |   |-- edid
|   |   |-- enabled
|   |   |-- modes
|   |   |-- power
|   |   |-- status
|   |   |-- subsystem -> ../../../../../../../class/drm  [recursive, not followed]
|   |   `-- uevent
|   |-- dev
|   |-- device -> ../../../drm
|   |   |-- driver -> ../../../../bus/host1x/drivers/drm
|   |   |-- drm
|   |   |-- graphics
|   |   |-- of_node -> ../../../../firmware/devicetree/base/host1x@50000000
|   |   |-- power
|   |   |-- subsystem -> ../../../../bus/host1x
|   |   `-- uevent
|   |-- power
|   |   |-- autosuspend_delay_ms
|   |   |-- control
|   |   |-- runtime_active_time
|   |   |-- runtime_status
|   |   `-- runtime_suspended_time
|   |-- subsystem -> ../../../../../../class/drm  [recursive, not followed]
|   `-- uevent
|-- card0-DSI-1 -> ../../devices/platform/50000000.host1x/drm/drm/card0/card0-DSI-1  [recursive, not followed]
|-- card1 -> ../../devices/platform/57000000.gpu/drm/card1
|   |-- dev
|   |-- device -> ../../../57000000.gpu
|   |   |-- driver -> ../../../bus/platform/drivers/nouveau
|   |   |-- driver_override
|   |   |-- drm
|   |   |-- hwmon
|   |   |-- iommu -> ../70019000.memory-controller/iommu/70019000.memory-controller
|   |   |-- iommu_group -> ../../../kernel/iommu_groups/10
|   |   |-- modalias
|   |   |-- of_node -> ../../../firmware/devicetree/base/gpu@57000000
|   |   |-- power
|   |   |-- subsystem -> ../../../bus/platform
|   |   `-- uevent
|   |-- power
|   |   |-- autosuspend_delay_ms
|   |   |-- control
|   |   |-- runtime_active_time
|   |   |-- runtime_status
|   |   `-- runtime_suspended_time
|   |-- subsystem -> ../../../../../class/drm  [recursive, not followed]
|   `-- uevent
|-- renderD128 -> ../../devices/platform/50000000.host1x/drm/drm/renderD128
|   |-- dev
|   |-- device -> ../../../drm  [recursive, not followed]
|   |-- power
|   |   |-- autosuspend_delay_ms
|   |   |-- control
|   |   |-- runtime_active_time
|   |   |-- runtime_status
|   |   `-- runtime_suspended_time
|   |-- subsystem -> ../../../../../../class/drm  [recursive, not followed]
|   `-- uevent
|-- renderD129 -> ../../devices/platform/57000000.gpu/drm/renderD129
|   |-- dev
|   |-- device -> ../../../57000000.gpu  [recursive, not followed]
|   |-- power
|   |   |-- autosuspend_delay_ms
|   |   |-- control
|   |   |-- runtime_active_time
|   |   |-- runtime_status
|   |   `-- runtime_suspended_time
|   |-- subsystem -> ../../../../../class/drm  [recursive, not followed]
|   `-- uevent
|-- ttm -> ../../devices/virtual/drm/ttm
|   |-- buffer_objects
|   |   `-- bo_count
|   |-- memory_accounting
|   |   |-- dma_pool
|   |   |-- kernel
|   |   `-- pool
|   |-- power
|   |   |-- autosuspend_delay_ms
|   |   |-- control
|   |   |-- runtime_active_time
|   |   |-- runtime_status
|   |   `-- runtime_suspended_time
|   |-- subsystem -> ../../../../class/drm  [recursive, not followed]
|   `-- uevent
`-- version

43 directories, 46 files

The whole /sys/class/ folder

(Limited to 3 levels) Here

Modes available

[root@alarm ~]# cat /sys/class/graphics/fb0/modes 
U:2560x1800p-0
mirh commented 7 years ago

Little hope of reclocking becoming available for GM20x and newer GPUs as firmware now needs to be signed by NVIDIA to have the necessary access.

That's a bit outdated. Moreover, X1 seems like the luckiest nvidia gpu since half a decade. EDIT: *fixed last link

denysvitali commented 7 years ago

I tried the nouveau.NvFanless=true / nouveau.conifg=NvFanless=1 boot parameter, but apparently nouveau doesn't recognize it

[  790.904271] [TTM] Finalizing pool allocator
[  790.904461] [TTM] Finalizing DMA pool allocator
[  790.904521] [TTM] Zone  kernel: Used memory at exit: 0 kiB
[  793.820375] nouveau: unknown parameter 'NvFanless' ignored
[  793.821291] [drm:nouveau_drm_init [nouveau]] Loading Nouveau with parameters:
[  793.821732] [drm:nouveau_drm_init [nouveau]] ... tv_disable   : 0
[  793.822120] [drm:nouveau_drm_init [nouveau]] ... ignorelid    : 0
[  793.822470] [drm:nouveau_drm_init [nouveau]] ... duallink     : 1
[  793.822835] [drm:nouveau_drm_init [nouveau]] ... nofbaccel    : 0
[  793.823182] [drm:nouveau_drm_init [nouveau]] ... config       : NvGrUseFW=1
[  793.823551] [drm:nouveau_drm_init [nouveau]] ... debug        : (null)
[  793.823894] [drm:nouveau_drm_init [nouveau]] ... noaccel      : 0
[  793.824227] [drm:nouveau_drm_init [nouveau]] ... modeset      : -1
[  793.824553] [drm:nouveau_drm_init [nouveau]] ... runpm        : -1
[  793.824847] [drm:nouveau_drm_init [nouveau]] ... vram_pushbuf : 0
[  793.825138] [drm:nouveau_drm_init [nouveau]] ... hdmimhz      : 0
[  793.825860] nouveau 57000000.gpu: NVIDIA GM20B (12b000a1)
[  793.825896] nouveau 57000000.gpu: imem: using IOMMU
[  793.826233] [drm:drm_minor_register] 
[  793.826239] [drm:drm_minor_register] 
[  793.826401] [drm:drm_minor_register] new minor registered 129
[  793.826406] [drm:drm_minor_register] 
[  793.826507] [drm:drm_minor_register] new minor registered 1
[  793.840595] nouveau 57000000.gpu: DRM: not a PCI device; no HDMI
[  793.840827] [TTM] Zone  kernel: Available graphics memory: 1420528 kiB
[  793.840832] [TTM] Initializing pool allocator
[  793.840845] [TTM] Initializing DMA pool allocator
[  793.840872] nouveau 57000000.gpu: DRM: VRAM: 0 MiB
[  793.840877] nouveau 57000000.gpu: DRM: GART: 1048576 MiB
[  793.842907] nouveau 57000000.gpu: DRM: failed to create ce channel, -22
[  793.930577] nouveau 57000000.gpu: DRM: MM: using GRCE for buffer copies
[  793.930593] [drm] Initialized nouveau 1.3.1 20120801 for 57000000.gpu on minor 1
[  794.071684] [drm:vblank_disable_fn] disabling vblank on crtc 0
mirh commented 7 years ago

Cause those patches haven't been pulled/mainlined yet.

Gnurou commented 7 years ago

Sorry, my mistake. The pstate node has been moved to from sysfs to debugs. So you should be able to find it under /sys/kernel/debug or wherever debugfs is mounted.

Still I am not convinced that X is using acceleration at the moment. You may want to check by looking for mentions of glamor the in X logs, or running glxgears or some other GL-enabled application. My bet is that some patching is still needed.

denysvitali commented 7 years ago

Found it: /sys/kernel/debug/dri/1 (which is the same as /sys/kernel/debug/dri/129)

[root@alarm 1]# cat pstate 
01: core 76 MHz *
02: core 153 MHz
03: core 230 MHz
04: core 307 MHz
05: core 384 MHz
06: core 460 MHz
07: core 537 MHz
08: core 614 MHz
09: core 691 MHz
0a: core 768 MHz
0b: core 844 MHz
0c: core 921 MHz
0d: core 998 MHz
DC: core 76 MHz

=>

[root@alarm 1]# echo "0c" > pstate
[root@alarm 1]# cat pstate 
01: core 76 MHz
02: core 153 MHz
03: core 230 MHz
04: core 307 MHz
05: core 384 MHz
06: core 460 MHz
07: core 537 MHz
08: core 614 MHz
09: core 691 MHz
0a: core 768 MHz
0b: core 844 MHz
0c: core 921 MHz AC DC *
0d: core 998 MHz
DC: core 921 MHz
[root@alarm 1]# cat /var/log/Xorg.0.log | grep glamor
[  2492.509] (II) Loading sub module "glamoregl"
[  2492.509] (II) LoadModule: "glamoregl"
[  2492.509] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[  2492.511] (II) Module glamoregl: vendor="X.Org Foundation"
[  2492.511] (II) glamor: OpenGL accelerated X.org driver based.
[  2492.643] (II) glamor: EGL version 1.4 (DRI2):
[  2492.644] (EE) modeset(0): glamor initialization failed
[  2492.647] (II) Loading sub module "glamoregl"
[  2492.647] (II) LoadModule: "glamoregl"
[  2492.647] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[  2492.647] (II) Module glamoregl: vendor="X.Org Foundation"
[  2492.647] (II) glamor: OpenGL accelerated X.org driver based.
[  2492.754] (II) glamor: EGL version 1.4 (DRI2):
[  2492.760] (II) modeset(G0): glamor initialized

2017-11-01-141659_2560x1800_scrot

Doesn't look good to me :(

opendata26 commented 7 years ago

startx -- -logverbose 9 -verbose 9 try this, itll give some more x debug output

denysvitali commented 7 years ago

@opendata26 Here is the X log w/ verbosity set to 9 (I removed the lines after inputs, since they aren't releveant to our problem.

(II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
(II) Loader magic: 0xaaaae3277d28
(II) Module ABI versions:
        X.Org ANSI C Emulation: 0.4
        X.Org Video Driver: 23.0
        X.Org XInput driver : 24.1
        X.Org Server Extension : 10.0
(--) using VT number 1

(II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
(II) xfree86: Adding drm device (/dev/dri/card0)
(II) xfree86: Adding drm device (/dev/dri/card1)
(II) no primary bus or device found
        falling back to /sys/devices/platform/50000000.host1x/drm/drm/card0
(II) LoadModule: "glx"
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
        compiled for 1.19.5, module version = 1.0.0
        ABI class: X.Org Server Extension, version 10.0
(==) Matched modesetting as autoconfigured driver 0
(==) Matched fbdev as autoconfigured driver 1
(==) Assigned the driver to the xf86ConfigLayout
(II) LoadModule: "modesetting"
(II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
(II) Module modesetting: vendor="X.Org Foundation"
        compiled for 1.19.5, module version = 1.19.5
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 23.0
(II) LoadModule: "fbdev"
(II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
(II) Module fbdev: vendor="X.Org Foundation"
        compiled for 1.19.3, module version = 0.4.4
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 23.0
(II) modesetting: Driver for Modesetting Kernel Drivers: kms
(II) FBDEV: driver for framebuffer: fbdev
(II) modeset(0): using drv /dev/dri/card0
(WW) Falling back to old probe method for fbdev
(II) Loading sub module "fbdevhw"
(II) LoadModule: "fbdevhw"
(II) Loading /usr/lib/xorg/modules/libfbdevhw.so
(II) Module fbdevhw: vendor="X.Org Foundation"
        compiled for 1.19.5, module version = 0.0.2
        ABI class: X.Org Video Driver, version 23.0
(II) modeset(G0): using drv /dev/dri/card1
(II) modeset(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
(==) modeset(0): Depth 24, (==) framebuffer bpp 32
(==) modeset(0): RGB weight 888
(==) modeset(0): Default visual is TrueColor
(II) Loading sub module "glamoregl"
(II) LoadModule: "glamoregl"
(II) Loading /usr/lib/xorg/modules/libglamoregl.so
(II) Module glamoregl: vendor="X.Org Foundation"
        compiled for 1.19.5, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.4
(II) glamor: OpenGL accelerated X.org driver based.
failed to bind extensions
failed to load driver: tegra
(II) glamor: EGL version 1.4 (DRI2):
EGL_MESA_drm_image required.
(EE) modeset(0): glamor initialization failed
(II) modeset(0): ShadowFB: preferred NO, enabled NO
(II) modeset(0): Output DSI-1 has no monitor section
(II) modeset(0): Up to 1 crtcs needed for screen.
(II) modeset(0): Allocated crtc nr. 0 to this screen.
(II) modeset(0): Allocated crtc nr. 1 to this screen.
(II) modeset(0): EDID for output DSI-1
(II) modeset(0): Printing probed modes for output DSI-1
(II) modeset(0): Modeline "2560x1800"x60.0  304.42  2560 2640 2720 2800  1800 1804 1808 1812 (108.7 kHz)
(II) modeset(0): Output DSI-1 connected
(II) modeset(0): Using sloppy heuristic for initial modes
(II) modeset(0): Output DSI-1 using initial mode 2560x1800 +0+0
(==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
(==) modeset(0): DPI set to (96, 96)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
        compiled for 1.19.5, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.4
(==) modeset(G0): Depth 24, (==) framebuffer bpp 32
(==) modeset(G0): RGB weight 888
(==) modeset(G0): Default visual is TrueColor
(II) Loading sub module "glamoregl"
(II) LoadModule: "glamoregl"
(II) Loading /usr/lib/xorg/modules/libglamoregl.so
(II) Module glamoregl: vendor="X.Org Foundation"
        compiled for 1.19.5, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.4
(II) glamor: OpenGL accelerated X.org driver based.
(II) glamor: EGL version 1.4 (DRI2):
(II) modeset(G0): glamor initialized
(II) modeset(G0): Up to 0 crtcs needed for screen.
(==) modeset(G0): Using gamma correction (1.0, 1.0, 1.0)
(==) modeset(G0): DPI set to (96, 96)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
        compiled for 1.19.5, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.4
(II) UnloadModule: "fbdev"
(II) Unloading fbdev
(II) UnloadSubModule: "fbdevhw"
(II) Unloading fbdevhw
(==) Depth 24 pixmap format is 32 bpp
(==) modeset(G0): Backing store enabled
(==) modeset(G0): Silken mouse enabled
(II) modeset(G0): RandR 1.2 enabled, ignore the following RandR disabled message.
(==) modeset(G0): DPMS enabled
(II) modeset(G0): [DRI2] Setup complete
(II) modeset(G0): [DRI2]   DRI driver: nouveau
(II) modeset(G0): [DRI2]   VDPAU driver: nouveau
(==) modeset(0): Backing store enabled
(==) modeset(0): Silken mouse enabled
(II) modeset(0): RandR 1.2 enabled, ignore the following RandR disabled message.
(==) modeset(0): DPMS enabled
(--) RandR disabled
(II) AIGLX: Screen 0 is not DRI2 capable
(EE) AIGLX: reverting to software rendering
(II) IGLX: enabled GLX_MESA_copy_sub_buffer
(II) IGLX: Loaded and initialized swrast
(II) GLX: Initialized DRISWRAST GL provider for screen 0
(II) modeset(G0): Damage tracking initialized
(II) modeset(0): Damage tracking initialized
(II) modeset(0): Setting screen physical size to 677 x 476
(II) XKB: Reusing cached keymap
(II) config/udev: Adding input device hid-over-i2c 06CB:3370 (/dev/input/event0)
(**) hid-over-i2c 06CB:3370: Applying InputClass "libinput touchscreen catchall"
(II) LoadModule: "libinput"
(II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
(II) Module libinput: vendor="X.Org Foundation"
        compiled for 1.19.3, module version = 0.26.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 24.1
(II) Using input driver 'libinput' for 'hid-over-i2c 06CB:3370'
        Option "_source" "server/udev"
        Option "name" "hid-over-i2c 06CB:3370"
        Option "path" "/dev/input/event0"
        Option "device" "/dev/input/event0"
        Option "major" "13"
        Option "minor" "64"
        Option "config_info" "udev:/sys/devices/platform/7000c000.i2c/i2c-0/0-0020/0018:06CB:3370.0001/input/input0/event0"
        Option "driver" "libinput"

This line caught my attention

(II) AIGLX: Screen 0 is not DRI2 capable
(EE) AIGLX: reverting to software rendering

Current boot args:

console=/dev/fb0,115200n8 consoleblank=0disp.screen0_output_mode=EDID:2560x1800p60 nouveau.config=NvGrUseFW=1,NvFanless=1 drm.debug=31 drm.atomic=1 firmware_class.path=/lib/firmware

I did symlink tegra_dri.so to nouveau_dri.so, JFYI

[root@alarm dvitali]# ls -la /usr/lib/xorg/modules/dri
total 64196
drwxr-xr-x 2 root root    4096 Nov  1 13:42 .
drwxr-xr-x 6 root root    4096 Oct 31 23:20 ..
-rwxr-xr-x 7 root root 8805160 Oct 29 15:14 kgsl_dri.so
-rwxr-xr-x 7 root root 8805160 Oct 29 15:14 kms_swrast_dri.so
-rwxr-xr-x 7 root root 8805160 Oct 29 15:14 msm_dri.so
-rwxr-xr-x 7 root root 8805160 Oct 29 15:14 nouveau_dri.so
-rwxr-xr-x 1 root root 4082128 Oct 29 15:14 nouveau_vieux_dri.so
-rwxr-xr-x 7 root root 8805160 Oct 29 15:14 swrast_dri.so
lrwxrwxrwx 1 root root      14 Nov  1 13:42 tegra_dri.so -> nouveau_dri.so
-rwxr-xr-x 7 root root 8805160 Oct 29 15:14 vc4_dri.so
-rwxr-xr-x 7 root root 8805160 Oct 29 15:14 virtio_gpu_dri.so

I also saw that there is an nvidia_drv.so in the Linux 4 Tegra drivers package. I have now tried to copy the necessary files in the correct places and I get the following, then the system hangs:

See the gist

It may also be due to the fact that all the NVIDIA libraries filled up my /system partition (which is only 3.8 GB), therefore I'm having some space problems too now 😞

Gnurou commented 7 years ago

I think that's the stage where I need to look at my old Xorg an Mesa repositories. :) Let's see if I can get the system to boot and run on a device first, will probably take a few days before I can make an attempt.

opendata26 commented 7 years ago

You could try disabling aglx?

denysvitali commented 7 years ago

As suggested by @mirh (in private) this may be useful

Gnurou commented 7 years ago

Probably not, as this appears to be for managing the non-upstream (i.e. not Nouveau) driver.

vartom commented 6 years ago

Hey. I downloaded the kernel and root directory of the message https://github.com/denysvitali/linux-on-pixel-c/issues/2#issuecomment-340314777. The system does not start. Tried to rebuild the kernel, as well as no launch. I found how to solve the problem with the firmware files. The solution is to add the firmware files to the vendor's directory in initramfs or add all the files to the kernel. Unfortunately, it still did not let me run the system. Maybe to me another tablet revision or not a suitable bootloader. My revision 1.3, bootloader-dragon-google_smaug.7900.50.0.

vartom commented 6 years ago

Did you try to connect the monitor through HDMI?

denysvitali commented 6 years ago

@vartom Unfortunately I don't have much free time to dedicate to the project 😞 . I haven't yet found a way to have an output on the HDMI.

About the rootfs, you can try to use the kernel posted here and use the /system instructions to build your own rootfs.

Samt43 commented 6 years ago

@denysvitali @Gnurou @vartom I could have successfull graphical acceleration on Pixel C using 4.8 @vartom kernel and this modification https://github.com/Samt43/mesa/commit/1790e46ae38cf9a0e812cfd04d25788c65c97d3f for mesa that uses gnurou renderonly mesa branch. With this, weston is working with gallium 0.4 and nv12b chipset and it seems to run fast !

I couldn't run Xorg unfortunately, i stuck with this :

[root@alarm alarm]# cat /var/log/Xorg.0.log                                                                                                                                                                                                                                    
[    66.430]                                                                                                                                                                                                                                                                   
X.Org X Server 1.19.6                                                                                                                                                                                                                                                          
Release Date: 2017-12-20                                                                                                                                                                                                                                                       
[    66.430] X Protocol Version 11, Revision 0                                                                                                                                                                                                                                 
[    66.430] Build Operating System: Linux 4.12.7-1-ARCH aarch64                                                                                                                                                                                                               
[    66.430] Current Operating System: Linux alarm 4.8.17+ #8 SMP PREEMPT Wed Feb 7 12:29:02 UTC 2018 aarch64                                                                                                                                                                  
[    66.430] Kernel command line: cros_secure vpr=0x08000000@0xf6800000 vmalloc=256M video=tegrafb fbcon loglevel=0 vga=current debug earlyprintk earlycon=uart8250,mmio32,0x70006000 drm.atomic=1 consoleblank=0 firmware_class.path=/lib/firmware                            
[    66.430] Build Date: 30 January 2018  11:53:15PM                                                                                                                                                                                                                           
[    66.430]                                                                                                                                                                                                                                                                   
[    66.431] Current version of pixman: 0.34.0                                                                                                                                                                                                                                 
[    66.431]    Before reporting problems, check http://wiki.x.org                                                                                                                                                                                                             
        to make sure that you have the latest version.                                                                                                                                                                                                                         
[    66.431] Markers: (--) probed, (**) from config file, (==) default setting,                                                                                                                                                                                                
        (++) from command line, (!!) notice, (II) informational,                                                                                                                                                                                                               
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.                                                                                                                                                                                                          
[    66.431] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Feb 12 06:57:27 2018                                                                                                                                                                                              
[    66.431] (==) Using system config directory "/usr/share/X11/xorg.conf.d"                                                                                                                                                                                                   
[    66.431] (==) No Layout section.  Using the first Screen section.                                                                                                                                                                                                          
[    66.431] (==) No screen section available. Using defaults.                                                                                                                                                                                                                 
[    66.432] (**) |-->Screen "Default Screen Section" (0)                                                                                                                                                                                                                      
[    66.432] (**) |   |-->Monitor "<default monitor>"
[    66.432] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    66.432] (==) Automatically adding devices
[    66.432] (==) Automatically enabling devices
[    66.432] (==) Automatically adding GPU devices
[    66.432] (==) Automatically binding GPU devices
[    66.432] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    66.432] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[    66.432]    Entry deleted from font path.
[    66.432] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[    66.433]    Entry deleted from font path.
[    66.433]    (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[    66.433] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[    66.433]    Entry deleted from font path.
[    66.433]    (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[    66.433] (==) FontPath set to:
        /usr/share/fonts/misc/,
        /usr/share/fonts/TTF/,
        /usr/share/fonts/OTF/
[    66.433] (==) ModulePath set to "/usr/lib/xorg/modules"
[    66.433] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    66.433] (II) Loader magic: 0x5c89dc1d28
[    66.433] (II) Module ABI versions:
[    66.433]    X.Org ANSI C Emulation: 0.4
[    66.433]    X.Org Video Driver: 23.0
[    66.433]    X.Org XInput driver : 24.1
[    66.433]    X.Org Server Extension : 10.0
[    66.434] (--) using VT number 2

[    66.434] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    66.436] (II) xfree86: Adding drm device (/dev/dri/card1)
[    66.437] (II) xfree86: Adding drm device (/dev/dri/card0)
[    66.437] (II) no primary bus or device found
[    66.437]    falling back to /sys/devices/platform/50000000.host1x/drm/drm/card1
[    66.437] (II) LoadModule: "glx"
[    66.437] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    66.441] (II) Module glx: vendor="X.Org Foundation"
[    66.441]    compiled for 1.19.6, module version = 1.0.0
[    66.441]    ABI class: X.Org Server Extension, version 10.0
[    66.441] (==) Matched modesetting as autoconfigured driver 0
[    66.441] (==) Matched fbdev as autoconfigured driver 1
[    66.441] (==) Assigned the driver to the xf86ConfigLayout
[    66.441] (II) LoadModule: "modesetting"
[    66.441] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    66.442] (II) Module modesetting: vendor="X.Org Foundation"
[    66.442]    compiled for 1.19.6, module version = 1.19.6
[    66.442]    Module class: X.Org Video Driver
[    66.442]    ABI class: X.Org Video Driver, version 23.0
[    66.442] (II) LoadModule: "fbdev"
[    66.442] (WW) Warning, couldn't open module fbdev
[    66.442] (II) UnloadModule: "fbdev"
[    66.442] (II) Unloading fbdev
[    66.442] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    66.442] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    66.471] (II) modeset(0): using drv /dev/dri/card1
[    66.472] (II) modeset(G0): using drv /dev/dri/card0
[    66.472] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    66.472] (II) modeset(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[    66.472] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[    66.472] (==) modeset(0): RGB weight 888
[    66.472] (==) modeset(0): Default visual is TrueColor
[    66.472] (II) Loading sub module "glamoregl"
[    66.472] (II) LoadModule: "glamoregl"
[    66.472] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[    66.474] (II) Module glamoregl: vendor="X.Org Foundation"
[    66.474]    compiled for 1.19.6, module version = 1.0.0
[    66.474]    ABI class: X.Org ANSI C Emulation, version 0.4
[    66.474] (II) glamor: OpenGL accelerated X.org driver based.
[    66.605] (II) glamor: EGL version 1.4 (DRI2):
[    66.611] (II) modeset(0): glamor initialized
[    66.611] (II) modeset(0): Output DSI-1 has no monitor section
[    66.611] (II) modeset(0): EDID for output DSI-1
[    66.611] (II) modeset(0): Printing probed modes for output DSI-1
[    66.611] (II) modeset(0): Modeline "2560x1800"x60.0  304.42  2560 2640 2720 2800  1800 1804 1808 1812 (108.7 kHz)
[    66.611] (II) modeset(0): Output DSI-1 connected
[    66.611] (II) modeset(0): Using sloppy heuristic for initial modes
[    66.611] (II) modeset(0): Output DSI-1 using initial mode 2560x1800 +0+0
[    66.611] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[    66.611] (==) modeset(0): DPI set to (96, 96)
[    66.611] (II) Loading sub module "fb"
[    66.611] (II) LoadModule: "fb"
[    66.611] (II) Loading /usr/lib/xorg/modules/libfb.so
[    66.612] (II) Module fb: vendor="X.Org Foundation"
[    66.612]    compiled for 1.19.6, module version = 1.0.0
[    66.612]    ABI class: X.Org ANSI C Emulation, version 0.4
[    66.613] (==) modeset(G0): Depth 24, (==) framebuffer bpp 32
[    66.613] (==) modeset(G0): RGB weight 888
[    66.613] (==) modeset(G0): Default visual is TrueColor
[    66.613] (II) Loading sub module "glamoregl"
[    66.613] (II) LoadModule: "glamoregl"
[    66.613] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[    66.613] (II) Module glamoregl: vendor="X.Org Foundation"
[    66.613]    compiled for 1.19.6, module version = 1.0.0
[    66.613]    ABI class: X.Org ANSI C Emulation, version 0.4
[    66.614] (II) glamor: OpenGL accelerated X.org driver based.
[    66.620] (II) glamor: EGL version 1.4 (DRI2):
[    66.623] (II) modeset(G0): glamor initialized
[    66.623] (==) modeset(G0): Using gamma correction (1.0, 1.0, 1.0)
[    66.623] (==) modeset(G0): DPI set to (96, 96)
[    66.623] (II) Loading sub module "fb"
[    66.623] (II) LoadModule: "fb"
[    66.623] (II) Loading /usr/lib/xorg/modules/libfb.so
[    66.623] (II) Module fb: vendor="X.Org Foundation"
[    66.623]    compiled for 1.19.6, module version = 1.0.0
[    66.623]    ABI class: X.Org ANSI C Emulation, version 0.4
[    66.623] (==) Depth 24 pixmap format is 32 bpp
[    66.623] (EE) modeset(G0): drmSetMaster failed: Invalid argument
[    66.623] (EE) 
Fatal server error:
[    66.624] (EE) AddScreen/ScreenInit failed for gpu driver 0 -1
[    66.624] (EE) 
[    66.625] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[    66.625] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    66.625] (EE) 
[    66.684] (EE) Server terminated with error (1). Closing log file.
[root@alarm alarm]# 

No idea why drmMaster fails, but it's fatal for Xorg. It seems that glamor initialisation was OK, wondering if DRI3 is active (for node rendering) and if that could be the issue.

Any idea ?

vartom commented 6 years ago

Tried to turn on the drivers nouveau. Not yet figured out why, but they do not see a DSI connection:

 [    99.051] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
 [    99.052] (II) xfree86: Adding drm device (/dev/dri/card1)
 [    99.054] (II) xfree86: Adding drm device (/dev/dri/card0)
 [    99.055] (II) no primary bus or device found
 [    99.055]   falling back to /sys/devices/platform/50000000.host1x/drm/drm/card1
 [    99.055] (II) LoadModule: "glx"
 [    99.056] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
 [    99.056] (EE) Failed to load /usr/lib/xorg/modules/extensions/libglx.so: /usr/lib/xorg/modules/extensions/libglx.so: wrong ELF class: ELFCLASS64
 [    99.056] (II) UnloadModule: "glx"
 [    99.056] (II) Unloading glx
 [    99.056] (EE) Failed to load module "glx" (loader failed, 7)
 [    99.056] (II) LoadModule: "nouveau"
 [    99.056] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
 [    99.057] (II) Module nouveau: vendor="X.Org Foundation"
 [    99.057]   compiled for 1.19.3, module version = 1.0.15
 [    99.057]   Module class: X.Org Video Driver
 [    99.057]   ABI class: X.Org Video Driver, version 23.0
 [    99.057] (II) NOUVEAU driver 
 [    99.057] (II) NOUVEAU driver for NVIDIA chipset families :
 [    99.057]   RIVA TNT        (NV04)
 [    99.057]   RIVA TNT2       (NV05)
 [    99.057]   GeForce 256     (NV10)
 [    99.057]   GeForce 2       (NV11, NV15)
 [    99.057]   GeForce 4MX     (NV17, NV18)
 [    99.057]   GeForce 3       (NV20)
 [    99.057]   GeForce 4Ti     (NV25, NV28)
 [    99.057]   GeForce FX      (NV3x)
 [    99.058]   GeForce 6       (NV4x)
 [    99.058]   GeForce 7       (G7x)
 [    99.058]   GeForce 8       (G8x)
 [    99.058]   GeForce GTX 200 (NVA0)
 [    99.058]   GeForce GTX 400 (NVC0)
 [    99.058] (II) [drm] nouveau interface version: 0.0.0
 [    99.071] (II) [drm] nouveau interface version: 1.3.1
 [    99.071] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
 [    99.071] (II) Loading sub module "dri2"
 [    99.071] (II) LoadModule: "dri2"
 [    99.071] (II) Module "dri2" already built-in
 [    99.072] (--) NOUVEAU(0): Chipset: "NVIDIA NV00"
 [    99.072] (==) NOUVEAU(0): Depth 24, (--) framebuffer bpp 32
 [    99.072] (==) NOUVEAU(0): RGB weight 888
 [    99.072] (==) NOUVEAU(0): Default visual is TrueColor
 [    99.072] (==) NOUVEAU(0): Using HW cursor
 [    99.072] (==) NOUVEAU(0): Allowed maximum DRI level 2.
 [    99.072] (==) NOUVEAU(0): Page flipping disabled: no kernel support
 [    99.072] (==) NOUVEAU(0): Swap limit set to 1 [Max allowed 2]
 [    99.072] (==) NOUVEAU(0): Page flipping synced to vblank by ddx.
 [    99.072] (II) NOUVEAU(0): Initializing outputs ...
 [    99.072] (II) NOUVEAU(0): **Output Unknown16-1** using monitor section Monitor0
 [    99.072] (**) NOUVEAU(0): Option "Ignore" "1"
 [    99.072] (II) NOUVEAU(0): 0 crtcs needed for screen.

Edit by @DenysVitali: Formatting

Samt43 commented 6 years ago

It seems that you have issues with your libglx that is at the wrong format. Another thing @gnurou can confirm, but I don't think we have to use Nouveau DDX driver but modesetting instead using glamor to accelerate X commands.

vartom commented 6 years ago

@Samt43 For kernel tests, I use the assembly of the rootfs from denysvitali https://github.com/denysvitali/linux-on-pixel-c direct link https://ded1.denv.it/pixel-c/arch-xfce-lightdm.tar.gz it works quite smoothly. Your earlier image of rootfs also works, but graphics drawing is much slower.

X.Org X Server 1.19.3
Release Date: 2017-03-15
[    27.336] X Protocol Version 11, Revision 0
[    27.336] Build Operating System: Linux 3.10.96-3-ARCH armv7l 
[    27.336] Current Operating System: Linux pixel-c 4.15.2+ #33 SMP PREEMPT Wed Feb 14 21:07:55 +07 2018 aarch64
[    27.336] Kernel command line: cros_secure vpr=0x08000000@0xf6800000 cros_legacy init=/init rw fbcon loglevel=0 debug earlyprintk drm.atomic=1 no_console_suspend firmware_class.path=/lib/firmware
[    27.336] Build Date: 10 April 2017  01:19:09AM
[    27.336]  
[    27.336] Current version of pixman: 0.34.0
[    27.336]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    27.336] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    27.337] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Feb 14 17:07:25 2018
[    27.343] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    27.344] (==) No Layout section.  Using the first Screen section.
[    27.344] (==) No screen section available. Using defaults.
[    27.344] (**) |-->Screen "Default Screen Section" (0)
[    27.344] (**) |   |-->Monitor "<default monitor>"
[    27.347] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[    27.347] (==) Automatically adding devices
[    27.347] (==) Automatically enabling devices
[    27.347] (==) Automatically adding GPU devices
[    27.347] (==) Automatically binding GPU devices
[    27.347] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    27.359] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[    27.359]    Entry deleted from font path.
[    27.359] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[    27.359]    Entry deleted from font path.
[    27.359]    (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[    27.359] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[    27.359]    Entry deleted from font path.
[    27.359]    (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[    27.359] (==) FontPath set to:
    /usr/share/fonts/misc/,
    /usr/share/fonts/TTF/,
    /usr/share/fonts/OTF/
[    27.359] (==) ModulePath set to "/usr/lib/xorg/modules"
[    27.359] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[    27.360] (II) Loader magic: 0x1f2ee0
[    27.360] (II) Module ABI versions:
[    27.360]    X.Org ANSI C Emulation: 0.4
[    27.360]    X.Org Video Driver: 23.0
[    27.360]    X.Org XInput driver : 24.1
[    27.360]    X.Org Server Extension : 10.0
[    27.361] (++) using VT number 7

[    27.361] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    27.363] (II) xfree86: Adding drm device (/dev/dri/card1)
[    27.373] (II) xfree86: Adding drm device (/dev/dri/card0)
[    27.374] (II) no primary bus or device found
[    27.374]    falling back to /sys/devices/platform/50000000.host1x/drm/drm/card1
[    27.375] (II) LoadModule: "glx"
[    27.377] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    27.378] (EE) Failed to load /usr/lib/xorg/modules/extensions/libglx.so: /usr/lib/xorg/modules/extensions/libglx.so: wrong ELF class: ELFCLASS64
[    27.378] (II) UnloadModule: "glx"
[    27.378] (II) Unloading glx
[    27.378] (EE) Failed to load module "glx" (loader failed, 7)
[    27.378] (==) Matched modesetting as autoconfigured driver 0
[    27.378] (==) Matched fbdev as autoconfigured driver 1
[    27.378] (==) Assigned the driver to the xf86ConfigLayout
[    27.378] (II) LoadModule: "modesetting"
[    27.378] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    27.380] (II) Module modesetting: vendor="X.Org Foundation"
[    27.380]    compiled for 1.19.3, module version = 1.19.3
[    27.380]    Module class: X.Org Video Driver
[    27.380]    ABI class: X.Org Video Driver, version 23.0
[    27.381] (II) LoadModule: "fbdev"
[    27.381] (WW) Warning, couldn't open module fbdev
[    27.381] (II) UnloadModule: "fbdev"
[    27.381] (II) Unloading fbdev
[    27.381] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    27.381] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    27.423] (II) modeset(0): using drv /dev/dri/card1
[    27.424] (II) modeset(G0): using drv /dev/dri/card0
[    27.424] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    27.424] (II) modeset(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[    27.424] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[    27.424] (==) modeset(0): RGB weight 888
[    27.424] (==) modeset(0): Default visual is TrueColor
[    27.424] (II) Loading sub module "glamoregl"
[    27.424] (II) LoadModule: "glamoregl"
[    27.424] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[    27.448] (II) Module glamoregl: vendor="X.Org Foundation"
[    27.448]    compiled for 1.19.3, module version = 1.0.0
[    27.448]    ABI class: X.Org ANSI C Emulation, version 0.4
[    27.448] (II) glamor: OpenGL accelerated X.org driver based.
[    28.106] (II) glamor: EGL version 1.4 (DRI2):
[    28.106] EGL_MESA_drm_image required.
[    28.107] (EE) modeset(0): glamor initialization failed
[    28.107] (II) modeset(0): ShadowFB: preferred NO, enabled NO
[    28.107] (II) modeset(0): Output DSI-1 has no monitor section
[    28.108] (II) modeset(0): EDID for output DSI-1
[    28.108] (II) modeset(0): Printing probed modes for output DSI-1
[    28.108] (II) modeset(0): Modeline "2560x1800"x60.0  304.42  2560 2640 2720 2800  1800 1804 1808 1812 (108.7 kHz)
[    28.108] (II) modeset(0): Output DSI-1 connected
[    28.108] (II) modeset(0): Using sloppy heuristic for initial modes
[    28.108] (II) modeset(0): Output DSI-1 using initial mode 2560x1800 +0+0
[    28.108] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[    28.108] (==) modeset(0): DPI set to (96, 96)
[    28.108] (II) Loading sub module "fb"
[    28.108] (II) LoadModule: "fb"
[    28.108] (II) Loading /usr/lib/xorg/modules/libfb.so
[    28.111] (II) Module fb: vendor="X.Org Foundation"
[    28.111]    compiled for 1.19.3, module version = 1.0.0
[    28.111]    ABI class: X.Org ANSI C Emulation, version 0.4
[    28.112] (==) modeset(G0): Depth 24, (==) framebuffer bpp 32
[    28.112] (==) modeset(G0): RGB weight 888
[    28.112] (==) modeset(G0): Default visual is TrueColor
[    28.112] (II) Loading sub module "glamoregl"
[    28.112] (II) LoadModule: "glamoregl"
[    28.113] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[    28.113] (II) Module glamoregl: vendor="X.Org Foundation"
[    28.113]    compiled for 1.19.3, module version = 1.0.0
[    28.113]    ABI class: X.Org ANSI C Emulation, version 0.4
[    28.113] (II) glamor: OpenGL accelerated X.org driver based.
[    28.167] (II) glamor: EGL version 1.4 (DRI2):
[    28.230] (II) modeset(G0): glamor initialized
[    28.230] (==) modeset(G0): Using gamma correction (1.0, 1.0, 1.0)
[    28.230] (==) modeset(G0): DPI set to (96, 96)
[    28.230] (II) Loading sub module "fb"
[    28.230] (II) LoadModule: "fb"
[    28.231] (II) Loading /usr/lib/xorg/modules/libfb.so
[    28.231] (II) Module fb: vendor="X.Org Foundation"
[    28.231]    compiled for 1.19.3, module version = 1.0.0
[    28.231]    ABI class: X.Org ANSI C Emulation, version 0.4
[    28.231] (==) Depth 24 pixmap format is 32 bpp
[    28.300] (==) modeset(G0): Backing store enabled
[    28.300] (==) modeset(G0): Silken mouse enabled
[    28.302] (II) modeset(G0): RandR 1.2 enabled, ignore the following RandR disabled message.
[    28.304] (==) modeset(G0): DPMS enabled
[    28.304] (II) modeset(G0): [DRI2] Setup complete
[    28.305] (II) modeset(G0): [DRI2]   DRI driver: nouveau
[    28.305] (II) modeset(G0): [DRI2]   VDPAU driver: nouveau
[    28.327] (==) modeset(0): Backing store enabled
[    28.327] (==) modeset(0): Silken mouse enabled
[    28.327] (II) modeset(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[    28.339] (==) modeset(0): DPMS enabled
[    28.339] (--) RandR disabled
[    28.374] (II) modeset(G0): Damage tracking initialized
[    28.374] (II) modeset(0): Damage tracking initialized
[    28.374] (II) modeset(0): Setting screen physical size to 677 x 476
[    28.528] (II) config/udev: Adding input device hid-over-i2c 06CB:3370 (/dev/input/event0)
[    28.528] (**) hid-over-i2c 06CB:3370: Applying InputClass "libinput touchscreen catchall"
[    28.528] (II) LoadModule: "libinput"
[    28.528] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[    28.541] (II) Module libinput: vendor="X.Org Foundation"
Samt43 commented 6 years ago

Great, can you run glxinfo ? If that works, it would mean that with a 4.15 kernel, everything is there to enable graphical acceleration for tegra without any mesa patch ! :)

Samt43 commented 6 years ago

Hi @Vartom, I compiled you kernel 4.15, and i could run X correctly. I used the lastest rootfs available by build system. Unfortunatly, llvmpipe was used for 3d rendering and UI was a bit slow. Could you run glxinfo to know if your config is using GPU correctly ? It seems according to the log that you were really using nouveau DRI driver :)

Thanks a lot in adavance,

Samt43

vartom commented 6 years ago

In the system that I try there is no glxinfo. In which particular version of the system do you have a problem with 3D? I have now tried this https://github.com/denysvitali/tegra-nouveau-rootfs/releases/tag/untagged-439d9f4a817e73403582. It seems to be running asked for a password, but then does not boot.

Samt43 commented 6 years ago

Seems like you have to install gnome-shell or xfce4 in order to have something after boot. (i had the same issue) I could do some test and i have the same logs as yours. We only have software rendering for now, it seems that it's due to this : AIGLX: Screen 0 is not DRI2 capable

I could have acceleration working with a mesa patched some days ago but only for wayland, I continue to look on this,

Samt

friesoft commented 6 years ago

@Samt43 are you talking about those mesa patches? https://lists.freedesktop.org/archives/mesa-dev/2018-February/186241.html

vartom commented 6 years ago

It might look like this,

[   166.001] Build Operating System: Linux 4.12.7-1-ARCH aarch64 
[   166.006] Current Operating System: Linux alarm 4.15.2+ #68 SMP PREEMPT Sat Feb 24 15:35:11 +07 2018 aarch64
[   166.007] Kernel command line: cros_secure vpr=0x08000000@0xf6800000 cros_legacy root=/dev/sdb1 rootwait rw init=/init fbcon loglevel=0 debug earlyprintk drm.atomic=1 no_console_suspend firmware_class.path=/lib/firmware
[   166.017] Build Date: 30 January 2018  11:53:15PM
[   166.023]  
[   166.028] Current version of pixman: 0.34.0
[   166.039]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   166.039] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   166.061] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Feb 24 13:35:45 2018
[   166.070] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   166.072] (==) No Layout section.  Using the first Screen section.
[   166.072] (==) No screen section available. Using defaults.
[   166.072] (**) |-->Screen "Default Screen Section" (0)
[   166.072] (**) |   |-->Monitor "<default monitor>"
[   166.078] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   166.078] (==) Automatically adding devices
[   166.078] (==) Automatically enabling devices
[   166.078] (==) Automatically adding GPU devices
[   166.078] (==) Automatically binding GPU devices
[   166.078] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   166.098] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[   166.098]    Entry deleted from font path.
[   166.099] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[   166.099]    Entry deleted from font path.
[   166.099]    (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[   166.100] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[   166.100]    Entry deleted from font path.
[   166.100]    (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[   166.100] (==) FontPath set to:
    /usr/share/fonts/misc/,
    /usr/share/fonts/TTF/,
    /usr/share/fonts/OTF/
[   166.100] (==) ModulePath set to "/usr/lib/xorg/modules"
[   166.100] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   166.102] (II) Loader magic: 0x556eacdd28
[   166.102] (II) Module ABI versions:
[   166.102]    X.Org ANSI C Emulation: 0.4
[   166.102]    X.Org Video Driver: 23.0
[   166.102]    X.Org XInput driver : 24.1
[   166.102]    X.Org Server Extension : 10.0
[   166.104] (++) using VT number 1

[   166.104] (--) controlling tty is VT number 1, auto-enabling KeepTty
[   166.107] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[   166.109] (II) xfree86: Adding drm device (/dev/dri/card0)
[   166.110] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[   166.111] (II) xfree86: Adding drm device (/dev/dri/card1)
[   166.112] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 12 paused 0
[   166.112] (II) no primary bus or device found
[   166.112]    falling back to /sys/devices/platform/50000000.host1x/drm/drm/card0
[   166.112] (II) LoadModule: "glx"
[   166.116] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   166.154] (II) Module glx: vendor="X.Org Foundation"
[   166.154]    compiled for 1.19.6, module version = 1.0.0
[   166.154]    ABI class: X.Org Server Extension, version 10.0
[   166.156] (==) Matched modesetting as autoconfigured driver 0
[   166.157] (==) Matched fbdev as autoconfigured driver 1
[   166.157] (==) Assigned the driver to the xf86ConfigLayout
[   166.157] (II) LoadModule: "modesetting"
[   166.157] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   166.161] (II) Module modesetting: vendor="X.Org Foundation"
[   166.161]    compiled for 1.19.6, module version = 1.19.6
[   166.161]    Module class: X.Org Video Driver
[   166.161]    ABI class: X.Org Video Driver, version 23.0
[   166.161] (II) LoadModule: "fbdev"
[   166.162] (WW) Warning, couldn't open module fbdev
[   166.162] (II) UnloadModule: "fbdev"
[   166.162] (II) Unloading fbdev
[   166.162] (EE) Failed to load module "fbdev" (module does not exist, 0)
[   166.162] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   166.162] (II) modeset(0): using drv /dev/dri/card0
[   166.162] (II) modeset(G0): using drv /dev/dri/card1
[   166.162] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   166.162] (II) modeset(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
[   166.162] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[   166.162] (==) modeset(0): RGB weight 888
[   166.162] (==) modeset(0): Default visual is TrueColor
[   166.162] (II) Loading sub module "glamoregl"
[   166.162] (II) LoadModule: "glamoregl"
[   166.163] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[   166.204] (II) Module glamoregl: vendor="X.Org Foundation"
[   166.204]    compiled for 1.19.6, module version = 1.0.0
[   166.204]    ABI class: X.Org ANSI C Emulation, version 0.4
[   166.204] (II) glamor: OpenGL accelerated X.org driver based.
[   166.255] (II) glamor: EGL version 1.4 (DRI2):
[   166.272] (II) modeset(0): glamor initialized
[   166.272] (II) modeset(0): Output DSI-1 has no monitor section
[   166.273] (II) modeset(0): EDID for output DSI-1
[   166.273] (II) modeset(0): Printing probed modes for output DSI-1
[   166.273] (II) modeset(0): Modeline "2560x1800"x60.0  304.42  2560 2640 2720 2800  1800 1804 1808 1812 (108.7 kHz)
[   166.273] (II) modeset(0): Output DSI-1 connected
[   166.273] (II) modeset(0): Using sloppy heuristic for initial modes
[   166.273] (II) modeset(0): Output DSI-1 using initial mode 2560x1800 +0+0
[   166.273] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[   166.273] (==) modeset(0): DPI set to (96, 96)
[   166.273] (II) Loading sub module "fb"
[   166.273] (II) LoadModule: "fb"
[   166.273] (II) Loading /usr/lib/xorg/modules/libfb.so
[   166.281] (II) Module fb: vendor="X.Org Foundation"
[   166.281]    compiled for 1.19.6, module version = 1.0.0
[   166.281]    ABI class: X.Org ANSI C Emulation, version 0.4
[   166.281] (==) modeset(G0): Depth 24, (==) framebuffer bpp 32
[   166.281] (==) modeset(G0): RGB weight 888
[   166.281] (==) modeset(G0): Default visual is TrueColor
[   166.281] (II) Loading sub module "glamoregl"
[   166.281] (II) LoadModule: "glamoregl"
[   166.281] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[   166.281] (II) Module glamoregl: vendor="X.Org Foundation"
[   166.281]    compiled for 1.19.6, module version = 1.0.0
[   166.281]    ABI class: X.Org ANSI C Emulation, version 0.4
[   166.281] (II) glamor: OpenGL accelerated X.org driver based.
[   166.501] (II) glamor: EGL version 1.4 (DRI2):
[   166.613] (II) modeset(G0): glamor initialized
[   166.613] (==) modeset(G0): Using gamma correction (1.0, 1.0, 1.0)
[   166.613] (==) modeset(G0): DPI set to (96, 96)
[   166.613] (II) Loading sub module "fb"
[   166.613] (II) LoadModule: "fb"
[   166.614] (II) Loading /usr/lib/xorg/modules/libfb.so
[   166.614] (II) Module fb: vendor="X.Org Foundation"
[   166.614]    compiled for 1.19.6, module version = 1.0.0
[   166.614]    ABI class: X.Org ANSI C Emulation, version 0.4
[   166.614] (==) Depth 24 pixmap format is 32 bpp
[   166.849] (==) modeset(G0): Backing store enabled
[   166.849] (==) modeset(G0): Silken mouse enabled
[   166.854] (II) modeset(G0): RandR 1.2 enabled, ignore the following RandR disabled message.
[   166.860] (==) modeset(G0): DPMS enabled
[   166.860] (II) modeset(G0): [DRI2] Setup complete
[   166.860] (II) modeset(G0): [DRI2]   DRI driver: nouveau
[   166.860] (II) modeset(G0): [DRI2]   VDPAU driver: nouveau
[   167.040] (==) modeset(0): Backing store enabled
[   167.040] (==) modeset(0): Silken mouse enabled
[   167.041] (II) modeset(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[   167.053] (==) modeset(0): DPMS enabled
[   167.053] (II) modeset(0): [DRI2] Setup complete
[   167.053] (II) modeset(0): [DRI2]   DRI driver: tegra
[   167.053] (II) modeset(0): [DRI2]   VDPAU driver: tegra
[   167.053] (--) RandR disabled
[   167.293] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[   167.293] (II) AIGLX: enabled GLX_ARB_create_context
[   167.293] (II) AIGLX: enabled GLX_ARB_create_context_profile
[   167.293] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile
[   167.293] (II) AIGLX: enabled GLX_INTEL_swap_event
[   167.293] (II) AIGLX: enabled GLX_SGI_swap_control
[   167.293] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[   167.293] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[   167.293] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float
[   167.294] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[   167.300] (II) AIGLX: Loaded and initialized tegra
[   167.300] (II) GLX: Initialized DRI2 GL provider for screen 0
[   167.337] (II) modeset(G0): Damage tracking initialized
[   167.370] (II) modeset(0): Damage tracking initialized
[   167.370] (II) modeset(0): Setting screen physical size to 677 x 476
[   167.593] (II) config/udev: Adding input device hid-over-i2c 06CB:3370 (/dev/input/event0)
[   167.593] (**) hid-over-i2c 06CB:3370: Applying InputClass "libinput touchscreen catchall"
[   167.593] (II) LoadModule: "libinput"
[   167.593] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so

But this is not stable (. kmscube works through time and sometimes takes off with errors. weston-launch does not start. startx giving out 3 rectangles All this was received on the assembled rootfs with the settings approximated to the original ones. Using the drivers drm and mesa from cgit.freedesktop.org/~tagr

Samt43 commented 6 years ago

@friesoft No I was talking about this patch https://github.com/Samt43/mesa/commit/d64c261dc62c2b5a78163579ddcf349f7ddc2ed3 From the renderonly branch of @Gnurou plus the patch I made to Port it on Pixel c : https://github.com/Samt43/mesa/commits/renderonly With this compiled and installed using the rootfs scripts, I could run Weston correctly with acceleration. The patches that you are talking about are very recent and seem to be equivalent to @Gnurou patch but uses more recent features of the kernel. This is a great hope for us, and according to the description it should work for Pixel C. I will try to compile a 4.16 kernel soon and try to compile Mesa with these patches when I will get some time ! Thanks a lot for the infos !

Edit : it seems @vartom already tried to compile mesa from this and that resulted in an instable UI. @vartom don't we need a 4.16 kernel for this ?

denysvitali commented 6 years ago

@Samt43 The 4.16 kernel doesn't seem to work. Apparently they've messed up with some arm instructions. We'll have to wait for a new tagged release (that will be released today)

vartom commented 6 years ago

@Samt43 @denysvitali It is possible that for this (mesa) you need the kernel 4.17 https://github.com/thierryreding/linux/tree/for-4.17/work In patches, the general line of updates is viewed "Support sync FDs ..."

denysvitali commented 6 years ago

I've tried the for-4.17/work kernel, unfortunately it doesn't work. The display stays black. I'll push the kernel source (and a prebuilt image) as soon as possible.

denysvitali commented 6 years ago

@thierryreding for-4.17/work boot image is available here (source on my repo) whilst the latest 4.16-rc3 kernel boot image is available here

Please note that both images use my initramfs, which requires the rootfs in /system (/dev/block/mmcblk0p4).
You can still unpack / repack it to boot the kernel image with another initramfs.