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

Raspbian Bullseye - tvservice is not supported w/ vc4-kms-v3d driver #143

Open
kpfa opened this issue Nov 30, 2021 · 14 comments
Open

Raspbian Bullseye - tvservice is not supported w/ vc4-kms-v3d driver #143

kpfa opened this issue Nov 30, 2021 · 14 comments

Comments

@kpfa
Copy link

kpfa commented Nov 30, 2021

On a fresh install of bullseye (Raspbian lite) We loaded the snap and were then able to install rpisurv 3 from git.

sudo apt update
sudo apt install snapd
sudo snap install core
sudo snap install vlc-pi --edge --devmode
sudo snap connect vlc-pi:hardware-observe

However, another issue pops up 'tvservice is not supported when using the vc4-kms-v3d driver.'

/usr/bin/rpisurv
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
/usr/local/bin/rpisurv/core/util/setuplogging.py:15: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  logcfg = yaml.load(ymlfile)
2021/11/30 10:57:10 - l_default - INFO - Starting rpisurv 3.0.0
/usr/bin/tvservice is not supported when using the vc4-kms-v3d driver.
Similar features are available with standard linux tools
such as modetest from libdrm-tests.
Traceback (most recent call last):
  File "/usr/local/bin/rpisurv/surveillance.py", line 170, in <module>
    displays=parse_tvservice()
  File "/usr/local/bin/rpisurv/surveillance.py", line 69, in parse_tvservice
    tvserviceresult_l = subprocess.check_output(['/usr/bin/tvservice', '-l'], text=True )
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/tvservice', '-l']' returned non-zero exit status 1.

root@raspberrypi:~/rpisurv# tvservice -l
tvservice is not supported when using the vc4-kms-v3d driver.
Similar features are available with standard linux tools
such as modetest from libdrm-tests.

I'll start a new issue (if one doesn't already exist)

Originally posted by @kpfa in #141 (comment)

@SvenVD
Copy link
Owner

SvenVD commented Dec 4, 2021

Thanks for reporting. However since official VLC is not working anyways on bullseye (at the moment). I will put a fix for this on hold too. Recommend to use buster for the time being: #141 (comment)

@CronoBandit
Copy link

CronoBandit commented Mar 13, 2022

@SvenVD
Got rpisurv (the broken tvservice) to work on Bullseye with one simple edit :

Edit: /boot/config.txt

Change --> dtoverlay=vc4-kms-v3d
To --> dtoverlay=vc4-fkms-v3d

After this change, & a reboot, rpisurv works fine again on pi 4 and 11.2 Debian 👍

I can't take credit for this ... saw it in another (unrelated) discussion recently. Figured I'd give it a go .... success !

Also, not sure what (if any) "trade-off" is for (fake) fkms -vs- kms. My weak understanding is maybe a kms-like passthru to the legacy hardware API. This might be the work-around needed until KMS matures fully.
Note: tvservice is still officially broken for 11.2 & vc4-kms-v3d.

@felker
Copy link

felker commented Apr 13, 2022

@CronoBandit did you already have rpisurv installed before that change? If not, how were you able to install it without the following error:

Your version of vlc does not have the needed mmal options. Rpisurv needs those
Minimum tested vlc version for Rpisurv is (VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72)
Aborting installation, upgrade to latest vlc player with mmal support

What VLC version are you using? I have

VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)

@felker
Copy link

felker commented Apr 13, 2022

@kpfa did you have to heavily modify install.sh to prevent it from re-installing vlc from apt and shadowing the snap-distributed vlc-pi?

@CronoBandit
Copy link

CronoBandit commented Apr 13, 2022

@felker
rpisurv is only for Raspberry Pi hardware.

$ uname -a
Linux host1 5.10.103-v7l+ #1530 SMP Tue Mar 8 13:05:01 GMT 2022 armv7l GNU/Linux
$ sudo apt list --installed | grep vlc/
vlc/stable,now 3.0.16-1+rpi1+rpt2 armhf [installed]

So that we don't loose context here.... The Raspbian OS base install includes vlc already installed, and that vlc is already has mmal support which is specific to the GPU hardware on Pi. The purpose of this thread --> it seems rpisurv broke when the Raspbian OS migrated from Buster to Bullseye. My comment above simply offers a work-around to get it working again on Bullseye.

