[BUG] DRM preview can't find DRM cards
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- linux, python
- Domain
- computer-graphics, operating-systems
Research direction
Start with examples/preview_drm.py and follow Picamera2.start_preview in picamera2.py into previews/drm_preview.py, especially the pykms.Card() call in DrmPreview._manager.add. Reproduce on the reported Raspberry Pi setup and determine why no DRM card is found; done means the DRM preview starts without the reported error.
Written by the indexing model from the issue text.
Description
# For use from the login console, when not running X Windows.
import time
from picamera2 import Picamera2, Preview
picam2 = Picamera2()
picam2.start_preview(Preview.DRM, x=100, y=100, width=480, height=320)
preview_config = picam2.create_preview_configuration({"size": (480, 320)})
picam2.configure(preview_config)
picam2.start()
time.sleep(5)
running the above script (preview_DRM.py from examples) or any snippet that tries to open up a DRM preview I get the following error message:
File "/home/tsid/picamera2/examples/preview_drm.py", line 10, in <module>
picam2.start_preview(Preview.DRM, x=100, y=100, width=480, height=320)
File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 569, in start_preview
preview = preview_table[preview](**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/picamera2/previews/drm_preview.py", line 56, in __init__
self.init_drm(x, y, width, height, transform)
File "/usr/lib/python3/dist-packages/picamera2/previews/drm_preview.py", line 78, in init_drm
DrmPreview._manager.add(self)
File "/usr/lib/python3/dist-packages/picamera2/previews/drm_preview.py", line 19, in add
self.card = pykms.Card()
^^^^^^^^^^^^
RuntimeError: failed to find DRM cards
I'm running a raspberry pi 4B 8gb on 64bit lite OS via SSH from windows
camera used: HQ Camera module
also hooked up on the pi is a Waveshare RPi LCD C 3.5 SPI screen
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/picamera2
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
raspberrypi/picamera2#1405 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
raspberrypi/picamera2#1404 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 57/100
raspberrypi/picamera2#1403 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
raspberrypi/picamera2#1392 · 13 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
raspberrypi/picamera2#1389 · 4 comments ·
All issues in raspberrypi/picamera2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100