Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full KMS not working @4.19.x #2891

Closed
ezar opened this issue Mar 11, 2019 · 21 comments
Closed

Full KMS not working @4.19.x #2891

ezar opened this issue Mar 11, 2019 · 21 comments

Comments

@ezar
Copy link

ezar commented Mar 11, 2019

Describe the bug
Using Full KMS, raspbi doesn't start.

To reproduce
dtoverlay=vc4-kms-v3d @ config.txt

System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:

  • Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
    Pi3B+
  • Which OS and version (cat /etc/rpi-issue)?
    Raspberry Pi reference 2018-06-27
    Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 0d34fb94398a4bd79711f21d6a0b5d35fe5f4a76, stage5
  • Which firmware version (vcgencmd version)?
    Mar 6 2019 14:47:17
    Copyright (c) 2012 Broadcom
    version b403ee6ed819f9ac7a96834ac437b6cfdd4512ad (clean) (release) (start_x)
  • Which kernel version (uname -a)?
    Linux magicmirror 4.19.27-v7+ SDIO-overlay: add poll_once-boolean parameter #1206 SMP Wed Mar 6 14:40:18 GMT 2019 armv7l GNU/Linux

Logs
No logs. Raspi doesnt boot :(

@6by9
Copy link
Contributor

6by9 commented Mar 11, 2019

Have you enabled it through raspi-config, or just altered config.txt? IIRC there are a couple of other parameters that get set up via raspi-config.

You've obviously used rpi-update to get the 4.19 kernel. Have you tried any other 4.19 kernels?
sudo rpi-update 82f49d8 would get the previous release.

4.19.27 does work with legacy, vc4-fkms-v3d, and vc4-kms-v3d, so something odd is going on with your system.

@ezar
Copy link
Author

ezar commented Mar 12, 2019

Yes, I use raspi-config.
I try with previous 4.19.x version with same result.
Do you need my config.txt?
Regards

@6by9
Copy link
Contributor

6by9 commented Mar 12, 2019

If you've made your own modifications, then yes having your config.txt would be useful.

So this is a vanilla Raspbian download, updated via apt update and apt upgrade, and then using Full KMS driver? Nothing else special? I'll try to reproduce today.

@ezar
Copy link
Author

ezar commented Mar 12, 2019

Nothing special. Only I need to rotate screen.

config.txt:

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=82

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=1

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on,i2c_arm_baudrate=10000
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# OpenGL
dtoverlay=vc4-kms-v3d
#dtoverlay=vc4-fkms-v3d

# Magic Mirror
display_rotate=3
avoid_warnings=1
start_x=1
gpu_mem=128

@6by9
Copy link
Contributor

6by9 commented Mar 12, 2019

Your title says "Full KMS not working", but your config.txt says vc4-fkms-v3d which is the fake or firmware KMS driver. Please confirm that you really mean fkms isn't working for you.

I was about to post that none of

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=82
hdmi_drive=1
display_rotate=3

will do anything in full KMS mode.

@pelwell
Copy link
Contributor

pelwell commented Mar 12, 2019

As Orson Welles (and Faith No More) would say, it's "F for Fake".

@6by9
Copy link
Contributor

6by9 commented Mar 12, 2019

Tested with November 2018 Raspbian image, apt update, apt upgrade, sudo rpi-update
Using sudo raspi-config to enable either Full or Fake KMS drivers works fine with default config.

It appears that display_rotate=3 does upset Full KMS (vc4-kms-v3d), but as I noted earlier it is meaningless in the full KMS world. I'm therefore reluctant to spend much effort investigating why.
xrandr --output HDMI-1 --rotate left is the command to amend the rotation in KMS, or stuff it in .bashrc if you want it permanently.

All your other hdmi options in config.txt are harmlessly ignored under full KMS.

@6by9
Copy link
Contributor

6by9 commented Mar 12, 2019

Actually I do know why it is failing.
display_rotate=[1|3] requires the transposer, however because you've requested the full KMS driver the firmware will never touch it as the ARM "owns" it. Boot stalls waiting for a screen update to complete, which will never happen becuase it requires the unavailable tranposer.

Low priority to fix as there is an obvious workaround, but it probably ought to get done to avoid others falling into the same hole.

@ezar
Copy link
Author

ezar commented Mar 12, 2019

Your title says "Full KMS not working", but your config.txt says vc4-fkms-v3d which is the fake or firmware KMS driver. Please confirm that you really mean fkms isn't working for you.

I was about to post that none of

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=82
hdmi_drive=1
display_rotate=3

will do anything in full KMS mode.

Sorry about that. I'm using fake KMS because full fails. I correct the config file for testing purposes.

@6by9
Copy link
Contributor

6by9 commented Mar 12, 2019

Sorry about that. I'm using fake KMS because full fails. I correct the config file for testing purposes.

No problem, it was just confusing.
The issue is now understood, and having said it's a low priority it's a two line "fix" (although I then also lose the rainbow screen).

@ezar
Copy link
Author

ezar commented Mar 12, 2019

Thanks @6by9 !!!!

Ok. I will remove "display_rotate=3" :)

