I hope you are smarter than I am. I have an entertainment system running Kodi and I have posted similar questions on the kodi forums without finding any useful answers there. I ask again here because the underlying OS is Ubuntu.
I have a legacy TV that runs 1920 x 1080i which renders strange results without adjustments via xrandr or xorg.conf. Without adjustment, the margins are too wide and display is fuzzy because the gpu is sending 1080p to a TV that expects 1080i.
I have written a script that does the job but only after booting to desktop, but it is impractical because it requires booting to command line, running startx to access the desktop, running the adjustment script, logging back out to the command line, then typing the command "kodi" to start the entertainment system, only then do handheld remotes work. Other family members do not know how to do all that. I need it to boot kodi with the correct display settings just by pressing the power button.
Here is the script using xrander that works ONLY WITHIN THE DESKTOP ENVIRONMENT (annoying!!!)
#!/usr/bin/bash
/usr/bin/sudo xrandr --output "HDMI-1" --mode 1920x1080i \
--set "top margin" 50 \
--set "bottom margin" 45 \
--set "left margin" 100 \
--set "right margin" 90
Adding this script to @reboot in crontab won't work nor will it work when added to .xinitrc because I cannot access "HDMI-1" in any other environment than full desktop mode, which uses too many resources (I use a SoC with only 2GB memory which works great when not running a full windows manager).
I can watch simultaneously via kodi and run
ssh -X username@192.168.X.XXX
but when I run this:
xrandr -query
It reports many things including:
eDP-1 connected
DP-1 disconnected
HDMI-1 disconnected
DP-2 disconnected
HDMI-2 disconnected
eDP-1 is the display on my laptop with X forwarding via SSH. It shows HDMI-1 is disconnected, but it isn't! I am watching the TV right now, which means it is connected! Stupid computer doesn't know it is actually using HDMI-1 to display the TV show? What am I missing?
xrandr sees all display ports, even the X forwarded one, but I still can't get any scripts to access them outside the desktop environment.
I still have to FIRST boot to lxde to control HDMI-1, log out to command line, then run kodi.
Anyone have a suggestion on how to control other display ports listed by xrandr -query from other environments? Thank you in advance.