@felker
Copy link

felker commented Apr 13, 2022

I am aware that this is for Raspberry Pi's--- trying to use this workaround on my 4B with a fresh Bullseye install. I am also using the 64-bit OS, which is another difference here. mmal does not seem to be supported on the official Raspberry Pi VLC (RPi-Distro/vlc#49), so I thought that the alternative VLC suggested by @kpfa might be suitable, along with your FKMS suggestion. But you would need to modify install.sh, just not sure of the best way to do so.

@CronoBandit
Copy link

CronoBandit commented Apr 14, 2022

My apologies ... it's got to be the 64-bit OS causing your added issues then.

To repeat my success:
Burn the SD card via rpi-imager: choose the default image --> "Raspberry Pi OS (32bit) 0.8 GB" ( or 32-bit Full 2.2 GB )
Boot the Pi, go through the 1st time setup - reboot.
Edit: /boot/config.txt
Change: dtoverlay=vc4-kms-v3d --> To: dtoverlay=vc4-fkms-v3d
Reboot
Note: the correct vlc (with mmal) is already installed in the OS.
Now just install rpisurv via github, follow the install doc.

Hope that helps!

@UntouchedWagons
Copy link

Yeah I still can't install rpisurv on Bullseye because the installer tries to install versions of VLC that don't exist

@JGVB
Copy link

JGVB commented Jul 24, 2022

Screen Shot 2022-07-24 at 1 17 33 AM

I am getting this error even on buster. Any ideas?

@si458
Copy link
Contributor

si458 commented Oct 23, 2022

not sure if it will help others but i used this comment and it worked a treat!
switch the GL driver to legacy mode
RPi-Distro/vlc#50 (comment)

@UntouchedWagons
Copy link

I tried the dtoverlay solution and I still can't install rpisurv on dietpi 8

@gitterman
Copy link

I have a model 1 which serves as a doorbell monitor.
As such, it uses an USB camera and a small car monitor attached to the sdtv port.
The monitor is only switched on if someone is ringing the bell.
As the old system doesn't support the latest ssh anymore, I decided to upgrade to bullseye only to find that tvservice doesn't work with it.
I always get 'tvservice is not supported when using the vc4-kms-v3d driver'
I tried to change the driver in config.txt to vc4-fkms-v3d but no change.
I also used raspi-config to disable the GL driver but still no change.
Why the heck can't I disable the vc4-fkms-v3d once and for good?
I don't need HDMI at all.
What can I do to disable the HDMI driver and to switch the monitor on/and off ?

@si458
Copy link
Contributor

si458 commented Dec 4, 2022

I have a model 1 which serves as a doorbell monitor.
As such, it uses an USB camera and a small car monitor attached to the sdtv port.
The monitor is only switched on if someone is ringing the bell.
As the old system doesn't support the latest ssh anymore, I decided to upgrade to bullseye only to find that tvservice doesn't work with it.
I always get 'tvservice is not supported when using the vc4-kms-v3d driver'
I tried to change the driver in config.txt to vc4-fkms-v3d but no change.
I also used raspi-config to disable the GL driver but still no change.
Why the heck can't I disable the vc4-fkms-v3d once and for good?
I don't need HDMI at all.
What can I do to disable the HDMI driver and to switch the monitor on/and off ?

Are you rebooting the pi after every change you are doing? You need to reboot the pi after changing graphics settings

@gitterman
Copy link

Yes, I did reboot after the changes I did to config.txt.
In the meantime I did revert to buster and with that everything works fine.
(for reference: https://forums.raspberrypi.com/viewtopic.php?t=257631)
I did find many links from people having problems with switching the display on and off, but no working solution for bullseye.
Bullseye is out now for more than a year, and things didn't seem to have improved.

vogler added a commit to vogler/smart-home that referenced this issue Feb 22, 2023
```console
$ ./cec.sh on
...
ERROR:   [            1003]     RegisterLogicalAddress - CEC is being used by another application. Run "tvservice --off" and try again.
...
$ tvservice --off
tvservice is not supported when using the vc4-kms-v3d driver.
Similar features are available with standard linux tools
such as modetest from libdrm-tests.
```
Found via SvenVD/rpisurv#143
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

8 participants