Open mv4manishverma opened 2 years ago
Could you attach a screenshot / photo to show what you mean please?
@spl237 sounds like openbox is not reading the root window size correctly in that situation?
Here are the screen shots.
@spl237 sounds like openbox is not reading the root window size correctly in that situation?
Not sure what is the cause of this problem !
FYI the bottom right corner of the maximised window is at (1023,767).
Thanks - based on your screenshot and @XECDesign 's comment, it seems that openbox (the window manager) thinks your screensize is 1024 x 768.
Hah, @pelwell just beat me to it :laughing:
Thanks - based on your screenshot and @XECDesign 's comment, it seems that openbox (the window manager) thinks your screensize is 1024 x 768.
Hah, @pelwell just beat me to it laughing
So what is the solution for this? Do i have to manually set the desired resolution?
I've raised the issue with RealVNC - they will investigate.
Thanks a lot !!
I've had the very same problem for a couple of months now. (Actually, ever since the 64 bit OS came out of beta and was officially released.) As a result, Raspberry Pi OS 64 bit is only usable for me with a monitor attached. I run it on a Raspberry Pi 4 with 4 GB of memory. I too wondered whether it might be a VNC issue; no matter what I tried, headless access never worked properly, especially by comparison with the 32 bit version of the OS, where it works flawlessly.
My solution has been to set the resolution, on the raspberry pi, to match that which is used by VNC.
While you're viewing the Raspberry Pi through VNC, go through:
Start -> Preferences -> Raspberry Pi Configuration -> Display -> Headless Resolution.
Where "Start" is the raspberry icon, in the upper left corner. Make sure you set this resolution so that it's the same that VNC is using.
I'm using tightvncserver. So if I start tightvncserver with "tightvncserver -geometry 1280x720", at the command line, and then set the Raspberry Pi resolution, in the above path, to 1280x720, then full screen has a chance to work properly. These changes, only have to be made, once.
Once all of this is done, the order, in which, you choose to go "full screen", is important. First, once you're viewing your Pi through VNC, you have to make VNC go full screen. After that, you can then make your application, on the raspberry pi, go full screen.
If you don't make VNC go full screen, first, the application, on the raspberry pi, may not line up correctly, when you make that application go full screen.
Obviously, this isn't a perfect solution, but it does tend to work. Hopefully, permanent fixes will soon be implemented by the 64-bit Raspberry Pi creators.
Hi. I have the same issue. Some people claimed they solved it by modifying the DRM VC4 V3D driver lines in the config.txt file. It didn’t work for me though. Any other lead?
I'm using a HDMI dummy plug... not elegant but it's working!
@romton843, I'm so sorry that the fix you mentioned is not working for you. But it gave me the idea to search the Web for that particular solution, and I found it, and it is working for me! Here are the details, inspired both by your comment and by https://forums.raspberrypi.com/viewtopic.php?t=282380.
Some people have said that SSH access gets messed up with dtoverlay=vc4-kms-v3d commented out. When I get back home I'll test that out and see what is the case for me. Some other people have said that what you need instead is the older dtoverlay=vc4-fkms-v3d entry but that it will be deprecated soon. Your mileage may vary.
@yvessa, good hack!
@jmlineb, When I try to uncomment dtoverlay=vc4-kms-v3d, I actually get trouble connecting through SSH indeed and even when I can, my VNC client shows the message “Cannot currently show the desktop”. That’s why I said this solution doesn’t work for me. Thank you for responding though. The only thing that works sometimes is changing the headless resolution to 1600x1200, rebooting, change the resolution back to 1024x768 and rebooting again (but doesn’t work all the time). I guess I’m gonna try a HDMI dummy plug then.
Rather than trying a dummy hdmi plug, add video=HDMI-A-1:1920x1080@60D
to the end of /boot/cmdline.txt
(on same line). That should have the effect of faking a connected display.
Rather than trying a dummy hdmi plug, add
video=HDMI-A-1:1920x1080@60D
to the end of/boot/cmdline.txt
(on same line). That should have the effect of faking a connected display.
I tried that but it actually made the headless stuck to that very small window. I'm guessing that a dummy hdmi plug will end up doing the same thing so I'm just going to reinstall it all. Thank you though.
For me forcing HDMI hotplug + resolution in /boot/config.txt AND adding the command to /boot/cmdline.txt fixed the issue.
I can't disable kms because of camera. RPi must have "connected" display to get the VNC work properly. You must see the display under Preferences->Screen configuration
For me forcing HDMI hotplug + resolution in /boot/config.txt AND adding the command to /boot/cmdline.txt fixed the issue.
I'm surprised the config.txt settings made a difference when using kms driver.
Can you report exactly which settings you added to config.txt and can you try removing them one at a time to ensure which ones are really required.
@romton843, I'm so sorry that the fix you mentioned is not working for you. But it gave me the idea to search the Web for that particular solution, and I found it, and it is working for me! Here are the details, inspired both by your comment and by https://forums.raspberrypi.com/viewtopic.php?t=282380.
- Comment out all dtoverlay=vc4-kms-v3d lines in config.txt
- Comment out max_framebuffers too (but this might not be necessary)
- Restart the Pi headless
- Connect from another machine with VNC client. Best not to maximize the VNC client window but let the headless resolution that you previously set determine the window size. Otherwise you get some mouse anomalies trying to switch from window to window.
- Maximizing windows on the Pi should then work just fine. At least, it finally does for me.
Some people have said that SSH access gets messed up with dtoverlay=vc4-kms-v3d commented out. When I get back home I'll test that out and see what is the case for me. Some other people have said that what you need instead is the older dtoverlay=vc4-fkms-v3d entry but that it will be deprecated soon. Your mileage may vary.
Warning don't do this, it might "brick" your PI.
After trying this out, I had to:
I'm so sorry, but what precisely bricked your Pi? Like I said, that approach worked for me.
But having said that, I'm currently a bit more nuanced in my config.txt. Here is a snippet of what I am now running with.
# Conditionally enable DRM VC4 V3D driver
[EDID=*]
# CONDITIONALLY ENABLES DTOVERLAY IF DISPLAY IS PLUGGED IN
dtoverlay=vc4-kms-v3d
# Set to number of monitors
max_framebuffers=1
For me forcing HDMI hotplug + resolution in /boot/config.txt AND adding the command to /boot/cmdline.txt fixed the issue.
I'm surprised the config.txt settings made a difference when using kms driver.
Can you report exactly which settings you added to config.txt and can you try removing them one at a time to ensure which ones are really required.
I don't know why, but just editing config.txt worked for some time and after one reboot it stoped working. So I edited also the cmdline.txt and it started to work again...
@Chippi I also tried to disable kms and didn't "brick" the RPi, it must be something else...
This problem appears on my RPi 4GB somehow randomly after each reboot. But if logout and login back (which is faster than reboot), it may also fix itself (like 40% chance).
Isn't there a way to configure the "fallback resolution"? For me it's like 300px wide (not 1023 as mentioned above) so even logging out is pretty complicated.
You can change the headless resolution from the start menu itself to some other arbitrary number (in my case I tried using 1600x1200) then tried to reboot and then again set the display resolution to 1920x1080, while not touching raspi-config.
You can change the headless resolution from the start menu itself
Where in the menu? Setting it in the Configuration window won't work on boot, I need to logout and login back every time in order to get a proper resolution.
This is what I get after reboot:
The usable screen is only the small rectangle in the upper left corner :(
EDIT:
When I run screen
in Firefox, it prints: availHeight: 160, availWidth: 320
So, is there a way to change the fallback 320x160 to something bigger?
I use Linux raspberrypi 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux
On 2 hardware versions (Pi 3B and Pi 3B+) :
Rather than trying a dummy hdmi plug, add
video=HDMI-A-1:1920x1080@60D
to the end of/boot/cmdline.txt
(on same line). That should have the effect of faking a connected display.
This actually worked in my case, but looks like it only supports standard resolutions, those worked with me: 1280x720 1600x900 1920x1080
Quick note - after plugging a dummy HDMI, setting resolution to FullHD and later removing it, it changed the fallback resolution from 320x160 to something like 1024x768.
In any case, indeed, appending video=HDMI-A-1:1920x1080@60D
to the end of /boot/cmdline.txt
fixed the problem!
Thanks!
Very interested in this thread.
I've tinkered with this, and have screwed up the screen resolution, had to put it on a monitor and m/k to fix things
So I've had this exact same issue for a year now.. just the luck of the draw on a reboot or cold start if the desktop will act like the resolution it's set at, or something smaller. I've had it on a Pi3+ 32b OS, and Pi4b+ 64b OS . All via VNC. I've set the headless res to 1920x1080, even checking it in the cl config panel for VNC display option. I tried this,, video=HDMI-A-1:1920x1080@60D to the end of /boot/cmdline.txt , NG for me. About to get the HDMI dummy plug. this is really annoying,
(Edit: on a Pi4B 64b OS) (not having the same success on the Pi3b+)
I was just doing some googling on this, and found some input, and on my 5th reboot, and all is hanging in there..
found in thread here: https://forums.raspberrypi.com/viewtopic.php?t=332327
/boot/config.txt Clipped from working config.txt... First 3 lines were in my stock config.txt , lines following are what were added just after the first 3 as shown.
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
hdmi_group=2
hdmi_mode=82
# Ignore EDID display data
hdmi_ignore_edid=0xa5000080
hdmi_force_hotplug=1
I started with the same lines as the Pi4B , but didn't work. Lots of adding and changing code for the resolution and rem'ing out , and so 5 reboots on a Pi3b+ 32b os.. and it's staying !
As with all, have the headless set to 1920x1080.
5 reboots and with this in the config.txt, all is good...
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=5
hdmi_group=2
hdmi_mode=82
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
Going to sleep..
Figures, I ordered the dummy hdmi's, and finally find combo's that work after hacking and wacking keys.
Hi, for those that could find this useful. What worked for me to fix the maximizing of the windows is this :
framebuffer_width=1920 framebuffer_height=1080
I hope this helps
Setting framebuffer_width=1920 and framebuffer_height=1080 in config.txt worked for me. Many thanks.
I had the same issue, here is the solution that worked for me:
in the /boot/config.txt edit this, make sure it is uncommented - after a reboot, you will see maximized windows, for me at least it was the case : hdmi_group=2 hdmi_mode=82
@ZigaJavornik, thank you! Setting hdmi_group=2
and hdmi_mode=82
fixed it for me.
Using "Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux"
OS: Pi OS Bullseye Release 11.
I am using CM4 ioboard carrier board with 4GB RAM and 32GB eMMC compute module 4. I set the headless resolution to 1920x1080 from the Menu while on the external monitor connected to HDMI. After that I removed the external monitor and rebooted the board. Then I connected to the board from VNC viewer. The Desktop appeared in 1920x1080 resolution but if I open any window or terminal and try to maximize it, it does not fill the whole desktop.