PinePhone Pro disable Volume Buttons when malfunctioning
#1
Hi together,

here comes a solution for a problem I had with the PinePhone Pro, hoping that it helps someone else. When I started installing different distributions, there was the same problem all over again. The volume buttons were randomly sending signals to the phone although I didn't press them, constantly changing the volume. This was very annoying as the pop-up message interrupted anything I wanted to do on the phone. After some research I found the following work around. Tested it on Arch with Phosh and on Manjaro with Plasma Mobile, but should work on other distros too. The solution works by unbinding the volume keys from the driver. The volume keys will stop working then, but the power key can still be used normally. Up to now I didn't miss the volume keys, as it can easily be adjusted in the settings. You can find more information about driver unbinding in this article: https://lwn.net/Articles/143397/

First open a terminal and issue the following command to stop the nuisance:

Code:
sudo echo -n "adc-keys" > /sys/bus/platform/drivers/adc_keys/unbind

Now to permanently deactivate the volume keys on startup we can create a systemd-service.
All of the following code-snippets should be executed as root-user.
First create the shell-script, for example in /opt or wherever you like to have it:

Code:
cat > /opt/unbind-adc-keys.sh << EOF
#!/bin/bash

echo -n "adc-keys" > /sys/bus/platform/drivers/adc_keys/unbind

exit 0

EOF

Don't forget to give execute permissions:

Code:
chmod a+x /opt/unbind-adc-keys.sh

Now create the systemd service unit:

Code:
cat > /etc/systemd/system/unbind-adc-keys.service << EOF
[Unit]
Description=Unbinds the Volume Keys on startup

[Service]
ExecStart=/bin/bash /opt/unbind-adc-keys.sh

[Install]
WantedBy=mulit-user.target

EOF

Now enable the service unit:

Code:
systemctl enable unbind-adc-keys.service

From now on the volume keys should be disabled from startup and you can again enjoy your PPP :-)
  Reply
#2
Thank you ArchBene! This fixed the problem I was having with my PPP's volume keys.
I just think that
Code:
[Install]
WantedBy=mulit-user.target
was supposed to be
Code:
[Install]
WantedBy=multi-user.target
Because the service would start but not enable until I switched those letter for my phone.

Thanks again for posting this!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fix Bricked SPI Flash, Pinephone Pro FR_IV 0 112 06-27-2026, 05:00 PM
Last Post: FR_IV
  performance wise which iphone does the pinephone pro compare to? heocb 2 1,620 01-24-2026, 01:01 PM
Last Post: heocb
Exclamation Pinephone pro stuck while booting Supervisor 3 2,910 10-07-2025, 02:46 PM
Last Post: Supervisor
Question Are there plannes to create a new and more powerfull PinePhone Pro? Nima0908 5 13,172 08-18-2025, 04:12 AM
Last Post: biketool
  Pinephone pro packet injection for internal wifi chipset covar 3 5,170 07-02-2025, 02:03 PM
Last Post: Kevin Kofler
  RTKLIB PinePhone Pro GPS jlaba 1 1,985 05-02-2025, 12:43 AM
Last Post: biketool
  PinePhone Pro Explorer's edition Qualcomm modem recovery shifras 11 12,305 02-28-2025, 07:03 AM
Last Post: tensa1000
  PinePhone Pro EDL boot by shorting contacts ozkenlc 3 5,470 09-18-2024, 04:59 AM
Last Post: biketool
  PinePhone's LED is blinking, but doesn't start zvavybir 0 1,853 09-06-2024, 02:39 AM
Last Post: zvavybir
  Pinephone pro shuts down immediately after login covar 4 5,389 07-03-2024, 10:59 AM
Last Post: covar

Forum Jump:


Users browsing this thread: 1 Guest(s)