@6by9
Copy link
Contributor

6by9 commented Mar 12, 2019

Patch pushed internally so that "display_rotate=3" shouldn't stall boot with KMS.

Loss of the rainbow screen may just be one of those things as it isn't that easy to fix, and the configuration options make no sense.
It does have a minor impact on legacy and fkms systems in that it is only when the Linux frame buffer kicks the transposer function does the rainbow screen flash up several seconds into the kernel boot, and is then almost immediately replaced by the frame buffer. If there is an easy fix then I'll add it.

@ezar
Copy link
Author

ezar commented Mar 12, 2019

I try it after eliminate display_rotate and works as expected.
The only problem is when I try to rotate screen using xrandr fails!!! Say “Can’t open display”.

@pelwell
Copy link
Contributor

pelwell commented Mar 12, 2019

xrandr needs the name of a display to control - see the man page. If you run it from a terminal opened on the desktop, the DISPLAY environment variable should be set to :0.0, and the command should work without an explicit display. If not, try adding -display :0.0.

@ezar
Copy link
Author

ezar commented Mar 12, 2019

@pelwell works fantastic!
If I want to apply when rpi start?

@pelwell
Copy link
Contributor

pelwell commented Mar 12, 2019

I was going to suggest adding it to /etc/rc.local, but it could end up being started before the X server. This page suggests putting it to ~/.config/autostart/.desktop, or /etc/xdg/autostart/.desktop, but I've not tried either.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Mar 20, 2019
kernel: Enable MT76 USB wifi modules
See: raspberrypi/linux#2890

kernel: staging: bcm2835-codec: NULL component handle on queue_setup failure
See: raspberrypi/linux#2898

kernel: f2fs: fix to skip verifying block address for non-regular inode
See: raspberrypi/linux#2896

kernel: vcsm: rpi-4.19.y - gcc-v8 fixes
See: raspberrypi/linux#2897

kernel: vc-sm-cma tidy ups, and one for bcm2835_codec
See: raspberrypi/linux#2889

kernel: staging: vc_sm_cma: Remove erroneous misc_deregister
See: raspberrypi/linux#2888

kernel: video: bcm2708_fb: Try allocating on the ARM and passing to VPU
See: raspberrypi/linux#2875

firmware: smservice: Avoid a double free

firmware: arm_loader/display: All the framebuffer allocation to be made on the ARM

firmware: isp_tuners: Fix memory leak in error path

firmware: testc: Fix dps parsing

firmware: camera_subsystem: Fix hardware sync pulses off disable_camera_led

firmware: Replace the remaining direct users of C(mask_gpu_interrupt[0|1])

