{"id":311,"date":"2021-04-16T11:18:09","date_gmt":"2021-04-16T10:18:09","guid":{"rendered":"https:\/\/therobinsonfamily.net\/?p=311"},"modified":"2021-04-16T11:18:09","modified_gmt":"2021-04-16T10:18:09","slug":"pi3-touch-screen-radio-on-with-phosh","status":"publish","type":"post","link":"https:\/\/therobinsonfamily.net\/?p=311","title":{"rendered":"Pi3 Touch screen radio on with Phosh"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/therobinsonfamily.net\/blog\/wp-content\/uploads\/2021\/04\/cf77b8c096f5bac8-1024x768.jpeg\" alt=\"\" class=\"wp-image-312\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I figured it may be helpful to note the steps I needed to create my Touch screen internet radio. I bought my capacitative touch screen a few years ago and really haven&#8217;t had much joy with it. It&#8217;s a 5&#8243; display and uses HDMI and USB for the touch screen. The orange card you can see poking out the the top is integral to the design as the micro-usb to drive the touch screen and display power isn&#8217;t a good fit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I chose Postmarket OS because I know it uses phosh and it has a tested pi3 image. First I created the image for the pi3 following the instructions here: <a href=\"https:\/\/wiki.postmarketos.org\/wiki\/Raspberry_Pi_3_(raspberry-pi3)\">https:\/\/wiki.postmarketos.org\/wiki\/Raspberry_Pi_3_(raspberry-pi3)<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It looks a bit daunting but actually, if you read thing through carefully, it&#8217;s pretty easy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once booted I had three issues I needed to resolve before I could unleash the magic. No Wifi, No Audio, A Squintworthy default resolution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>No Wifi<\/strong> This was because pmbootstrap didn&#8217;t include the broadcom firmware in the image. I ssh&#8217;ed in and ran <code>sudo apk add linux-firmware-cypress <\/code> rebooted and the wifi came up like a charm. I added it to the wiki for you \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>No Audio<\/strong>: You might not hit this issue as it was a packaging error but the resolution is this <a href=\"https:\/\/postmarketos.org\/edge\/2021\/04\/02\/pipewire-pulse\/\">https:\/\/postmarketos.org\/edge\/2021\/04\/02\/pipewire-pulse\/<\/a><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apk update\n$ sudo apk add '!pipewire-pulse'\n$ sudo reboot\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Squintworthy:<\/strong> The default resolution it launched in was 1024&#215;768. Everything I learned about X11 is useless with phosh as it uses Wayland. First you need to discover your display device. Stackoverflow helped me here with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">raspberry-pi3:~$ ls \/sys\/class\/drm\n card0           card0-HDMI-A-1  renderD128      version<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The bit after <code>card0<\/code> you can stuff into <code>\/etc\/phosh\/phoc.ini<\/code> with something like the following stanza:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[output:HDMI-A-1]\n mode = 800x600\n scale = 1<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I think my screen is actually 800&#215;480, or 848&#215;480, but phosh hates it, even if I try and set a modeline, so weirdly squished screen ratio it is.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The last setting I&#8217;d like to set it is to force phosh into undocked mode by default so apps always take up the full screen, but I don&#8217;t know how to do that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, install flatpak, register flathub and install Shortwave the flatpak app is more up to date than the one in the alpine repos. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apk add flatpak\nflatpak remote-add --if-not-exists flathub https:\/\/flathub.org\/repo\/flathub.flatpakrepo\nsudo flatpack install de.hackerfelix.Shortwave -y\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I also installed gnome-weather so I can see if it will rain tomorrow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In settings under power you will probably want to set &#8220;Blank Screen&#8221; to never, the pi has no buttons to wake it up.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I figured it may be helpful to note the steps I needed to create my Touch screen internet radio. I bought my capacitative touch screen a few years ago and really haven&#8217;t had much joy with it. It&#8217;s a 5&#8243; display and uses HDMI and USB for the touch screen. The orange card you can [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311"}],"version-history":[{"count":0,"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions"}],"wp:attachment":[{"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/therobinsonfamily.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}