Kodi Community Forum
Shutdown graphics subsystem before pc sleeps - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Shutdown graphics subsystem before pc sleeps (/showthread.php?tid=209726)



Shutdown graphics subsystem before pc sleeps - grobbie - 2014-11-24

Hi,

I have an HTPC with AMD A8-5545 apu. Whenever my machine goes to sleep and wakes up I end up with a black screen and a frozen xbmc/kodi. This is probably a video driver issue but could possibly be prevented by shutting down the graphics subsystem just before the machine goes to sleep (and consequent restarting it when coming back online). On Windows systems for example you can listen for WM_POWERBROADCAST messages.


RE: Shutdown graphics subsystem before pc sleeps - Memphiz - 2014-11-25

How are we supposed to "shutdown" the graphics subsystem?


RE: Shutdown graphics subsystem before pc sleeps - grobbie - 2014-11-25

You control the graphics subsystem of the application itself as such you can shut it down and restart it once the machine wakes up, but you must know this as a developer. So what exactly is your question?


RE: Shutdown graphics subsystem before pc sleeps - Memphiz - 2014-11-26

My question is what exactly you think we should shutdown? I mean we are going to sleep - basically everything is shut down for us ... tearing down the graphics subsystem while the rest of the app is basically still working might not be as easy as you think ... not even sure where to begin with here.


RE: Shutdown graphics subsystem before pc sleeps - grobbie - 2014-11-26

Maybe an option would be to simply restart the app. When the suspend is system triggered the user was not using the system anyway so restarting and ending up at mainscreen is not much of a problem. Same goes for a user triggered suspend from the menu actually.

But this should be optional I guess.


RE: Shutdown graphics subsystem before pc sleeps - teeedubb - 2014-11-26

You can use external programs to restart is suspend/resume, on windows eventghost and Linux pm-utils.


RE: Shutdown graphics subsystem before pc sleeps - topfs2 - 2014-11-26

Shutting down the graphics system would entail reloading textures and caches and everything. Essentially restarting the majority of the app. All for the 1% which have bad drivers. I say return the device and complain at the customer support of amd. We aren't doing anything drastic when sleeping. So you'd have the same problems when sleeping mid game.


RE: Shutdown graphics subsystem before pc sleeps - bry - 2014-11-26

@grobbie - why not try the hdmi pin 19 cover trick?


RE: Shutdown graphics subsystem before pc sleeps - grobbie - 2014-11-27

Thanks for the replies.
I'll look into the external tools mentioned to shutdown/restart xbmc.

@bry: the black screen has nothing todo with the display not being detected, simply a crashed process (xbmc) due to video driver issues after resume.