When switching from battery to ac or back, screen goes black
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When switching from battery to ac or back, screen goes black
I guess it's my turn.
I have an Acer amd64 dual with an atix1600 vid card. I've had this happen on various distros, so it's not distro specific.
When I go from AC to battery or vice versa, my screen goes black, I have to ctrl_alt f1 then back to f7 to get my screen back. I can post my xorg.conf if requested, but I have had this prob before and after a kernel upgrade it went away. No clue at all. I'm curious if it's an acpi setting.
I've googled this many times, but not really seeing anything similar.
I don't have a clue either, but I have a (not fully baked) idea for a work-around. The basic idea is to have the computer do the switching for you. I believe there is a way to detect which vt/console is currently being displayed, but I don't remember how to do that. (I think there is a command.) I believe there is a notification in the acpi subsystem when the switch occurs. When the notification occurs, you could have a script check, and if you are currently displaying a GUI, have it use chvt to switch to a text vt and back.
This will not make you happy, but I have sometimes distorted screen contents when the screensaver releases the screen. This happens on a desktop computer, and not even frequently, so it's not something to be traced down easily. Switching back and forth between a terminal screen and the X11 screen solves the problem.
My bet is that this is rather an issue with the X11 implementation. Nasty to fix something like that, as it can be a mixed responsibility between standard X11 and specific video driver code.
This is just a guess, but I think it may have something to do with the way the kernel or possibly x is viewing the event. I've seen this over the years, and it differs from one kernel to the other. Like I said, it's not distro specific. Suse, Ubuntu, Sidux, mandriva and fedora have all done it, but after a kernel upgrade or downgrade it stops happening. I'll keep plugging away. I downgraded my current kernel and the problem is gone.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.