Lomax
Posts: 184
Joined: Wed May 20, 2015 9:43 pm

Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Sat Nov 26, 2016 11:49 pm

So I've managed to get the experimental OpenGL driver to work on a Pi 3, but the video is slightly too large for my monitor, both in text mode and in X, putting some content off screen. I know this driver doesn't listen to settings in /boot/config.txt but is there some other way I can control the display size?

Lomax
Posts: 184
Joined: Wed May 20, 2015 9:43 pm

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Sun Nov 27, 2016 3:41 pm

This appears to be caused by a failure to read the display's EDID correctly; I see EDID checksum errors at boot in my logs, though the "remainder" seems to be different from time to time. Any ideas?


spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 366
Joined: Fri Dec 26, 2014 11:02 am

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Mon Dec 05, 2016 2:56 pm

As far as I know, the experimental driver does not yet support correction for over/underscan, so I'm not aware of a fix for this at the moment.

Getting over/underscan to be supported properly is on the to-do list for the developer; I'd hope it will be sorted by the time we move to Raspbian Stretch, some time next year.


spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 366
Joined: Fri Dec 26, 2014 11:02 am

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Fri Dec 16, 2016 7:21 pm

That seems to be a completely different driver for a different OS running on different hardware. So I can't see how it will be much help for you!

As above - this is a known issue, the developer is working on it, we hope to have it working correctly some time next year. If you need to change the screen size, at the moment you can't use the GL driver.

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 366
Joined: Fri Dec 26, 2014 11:02 am

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Fri Dec 16, 2016 10:49 pm

One thing you might try is to access the service menu (or even the user menu in some cases) on your monitor and adjust the overscan on the monitor itself. The problem you are seeing is monitor overscan cutting the edges off the picture; the GL driver only works properly on monitors which do not do overscan. It may be possible to reduce or remove the overscan from your monitor - check its manual and look online for a service manual.

pingpong2012
Posts: 28
Joined: Mon Mar 30, 2015 1:09 am

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Sat Dec 17, 2016 1:49 am

What exactly is supposed to be the OpenGL resolution? I've tried many monitors, and none of them work with it. The best I could get was highly distorted without going into standby, and I was sitting there for a long time trying to manually set the resolution, and it would just blank out at any proper resolution. More recently, on the same monitor, the RasPi 3 fails to output anything, so the signal or resolution code was changed somewhere, making it worse.

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 366
Joined: Fri Dec 26, 2014 11:02 am

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Sat Dec 17, 2016 11:05 am

There's no set resolution for it - it should detect the correct size from EDID data, but a surprisingly large number of monitors put out incorrect EDID, at which point the GL driver falls over. It runs fine on my monitors at home and work; it produces nothing but a blank screen on my Pi-Top.

We are working on improving the robustness, and adding support for things like overscan - but as we have always said, this is an experimental driver at this stage; if you need reliability, don't use it.

nagual20
Posts: 4
Joined: Fri Aug 18, 2017 5:24 pm

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Fri Aug 18, 2017 5:30 pm

Lomax,

how did you get vc4-kms-v3d to work on PI3? I've been hitting the wall for the last week. Scoured these forums and the interwebs.

vc4-fkms-v3d - I get "failed to add service - already in use?" and unresponsive console
vc4-kms-v3d - black screen, can ssh to Pi

Besides updating kernel to 4.9, I've tried various things in config.txt, including:
hdmi_force_edid_3d=1
avoid_warnings=2

Any tips?

pik33
Posts: 142
Joined: Thu Sep 10, 2015 4:26 pm

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Sun Aug 20, 2017 8:23 am

Updated to Stretch, tried OpenGL driver - blank screen :( 1920x1200 LG w2452TX monitor.

feelslikeautumn
Posts: 307
Joined: Wed Aug 09, 2017 9:51 pm

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Sun Aug 20, 2017 11:41 am

I'm not near a pi at the moment, but you can certainly adjust things with the video= kernel boot parameter. See https://ubuntu-mate.community/t/screen- ... r/11202/13 for a generic discussion.

UberEclectic
Posts: 2
Joined: Thu May 09, 2019 11:50 pm

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Thu May 23, 2019 9:30 pm

I found a functional solution, albeit imperfect, for when I want to use vc4-kms-v3d mode, but also have a usable VNC resolution.

You can of course change the resolution using xrandr, but you first have to convince xrandr that it should let you. ;-)
To do that, you need to generate the appropriate "mode" settings.
The easiest way to do that is by using the "cvt" command.

Here I am using 1280x1024 @ 60 Hz as an example of the desired resolution.

Code: Select all

$ cvt 1280 1024 60
# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

You also need to know what screen VNC is using, which you can find out by logging in with the default resolution still in effect.
The xrandr command has the goods:

Code: Select all

$ xrandr
Screen 0: minimum 320 x 200, current 720 x 480, maximum 2048 x 2048
HDMI-1 disconnected primary (normal left inverted right x axis y axis)
Composite-1 unknown connection (normal left inverted right x axis y axis)
   720x480       62.69
In my case it was pretty obvious, because I am not using HDMI and the only other choice was "Composite-1" which also shows the defaul 720x480 resolution. =D


Armed with all of that info, you can set the resolution as follows, by pasting the string from after "Modeline" in the cvt output.
Here I took the liberty of simplifying the "1280x1024_60.00" to just "1280x1024_60" and then used that consistently:

Code: Select all

xrandr --newmode "1280x1024_60"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode Composite-1 1280x1024_60
xrandr -s 1280x1024_60

I wasn't satisfied with having to run that every time I logged in, so I made it a system-wide change as follows:

Code: Select all

$ sudoedit /etc/xdg/autostart/set-vnc-resolution.desktop
To which I added the following lines:

Code: Select all

[Desktop Entry]
Name=set_vnc_resolution
Exec=/bin/bash -c "xrandr --newmode "1280x1024_60"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync && xrandr --addmode Composite-1 1280x1024_60 && xrandr -s 1280x1024_60"
Type=Application

So, now, the initial VNC login screen is still only 720x480, but a few seconds after login, it changes to 1280x1024.
It disconnects me and I have to reconnect, but after that point it stays at 1280x1024 until the next reboot.

That disconnect / reconnect part is why I say it is an imperfect solution, but it's one that I can live with. =D

HTH someone. =D

itsmedoofer
Posts: 335
Joined: Wed Sep 25, 2013 8:43 am

Re: Adjust screen size with OpenGL driver (vc4-kms-v3d)?

Tue May 28, 2019 11:46 am

From memory you can force a FB resolution in /boot/config.txt , I have had to do this when running headless..

Code: Select all

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1900
framebuffer_height=1024

Return to “Raspbian”