firmware: arm_display: Kick transposer for the rainbow screen if required
firmware: dispmanx: Do not allow transpose if using Full KMS
See: raspberrypi/linux#2891
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Mar 20, 2019
kernel: Enable MT76 USB wifi modules
See: raspberrypi/linux#2890

kernel: staging: bcm2835-codec: NULL component handle on queue_setup failure
See: raspberrypi/linux#2898

kernel: f2fs: fix to skip verifying block address for non-regular inode
See: raspberrypi/linux#2896

kernel: vcsm: rpi-4.19.y - gcc-v8 fixes
See: raspberrypi/linux#2897

kernel: vc-sm-cma tidy ups, and one for bcm2835_codec
See: raspberrypi/linux#2889

kernel: staging: vc_sm_cma: Remove erroneous misc_deregister
See: raspberrypi/linux#2888

kernel: video: bcm2708_fb: Try allocating on the ARM and passing to VPU
See: raspberrypi/linux#2875

firmware: smservice: Avoid a double free

firmware: arm_loader/display: All the framebuffer allocation to be made on the ARM

firmware: isp_tuners: Fix memory leak in error path

firmware: testc: Fix dps parsing

firmware: camera_subsystem: Fix hardware sync pulses off disable_camera_led

firmware: Replace the remaining direct users of C(mask_gpu_interrupt[0|1])

firmware: arm_display: Kick transposer for the rainbow screen if required
firmware: dispmanx: Do not allow transpose if using Full KMS
See: raspberrypi/linux#2891
@vanfanel
Copy link

vanfanel commented Apr 30, 2019

Full KMS is not working on 4.14.114 either. I have just built the latest kernel on the 4.14.y branch and I get a black screen unless I disable the vc4-kms-v3d overlay.

@popcornmix
Copy link
Collaborator

What was the last version that did work @vanfanel ?

@vanfanel
Copy link

vanfanel commented Apr 30, 2019

@popcornmix : I am not building the kernel very often, but 4.14.72-v8+ (which was the version I was using previously) seems to work perfectly fine with the vc4-kms-v3d overlay.

EDIT: My fault, sorry. I was installing the modules to the wrong location... the vc4-kms-v3d overlay works fine with 4.14.114. Please ignore my previous report! Really sorry.

@6by9
Copy link
Contributor

6by9 commented May 1, 2019

Are we happy to close this one?
ezar's issue with display_rotate=3 is fixed, and is an invalid configuration anyway.
vanfanel's issue was user error in installing the modules in the wrong place. (It looks like it's on an aarch64 build as well based on 4.14.72-v8+)

Full KMS should be working fine on both 4.14 and 4.19.

mkreisl added a commit to xbianonpi/xbian-package-firmware that referenced this issue Oct 6, 2019
- firmware: camera/image_encode: Add timestamp to frames encoded with image_encode
  See: raspberrypi/linux#2351

- firmware: camera_subsystem: Clean up disable_camera_led handling

- firmware: smservice: Add defines for VPU allocations
- smservice: Add support for reporting the supported version to the host

- firmware: Camplus: cdi: Remove requirement for calibration functions

- firmware: isp: Reinstate lres shift parameter accidentally dropped with gamma changes
  See: #1108

- firmware: mmal_ril: List all 4 Bayer orders if the IL component says it supports Bayer

- firmware: raspivid: Stop --raw option resetting --raw-format to YUV
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=189830&start=25#p1432589

- firmware: Fixed up overflow in microsecond timer
  See: raspberrypi/userland#535

- firmware: smservice: Avoid a double free

- firmware: arm_loader/display: All the framebuffer allocation to be made on the ARM

- firmware: isp_tuners: Fix memory leak in error path

- firmware: testc: Fix dps parsing

- firmware: camera_subsystem: Fix hardware sync pulses off disable_camera_led

- firmware: Replace the remaining direct users of C(mask_gpu_interrupt[0|1])

