Desktop Effects crashed KDE 4

Hi,

HELP !! I enabled desktop effects in OpenSuse 11 and the screen had gone black… How do I turn desktop effects off from the command line? How do I get to a command line? I tried rescue system and it booted to a prompt. Then I tried sax2 and gnome-xgl-switch commands but it didn’t recognise either of them.

I also got rid of the task bar and have no idea how to get it back :confused:

I have an ATI card and I imagine that’s the reason it crashed in the first place. I can sort that out later if I could just get the desktop back…

/jlar

I tried reinstalling and it didn’t make any differance… I am really screwed now. I managed to disable xgl but it made no differance… Any help would be great

/j

I’d like to follow up on this question, because it seems to me like a usefull thing to be able to do.

First of all, what I do when the KDE4 Desktop Effects crash my Window Manager is restart the X-server (CTRL+ALT+BACKSPACE x2, in a short period of time). This bring you back to the login window. Then I change my session type to something else (failsafe for instance, everything but KDE4 will do). Then I login (and open up a terminal/konsole) and move my .kde4 directory in my home folder to .kde4-backup. Unfortunately this removes all my kde4 user settings so another solution would be appriciated.

For instance doing an ALT+F1 and then running a command. Any ideas?

I’m no expert but I’ve been using Linux for awhile and I have found there is almost always a solution.

I would suggest that you reboot your system and at the green grub prompt, type init 3. This should boot to a command prompt without X running.

From there login as user and try running sax2 -r and turn off desktop effects in the setup screen. Then reboot. (if there is no apparent way to turn off “effects” reboot anyway because regenerating the xorg.conf file might fix the problem)

If that doesn’t help, boot again into init 3 and use an editor to open your /etc/X11/xorg.conf file. (I use nano - if you don’t have a text editor installed you can install one using the zypper command from the prompt.)

Anyway, if the last line of xorg.conf indicates compositing is running try changing it … can’t remember if it’s “no” or “false” but you could just “rem” out that line in xorg.conf. You may also have to “rem” the line that loads aiglx.

That should get your gui running.

You can also press Ctrl-Alt-1 to get into one of the virtual consoles, login as root and type init 3 in command line. Then change directory to your home directory and type “rm -R .kde4” This removes all KDE 4 settings and sets it to factory default. I hope this helps.

Here’s a little less rigorous approach to get your Desktop Back once enabling “Desktop Effects” had crashed your window manager and wouldn’t get back to normal. Credits (also) to: kjjjjshab from kubuntuforums

Ok, first your situation, you enabled Desktop Effects in KDE4 and now you’re stuck with a black / grey / white screen with just / not even your mouse visible. Restarting the X server via CTRL+ALT+BACKSPACE doesn’t work. Also you don’t want to delete your whole .kde4 folder because you just got everything just right, here’s what you do:
Please note I’m using the command line text editor “nano” in this example, but you might not have it installed, then try a different editor like “pico”, “vi”, “vim” (in order of preference, vi and vim work slighty differently).

  • Press CTRL+ALT+F1 (switches to command line - terminal)

  • Enter your login + password, NOT root.

  • Type (line after line):

cd ~/.kde4/share/config
nano kwinrc
  • Now in the 4th and 5th line you see this:

