Linux [SOLVED]Permanent adjustment of resolution with XBMCbuntu [Haswel chip]
#1
I'm using XBMCbuntu 13 (i.e. Ubuntu 14.04). I have an Intel integrated card (HD4600). I'm connected to a 1366x768 Metz 26" TV using an HDMI cable. I'm able to get good resolution using xrandr commands (I didn't have to make a new mode a good one was already there). I actually created a little script that first do: export DISPLAY=:0 and the xrandr --output and the relevant mode. BUT: whenever I restart the computer I need to run the script again, the settings are not saved. I can add the script to rc.local but think its not the best way. How can I change it?
Reply
#2
You could try rc.local but that only works when the computer is booted, not each time X is started. Try $HOME/autostart
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
I do it in the script that starts XBMC.
Reply
#4
in XBMCbuntu where is the script that starts xbmc?
Reply
#5
Should be /usr/bin/xbmc-standalone
Reply
#6
So I tried adding the xrandr lines to /usr/bin/xbmc-standalone but it didn't work.
It seems like I have to wait until XBMC is fully loaded before I can run the command to change resolution.
After XBMC is up, if I run my script (export DISPLAY=:0 xrandr -- etc.) the resolution changes.
Any ideas on how I can make something like that?
Reply
#7
put this in the /etc/rc.local

sh -c "sleep 5;export DISPLAY=:0 xrandr -- xxxxxxxxxxxx" &
Reply
#8
You don't need export in that line.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#9
It not working.
I started with the above (sleep 5) and went to sleep 30 but it still doesn't work.
Reply
#10
OK, try this:

su xbmc -c "sleep 30;DISPLAY=:0 xrandr -q" >/tmp/rc.local.out 2>&1 &

Once you see output in /tmp/rc.local.out you can change the xrandr command string to suit ...
Reply
#11
(2014-06-08, 11:21)astropolak Wrote: OK, try this:

su xbmc -c "sleep 30;DISPLAY=:0 xrandr -q" >/tmp/rc.local.out 2>&1 &

Once you see output in /tmp/rc.local.out you can change the xrandr command string to suit ...

Should I put that in rc.local instead of the command you previously showed?
Reply
#12
OK. I did put it in rc.local (with my username instead of xbmc.
output says every xrandr output is disconnected. I know that this is what I get before xbmc starts up.
Another thing: If I run the xrandr command from another tty in the same computer (as opposed to run it through ssh while xbmc is on) I get the same "disconnected" error.
Reply
#13
This is what I did in earlier iterations of Gotham to fix brightness problems, xbmc is the user under which the XBMC runs,..

su xbmc -c 'sleep 4;xrandr -d :0 --output HDMI1 --set "Broadcast RGB" "Limited 16:235"'

And this is what I get when the receiver is not powered on (HDMI cable disconnected):
root@xbmc:/etc# su xbmc -c 'sleep 4;xrandr -d :0 -q'
Screen 0: minimum 320 x 200, current 320 x 200, maximum 32767 x 32767
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Reply
#14
I don't know why I get this message sometimes as my TV is connected directly to the computer via HDMI.
I think its associated to my problem. Sometimes the OS doesn't recognize the connection or something like that.
Reply
#15
Have you tried another HDMI cable?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply

Logout Mark Read Team Forum Stats Members Help
[SOLVED]Permanent adjustment of resolution with XBMCbuntu [Haswel chip]0