[SOLVED] KMS not working anymore

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

[SOLVED] KMS not working anymore

Postby unformatted » Sat Oct 23, 2021 11:00 am

On RPi4 aarch64 with linux-raspberrypi kernel I have installed LXDE desktop as follows:

$this->bbcode_second_pass_code('', '
Display server
* Install Xorg.
# pacman -S xorg-server xorg-xinit xterm xf86-video-fbdev
* Test display server.
$ startx

Desktop environment
* Install LXDE.
# pacman -S lxde
* Edit ~/.xinitrc shell script for starting LXDE from terminal using startx.
$ nano /home/user/.xinitrc
exec startlxde
')

With the following config.txt this works fine:

$this->bbcode_second_pass_code('', '
initramfs initramfs-linux.img followkernel
temp_limit=70
hdmi_group=2
hdmi_mode=87
hdmi_cvt 2560 1440 60 3 0 0 1
max_framebuffer_width=2560
max_framebuffer_height=1440
hdmi_blanking=1
dtoverlay=vc4-fkms-v3d
dtparam=audio=on
dtoverlay=disable-wifi
dtoverlay=disable-bt
')

But as I change fkms to kms and reboot then I get random black screens.

I've search the arch wiki on kms and on the Installation chapter it says:
$this->bbcode_second_pass_quote('', '
')At first, note that for any method you use, you should always disable:

Any vga= options in your bootloader as these will conflict with the native resolution enabled by KMS.
Any video= lines that enable a framebuffer that conflicts with the driver.
Any other framebuffer drivers (such as uvesafb).

Now as part off Xorg install I have xf86-video-fbdev installed, which is a framebuffer driver. Above installation instructions are quite a few years old, before (f)kms was intruduced and one had to use gpu_mem setting in config.txt.

Should I just remove xf86-video-fbdev and/or are there other things I need to do switching to kms?
Last edited by unformatted on Wed Oct 27, 2021 10:08 am, edited 2 times in total.
unformatted
 
Posts: 119
Joined: Tue Mar 09, 2021 5:23 pm

KMS not working anymore

Postby unformatted » Mon Oct 25, 2021 4:36 pm

Today I tested on another RPi4 with same setup and kms does not work at all, there is no hdmi output after booting. I upgraded, same issue.

I use "default" config settings:
$this->bbcode_second_pass_code('', 'dtoverlay=vc4-kms-v3d
initramfs initramfs-linux.img followkernel
')
I tried adding following in config.txt:
* using edid file from monitor
* vc4-kms-v3d-pi4
* hdmi_ignore_edid=0xa5000080
* disable_fw_kms_setup=1
and almost all possible combinations of those settings.

Here's the output of journalctl --since=2021-10-25 which contains today's efforts:
https://pastebin.com/9Cq6BiUP

I also cannot ssh into the pi when kms is used so I constantly have to swap the sd card into another pc and edit config.txt.

EDIT: just changed the subject into "KMS not working anymore"
unformatted
 
Posts: 119
Joined: Tue Mar 09, 2021 5:23 pm

Re: KMS not working anymore

Postby solskogen » Mon Oct 25, 2021 5:02 pm

Have you tried turning off the Pi and starting it up again? I had the same issue, but it went away as soon as I cut the power.
solskogen
 
Posts: 160
Joined: Mon Nov 18, 2013 10:41 am

Re: KMS not working anymore

Postby robg » Mon Oct 25, 2021 8:32 pm

There are too many factors involved at this point. For debugging, let's start simple:

- Are you running the linux-raspberrypi kernel or the linux-raspberrypi4 kernel? You should / must use the latter.
- If, following a fresh install, you only run
$this->bbcode_second_pass_code('', '
pacman -Syu && pacman -S linux-rasperrypi4 raspberrypi-bootloader-x raspberrypi-firmware
')
does it boot with the default config.txt?
- If not, do you have a different screen to test with?
robg
 
Posts: 185
Joined: Tue Jan 05, 2021 8:22 am

Re: KMS not working anymore

Postby unformatted » Tue Oct 26, 2021 6:07 am

I completely removed all cables and waited a couple of minutes, must have done that dozens of time.

$this->bbcode_second_pass_code('', '
[user@PC19 ~]$ uname -a
Linux PC19 5.10.74-2-raspberrypi4-ARCH #1 SMP PREEMPT Sat Oct 23 04:13:35 MDT 2021 aarch64 GNU/Linux
')
$this->bbcode_second_pass_code('', '
[user@PC19 ~]$ cat /boot/config.txt
# See /boot/overlays/README for all available options
dtoverlay=vc4-kms-v3d
initramfs initramfs-linux.img followkernel
')
I does boot with default config but ends with "no signal" message on monitor and I cannot even ssh into it.

I tested on another hdmi monitor and also on a dvi monitor connected using dvi to hdmi cable but same results.
unformatted
 
Posts: 119
Joined: Tue Mar 09, 2021 5:23 pm

Re: KMS not working anymore

Postby unformatted » Tue Oct 26, 2021 4:28 pm

The RPi4 as described in my first post was installed from scratch about 1 week ago and using fkms as described. Then a few days later I switched it to kms, rebooted and the random black screens began. So I posted here and meanwhile setup another RPi4 for testing. I just noticed on my conky screen that the first post RPi4 was running for 8 days and realized @solskogen 's remark on powering off. After doing that the random black screens on this RPi4 seem to be gone. Thanks a lot for solving that problem!

Then I decided to power off this RPi4 and put the sd card into the other "test" RPi4. After powering up it boots but ends with the "no signal" message. So my test RPI4 gives "no signal" after booting with kms but works fine when changed back to fkms.

This got me thinking that this RPI4 has been used for all kinds of testing and I vaguely rembember fiddling with some hardware setting a long time ago. I remember doing something on the terminal showing sort of a table and then I issued a command which changed a value or address or something but I have absolute no idea what the context was. So this test RPI4 works with fkms but not with kms and it's in the pi somewhere, not the sd card.

I just hope someone has knowledge on how to troubleshoot this.
unformatted
 
Posts: 119
Joined: Tue Mar 09, 2021 5:23 pm

Re: KMS not working anymore

Postby robg » Tue Oct 26, 2021 7:46 pm

So the clean (in the sense that you have applied no hardware-related modifications) RPI works fine with KMS, the other works only with FKMS?

To troubleshoot this further, I suggest taking the following steps:

- If the black screens appear again after leaving the clean RPI running for a while with KMS, please post the output of `dmesg` (highlighting, if possible, when the black screen appeared.)
- Run the other RPI with FKMS and check the output of `tvserive -s` (see here for details.)
- The output of `tvserive -s` should suggest a working HDMI mode. Try applying that HDMI mode via hdmi_mode. So, your config.txt would extend the default kms file only by the hdmi_mode entry.
- If the above does not work, only try i) varying the hdmi_group, setting ii) hdmi_drive=2, and ii) setting force_turbo=1.
robg
 
Posts: 185
Joined: Tue Jan 05, 2021 8:22 am

Re: KMS not working anymore

Postby unformatted » Wed Oct 27, 2021 10:08 am

The first RPi4 works with KMS but still has the random black screens but this may have to do with other hdmi settings in config.txt which may conflict with KMS. I will need to test that further on my other RPI4 (the first is actually my daily driver).

My other RPi4 didn't work with KMS so I tried all suggestions but to no avail. Finally I found the culprit: I was using a USB-A to USB-micro powercable with a USB-micro to USB-C adapter to connect to the Pi. Switching with the powercable from the other Pi the problem was gone and KMS suddenly booted fine. I'm also using the same powersuppy which measures 4.97 VDC under load and there are no "lightning bolts" on the screen.

I'm closing this issue for now, thanks for replying.
unformatted
 
Posts: 119
Joined: Tue Mar 09, 2021 5:23 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 2 guests