hoopsurfer / pidesktop Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pi-desktop/deb-make
Collected files, drivers and documentation for the pidesktop case
License: MIT License
This project forked from pi-desktop/deb-make
Collected files, drivers and documentation for the pidesktop case
License: MIT License
From testing and measuring reboot times on a RB 3 Model 3 starting with the initial flash of the case LED to when it fails to turn on shows times measured with a stop watch are as short as 26.5 seconds meaning that if the system is in a of reboot operation the power is shutoff and the system fails to reboot.
Note the LED does flash 30-32 times so perhaps the programmed delay between flashes turns out is slightly less than 1 second.
Need to get firmware source to fix what clearly is a bug with respect to the system specification and the limits of the hardware when booting from USB via a mSATA SSD.
TODO: This can simplify the code required for services and eliminate some
Currently reboot depends on a 30 second reboot timer, if the system takes longer to get to the powerkey service routine it will power down in the middle of booting. How can this be reset before the OS boots?
SOLVED
add to pd-check: dmesg --notime | grep firmware
which should show date 2018-04-09 or later which fixed gpio support (earlier dates like 2018-03-23 does not work)
add to /boot/config.txt use:
gpio=6=op,pn,dl
gpio=13=ip
Background Info:0
"GPIO numbering uses the hardware pin numbering scheme (aka BCM scheme) and
not the physical pin numbers." Definitive guidance on pin numbers is at:
https://github.com/raspberrypi/firmware/tree/master/boot/overlays
see: https://www.raspberrypi.org/forums/viewtopic.php?f=117&t=208748
When executing pd-clonessd
I get the following errors:
sudo: /usr/share/pidesktop/python/pd_clonessd.py: command not found
sudo: /usr/share/pidesktop/python/pd_bootssd.py: command not found
listing the contents shows these files with '-'
instead of '_'
user@host:~ $ cd /usr/share/pidesktop/python/
user@host:/usr/share/pidesktop/python $ ls
pd-bootssd.py pd-clonessd.py pd-fixrtc.py pd-powerkey.py pd-reboot.py pd-shutdown.py
output of pd-check
:
user@host:~ $ pd-check
OS & Firmware versions:
raspberrypi-firmware soc:firmware: Attached to firmware from 2018-09-10 17:26
rpi_firmware_get_throttled: 1 callbacks suppressed
rpi_firmware_get_throttled: 1 callbacks suppressed
Linux 4.14.69-v7+ #1141 SMP Mon Sep 10 15:26:29 BST 2018 GNU/Linux
pidesktop
Script files:
/usr/share/pidesktop/python:
total 36
drwxr-xr-x 2 1000 1000 4096 Sep 13 08:14 .
drwxr-xr-x 4 1000 1000 4096 Sep 13 08:14 ..
-rwxr-xr-x 1 1000 1000 1700 Apr 11 06:43 pd-bootssd.py
-rwxr-xr-x 1 1000 1000 1125 Apr 11 06:43 pd-clonessd.py
-rwxr-xr-x 1 1000 1000 4393 Apr 11 07:01 pd-fixrtc.py
-rwxr-xr-x 1 1000 1000 970 Apr 11 06:43 pd-powerkey.py
-rwxr-xr-x 1 1000 1000 866 Apr 11 06:43 pd-reboot.py
-rwxr-xr-x 1 1000 1000 1690 Apr 11 06:43 pd-shutdown.py
/usr/share/pidesktop/script:
total 20
drwxr-xr-x 2 1000 1000 4096 Sep 13 08:14 .
drwxr-xr-x 4 1000 1000 4096 Sep 13 08:14 ..
-rwxr-xr-x 1 1000 1000 621 Apr 11 08:38 pd-check
-rwxr-xr-x 1 1000 1000 175 Apr 11 06:43 pd-clonessd
-rwxr-xr-x 1 1000 1000 70 Apr 11 06:43 pd-rtcsync
Links to commands:
lrwxrwxrwx 1 root root 41 Sep 13 08:14 /usr/bin/pd-bootssd -> /usr/share/pidesktop/python/pd-bootssd.py
lrwxrwxrwx 1 root root 36 Sep 13 08:14 /usr/bin/pd-check -> /usr/share/pidesktop/script/pd-check
lrwxrwxrwx 1 root root 39 Sep 13 08:14 /usr/bin/pd-clonessd -> /usr/share/pidesktop/script/pd-clonessd
lrwxrwxrwx 1 root root 40 Sep 13 08:14 /usr/bin/pd-fixrtc -> /usr/share/pidesktop/python/pd-fixrtc.py
Systemd services:
pidesktop-powerkey.service enabled
pidesktop-reboot.service enabled
pidesktop-shutdown.service enabled
System and hardware clocks:
Local time: Thu 2018-09-13 08:21:01 CEST
Universal time: Thu 2018-09-13 06:21:01 UTC
RTC time: n/a
Time zone: Europe/Stockholm (CEST, +0200)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2018-03-25 01:59:59 CET
Sun 2018-03-25 03:00:00 CEST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2018-10-28 02:59:59 CEST
Sun 2018-10-28 02:00:00 CET
Package status:
Package: pidesktop-base
Status: install ok installed
Priority: optional
Section: free
Maintainer: hoopsurfer
Architecture: all
Version: 0.1.6
Description: Pi DeskTop Case Power+RTC+mSATA Support
does this fork also works on raspbian buster ?
Hello
I own a Pi 3B+ and a Pi Desktop Hat card plus a Transcend mSATA ssd.
I just gave a try to your 1.1.7 contrib. package install went smoothly and pd-check did'nt signal any error.
Still reboot could'nt complete, it seems to block on the disk detection step, see console image attached.
I'm using the 4.14.80-v7+ #1161 Raspian build
root@raspberrypi> /opt/vc/bin/vcgencmd version
Nov 4 2018 16:32:03
Copyright (c) 2012 Broadcom
version ed5baf9520a3c4ca82ba38594b898f0c0446da66 (clean) (release)
Could you please help?
Thanks
gpiozero might provide cleaner code in the long run. Note the nice pin numbering explaination.
Hi, I'm trying to use the PiDesktop with a Raspberry Pi 4B 2GB running Debian Buster with a mSATA SSD mounted at the HAT (addon board). Therefore I reworked the housing a little put to be able to access the USB-C and HDMI Port ...
But this doesn't seem to work as expected. Maybe there's an incompatibility with the GPIO Pins
By pressing the Push Button on the HAT I'm able to turn the bright white LED on and off ... with no effect to the RPi. The only way to turn the RPi 4 on is by powering itself (after shutdown: USB-C Powerplug off and on again). Furthermore the mSATA on the HAT doesn't get recognized in any way. And a reboot command doesn't reboot the RPi - it's powered off then!?
I successfully installed the pidesktop-base.deb package ... but this didn't change anything.
Is there any chance to get this setup running?
There is some evidence that the system updates the hwclock, but keeping the command to copy the system time to the RTC until that is better understood. Does this need to be in the shutdown script?
we have /udev script as well, what is running that?
Better cleanup of fake hwclock:
sudo apt-get remove fake-hwclock
sudo update-rc.d -f fake-hwclock remove
sudo rm /etc/fake-hwclock.data
Better pd-status using:
timedatectl status
To debug logs need setting in conf file and create directory to get it to work:
sudo nano /etc/systemd/journald.conf
Storage=persistent
AND
sudo mkdir -p /var/log/journal THEN reboot
question: sudo apt-get install bootlogd needed? not completely sure on this one
I want to run this script on a PI equipped with the 735 ver 2.1 and an 825 in the Geekworm metal case.
When I install the package and reboot, the system shuts down after a few seconds.
When I pull the MicroSD card I can see in the logs that the PI thinks the button is being pressed.
I see the messages from the powerkey.py script in the logs indicating a 5 second press.
However if I run the original Geekworm script for the 735 this does not happen.
Any idea as to what I can change to fix this?
Thanks for writing this btw!
First thank you hoopsurfer for updating pidesktop.
I followed the instruction and typed "make install" in terminal. This is the output:
dpkg -b pidesktop-base/ pidesktop-base.deb
dpkg-deb: building package 'pidesktop-base' in 'pidesktop-base.deb'.
sudo dpkg -i pidesktop-base.deb
Selecting previously unselected package pidesktop-base.
(Reading database ... 107088 files and directories currently installed.)
Preparing to unpack pidesktop-base.deb ...
Unpacking pidesktop-base (1.1.7) ...
Setting up pidesktop-base (1.1.7) ...
'/usr/bin/pd-check' -> '/usr/share/pidesktop/script/pd-check'
'/usr/bin/pd-clonessd' -> '/usr/share/pidesktop/script/pd-clonessd'
'/usr/bin/pd-bootssd' -> '/usr/share/pidesktop/python/pd-bootssd.py'
'/usr/bin/pd-fixrtc' -> '/usr/share/pidesktop/python/pd-fixrtc.py'
Created symlink /etc/systemd/system/multi-user.target.wants/pidesktop-powerkey.service → /lib/systemd/system/pidesktop-powerkey.service.
Created symlink /etc/systemd/system/reboot.target.wants/pidesktop-reboot.service → /lib/systemd/system/pidesktop-reboot.service.
Created symlink /etc/systemd/system/shutdown.target.wants/pidesktop-shutdown.service → /lib/systemd/system/pidesktop-shutdown.service.
pidesktop-powerkey.service enabled enabled
pidesktop-reboot.service enabled enabled
pidesktop-shutdown.service enabled enabled
File "/usr/share/pidesktop/python/pd-fixrtc.py", line 10
print command;
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(command)?
dpkg: error processing package pidesktop-base (--install):
installed pidesktop-base package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
pidesktop-base
make: *** [Makefile:10: install] Error 1
I believe the error lies in the "pd-fixrtc.py" file. I am new to python so I am not sure where the problem lies.
Any assistance would be appreciated.
The following is system information for my Raspberry Pi:
OS: Raspbian GNU/Linux 11 (bullseye) armv7l
Host: Raspberry Pi 3 Model B Plus Rev 1.3
Kernel: 6.1.21-v7+
Uptime: 45 mins
Packages: 1428 (dpkg)
Shell: bash 5.1.4
Resolution: 1920x1080
DE: LXDE
Theme: PiXflat [GTK3]
Icons: PiXflat [GTK3]
Terminal: lxterminal
Terminal Font: Monospace 16
CPU: BCM2835 (4) @ 1.400GHz
Memory: 458MiB / 921MiB
Thank you for cleaning up this Pi Desktop. I was struggling with the original before I found your fork.
Just one issue that I can see. I started with a Pi 3B and the Desktop. Eventually I did get the latest Raspian Stretch installed on a SSD and got it booting up without SD card. I installed the pidesktop as instructed from the .deb file. Whenever I use Reboot from the GUI Shutdown menu, it goes through the exercise of 30 seconds of flashing then shuts down. If I replace the Pi 3B with a Pi 3B+ the reboot function works as expected. I am using a cheaper Vaseky 1.8" 32GB MSATA drive but I don't think that is the issue as the Pi 3B+ works fine. BTW a sudo reboot shows the same behaviour on both Pi's
Do you have any ideas?
Thanks
Hi,
First sorry about my english. I´m using Gtranslate.
I had install the pidesktop-base i my raspi but ist fail. The console say:
`dpkg-deb:` error: `pidesktop-base.deb 'is not a Debian format file
dpkg: error processing the pidesktop-base.deb file (--install):
dpkg-deb thread --control returned error exit code 2
Errors were encountered while processing:
pidesktop-base.deb
I had installed the original previous file version without troubles but your version its better (the last year I used and is fabulous, could be the file is corrupted?
Thanks for your amazing work
(c) 2018 Britt Johnston
Future versions of the PiDesktop product I believe could be improved with some engineering changes.
From a previous comment the current version number is 0.1.6 in the install package when it should be 1.1.6, needs to be cleaned up.
When I am booting from MSATA on a Pi 3 Model B+ I am getting a frozen screen after about 30 to 60 mins. Seems to be related to the hardware for MSATA as I get this before and after I install the PI desktop software. Anyone else getting this on a 3B+? I see one user reported in another forum Element14 says that this case does not support the 3B+.
pd-reboot.py
seems, at some point, have been doing this:
GPIO.output(31,GPIO.HIGH)
but that's now commented out and all the rest is just print statements. Which means the entire pidesktop-reboot.service
may not be needed any more?
Requested firmware for STM8S MCU to address firmware issues from Embest - no reponse to date.
Ideas:
Note MCU is STM8S005CK part, 8-bit controller with 32Kb flash plus 128 bytes EEPROM, 2Kb RAM onboard pins are labeled for programming MCU.
I have a pi desktop connected to a Pi3B also a 16GB SSD installed. All was working fine after some firmware updates earlier around the reboot, thank you
I left the unit powered up and running for a week or two, my plan is to leave it running permanently, will be part of a data collection system.
Noticed that the unit had failed, Pi was not running, LED on PiDesktop still on I think at that stage. On investigation Pi is OK, boots from a micro SD card and runs. I did get the SSD to work once so I think it is OK. Now just with the PiDesktop board on its own (no SSD attached) I have 5.5V coming in from the supply, the main switching power supply does not have its enable pin raised. Sometimes after leaving it unpowered for a while I can press the on button and the enable pin on the main supply comes on and everything powers up. Mostly nothing happens. Looking at the document on the way the power supply is organised, I suspect the micro which organises the power on/off process is confused or damaged.
Is there any clear path from here? I suspect I need to buy a new Pi Desktop but if there is an issue with them failing it will not suit what I want to use if for. Is there a circuit available which would allow us to see where the issue is?
Thanks
An update to python3 that would work on Bullseye is much needed.
I tried installing python2 on Bullseye to get this to work but ran into some issues getting rpi.gpio to build. This in on an aarch64 Raspberry Pi OS install.
It's not an issue but I don't know how to ask questions...
Based on your experiences (and the source of the mcu program) could you be so kind to help us to sort this problem out: pinout-xyz/Pinout.xyz#301 ?
Actually the problem's source is this page: https://github.com/pi-desktop/pi-desktop/blob/master/Pins-used-by-pi-desktop/Pins-used-by-pi-desktop.md
As far as I can see, these pins are in use only: GPIO6, 13 (MCU), and 2, 3 (i2c). What are the others (17, 19, 26) are doing? Are they in use at all?
Thank you in advance,
TiceRex
Hi,
Former i use your BerryBoot aplication and everythinks works fine but after some years when I not use the PiDesktop run an update upgrade code and everythings go wasted....
So now I don't need to use SSD as boot system just from sd card but i need a PiDesktop-base file, for led control and something else but don't need the boot sequence...
Can you help me???
Thanks:
Bela
(I also filed this upstream:pi-desktop#8 )
What is the license for this code? I cannot find a LICENSE.txt or license header in the files.
Given how it has been published, and the installation instructions that come with the Pi Desktop, I will assume that you intended to put this code in the public domain or use a common open-source license. Please advise if this is not correct.
Pins used by Pi Desktop has broken link - need to check others.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.