JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 3:26 pm

I just purchased the 7 inch Touchscreen display and Smarticase for my Pi. I wanted to know if it's possible to change the resolution on the screen so I can see even more of the webpages when online. Even if it means everything appears smaller. I tried tvservice -m CEA and tvservice -m DMT, but no luck. Also, does anyone know if there is a way to reduce the brightness? Thank you.
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

W. H. Heydt
Posts: 13345
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 5:02 pm

To control the backlight brightness:

Code: Select all

echo 250 > /sys/class/backlight/rpi_backlight/brightness
The range is 0 to 255.

Like any LCD display, the imgae is best viewed at the screens native resolution. As I understand it, tvservice is for controlling the HDMI interface, not the DSI that the RPF screen attaches to.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 5:11 pm

I could be wrong, but I don't think changing the official touchscreen resolution is possible.
EDIT: I'm wrong. I've been using the 4.9.x kernel with VC4 drivers. When using vc4-fkms-v3d, the touchscreen is apparently treated as HDMI-1. Using vc4-kms-v3d, both HDMI-1 and DSI-1 (for the touchscreen) are available. However, xrandr does not appear to be able to change the mode/resolution. Well, maybe... Using vc4-kms-v3d, the ARandR GUI tool makes it look like DSI-1 supports 800x480 and 1312x744 (weird), but 1312x744 doesn't work properly. Using vc4-fkms-v3d, setting framebuffer_width=1280 and framebuffer_height=720 in config.txt does sort of work (but mouse cursor position is way off, while touch input appears to be accurate).

Reducing the screen brightness is easily done when using the Xfce desktop environment with xfce4-power-manager. I don't know of an easy way to do that when using PIXEL or LXDE, unless xfce4-power-manager works in PIXEL/LXDE (I've never tried).
EDIT: xfce4-power-manager does appear to work in LXDE. Using the "Show system tray icon" option, a right click on the icon will pop-up a menu with a slider control for adjusting the "Display brightness."
Last edited by ktb on Fri Apr 07, 2017 10:58 am, edited 5 times in total.

JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 6:13 pm

W. H. Heydt wrote:To control the backlight brightness:

Code: Select all

echo 250 > /sys/class/backlight/rpi_backlight/brightness
The range is 0 to 255.

Like any LCD display, the imgae is best viewed at the screens native resolution. As I understand it, tvservice is for controlling the HDMI interface, not the DSI that the RPF screen attaches to.
Do I type that code into the terminal? I was getting an access denied error.
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 6:34 pm

I actually just learned from more searching that the resolution can be adjusted in the terminal using

Code: Select all

sudo nano /boot/config.txt
I changed my resolution to 1200x720. I still can't change the brightness however...
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 6:44 pm

You have to be root. One way is to enter a root shell:
sudo su
There are 10 types of people: those who understand binary and those who don't.

W. H. Heydt
Posts: 13345
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 10:00 pm

JayinHouston wrote:
W. H. Heydt wrote:To control the backlight brightness:

Code: Select all

echo 250 > /sys/class/backlight/rpi_backlight/brightness
The range is 0 to 255.

Like any LCD display, the imgae is best viewed at the screens native resolution. As I understand it, tvservice is for controlling the HDMI interface, not the DSI that the RPF screen attaches to.
Do I type that code into the terminal? I was getting an access denied error.
Prefix the command with "sudo" so that you are running it with root privileges. My setup runs it as part of the root cron, where one starts by usung "sudo crontab -e", putting the command in there (no sudo needed, it will already sun as root).

W. H. Heydt
Posts: 13345
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 10:01 pm

kusti8 wrote:You have to be root. One way is to enter a root shell:
sudo su
That's overkill for a single command. All it takes is using sudo as a command prefix. (And--FYI--if I want to run as root for a while, I prefer "sudo su -" so that I get the full root environment.)

JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 10:27 pm

W. H. Heydt wrote: Prefix the command with "sudo" so that you are running it with root privileges. My setup runs it as part of the root cron, where one starts by usung "sudo crontab -e", putting the command in there (no sudo needed, it will already sun as root).
i typed in

Code: Select all

sudo echo 250 > /sys/class/backlight/rpi_backlight/brightness
and got this error:
bash: /sys/class/backlight/rpi_backlight/brightness: Permission denied

got the same thing when i typed in sudo su instead of just sudo.
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

User avatar
DougieLawson
Posts: 39884
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Official Rapberry Pi Touchscreen

Thu Apr 06, 2017 10:36 pm

sudo sh -c "echo 250 > /sys/class/backlight/rpi_backlight/brightness"
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

JayinHouston
Posts: 23
Joined: Sat Mar 25, 2017 5:21 pm

Re: Official Rapberry Pi Touchscreen

Fri Apr 07, 2017 2:58 am

DougieLawson wrote:sudo sh -c "echo 250 > /sys/class/backlight/rpi_backlight/brightness"
Yes! It worked!
Raspberry Pi 3B running Raspian Jessie. Smarticase with Raspberry Pi Official 7" Touchscreen.
Houston, TX USA

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Official Rapberry Pi Touchscreen

Fri Apr 07, 2017 10:58 am

W. H. Heydt wrote:
kusti8 wrote:You have to be root. One way is to enter a root shell:
sudo su
That's overkill for a single command. All it takes is using sudo as a command prefix. (And--FYI--if I want to run as root for a while, I prefer "sudo su -" so that I get the full root environment.)
When piping into a file in Linux, you can't just prefix echo with sudo because the file still won't have permissions. You could use tee or the way dougie showed, but just prefixing it won't work
There are 10 types of people: those who understand binary and those who don't.

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Official Rapberry Pi Touchscreen

Sat Apr 22, 2017 1:41 am

Another Recomendation is to use Chromium and when in default resolution use your keyboard and press Ctrl and the Negative symbol - to adjust the webpage size formatting. It works like a charm with all websites and keeps the Resolution footprint down allow you to play HD videos down-scaled to 480p and it's amazing.

Off topic but leaving the resolution at default and down-scaled with Chromium allows you to play Youtube 60fps @720p down-scaled to 480p (default resolution). The High Frame Rate makes for some very amazing sights for such a low res screen.

Return to “Official Foundation Display”