- firmware: arm_display: Kick transposer for the rainbow screen if required
- firmware: dispmanx: Do not allow transpose if using Full KMS
  See: raspberrypi/linux#2891

- firmware: Revert: arm_loader/display: All the framebuffer allocation to be made on the ARM

- firmware: arm_loader: Further conditionals for passing in a frame buffer

- firmware: di_adv: Drop back to fast if QPUs are masked off

- firmware: Fix AWB exception bug

- firmware: Updates for Pi4

- firmware: Add missing licence file

- firmware: 2711: CORE, EMMC & BVB clock updates for WiFi / 4Kp60
- firmware: 711: Use boost instead of fixed freq for 4Kp60

- firmware: hvs: Emulate the EOLn interrupt with a timer reset from VSTART
  See: #1154

- firmware: Add support for Rec2020 colour space in vc_image, IL, and MMAL

- firmware: Fix composite mode on devices up to Pi3B+
  See: #1166

- firmware: Fixes for core_freq_min causing failure on HDMI1
  See: http://git/vc4/vc4/merge_requests/529

- firmware: hdmi: Don't release previous boost until mode set is complete
  See: #1159

- firmware: bcm_host: Adjust for 64-bit physical addresses
  See: #1161

- firmware: arm_loader: Shrink most stubs back to 256 bytes, add arm64 GIC stub
  See: raspberrypi/linux#3032

- firmware: arm_dispmanx: Add support for setting the colour encoding

- firmware: dmalib: Fix Lite channel interrupt usage, and macro name

- firmware: Force overscan off when using LCDs
  See: #1173

- firmware: cec: Fix crash when using CEC with HDMI1

- firmware: arm_display: Fix race condition initialising CEC

- firmware: hdmi: Always use boost frequency for initial mode set
  See: #1159

- firmware: AWB: Fix usage for IR operation
  See: #1167

- firmware: arm_loader: Support CLOCK_EMMC2 from GET_CLOCK_RATE
  See: #1179

- firmware: arm_loader: Force word alignment for the DTB
  See: #1175

- firmware: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: Assorted minor fixes for tvservice -o

- firmware: Rename hdmi_enable_4k to hdmi_enable_4kp60

- firmware: Revert: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: dispmanx: Fix handling of disable_overscan to not disable it totally
  See: raspberrypi/linux#3059

- firmware: power: Enable/disable H264 and ISP clocks with domain

- firmware: arm_loader: arm_64bit=0 should disable loading of kernel8.img

- firmware: dt-blob: CM has no activity LED

- firmware: AWB updates
  See: #1167

-firmware: Change order of display remapping for default display number

- firmware: AWB: Set default number of stats regions for RPi AWB
  See: #1198

- firmware: Fix composite interrupt HVS channel

- firmware: scalarlib: Fix width setting for SCALERLIB_PIXEL_FORMAT_YUV10COL

- firmware: vcmailbox: Add a new SET_AUDIO_LDO_STATE mailbox command

- firmware: Add mailbox call to report the HDMI timings

- firmware: H264: Set the decoder cache AXI burst length to the same as the encoder

- firmware: gencmd: Fix gencmd max result length
- firmware: bootloader_config: New gencmd to read the EEPROM config

- firmware: pwm_audio: Use PWM1 on BCM2838 unless remapped
  See: #1178

- firmware: Fixups for missing code changes from Pi4 branch
  See: #1201

- firmware: pwm_audio: Use the correct DREQs on Pi4
  See: #1214

- firmware: pixelvalve_2711: Alter back porch for widths of 1366
  See: #1202

- firmware: Clear the SMIDSW1 display interrupt flag on startup

- firmware: dt-blob: Declare Pi 4B's SD_IO voltage selector

- firmware: Fix to allow HDMI audio port route setting
  See: raspberrypi/linux#3100

- firmware: AWB: Allow user to set manual gains for the RPi algorithm

