Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
Hello all,
I'm currently away from home with a Pi 5 and a I'm having issues.
Seems my video connection isn't 100% and it's trying to run at 1278x768 (I think, it only shows up for a moment!), which the TV doesn't like!
I can't see the GUI but I can get a Shell connection, through a series of hops and the internet.
So I tried adding a "video=" statement to the config.txt in the /boot/firmware folder. This worked to the extent the boot console showed up! The desktop didn't change (which I realise wasn't going to happen!)
I tried the "WAYLAND_DISPLAY="wayland-1" wlr-randr --output <OUTPUTNAME> --mode <WIDTH>x<HEIGHT>@<REFRESHRATE>Hz" command but nothing seemed to change, although no error messages were shown.
I've also tried editing the ~/.config/wayfire.ini file of the user I have it booting into, again no change right away (wasn't expecting one) and nothing after a reboot.
I've tried on the "HDMI-A-1" Output name, as that's what showed up listing the screen resolutions (using just the wlr-randr command) so I'm hoping I've got that part right.
(With HDMI-A-1 being the port closest to the USB C power connection, is my assumption)
Can anyone tell me what I'm doing wrong?
Cheers,
Ben
I'm currently away from home with a Pi 5 and a I'm having issues.
Seems my video connection isn't 100% and it's trying to run at 1278x768 (I think, it only shows up for a moment!), which the TV doesn't like!
I can't see the GUI but I can get a Shell connection, through a series of hops and the internet.
So I tried adding a "video=" statement to the config.txt in the /boot/firmware folder. This worked to the extent the boot console showed up! The desktop didn't change (which I realise wasn't going to happen!)
I tried the "WAYLAND_DISPLAY="wayland-1" wlr-randr --output <OUTPUTNAME> --mode <WIDTH>x<HEIGHT>@<REFRESHRATE>Hz" command but nothing seemed to change, although no error messages were shown.
I've also tried editing the ~/.config/wayfire.ini file of the user I have it booting into, again no change right away (wasn't expecting one) and nothing after a reboot.
I've tried on the "HDMI-A-1" Output name, as that's what showed up listing the screen resolutions (using just the wlr-randr command) so I'm hoping I've got that part right.
(With HDMI-A-1 being the port closest to the USB C power connection, is my assumption)
Can anyone tell me what I'm doing wrong?
Cheers,
Ben
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
Video mode line goes into kernel command line - cmdline.txt - and not into config.txt
There is documentation on that https://www.raspberrypi.com/documentati ... ne-options
Your Pi running at 1280x768pixels is typ caused by bad HDMI cables and or monitors not providing valid EDID. Remove the uSD card, power up the Pi, post a picture of the boot diagnostics screen.
There is documentation on that https://www.raspberrypi.com/documentati ... ne-options
Your Pi running at 1280x768pixels is typ caused by bad HDMI cables and or monitors not providing valid EDID. Remove the uSD card, power up the Pi, post a picture of the boot diagnostics screen.
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
You're right, it was the cmdline.txt I'd edited.
As for the cabling, I'm pretty convinced that's the issue, but being away from all my "stuff" means no replacements.
Hence the reason I want to force a screen resolution, not have it negotiate with the TV.
The Pi is inside a case, booting off an NVME hat. So no easy way to remove the boot media and get a shot of the diag screen. I'll see what I can do when I get where I'm going.
As for the cabling, I'm pretty convinced that's the issue, but being away from all my "stuff" means no replacements.
Hence the reason I want to force a screen resolution, not have it negotiate with the TV.
The Pi is inside a case, booting off an NVME hat. So no easy way to remove the boot media and get a shot of the diag screen. I'll see what I can do when I get where I'm going.
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
Add below to the beginning of cmdline.txt, make sure all remains on a single line.
screen needs to be connected to HDMI next to USB-C.
As said, make sure you've not added any useless stuff to config.txt.
Code: Select all
video=HDMI-A-1:1920x1080M@60D
As said, make sure you've not added any useless stuff to config.txt.
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
As I thought, I had added it to the right file. Nothing added to the wrong one.
Connected to the correct HDMI port.
So, what do I put where, to tell the desktop to use a specific resolution?
The reason for for it not negotiating is most likely the cable, but that's not replaceable at the moment.
Connected to the correct HDMI port.
So, what do I put where, to tell the desktop to use a specific resolution?
The reason for for it not negotiating is most likely the cable, but that's not replaceable at the moment.
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
Did a little more experimenting, seems the HDMI plug to plug is working fine (used on another device).
Which leaves the mini-HDMI plug to Standard size HDMI socket as the probable issue.
Saying that, I can't rule out the Pi itself yet.
Which leaves the mini-HDMI plug to Standard size HDMI socket as the probable issue.
Saying that, I can't rule out the Pi itself yet.
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
I had similar problem but ONLY my RPI3, another RPI400/RPI5 are working "fine" with SAME Monitor/Cable SO i was pretty sure it's configuration miss-match?! :?
I running wayland/labwc on ALL 3x RPI, tricky was kanshi-config :P
I running wayland/labwc on ALL 3x RPI, tricky was kanshi-config :P
Code: Select all
~/.config/kanshi/config
profile {
output HDMI-A-1 mode [email protected] position 0,0 transform normal
}
systemctl restart lightdm.service
- terribleted
- Posts: 2023
- Joined: Tue Oct 06, 2020 8:07 pm
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
OP said "Which leaves the mini-HDMI plug to Standard size HDMI socket as the probable issue."
Yep. Some Adapters do not pass data in both directions, which means the EDID data from the monitor never makes it to the PI.
recommend the correct cable (as long as you are buying something)
saw this myself. If you remove the SD card, and power up, the diagnostic display has a "display" line, which should say "ok"
if not, the adapter isn't passing data.
Yep. Some Adapters do not pass data in both directions, which means the EDID data from the monitor never makes it to the PI.
recommend the correct cable (as long as you are buying something)
saw this myself. If you remove the SD card, and power up, the diagnostic display has a "display" line, which should say "ok"
if not, the adapter isn't passing data.
The only people that don't make mistakes are people that don't do anything.
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
This may be a similar problem that I had. Was this pi updated to labwc rather than a fresh install? If so I fixed mine by:
sudo apt purge arandr
sudo apt install raindrop
and set the screen resolution via raindrop. (preferences, screen configuration, screens)
That worked for me, and survives shutdowns etc. Sorry if yours is a different problem
sudo apt purge arandr
sudo apt install raindrop
and set the screen resolution via raindrop. (preferences, screen configuration, screens)
That worked for me, and survives shutdowns etc. Sorry if yours is a different problem
- photoberry4B
- Posts: 7
- Joined: Tue Jan 16, 2024 5:47 am
- dom
- Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator - Posts: 8472
- Joined: Wed Aug 17, 2011 7:41 pm
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
No, it doesn't support custom modes, only modes reported by your display.photoberry4B wrote: ↑Wed Nov 06, 2024 10:23 amHow do you set a custom resolution that way? If I open that dialog it just shows a list of resolutions, no option to set custom.
You should fix the underlying issue of no edid being reported by the display (likely by using a working hdmi cable).
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
Sorry if I added to the confusion, but what I was trying to say was that, for me, the purge and install raindrop was essential to allow me to set the resolution manually, in addition to the cmdline.txt. If someone had fresh installed the previous release of bookworm, upgraded since, and cant get the gui to work, then adding raindrop in the documented way may help.
My monitor correctly EDID reports 1920x1080@60 which was ok without the AV:link device. But with it I presume it either doesnt return correct EDID results (or none) so that could be similar to the OPs question but not for the resolution he wants. I seem to have seen the ability to add custom elsewhere on this forum (but dont know if it works) eg:
viewtopic.php?p=2266160&hilit=custom+wayfire#p2266160
labwc is totally ignoring wayfire.ini --> that's why this no longer works.
Try adding a custom modeline to ~/.config/labwc/autostart
Code: Select all
wlr-randr --output NOOP-1 --custom-mode 800x400@60Hz &
My monitor correctly EDID reports 1920x1080@60 which was ok without the AV:link device. But with it I presume it either doesnt return correct EDID results (or none) so that could be similar to the OPs question but not for the resolution he wants. I seem to have seen the ability to add custom elsewhere on this forum (but dont know if it works) eg:
viewtopic.php?p=2266160&hilit=custom+wayfire#p2266160
labwc is totally ignoring wayfire.ini --> that's why this no longer works.
Try adding a custom modeline to ~/.config/labwc/autostart
Code: Select all
wlr-randr --output NOOP-1 --custom-mode 800x400@60Hz &
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
You should think first before trying to repost 'cool looking stuff'.Pi5_User wrote: ↑Wed Nov 06, 2024 10:53 amSorry if I added to the confusion, but what I was trying to say was that, for me, the purge and install raindrop was essential to allow me to set the resolution manually, in addition to the cmdline.txt. If someone had fresh installed the previous release of bookworm, upgraded since, and cant get the gui to work, then adding raindrop in the documented way may help.
My monitor correctly EDID reports 1920x1080@60 which was ok without the AV:link device. But with it I presume it either doesnt return correct EDID results (or none) so that could be similar to the OPs question but not for the resolution he wants. I seem to have seen the ability to add custom elsewhere on this forum (but dont know if it works) eg:
viewtopic.php?p=2266160&hilit=custom+wayfire#p2266160
labwc is totally ignoring wayfire.ini --> that's why this no longer works.
Try adding a custom modeline to ~/.config/labwc/autostart
Code: Select all
wlr-randr --output NOOP-1 --custom-mode 800x400@60Hz &
Look at the documentation https://www.raspberrypi.com/documentati ... splay-mode on how to force video modes.
The above is - and was - a special use case!
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
'video=HDMI-A-1:1920x1080M@60D' or 'video=HDMI-A-1:1920x1080M@60'aBUGSworstnightmare wrote: ↑Mon Oct 07, 2024 6:56 amAdd below to the beginning of cmdline.txt, make sure all remains on a single line.screen needs to be connected to HDMI next to USB-C.Code: Select all
video=HDMI-A-1:1920x1080M@60D
As said, make sure you've not added any useless stuff to config.txt.
btw, can i set @100D or @100?
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
the parameters of the video mode are well documented in https://github.com/raspberrypi/linux/bl ... modedb.rstcjan wrote: ↑Wed Nov 06, 2024 8:28 pm'video=HDMI-A-1:1920x1080M@60D' or 'video=HDMI-A-1:1920x1080M@60'aBUGSworstnightmare wrote: ↑Mon Oct 07, 2024 6:56 amAdd below to the beginning of cmdline.txt, make sure all remains on a single line.screen needs to be connected to HDMI next to USB-C.Code: Select all
video=HDMI-A-1:1920x1080M@60D
As said, make sure you've not added any useless stuff to config.txt.
btw, can i set @100D or @100?
You should be able to figure out the difference between @100D or @100 yourself.
Is your screen supporting 100Hz refresh rates?
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Forcing a Desktop Screen Resolution on latest OS non working
o.k. tested this myself again this morning with an all fresh uSD image --> BROKEN AGAIN!
Video mode configured from kernel command line will only be effective when booted to CLI. GUI is AGAIN ignoring it and will switch to the preferred mode advertised by EDID.
Deja vue with more or less every new release....
My DUT:
Pi5
video mode requested via kernel command line: video=HDMI-A-1:1440x900M@60D
Yes, that mode is supported on my DUT
as one can see from the above the GUI has picked the preferred mode from the EDID table.
https://paste.debian.net/hidden/0e031b98/
Having the screen disconnected the GUI comes up correct - but that doesn't help that much ...
connecting the monitor now gives the correct results --> non practicable fix!
Video mode configured from kernel command line will only be effective when booted to CLI. GUI is AGAIN ignoring it and will switch to the preferred mode advertised by EDID.
Deja vue with more or less every new release....
My DUT:
Pi5
Code: Select all
pi@Pi5-new:~ $ uname -a
Linux Pi5-new 6.6.59-v8-16k+ #1811 SMP PREEMPT Tue Nov 5 20:06:38 GMT 2024 aarch64 GNU/Linuxvideo mode requested via kernel command line: video=HDMI-A-1:1440x900M@60D
Code: Select all
cmdline.txt
-----------
reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe cgroup_disable=memory numa_policy=interleave smsc95xx.macaddr=D8:3A:DD:7D:0C:BE vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 video=HDMI-A-1:1440x900M@60D console=ttyAMA10,115200 console=tty1 root=PARTUUID=c178ccd4-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=DE
Code: Select all
pi@Pi5-new:~ $ wlr-randr
HDMI-A-1 "Stargate Technology HDMI (HDMI-A-1)"
Physical size: 600x340 mm
Enabled: yes
Modes:
640x480 px, 59.939999 Hz
640x480 px, 59.939999 Hz
640x480 px, 60.000000 Hz
720x480 px, 59.939999 Hz
720x480 px, 59.939999 Hz
720x480 px, 60.000000 Hz
720x480 px, 60.000000 Hz
800x600 px, 60.317001 Hz
1024x768 px, 60.004002 Hz
1280x720 px, 23.976000 Hz
1280x720 px, 24.000000 Hz
1280x720 px, 25.000000 Hz
1280x720 px, 29.969999 Hz
1280x720 px, 30.000000 Hz
1280x720 px, 50.000000 Hz
1280x720 px, 59.939999 Hz
1280x720 px, 60.000000 Hz
1280x720 px, 60.000000 Hz
1280x960 px, 60.000000 Hz
1440x900 px, 59.901001 Hz
1280x1024 px, 60.020000 Hz
1400x1050 px, 59.948002 Hz
1920x1080 px, 23.976000 Hz
1920x1080 px, 24.000000 Hz
1920x1080 px, 25.000000 Hz
1920x1080 px, 29.969999 Hz
1920x1080 px, 30.000000 Hz
1920x1080 px, 50.000000 Hz
1920x1080 px, 59.939999 Hz
1920x1080 px, 60.000000 Hz
1920x1080 px, 60.000000 Hz
2560x1440 px, 59.951000 Hz (preferred, current)
Position: 0,0
Transform: normal
Scale: 1.000000
https://paste.debian.net/hidden/0e031b98/
Having the screen disconnected the GUI comes up correct - but that doesn't help that much ...
Code: Select all
pi@Pi5-new:~ $ wlr-randr
HDMI-A-1 "(null) (null) (HDMI-A-1)"
Enabled: yes
Modes:
640x480 px, 59.939999 Hz
848x480 px, 60.000000 Hz
800x600 px, 56.250000 Hz
800x600 px, 60.317001 Hz
1024x768 px, 60.004002 Hz
1440x900 px, 59.991001 Hz (current)
Position: 0,0
Transform: normal
Scale: 1.000000
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
No, read but no clue.aBUGSworstnightmare wrote: ↑Thu Nov 07, 2024 6:26 amthe parameters of the video mode are well documented in https://github.com/raspberrypi/linux/bl ... modedb.rstcjan wrote: ↑Wed Nov 06, 2024 8:28 pm'video=HDMI-A-1:1920x1080M@60D' or 'video=HDMI-A-1:1920x1080M@60'aBUGSworstnightmare wrote: ↑Mon Oct 07, 2024 6:56 amAdd below to the beginning of cmdline.txt, make sure all remains on a single line.screen needs to be connected to HDMI next to USB-C.Code: Select all
video=HDMI-A-1:1920x1080M@60D
As said, make sure you've not added any useless stuff to config.txt.
btw, can i set @100D or @100?
You should be able to figure out the difference between @100D or @100 yourself.
Is your screen supporting 100Hz refresh rates?
Yes, monitor is 1920x1080x100 and Freesync supported as box printed.
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
got it?'D' will force the display to be enabled and use digital output.
This is useful for outputs that have both analog and digital signals (e.g. HDMI and DVI-I). For other outputs it behaves like 'e'. If 'd' is specified the output is disabled.
what is the output of below command on your system?
Code: Select all
wlr-randrRe: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
aBUGSworstnightmare wrote: ↑Thu Nov 07, 2024 9:37 amgot it?'D' will force the display to be enabled and use digital output.
This is useful for outputs that have both analog and digital signals (e.g. HDMI and DVI-I). For other outputs it behaves like 'e'. If 'd' is specified the output is disabled.
what is the output of below command on your system?Code: Select all
wlr-randr
1920x1080 px, 60.000000 Hz (preferred, current)
1920x1080 px, 100.086998 Hz
1920x1080 px, 84.904999 Hz
1920x1080 px, 74.973000 Hz
1920x1080 px, 60.000000 Hz
1920x1080 px, 59.939999 Hz
1920x1080 px, 50.000000 Hz
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
o.k. 100Hz is shown as available so make a simple test:
1.) add below to your cmdline.txt
Code: Select all
video=HDMI-A-1:1920x1080M@100D3.) disconnect the monitor
4.) power up
5.) once the Pi has booted connect your monitor
-> expected result is that your OS is now running at FHD@100Hz . Confirm by running 'wlr-randr' again; should now show
...
Code: Select all
1920x1080 px, 100.086998 Hz(current)Re: Forcing a Desktop Screen Resolution, on Raspberry Pi OS, using Wayland
@aBUGSworstnightmare, thanks.
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion