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

pipresent on a raspberry with 7 inch LCD #11

Open
henkkoorn opened this issue Apr 10, 2024 · 11 comments
Open

pipresent on a raspberry with 7 inch LCD #11

henkkoorn opened this issue Apr 10, 2024 · 11 comments

Comments

@henkkoorn
Copy link

when I type the following in the thermal: python3 /home/pi/pipresents/pipresents.py -p pp_mediashow_1p5

that gives the following error message:
xrandr: Failed to get size of gamma for output default
Traceback (most recent call last):
File "/home/pi/pipresents/pipresents.py", line 1004, in
pp = PiPresents()
File "/home/pi/pipresents/pipresents.py", line 288, in init
status,message,self.root=self.dm.init(self.options,self.handle_user_abort,self.pp_dir,False)
File "/home/pi/pipresents/pp_displaymanager.py", line 142, in init
status,message=self.process_displays_model4()
File "/home/pi/pipresents/pp_displaymanager.py", line 271, in process_displays_model4
DisplayManager.displays.append(DisplayManager.randr_map[DisplayManager.randr_displays[index]])
KeyError: 'default'

@KenT2
Copy link
Owner

KenT2 commented Apr 10, 2024

Are you using the official 7 inch display or another type?
Could you type xrandr in a terminal window and post the output.
You can copy from the terminal window using a right click and drag

@henkkoorn
Copy link
Author

i use a 'KeDei' 800x480
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 800 x 480, current 800 x 480, maximum 800 x 480
default connected 800x480+0+0 0mm x 0mm
800x480 0.00*

@KenT2
Copy link
Owner

KenT2 commented Apr 10, 2024

Problem is you have a non-raspberry pi display which returns an unexpected name.

Can you try editing lines 27 and 28 in pp_displaymanager.py to:

randr_map={'default':0,'HDMI-1':2,'Composite-1':3,'HDMI-2':7}
vlc_display_name_map = {'DSI0':'default','HDMI':'HDMI-1','HDMI0':'HDMI-1','A/V':'A/V','HDMI1':'HDMI-2' }

and select DSI0 display in profiles.

@henkkoorn
Copy link
Author

Sorry, if you buy a display like this you don't know whether it is an official display or not
I have changed lines 27 and 28,
it is less but there is still an error message, is that because I have not yet changed that profile?
"select DSI0 display in profiles." I don't understand what to do, which profile or all?

xrandr: Failed to get size of gamma for output default
4.02 Profile Error: PiPresents: touchscreen connected but rpi-backlight is not installed

@KenT2
Copy link
Owner

KenT2 commented Apr 11, 2024

No sorry, its my software that is limited to the official display. The official display is always advertised as Official Raspberry Pi.....
It looks like the edits have worked.

Profile is what you edited with the Pi Presents editor. In every show that is to use your display the Display Field should be DSI0

The new error is about controlling the backlight brightness. There are instructions in the manual for installing rpi-backlight but the software may not work with your display. Better to comment out the lines that initialise the backlight.

In pp_displaymanager.py comment out lines 154,155,156:

    # setup backlight for touchscreen if connected
    #status,message=self.init_backlight()
    #if status=='error':
        #return status,message,None

@henkkoorn
Copy link
Author

first :xrandr: Failed to get size of gamma for output default
8.96 Profile Error: PiPresents: Display not connected (no canvas): HDMI0
and when I close the popup this:
Traceback (most recent call last):
File "/home/pi/pipresents/pipresents.py", line 1004, in
pp = PiPresents()
File "/home/pi/pipresents/pipresents.py", line 461, in init
self.run_start_shows()
File "/home/pi/pipresents/pipresents.py", line 485, in run_start_shows
self.mon.err(self,message)
File "/home/pi/pipresents/pp_utils.py", line 257, in err
tkinter.messagebox.showwarning(r_class ,'Profile Error:\n'+text)
File "/usr/lib/python3.9/tkinter/messagebox.py", line 93, in showwarning
return _show(title, message, WARNING, OK, **options)
File "/usr/lib/python3.9/tkinter/messagebox.py", line 76, in _show
res = Message(**options).show()
File "/usr/lib/python3.9/tkinter/commondialog.py", line 46, in show
s = w.tk.call(self.command, *w._options(self.options))
_tkinter.TclError: can't invoke "grab" command: application has been destroyed

@KenT2
Copy link
Owner

KenT2 commented Apr 11, 2024

8.96 Profile Error: PiPresents: Display not connected (no canvas): HDMI0
Indicates you are running a profile which for one of it shows is using HDMI0 as its display.

@henkkoorn
Copy link
Author

indeed, I started from the beginning. When I made the two changes I got the following message:
xrandr: Failed to get size of gamma for output default
4.13 Profile Error: PiPresents: Display not connected (no canvas): HDMI0
and that is because of the first change (I just changed it back)
my previous message was not entirely correct

@KenT2
Copy link
Owner

KenT2 commented Apr 11, 2024

Maybe my suggested changes do not work.
Can you contact me via pipresents.wordpress.com I will send you an email

Using the email please send pp_displaymanager.py with both mods.
Also run:
python pipresents.py -p myprofile -d
to enable debugging and send me
/pipresents/pp_logs/pp_log.txt

@henkkoorn
Copy link
Author

how can I contact you via pipresents.wordpress.com

@henkkoorn
Copy link
Author

pp_log.txt
3.142587900161743 PiPresents_548310545264: Pi Presents is starting, Version:1.5.3e at 2024-04-11 18:42.46
3.1427412033081055 PiPresents_548310545264: sys.path[0] - location of code: /home/pi/pipresents
3.1435117721557617 PiPresents_548310545264:
Raspberry Pi OS: Raspberry Pi reference 2024-03-12
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, fbaa2a26c810dc53305754575f299bc2319d46f2, stage4

3.1755073070526123 PiPresents_548310545264:
GPU Memory: gpu=76M

3.1759932041168213 PiPresents_548310545264: Pi Presents must be run from the Desktop

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

2 participants