Kodi Community Forum

Full Version: Resolution defaulting to lower resolution on resume from sleep.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am having trouble with my xbmcbuntu installation in that when I put the computer to sleep or hibernation it is working perfectly at 1080p then on resume
it wakes up briefly displays at 1080p, then only shows xbmc on the upper left corner of the TV and is at 1280x800p.
I can then set the resolution back to 1080p and it goes back to fullscreen 1080p just fine. This is reproducible
every time I put the system to sleep/wake it up. the computer is a HP dv4 laptop that I bought cheap with a broken LCD. I have it hidden
in my entertainment center and hooked up to my TV via HDMI and it works wonderfully with XMBCbuntu. Specs of the laptop are here. /Laptop Specs

Pictures of what I see are shown below.

XBMC before I suspend the system

XBMC just after it resumes

XBMCBuntu login screen when switching between XBMC and the desktop


xbmc.log at http://paste.ubuntu.com/9352160/

this is the newest version of XBMCBuntu running XBMC 13.2, Architecture is X86_64

xrandr output

ryan@ryan-HP-Pavilion-dv4-Notebook-PC:~$ sudo xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 32767 x 32767
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 303mm x 190mm
1280x800 60.0*+
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 820mm x 460mm
1920x1080 60.0*+ 59.9 24.0 24.0
1920x1080i 60.1 60.0
1600x1200 60.0
1400x1050 59.9
1280x1024 60.0
1360x768 60.0
1280x720 60.0 59.9
1024x768 75.1 70.1 60.0
1440x480i 60.1 60.1 60.1
800x600 72.2 75.0 60.3 56.2
720x480 60.0 59.9
640x480 75.0 72.8 60.0 59.9
720x400 70.1
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

I have tried creating a xorg.conf file and dropping in some info that I found online. this is the contents of my xorg.conf

Section "Screen"
Option "HWCursor" "Off"
Identifier "Screen0"
Device "Device1"
Monitor "Monitor0"
DefaultDepth 24
Option "NoLogo" "True"
Option "DynamicTwinView" "False"
Option "metamodes" "1920X1080_60 +0+0"
SubSection "Display"
Depth 24
Modes "1920x1080_60"
EndSubSection
EndSection

I have tried changing the Screen, Device, and Monitor settings from 0 to 1 since I have 2 displays. the broken internal LCD, and the HDMI
The xorg.conf file here does not seem to make any difference as the result is the same if it is there as if I delete it completely and restart.

When fully shutdown and restarted, the resolution stays correctly at 1080p. it is only on suspend/resume and Hibernate/resume that it screws up.
Any help would be appriciated as I cant seem to fix it. I dont know if I need a correct xorg.conf or if I can somehow have the system run a script that uses xrandr to set resolution on resume.

Thanks in advance.
it seems to auto switch to the laptop internal display.
You can try turning off LVDS1:
xrandr --output LVDS1 --off

if that doesn't help, please try kodi from the unstable PPA. Backup ~/.xbmc in case you want to go back to gotham
I am not at home, but I will try this tonight when I get home. should shutting down the LCD be persistent across sleep/resume cycles? or would I add it to a script to be autorun upon waking? (/etc/pm/sleep.d/)

Also, where is the proper place to add this command to system boot?

If you don't know, I will try it and see tonight, and then report my results.

If this doesn't work, I wonder if physically disconnecting the lcd ribbon cable from the laptop motherboard would cause the GPU to see it as disconnected.
there are multiple possible options to put the xrandr command. To your kodi init script(if you have one), /etc/rc.local, autoexec.py in kodi...

but you can also do this via kernel options.
adding
Code:
video=LVDS1:d
on the grub kernel commandline should work.
OK, I got it to work but it was fairly convoluted. no amount of

sudo xrandr --output LVDS1 --off

would disconnect that monitor. When I ran xrandr again to see what monitors I had, the LVDS1 was still there. so I tried updating the grub.cfg which reverted back to its default when I ran sudo update grub. After a lot of google'ing I found that if I update /etc/default/grub and add
Code:
video=LVDS1:d
to GRUB_CMDLINE_LINUX_DEFAULT= " " that when I ran sudo update-grub, the changes would appear in my /boot/grub/grub.cfg file, but on reboot it wouldnt work.

however I noticed that someone else on another forum used the command

Code:
GRUB_CMDLINE_LINUX_DEFAULT="video=LVDS-1:d"
so I tried that and it worked perfectly. the internal LCD shows that it is disconnected in xrandr, and the suspend/resume works perfectly and maintains its resolution.

Thanks so much for the help. I think that I now have everything working on XBMC how I want it. Time to sell the far to valuable appletv2's and get some appletv3's. The apple tv 2's with infuse just are way to slow to browse my nas, and are sometimes tempramental. so I will use XBMC for local content (which I have a lot of) and my appletv3 for online content.