XUbuntu 22.04.5 LTS | xfce4 | computer won't wake up after screen locks, and now GUI stopped working

Asked by Jonathan

I have noticed that, starting recently, if I leave my computer unattended for a while and the screen goes blank, moving the mouse does not unblank the screen.

So I tried getting rid of the screensaver and changing my power management settings, but that didn't work, so I tried turning the screensaver back on and turning power-management off, and that didn't work either.

Then I tried playing with the xfce4-panel-profiles but unfortunately lost my preferences. So I tried to restore the xfce4-panel profile to default, by moving files out of ~/.config/xfce4. Now, when I start the computer, then a fraction of a second after I login, the screen goes completely blank and the only way out is to power off (or use magic SysReq).

Note: I can login to a command line by hitting ctrl-alt-F1 at the GUI login screen, but if I login to the GUI, then after the screen blanks, no keyboard shortcuts (other than magic SysRq) work to regain control.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu xfce4 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jonathan (jonathandl2) said (last edit ):
#1

One more piece of information: if I press ctrl-alt-f1 and login to the CLI, then there is an error message

xset: unable to open display ""

but I still get a prompt and can issue commands, as long as I don't hit ctrl-alt-f7 to activate the GUI:
once I login to the GUI, I can't get back to the command line.
How do I repair the xfce4 GUI?

Revision history for this message
Patricia Horne (patriciahorne) said :
#2

Here's a possible solution to your XUbuntu screen locking and GUI issues:

1. To restore your GUI, try this from the command line (Ctrl+Alt+F1):
   ```
   mv ~/.config ~/.config_old
   sudo reboot
   ```
   This should reset XFCE to default settings.

2. If GUI works, edit LightDM config:
   ```
   sudo nano /etc/lightdm/lightdm.conf
   ```
   Add under [Seat:*]:
   ```
   logind-check-graphical=true
   xserver-command=X -s 0 dpms
   ```

3. Update your system:
   ```
   sudo apt update && sudo apt upgrade
   ```

4. Check graphics drivers:
   ```
   lspci | grep VGA
   ```
   Ensure correct drivers are installed.

5. Investigate power management:
   ```
   sudo apt install powertop && sudo powertop
   ```
   Look for unusual power behaviors.

6. Check logs:
   ```
   journalctl -b -p err
   ```
   Look for display/power/XFCE errors.

If issues persist:
- Try a different desktop environment
- Create a new user account to test
- Check hardware, especially on older systems

Backup data before major changes. Let us know if you need more details on any step!

Revision history for this message
Jonathan (jonathandl2) said (last edit ):
#3

Thanks for your help! You wrote:

"If GUI works, edit LightDM config:
sudo nano /etc/lightdm/lightdm.conf
Add under [Seat:*]:
logind-check-graphical=true
xserver-command=X -s 0 dpms"

If the GUI does not work, should I still do this step (from the ctrl-alt-f1 CLI), or should I skip it?

By the way, when I just did it, then the GUI still failed, then I unplugged and re-plugged the monitor cable and the GUI actually worked for a few seconds.

My theory is that "X" does not know which display to connect to, and something i had previously in .config told it to but it got lost even though I thought i had backed it up. And unfortunately commands involving "xset" or "xrandr" return errors when I try to set the display to ":0" (export DISPLAY=0 or export DISPLAY=:0) which should be the default, anyway.

I can try replacing the adapter and cable and see what happens, but in the meantime, please let me know if I should edit /etc/lightdm/lightdm.conf if the gui does NOT work? Thank you.

Revision history for this message
Jonathan (jonathandl2) said :
#4

Thank you again for your help. Regarding troubleshooting step #2:

"2. If GUI works, edit LightDM config:

   sudo nano /etc/lightdm/lightdm.conf

   Add under [Seat:*]:

   logind-check-graphical=true
   xserver-command=X -s 0 dpms"

should I also do this if the GUI does *not* work, or should I skip it, or save it till the end? I find the "X Window" system terminology confusing, as it seems the "server" and the "client" are reversed, with the "server" making requests to the "client"; what do these commands actually do?

Regarding step 4, the output of "lspci | grep VGA" is:
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] (rev 87)

Regarding step 5, I tried installing powertop, but none of the keyboard commands work! (Only thing that works is Ctrl-C.) And if I redirect the output to a file then it is not easily readable.

Regarding step 6, I can private-message you the logs; however, I think the ".xsession-errors" file might be more interesting:

dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/jdl/.Xauthority
/etc/X11/Xsession.d/30x11-common_xresources: line 16: has_option: command not found
/etc/X11/Xsession.d/75dbus_dbus-launch: line 9: has_option: command not found
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
/etc/X11/Xsession.d/90x11-common_ssh-agent: line 9: has_option: command not found
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg
dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
dbus-update-activation-environment: setting CLUTTER_BACKEND=x11
dbus-update-activation-environment: setting LANGUAGE=en_US
dbus-update-activation-environment: setting DESKTOP_SESSION=xubuntu
dbus-update-activation-environment: setting PWD=/home/jdl
dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=xubuntu
dbus-update-activation-environment: setting LOGNAME=jdl
dbus-update-activation-environment: setting QT_QPA_PLATFORMTHEME=gtk2
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting XAUTHORITY=/home/jdl/.Xauthority
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/jdl
dbus-update-activation-environment: setting GDM_LANG=en_US
dbus-update-activation-environment: setting HOME=/home/jdl
dbus-update-activation-environment: setting IM_CONFIG_PHASE=1
dbus-update-activation-environment: setting LANG=en_US.UTF-8
dbus-update-activation-environment: setting XDG_CURRENT_DESKTOP=XFCE
dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
dbus-update-activation-environment: setting XDG_SESSION_CLASS=user
dbus-update-activation-environment: setting GTK_OVERLAY_SCROLLING=0
dbus-update-activation-environment: setting USER=jdl
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting SHLVL=1
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/xubuntu:/usr/share/xfce4:/usr/local/share:/usr/share:/var/lib/snapd/desktop
dbus-update-activation-environment: setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
dbus-update-activation-environment: setting GDMSESSION=xubuntu
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting _=/usr/bin/dbus-update-activation-environment
/usr/bin/iceauth: creating new authority file /run/user/1000/ICEauthority

(wrapper-2.0:2741): GLib-GIO-CRITICAL **: 08:44:11.051: g_file_new_for_path: assertion 'path != NULL' failed

(wrapper-2.0:2741): GLib-GIO-CRITICAL **: 08:44:11.052: g_file_monitor_file: assertion 'G_IS_FILE (file)' failed

(wrapper-2.0:2741): GLib-GObject-WARNING **: 08:44:11.052: invalid (NULL) pointer instance

(wrapper-2.0:2741): GLib-GObject-CRITICAL **: 08:44:11.052: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wrapper-2.0:2741): Gtk-WARNING **: 08:44:11.052: Attempting to add a widget with type GtkToggleButton to a container of type XfcePanelPlugin, but the widget is already inside a container of type XfcePanelPlugin, please remove the widget from its existing container first.

(process:2771): ayatana-indicator-application-service-WARNING **: 08:44:11.241: Unable to get watcher name 'org.kde.StatusNotifierWatcher'

** (xfce4-power-manager:2773): WARNING **: 08:44:11.286: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name

** (xfce4-power-manager:2773): WARNING **: 08:44:11.289: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name

** (wrapper-2.0:2743): WARNING **: 08:44:11.320: No outputs have backlight property

(wrapper-2.0:2741): Gtk-WARNING **: 08:44:11.549: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)

(polkit-gnome-authentication-agent-1:2777): GLib-CRITICAL **: 08:44:11.549: g_variant_new_string: assertion 'string != NULL' failed

(polkit-gnome-authentication-agent-1:2777): polkit-gnome-1-WARNING **: 08:44:11.561: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

(wrapper-2.0:2739): Gtk-WARNING **: 08:44:11.646: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)

** (xfce4-screensaver:2770): WARNING **: 08:44:11.731: screensaver already running in this session

(wrapper-2.0:2743): Gtk-CRITICAL **: 08:44:12.126: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(wrapper-2.0:2743): Gtk-CRITICAL **: 08:44:12.126: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(wrapper-2.0:2743): Gtk-CRITICAL **: 08:44:12.146: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(wrapper-2.0:2743): Gtk-CRITICAL **: 08:44:12.158: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(wrapper-2.0:2743): Gtk-WARNING **: 08:44:12.304: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)

(wrapper-2.0:2746): Gtk-WARNING **: 08:44:12.536: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)

(xfce4-power-manager:2773): GLib-GObject-WARNING **: 08:44:12.567: ../../../gobject/gsignal.c:2613: signal 'Changed' is invalid for instance '0x55dc8e997140' of type 'GDBusProxy'

(xfce4-power-manager:2773): xfce4-power-manager-WARNING **: 08:44:12.618: could not map keysym 1008ffa8 to keycode

** (xfce4-power-manager:2773): WARNING **: 08:44:12.631: No outputs have backlight property

(xfce4-power-manager:2773): xfce4-power-manager-WARNING **: 08:44:12.747: It seems the kernel brightness switch handling value was not restored properly on exit last time, xfce4-power-manager will try to restore it this time.
xfce4-power-manager-Message: 08:44:13.257: Set kernel brightness switch to 0

(xfce4-power-manager:2773): xfce4-power-manager-WARNING **: 08:44:13.300: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/freedesktop/UPower/KbdBacklight”

In conclusion, should I do troubleshooting step #2 (above) if the GUI still does not work? And, by looking at the xsession-errors, can you please advise what the next troubleshooting step should be? Thank you again for your help.

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.