[Compositing]
Enabled=true
… now navigate to the 5th line by means of the arrow keys and change “true” to “false

  • Press CTRL+O to “WriteOut” or in other words save the file. It will ask for a name which is by default the original file name “kwinrc”, so just press ENTER to overwrite the file with this new change.

  • Press CTRL+X, to exit the nano editor. Now you are back at the command line.

  • Press CTRL+ALT+F7 to switch back to graphical mode (yes the screen is still white / dark / grey, because we still need to restart KDE4)

  • Press CTRL+ALT+BACKSPACE (twice, fast) to restart the X Graphics Server and end up at the login window.

  • Login and see your KDE4 desktop as it was before you enabled Desktop Effects :wink:

  • Optional: file a bug report (because KDE4 should have disabled Desktop Effects automatically after the 10 seconds you didn’t do anything because your Desktop wasn’t working anymore.

Here’s a slightly more convenient solution, which should work in the file in question remains properly formatted (but this may change in subsequent KDE releases). I’ve tested it with KDE 4.1.

Note: if you are in “black / white / messed up screen mode” remember you need to press CTRL+ALT+F1 to get a terminal and login with your normal user account (not as root).

Type the following inside a terminal / konsole.


cp -i ~/.kde4/share/config/kwinrc ~/.kde4/share/config/kwinrc_backup 
sed -i '/[Compositing]/{n; s/true/false/;}' ~/.kde4/share/config/kwinrc

[Explanation]
First this make a copy (kwinrc_backup) of the configuration file we are about to mess with (kwinrc) using cpless ~/.kde4/share/config/kwinrc_backup".
Next using the unix tool sed we find the line that matches “[Compositing]”, then replace “true” with false on the next line. The “-i” options makes that we replace the string in the same file, rather than throw the output to the command line, so this is a search and replace command.
Note: if you don’t have the “sed” program then run the following as root to install it:

zypper in sed

If something goes wrong you can restore the backup this way:


mv -i ~/.kde4/share/config/kwinrc_backup ~/.kde4/share/config/kwinrc

What might be also usefull if you experiment with Desktop Effects a lot is the following:

create a new text file called “Disable_DesktopEffects” in the folder “bin” in your home directory, i.e. ~/bin/. And put the following lines of code in it:


#!/bin/sh
echo ---------------------------------------------------------
echo Making backup of configuration file: ~/.kde4/share/config/kwinrc
echo if backup file already exists you will be promted to overwrite \(y/n\).
echo ---------------------------------------------------------
cp -i ~/.kde4/share/config/kwinrc ~/.kde4/share/config/kwinrc_backup
sed -i '/[Compositing]/{n; s/true/false/;}' ~/.kde4/share/config/kwinrc
echo Desktop Effects disabled, now restart the X-server using CTRL+ALT+ESCAPE
echo alternatively you can also login as root, type
echo \"init 3\" which tops the kde desktop manager and then type
echo \"init 5\" to restart it and bring you back to the login screen.

Now make sure to make it executable by typing:

chmod +x ~/bin/Disable_DesktopEffects

Have fun!

Here’s a slightly more convenient solution, which should work in the file in question remains properly formatted (but this may change in subsequent KDE releases). I’ve tested it with KDE 4.1.

Note: if you are in “black / white / messed up screen mode” remember you need to press CTRL+ALT+F1 to get a terminal and login with your normal user account (not as root).

  • Type the following inside a terminal / konsole to disable Desktop Effects:

cp -i ~/.kde4/share/config/kwinrc ~/.kde4/share/config/kwinrc_backup 
sed -i '/[Compositing]/{n; s/true/false/;}' ~/.kde4/share/config/kwinrc

**

[Explanation]**
First this make a copy (kwinrc_backup) of the configuration file we are about to mess with (kwinrc) using cpless ~/.kde4/share/config/kwinrc_backup".
Next using the unix/linux tool sed we find the line that matches the string “[Compositing]”, then replace the string “true” with the string “false” on the next line. If “true” is not found (Desktop Effects was already disabled, nothing happens). The “-i” options makes that we replace the string in the same file, rather than spit out the output to the command line, so this is a search and replace command.
Note: if you don’t have the “sed” program then run the following as root to install it:

zypper in sed

If something goes wrong you can restore the backup by executing the following line from the terminal, but make sure you’re not in super user (root) mode:


mv -i ~/.kde4/share/config/kwinrc_backup ~/.kde4/share/config/kwinrc

What might be also useful if you experiment with Desktop Effects a lot is the following:

  • Create a new text file called “Disable_DesktopEffects” in the folder “bin” in your home directory, i.e. ~/bin/. And put the following lines of code in it:

#!/bin/sh
echo ---------------------------------------------------------
echo Making backup of configuration file: ~/.kde4/share/config/kwinrc
echo if backup file already exists you will be promted to overwrite \(y/n\).
echo ---------------------------------------------------------
cp -i ~/.kde4/share/config/kwinrc ~/.kde4/share/config/kwinrc_backup
sed -i '/[Compositing]/{n; s/true/false/;}' ~/.kde4/share/config/kwinrc
echo Desktop Effects disabled, now restart the X-server using CTRL+ALT+ESCAPE
echo alternatively you can also login as root, type
echo \"init 3\" which tops the kde desktop manager and then type
echo \"init 5\" to restart it and bring you back to the login screen.

  • Now make sure to make it executable by typing:
chmod +x ~/bin/Disable_DesktopEffects

Have fun!

To clarify from the OP, it’s not clear whether you’re talking about compiz-style “desktop effects”, or KDE4 style desktop effects.

Novell refers to compiz integration as “desktop effects”, KDE refers to compositing in KDE4 as “desktop effects”.

From your post, it’s not really clear which environment you’re running with, or what the actual issue is.

KDE4 should recover if compositing fails, otherwise jsnel’s advice should help.

If the issue is with compiz, then you can search this forum for support, or remove compiz if all else fails.

Hope this helps…

Cheers,
KV

I thought it would be clear from my post’s title "Disable KDE 4 Desktop Effects from the command line [script]" but if it wasn’t, yes I’m talking about the Desktop Effects built into KDE4. KDE doesn’t recover from this on some (Ati graphics card’s based) machines. I will try to file a bug report if I find the time.

Thankyou so much for this simple and straight forward solution jsnel!

Same issue with a Nvidia card. I tried both solutions listed here and it turned out I had to install nano to make the first one work properly. Vi just didn’t play well with me.

Thanks for the help

Okay, now this does not work for me. In my kwinrc file I have this:

[Compositing]
Backend=OpenGL
Enabled=false 

I have restarted my X-server several times (including a complete reboot) but on bootup XGL is always started and i see fancy flames going on and stuff.
I want to disable it not because I don’t see my desktop anymore but because it makes my system super unstable and unuseable. I can’t even use the panel…all i can do in KDE is switching apps with alt-Tab and launching new apps with alt-F2… :frowning:
Thanks for help!
Ron

Hi guys, for anyone interested i have the same issue with the Kde Desktop Effects in Kd4(sorry no opensuse, Ubuntu Inteprid Ibex), but i think this could help to anyone, i follow the guide to change the value of true to false in the kwinrc of Kde(Kde4 in my case) but it didn’t help, the same issue with the black screen, so i found a .kde directory in mi home, so i went to share/config and there i found another kwinrc, this time i follow the guide and disabled the compositing there, and voila!

it works!!

sorry for my bad english and i hope someone could use this.

bye.

Thanks for the help. I aslo found that in Kubuntu 8.10 with KDE 4.1 the kde folder is .kde (not .kde4).

However on doing that and restarting I no longer have anything in my bottom panel and it will not restore any “widgets”. Any ideas?

Also I am using an ATI Radeon HD 3650 GPU, any reason why this occurs? Thanks

what if you dont know your password or username to login and when you do try to login in the password doesnt show type ? how or what should i do ?

will this delete every thing on your drive/desktop ?

jsnel;1845167 Wrote:
> Here’s a little less rigorous approach to get your Desktop Back once
> enabling “Desktop Effects” had crashed your window manager and wouldn’t
> get back to normal. Credits (also) to: ‘kjjjjshab’
> (http://tinyurl.com/6y2onz) from ‘kubuntuforums’
> (http://www.kubuntuforums.net/index.php)
>
> Ok, first your situation, you enabled Desktop Effects in KDE4 and now
> you’re stuck with a black / grey / white screen with just / not even
> your mouse visible. Restarting the X server via CTRL+ALT+BACKSPACE
> doesn’t work. Also you don’t want to delete your whole .kde4 folder
> because you just got everything just right, here’s what you do:
> please note i’m using the command line text editor “nano” in this
> example, but you might not have it installed, then try a different
> editor like “pico”, “vi”, “vim” (in order of preference, vi and
> vim work slighty differently).
>
>
> > > >

  • Press CTRL+ALT+F1 (switches to command line - terminal)
  • Enter your login + password, NOT root.
    > > >
    >
    > > > >
  • Type (line after line):
    > >
    Code:

> > cd ~/.kde4/share/config
> nano kwinrc

> >
> > >
>
> > > >

  • Now in the 4th and 5th line you see this:
    > … now navigate to the 5th line by means of the arrow keys and
    > change “true” to “false
  • Press CTRL+O to “WriteOut” or in other words save the file. It
    > will ask for a name which is by default the original file name
    > “kwinrc”, so just press ENTER to overwrite the file with this new
    > change.
  • Press CTRL+X, to exit the nano editor. Now you are back at the
    > command line.
  • Press CTRL+ALT+F7 to switch back to graphical mode (yes the
    > screen is still white / dark / grey, because we still need to
    > restart KDE4)
  • Press CTRL+ALT+BACKSPACE (twice, fast) to restart the X Graphics
    > Server and end up at the login window.
  • Login and see your KDE4 desktop as it was before you enabled
    > Desktop Effects :wink:
    > > >
    >
    >
    > > > >
  • Optional: file a bug report (because KDE4 should have disabled
    > Desktop Effects automatically after the 10 seconds you didn’t do
    > anything because your Desktop wasn’t working anymore.
    > > >

Okay, now this does not work for me. In my kwinrc file I have this:

Code:

[Compositing]
Backend=OpenGL
Enabled=false

I have restarted my X-server several times (including a complete
reboot) but on bootup XGL is always started and i see fancy flames going
on and stuff.
I want to disable it not because I don’t see my desktop anymore but
because it makes my system super unstable and unuseable. I can’t even
use the panel…all i can do in KDE is switching apps with alt-Tab and
launching new apps with alt-F2… :frowning:
Thanks for help!
Ron


reggler

reggler’s Profile: http://forums.opensuse.org/member.php?userid=6264
View this thread: http://forums.opensuse.org/showthread.php?t=386613

Hi guys, for anyone interested i have the same issue with the Kde
Desktop Effects in Kd4(sorry no opensuse, Ubuntu Inteprid Ibex), but i
think this could help to anyone, i follow the guide to change the value
of true to false in the kwinrc of Kde(Kde4 in my case) but it didn’t
help, the same issue with the black screen, so i found a .kde directory
in mi home, so i went to share/config and there i found another kwinrc,
this time i follow the guide and disabled the compositing there, and
voila!

it works!!

sorry for my bad english and i hope someone could use this.

bye.


saija

saija’s Profile: http://forums.opensuse.org/member.php?userid=22045
View this thread: http://forums.opensuse.org/showthread.php?t=386613