DEV Community

Cover image for An erratic Xfce4 Black Screen (WIP)
Ingo Steinke, web developer
Ingo Steinke, web developer Subscriber

Posted on

An erratic Xfce4 Black Screen (WIP)

Although I remain skeptical about AI, it often helps when you're quite clueless and have nothing to lose: even hallucinated lies can be better than nothing and might inspire creative solutions beyond. After AI helped me find an overlooked aspect of my recurring network connectivity issues with public Wi-Fi in German trains, I was hopeful to resolve my erratic black screen issues as well.

Erratic Black Screen Issues on Linux

I chose Linux Xfce on purpose for its classic UI and conservative lightweight energy usage. However, not choosing mainstream means not getting mainstream support, unless you hire an expert or take your time to fiddle with arcane system settings hoping to learn anything and feel proud of your nerdy half-knowledge.

I already examined several logfiles and configurations, as detailed in one of the numerous forum threads about erratic black screen issues on Xfce:
https://forum.xfce.org/viewtopic.php?id=18738
https://forums.linuxmint.com/viewtopic.php?t=450484

Half a year later, I lazily prompted Perplexity, which readily spat out a too-long-don't-read style mix of information that might or might not be helpful in my situation. Leveraging large language model technology, I then asked it to compare its answer with my forum thread on summarize only what I hadn't tried before.

https://www.perplexity.ai/search/i-have-occasional-problems-tha-qusAirrqRtKaXXbujzdYzA#1

The link points to the AI conversation at the time of writing. The paragraphs below are based on that answer and helpful comments in the forum thread. That's a community effort after all, as AI wouldn't find any useful suggestions without prior work of real people making an effort to understand and explain. There are numerous other posts and threads about similar black screen issues, including @an3223 Ethan's XFCE blank/black screen with cursor after login (solution) on DEV.to. His solution was to delete ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml as suggested on the Arch wiki and on this thread from the Nvidia forums.

The issue

When I log into an Xfce4 session, the screen stays black, there is only a movable mouse pointer, but no menus, no right click, nothing interactive. Xfce, xfwm and compositor still work, as I can see when I either force another X session from a text cosole, or when I am lucky that one of the workarounds leads to a fully functional working Xfce desktop session.

Xfce4 is running on Linux Mint 22. However, similar Xfce issues have been reported on Arch Linux and other Mint versions as well.

Diagnostics and Observations

System information from lsb_release -a && uname -a && inxi && sudo lshw -C display && echo $XDG_SESSION_TYPE && xfwm4 --version and diagnosis tool, contents of ~/.xsession-errors and /var/log/Xorg.0.log after a failed attempt: details can be found in the linked forum threads.

The logs reflecting a defunct black screen session aren't showing any issues. No underrun log entries or any other logs that look related to the blackscreen issue.

Workarounds and Failed Fixes

I had the xserver-xorg-video-intel package installed, but removing the obsolete package was not the solution yet.

  • The blackscreen issue used to happen erratically first, so a reboot "solved" the problem. One day, rebooting was not enough anymore.
  • All other workarounds start with switching to a console session using Ctrl+Alt+F1
  • if there is no cursor, type any key,
  • log in at the login prompt,
  • do one of the following:
    • remove blackbox screensaver: sudo apt remove blackbox
    • get all updates: `sudo apt update && sudo apt
    • find, kill, and replace the running desktop session:
      • ps -aux | grep xfce
      • kill -9 (+ the process id of the xfce session)
      • startx or startxfce4 (without lightdm)
  • switch back to the graphical desktop session using Ctrl+Alt+F7

The system keeps behaving erratically. The black screen session that generated the logfiles above, later turned into a functional session when I switched back to it using Ctrl+Alt+F7, but most sessions don't. In rare occasions, after a reboot, everything works well without the black screen issue.

Untested Fixes

The hardware manufacturer, Tuxedo, and a Linux Mint forum user both suggested updating my BIOS, but I fear that I might risk getting even more problems, as I still hope this is just a software/configuration issue.

Alternatively, the hardware manufacturer suggested to switch from their kernel to a default Linux kernel, but I fear I might lose working hardware support, especially for my laptop touchscreen.

I could try enabling the experimental Intel Xe driver for my specific chip ID.

Alternative Approaches

Common troubleshooting suggestions cover session restarts, log checks, and kernel/BIOS notes similar to the forum thread, which remains unsolved with no replies beyond requesting logs.​

Diagnostics

Check xfce4-session logs: examine ~/.cache/sessions/xfce4-session-*:0 for session restore errors, absent from forum post.​

LightDM and systemd journals: Run journalctl -b -u lightdm and journalctl -b --user -u xfce4-session.service for DM-specific failures.​

more untried fixing suggestions

Reset displays.xml: mv ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml.bak then restart LightDM; targets multi-monitor config corruption.​

Clear session cache systematically: mv ~/.cache/sessions/* ~/.cache/sessions_backup/ then test startxfce4; prevents broken session reloads.​

Test minimal session: Create temp user or disable autostart (mv ~/.config/autostart/*.desktop ~/.config/autostart_disabled/); isolates user config vs. system issue.​

Manual component start: From black screen TTY, export DISPLAY=:0; xfce4-panel & xfdesktop & to verify if panel/desktop hangs.​

Disable compositor: xfconf-query -c xfwm4 -p /general/use_compositing -s false; rules out xfwm4 rendering stalls on Iris Xe.​

Prevention: disable automatic session saving in Xfce's "Session and Startup" settings to avoid recurring cache corruption.​

Conclusion

tbd

Top comments (4)

Collapse
 
leob profile image
leob

But it's still not solved? Maybe just dump Xfce and switch to a "mainstream" display manager (KDE or Gnome, and then preferably the "classic" variants)?

Collapse
 
ingosteinke profile image
Ingo Steinke, web developer • Edited

Yes, that's still less risk than changing drivers or configuration. No, not solved, as it's only erratic and I don't need to shutdown every day, I probably got lazy. Thanks for reminding me of the simple alternative!

I had other issues after an Ubuntu distribution upgrade in 2024, and cinnamon seemed too restricted so I felt returning to Xfce also visually going back to the good old days. Maybe I took one step too far backwards though.

Collapse
 
leob profile image
leob

Gnome classic works for me - not Gnome "Unity", with its huge showy sidebar, which (for me at least) just clutters and gets in the way, and doesn't seem to do anything that I need - but Gnome "classic", with its simple Windows 95/XP style taskbar at the bottom, showing my active/running applications so that I can easily and simply switch between them - and a way to launch apps (via icons or a menu) - and that's it really, nothing more !

That plain, simple, and lovely taskbar is Microsoft's best invention ever - until they messed it up in Windows Vista and later by adding tons of useless features to it ;-)

Thread Thread
 
ingosteinke profile image
Ingo Steinke, web developer

Unity still exists? like Ubuntu One or what was it called? Last time I had Ubuntu Budgie with a MacOS-inspired Dock panel that looked really nice.