You are not logged in.
I've installed XFCE4 on Arch in a Qemu VM managed by Libvirt using the VirtIO GPU with 3D acceleration. I'm using SDDM to start it, although I've also tried starting it using startx and adding the command to xinitrc, with the same resulting behavior. The first time I run XFCE4 it starts up just fine, but the second time I run it XFCE4 freezes at startup with a black screen. SDDM runs fine on the X server it starts, but once I log in XFCE4 fails. I can however fix this by removing ~/.config/xfce4/ before XFCE4 starts. I currently use a pre-execution script on the SDDM service to do this on every boot. This has the downside if nuking most of my settings every time I restart the VM. Autostarts seem to persist somewhere else though, so I use a script run by an autostart to automatically set some of my settings using xfconf-query. This however makes changing settings very tedious, as I have to modify the script for any changes to persist. I'd like to be able to use the settings manager normally, but I'm not sure where to even begin debugging the startup failure.
Last edited by Imred_Gemu (2022-09-23 04:46:07)
Offline
If it's a VM, can't you just use LightDM?
Anyway, my first suggestion would be to disable session saving.
xfconf-query --channel xfce4-session --property /general/AutoSave --set false
xfconf-query --channel xfce4-session --property /general/SaveOnExit --set false
# also clear sessions cache
rm -rf ~/.cache/sessions/
Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please!
Offline
Thank you for your reply KBar. I used SDDM because it was what I'm used to, I use it on my host. What would be the advantage of using LightDM in a VM? I've tried setting these properties. They don't exist when my system starts up, I assume creating them as type "bool" is correct? With these settings the ~/.cache/sessions/ is recreated sometime during a reboot, but just has a image file at ~/.cache/sessions/thumbs-archlinux:0/Default.png which seems unlikely to be related to this issue. The black screen is still happening though with these settings and my pre-execution script disabled.
Offline
Do you have an ~/.xsession-errors file? If so, can you share it? If not and you are running systemd, perhaps post bak your journal log during Xfce startup.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you for your reply ToZ, nothing in my configuration generates a ~/.xsessions-errors file normally. I can post the stdout and stderr of startx during a black screen.
/usr/bin/startxfce4: X server already running on display :0
/usr/bin/iceauth: creating new authority file /run/user/0/ICEauthority
xfce4-session: No SSH authentication agent found
gpg-agent: a gpg-agent is already running - not starting a new one
** (xfce4-power-manager:963): WARNING **: 19:58:29.161: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name
** (xfce4-power-manager:963): WARNING **: 19:58:29.161: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name
Xfce power manager is not running
(xfce4-power-manager:963): libnotify-WARNING **: 19:58:29.200: Failed to connect to proxy
(xfce4-power-manager:963): GLib-GObject-WARNING **: 19:58:29.207: ../glib/gobject/gsignal.c:2613: signal 'Changed' is invalid for instance '0x5599f0262a20' of type 'GDBusProxy'
(xfce4-power-manager:963): xfce4-power-manager-WARNING **: 19:58:29.228: could not map keysym 1008ffa8 to keycode
** (xfce4-power-manager:963): WARNING **: 19:58:29.234: No outputs have backlight property
(xfce4-power-manager:963): xfce4-power-manager-WARNING **: 19:58:29.238: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/freedesktop/UPower/KbdBacklight”
Xfce Power Manager: Another power manager is already running
** (xfce4-screensaver:984): WARNING **: 19:58:29.260: screensaver already running in this session
** (wrapper-2.0:966): WARNING **: 19:58:29.461: No outputs have backlight property
(wrapper-2.0:997): Gtk-WARNING **: 19:58:29.518: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)
(wrapper-2.0:965): Gtk-WARNING **: 19:58:29.524: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)
(wrapper-2.0:967): Gtk-WARNING **: 19:58:29.533: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
(wrapper-2.0:966): Gtk-WARNING **: 19:58:29.553: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)
(xfsettingsd:948): libxfce4ui-WARNING **: 19:59:14.100: ICE I/O Error
(xfsettingsd:948): libxfce4ui-WARNING **: 19:59:14.100: Disconnected from session manager.
(xfdesktop:960): libxfce4ui-WARNING **: 19:59:14.100: ICE I/O Error
(xfdesktop:960): libxfce4ui-WARNING **: 19:59:14.100: Disconnected from session manager.
(xfce4-power-manager:963): libxfce4ui-WARNING **: 19:59:14.100: ICE I/O Error
(xfce4-panel:951): libxfce4ui-WARNING **: 19:59:14.100: ICE I/O Error
(xfce4-power-manager:963): libxfce4ui-WARNING **: 19:59:14.100: Disconnected from session manager.
(xfce4-panel:951): libxfce4ui-WARNING **: 19:59:14.100: Disconnected from session manager.
I believe the ICE I/O errors happen when I kill the xfce4-session process to get back to the terminal. Which journal logs would be helpful? There doesn't appear to by much in the journal besides sddm saying that it's starting xfce.
Last edited by Imred_Gemu (2022-09-13 00:21:13)
Offline
ICE I/O Error
Check the permissions of the .ICEauthority file in your home directory - it should be owned by you. If it is not, then are you running any component as root (you should not be)? Or there may be something else changing it.
Edit: if .ICEauthority is owned by you, try deleting it between re-logins to see if it's the culprit.
Last edited by ToZ (2022-09-13 00:44:43)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
To me it seems like there's something wrong in your start-up script.
Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please!
Offline
Thank you for the replies. I've confirmed that the ICE I/O error does not occur until the xfce4-session process is killed, which the rest of the xfce4 process tree probably doesn't appreciate. This is the stdout/stderr of the X server while the black screen is frozen:
/usr/bin/startxfce4: X server already running on display :0
Failed to connect to bus: No medium found
dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
xfce4-session: No SSH authentication agent found
gpg-agent: a gpg-agent is already running - not starting a new one
** (xfce4-clipman:680): WARNING **: 18:39:39.381: Unable to register GApplication: An object is already exported for the interface org.gtk.Application at /org/xfce/clipman
(xfce4-clipman:680): GLib-GIO-CRITICAL **: 18:39:39.381: g_application_get_is_remote: assertion 'application->priv->is_registered' failed
(xfce4-clipman:680): GLib-WARNING **: 18:39:39.381: g_set_application_name() called multiple times
** (wrapper-2.0:695): WARNING **: 18:39:39.716: No outputs have backlight property
(wrapper-2.0:696): Gtk-WARNING **: 18:39:39.807: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
(wrapper-2.0:694): Gtk-WARNING **: 18:39:39.813: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)
(wrapper-2.0:741): Gtk-WARNING **: 18:39:39.959: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)
(wrapper-2.0:695): Gtk-WARNING **: 18:39:40.011: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)
Removing the .ICEauthority file at startup does not prevent the black screen. It is owned by my user, I'm running startx as my user to generate these logs. Regarding KBar's comment, the only thing my startup scripts does is delete the ~/.config/xfce4/ directory, and these logs are created without running the script anyway.
Offline
Failed to connect to bus: No medium found
dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
This log file is showing something different. Looks like incorrect dbus set up.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Sorry, that message is the result of me running startx while su'ed into my user account from root, I logged in directly to root on the main console to edit the startup scripts, then lowered down to my user account to run startx. I don't get this message if I log directly into my user account and run startx from there:
/usr/bin/startxfce4: X server already running on display :0
xfce4-session: No SSH authentication agent found
gpg-agent: a gpg-agent is already running - not starting a new one
** (xfce4-clipman:1609): WARNING **: 21:54:30.019: Unable to register GApplication: An object is already exported for the interface org.gtk.Application at /org/xfce/clipman
(xfce4-clipman:1609): GLib-GIO-CRITICAL **: 21:54:30.019: g_application_get_is_remote: assertion 'application->priv->is_registered' failed
(xfce4-clipman:1609): GLib-WARNING **: 21:54:30.019: g_set_application_name() called multiple times
** (wrapper-2.0:1622): WARNING **: 21:54:30.325: No outputs have backlight property
(wrapper-2.0:1625): Gtk-WARNING **: 21:54:30.396: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
(wrapper-2.0:1621): Gtk-WARNING **: 21:54:30.407: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)
(wrapper-2.0:1622): Gtk-WARNING **: 21:54:30.416: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)
(wrapper-2.0:1664): Gtk-WARNING **: 21:54:30.474: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)
Offline
That one looks fine - nothing out of the ordinary, Other than the clipman CRITICAL message but that shouldn't affect the startup of the DE. Whats really interesting is that you can actually get it to work once - the first time - but on subsequent starts it no longer works.
I've installed XFCE4 on Arch in a Qemu VM managed by Libvirt using the VirtIO GPU with 3D acceleration.
Can you try without 3D acceleration?
Can you also try exporting XFSETTINGSD_DEBUG=1 globally (use /etc/profile.d/) and you will get more verbose output in the .xsession-errors file.
One other suggestion. The xfconf-query process persists after logout. Try setting "KillUserProcesses=yes" in /etc/systemd/logind.conf.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you for your reply ToZ, disabling 3D acceleration completely prevents the issue even while still using the Virtio GPU, though this is an even less desirable solution for me than the one I'm using now. Here is the .xsession-errors file with "XFSETTINGSD_DEBUG=1" set:
/usr/bin/startxfce4: X server already running on display :0
/usr/bin/iceauth: creating new authority file /run/user/1000/ICEauthority
xfce4-session: No SSH authentication agent found
gpg-agent: a gpg-agent is already running - not starting a new one
xfce4-settings(xsettings): _XSETTINGS_S0 registered on screen 0
xfce4-settings(xsettings): 31 settings changed (serial=0, len=1216)
xfce4-settings(xsettings): resource manager (xft) changed (len=110)
xfce4-settings(displays): Detected CRTC 62.
xfce4-settings(displays): Detected output 63 Virtual-1.
xfce4-settings(displays): CRTC 62 assigned to Virtual-1.
xfce4-settings(displays): CRTC 62, output list[0] -> 63.
xfce4-settings(displays): Total 1 active output(s).
xfce4-settings(displays): Normalized CRTC 62: size=1920x1080, pos=0x0.
xfce4-settings(displays): min_h = 200, min_w = 320, max_h = 8192, max_w = 8192, prev_h = 800, prev_w = 1280, prev_hmm = 211, prev_wmm = 338, h = 1080, w = 1920, hmm = 286, wmm = 508.
xfce4-settings(displays): Applying desktop dimensions: 1920x1080 (px), 508x286 (mm).
xfce4-settings(displays): Configuring CRTC 62.
xfce4-settings(displays): Applying changes to CRTC 62.
xfce4-settings(displays): Applying CRTC 62 Transform: x=1.000000 y=1.000000, filter=nearest.
xfce4-settings(pointers): initialized xi 2.4
xfce4-settings(keyboards): initialized xkb 1.0
xfce4-settings(keyboards): set auto repeat on
xfce4-settings(keyboards): set key repeat (delay=500, rate=50)
xfce4-settings(keyboards): set numlock off
xfce4-settings(accessibility): AccessXKeys disabled
xfce4-settings(accessibility): stickykeys disabled
xfce4-settings(accessibility): slowkeys disabled
xfce4-settings(accessibility): bouncekeys disabled
xfce4-settings(accessibility): mousekeys disabled
xfce4-settings(keyboard-shortcuts): 20 shortcuts loaded
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 62.
xfce4-settings(displays): Detected output 63 Virtual-1.
xfce4-settings(displays): Noutput: before = 1, after = 1.
xfce4-settings(displays): RRScreenChangeNotify event received.
xfce4-settings(displays): Refreshing RandR cache.
xfce4-settings(displays): Detected CRTC 62.
xfce4-settings(displays): Detected output 63 Virtual-1.
xfce4-settings(displays): Noutput: before = 1, after = 1.
xfce4-settings(fontconfig): monitoring 30 paths
xfce4-settings(workspaces): 4 desktop names set from xfconf
** (xfce4-clipman:633): WARNING **: 12:35:21.960: Unable to register GApplication: An object is already exported for the interface org.gtk.Application at /org/xfce/clipman
(xfce4-clipman:633): GLib-GIO-CRITICAL **: 12:35:21.960: g_application_get_is_remote: assertion 'application->priv->is_registered' failed
(xfce4-clipman:633): GLib-WARNING **: 12:35:21.960: g_set_application_name() called multiple times
xfce4-settings(xsettings): Another instance is already running. Leaving.
** (wrapper-2.0:648): WARNING **: 12:35:22.279: No outputs have backlight property
(wrapper-2.0:647): Gtk-WARNING **: 12:35:22.341: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)
xfce4-settings(displays): CRTC 62 assigned to Virtual-1.
xfce4-settings(displays): CRTC 62, output list[0] -> 63.
xfce4-settings(displays): Total 1 active output(s).
xfce4-settings(displays): Normalized CRTC 62: size=1920x1080, pos=0x0.
xfce4-settings(displays): min_h = 200, min_w = 320, max_h = 8192, max_w = 8192, prev_h = 1080, prev_w = 1920, prev_hmm = 286, prev_wmm = 508, h = 1080, w = 1920, hmm = 286, wmm = 508.
xfce4-settings(displays): Configuring CRTC 62.
(wrapper-2.0:649): Gtk-WARNING **: 12:35:22.456: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
(wrapper-2.0:686): Gtk-WARNING **: 12:35:22.456: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)
(wrapper-2.0:648): Gtk-WARNING **: 12:35:22.482: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)
Setting "KilUserProcesses=yes" did not affect the error. I don't know if this would change how things are saved on shutdown. If it's just about the process persisting though, the black screen occurs on starting the desktop even after a full reboot.
Offline
disabling 3D acceleration completely prevents the issue even while still using the Virtio GPU,
This is a step forward. Can you try with 3D acceleration enabled and the compositor disabled?
Here is the .xsession-errors file with "XFSETTINGSD_DEBUG=1" set:
Was this from an attempt that result in a black screen?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you for your reply ToZ, disabling the compositor allows me to start XFCE4 without deleting the settings folder. However, once it's running, the instant I re-enable it it locks up with a black screen. This also happens if, while in a running desktop, I disable and re-enable the compositor without restarting. So this narrows the problem down to "XFCE4 freezes with a black screen if the compositor starts while ~/.config/xfce4/ exists." Also yes, those logs were the stdout/stderr from X during a black screen freeze with "XFSETTINGSD_DEBUG=1" set globally.
Offline
Start with the compositor disabled, then run these commands (one at a time) to see if any of them work:
xfwm4 -c on -b off -r
xfwm4 -c on -b xpresent -r
xfwm4 -c on -b glx -r
These commands will restart xfwm4, enable the compositor and attempt to use the 3 different types of vblank options. Note: xpresent requires the libxpresent libraries to be installed.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you for your reply ToZ, all three of these commands seem to work. No stdout/stderr messages. The first time I ran them it caused the screen to flash black and then come back as normal. After stopping them the desktop is broken with some status bar icons and window decorations missing until I run one of them again, then it behaves normally again. After rebooting the desktop starts, but the wallpaper is black and there are no desktop icons. Some of the status bar icons are missing to, but the status bar and bottom icon tray are present, and I can open a terminal. After running one of the commands, the desktop is normal again until I stop the command, then it goes back to the state I described just now until I run one of the commands again. None of the commands address the performance issues caused by disabling the compositor.
Offline
Lets try it this way then.
xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s off --create
...and restart.
If that doesn't work (you get a blank screen), then try:
xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s xpresent --create
...then:
xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s glx --create
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you very much ToZ, setting any of these values allows me to start the desktop normally even with the compositor enabled. I tried all three and they all seem to work fine.
Offline
[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 650.21 KiB (Peak: 683.05 KiB) ]