Automatically detected modes cannot be deleted.
Ping developers: https://gitlab.freedesktop.org/xorg/xserver/-/issues/353
You can try creating and using a custom EDID file for your monitor:
I use this script for that purpose
xrandr --prop | grep "[^dis]connected" | cut --delimiter=" " -f1> "$HOME/currentScreens.txt"
echo "Number of active screens:" $(< "$HOME/currentScreens.txt" wc -l)
if [ $(< "$HOME/currentScreens.txt" wc -l) -gt 1 ]; then
xrandr --auto &...
The lxrandr command is best suited to run from the LXDE desktop environment rather than from any arbitrary environment.
It saves its settings in a .desktop entry (compliant with Freedesktop) there:
which includes this entry:
According to the Fredesktop specifications that means this will ...
xrand is an Xwindows utility and expects to be run inside an X session, that's where the Cant open display comes from.
You could do this (if your DISPLAY is :0):
$ export DISPLAY:0
$ xrandr --listmonitors
$ xrandr your_command