- firmware: arm_loader: Fix disabling of audio before reboot

- firmware: fixed up the custom CVT values to use correct group

- firmware: hdmi: Add independent table entries for hdmi_timings on each display
  See: #1218

- firmware: arm_loader: Fix initial_turbo getting stuck
  See: #1005

- firmware: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: arm_loader: Use platform_get_min_core_voltage for actual min voltage

- firmware: clock: Remember disable state across clock changes

- firmware: platform: pi4: Reduce min core voltage to 810mV

- firmware: arm_dt: Use boost to force turbo mode rather than modifying core_freq_min for uart

- firmware: arm_loader: Add optional flag to add_boost and get_boost calls

- firmware: avs_2711: Move margin from init structure to run time

- firmware: platform: fix get_min_default

- firmware: arm_loader: Use AP_CLOCK_T for clock_iterator for easier debugging

- firmware: AWB: Fix for manual WB settings in capture
  See: #1215

- firmware: sdhost_arasan: Disable busy wait on EMMC_STATUS_NEW_CARD_DATA_SET

- firmware: power: Add 2711-specific PMIC compensation values

- firmware: platform: Remove 10mV of margin

- firmware: Revamp file loading logic

- firmware: power: Allow reading uncached voltage

- firmware: arm_loader: Request KMS to use CVT timings

- firmware: vc_image: Default YUVUV to non-tall mode, with flag if required

- firmware: ldconfig: Implement [pi2/pi3/pi3+] using board types
  See: #1242

- firmware: Avoid defaulting to 64-bit kernel on older Pi

- firmware: Port file loading revamp to master

- firmware: platform: Set up emmc clock earlier

- firmware: hdmi: Implement platform_display_power on 2711
  See: #1224

- firmware: arm_loader: Pass overscan settings to the kernel

- firmware: arm_loader: Add option disable_fw_kms_setup to stop FKMS setup by FW

- firmware: hdmi: Use pixel clock multiplier to determine the core clock

- firmware: Fixups for composite output mode
  See: #1223

- firmware: platform: Allow display_power to be queried from gencmd
  See: #1224

- firmware: arm_loader: Fix no-DT and upstream handling
  See: #1250

- firmware: Round up HDMI0 minimum core clock

- firmware: board_info: Support bcm2710- and bcm2837- Pi 2 DTBs
  See: raspberrypi/linux#3234

- firmware: power: bcm2711: Rescale the GPIO pad power

- firmware: brfs: Add GENET driver for 2711

- firmware: bootloader_state: Add network state and bootmode configuration

- firmware: bootloader_state: Fix mask for EEPROM header magic

- firmware: arm_loader: Fix initial_turbo getting stuck
  See: #1005

- firmware: ldconfig: Support [edid=*] to mean any HDMI monitor
  See: #1136

- firmware: image_fx: Remove restriction that output stride must match input stride

- firmware: image_fx: Remove spamming log line

- firmware: platform: Switch to divide by one when arm_freq exceeds 2GHz

- firmware: Add EMMC support to 2711 Arasan EMMC driver

- firmware: arm_loader: Use /memory@0 if found
  See: raspberrypi/linux#3244

- firmware: bootloader_state: Fix length for bootloader_config

- firmware: arasan_emmc: Fix STB_GPIOOVERRIDE for MMC1 in network boot

- firmware: bfs: Verify that eth FS has not been closed before using
@leragequit
Copy link

leragequit commented Jun 26, 2020

Hello there.
For me Full KMS is still not working when using the Buster Lite Image and Kernel
Linux raspberrypi 5.4.47-v7+ #1322 SMP Wed Jun 17 17:52:39 BST 2020 armv7l GNU/Linux
The screen just stays dark, ssh works though.

It would be really nice if this could be fixed in the near future, as I am experiencing issues with the Fake KMS driver and QT.

edit:
Working on a Raspberry Pi 3+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants