DEV Community

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

Posted on Edited 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.​

Only after further research (see conclusion and comments below) I found yet another alternative solution approach switching the display manager (or the entire desktop environment):

Alternative Desktops and Display Managers

Asking narrow questions attracts narrow answers, both in specialized user forums and from AI chats that rarely question the question and its implicit assumptions.

On DEV, @leob suggested, I might switch to another desktop environment. After further research, I tried and switched my display manager and switch the desktop from Xfce to Cinnamon (or Mate, but not Gnome or KDE, as the latter two are not officially supported for Linux Mint 22) and see if and when something breaks.

Display Managers: LightDM, LXDM, SDDM

Install and use an alternative display manager instead of LightDM is a good idea in theory, but what would be the alternative that's still supported for Linux Mint?

It's not SDDM, which failed to start, hanging after login, no matter if I used the default (Wayland?) or switched back explicitly using x11. SDDM KDE stack dependencies don't make it an ideal replacement either.

Alternative LXDM: minimal and traditional X11, no Wayland, no login screen customization. LXDM can be use as a drop-in replacement for LightDM on Linux Mint 22 XFCE. However, LXDM hangs at startup, just an unresponsive Linux Mint logo, not even an option to switch to a text console with Ctrl + Alt + F... so I had to reboot into recovery mode and I'm back at LightDM. Back on square one.

I also tried another desktop environment:

sudo apt install cinnamon-desktop-environment

Then log out and select Cinnamon in the session settings.

Cinnamon desktop took a long time to set up so I first thought the black screen issue was back, but that's a one time issue - or at least, the second start was smooth.

I'm still not a big Cinnamon fan, but that wouldn't matter much, if it solved the problem. But the black screen issue still occurs, erratically, not matter if I boot into Cinnamon or Xfce. So the desktop environment is not the root cause. Maybe it's the display manager. We'll never know.

I will never feeld sure again that the black screen issue won't come back eventually, unless someone points to a convincing bug report that matches my problem exactly.

Conclusion? Workaround!

One good thing about Linux is that you can still switch to a text console using Ctrl + Alt + F1 / F2 / F3 in most situations or hit Esc once during boot to enter recovery mode to reconfigure the system. And we have mobile browsers on our phones these days to facilitate research.

Still, it can be hard to solve erratic issues and it's worth following different strategies in parallel, like asking on forums, researching risk-free configuration alternatives, and leveraging both AI and the human developer community to find a solution beyond the obvious suggestions.

Follow-Up ...

Picking up the issue months later after several software updates have not magically solved the issue, gathering additional system information using lsb_release -a and neofetch, the GPU might be the crucial detail overlooked before:

GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics]

A possible explanation sounds convincing and hopeful, unless Claude just made it up. Before proceeding, I should verify the solutions mentioned in the linked bug reports. Interestingly, none of those had turned up in my earlier search and research in January.

The hardware and symptom pattern points at a known, well-documented cause: Panel Self Refresh (PSR) on Intel's i915 driver, which is notorious for exactly this "movable cursor, black/frozen screen, works after a session restart" behavior on Iris Xe / Tiger Lake and related chips. It also explains why the desktop-environment swap (Xfce → Cinnamon) didn't help: PSR operates at the kernel/driver level below the desktop environment.

Confirming the PSR Hypothesis in Journal Logs

Before changing anything, I have to confirm the PSR signature in logs: after a black-screen incident, switch to a TTY (Ctrl+Alt+F1) and run

  • journalctl -b | grep -i -E 'i915|drm|fifo underrun|psr'

Look specifically for lines like 'CPU pipe B FIFO underrun' or PSR state changes. Done. Found several such signs. ✅

Activating Configuration Workarounds

Next, edit /etc/default/grub and change the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.enable_psr=0". ✅

After changing the grub configuration, run sudo update-grub and reboot. ✅

Another black screen incident immediately after rebooting. ⬛

If that is not enough, try adding i915.enable_fbc=0 and/or i915.enable_dc=0.

Linux Intel Graphics Flags

vaguely "explained" in layperson's terms, quoting Claude's and Mistral's Le Chat's research summaries:

  • The flag i915.enable_psr=0 is supposed to fix flickering/black screens, cons: slightly higher power usage. Hardware risks: none.

  • i915.enable_dc=0 fixes sleep/wake issues, hardware risks: none, cons: higher power usage.

  • i915.enable_fbc=0 should "fix graphical glitches", hardware risks: none, cons: increased memory bandwidth.

Memory bandwidth is the rate at which data can be read from or written to the GPU’s memory (VRAM or system RAM, in the case of integrated graphics like Intel i915). It’s measured in gigabytes per second (GB/s) and determines how quickly the GPU can process and display images, textures, and other graphical data.

For integrated Intel GPUs (like those using the i915 driver), the GPU shares system RAM (not dedicated VRAM), so memory bandwidth is a critical resource.

The GPU compresses the framebuffer (the portion of memory storing the pixels to be displayed). Compression reduces the amount of data that needs to be transferred between the GPU and memory. Result: Lower memory bandwidth usage, which saves power and can improve performance in memory-constrained systems.

Compressing and decompressing the framebuffer requires CPU/GPU cycles thus consumes more power, but usually less than the power saved by reducing memory bandwidth.

Next Attempt

  • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.enable_psr=0 i915.enable_fbc=0"

...

(to be continued)

Top comments (13)

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
 
ddebajyati profile image
Debajyati Dey

I used to use XFCE4 in the past and used to love it. 1 year ago I tried to change taste and tried KDE and honestly it's good (apart from some nvidia-wayland issues). I definitely recommend KDE. I used KDE with x11 because the waylabd version crashes always with nvidia GPU

Thread Thread
 
ingosteinke profile image
Ingo Steinke, web developer

Interesting. Last time I used KDE it was version 0.x of an obscure alternative desktop system while I struggled to get X11 working at all on my 486 PC with SuSE 2.x or something, haha. I should really try and see how it evolved. Is KDE an option for Mint though?

Thread Thread
 
ddebajyati profile image
Debajyati Dey

I think so. Although it is not officially supported by mint, it should work without problems.

Here is a not too old tutorial for your reference (in case you need something) - linuxconfig.org/how-to-install-kde...

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.

Collapse
 
ingosteinke profile image
Ingo Steinke, web developer

Gnome and KDE don't seem to be officially supported mainstream Xfce alternative for Linux Mint 22 though, but Cinnamon and Mate are.

Collapse
 
leob profile image
leob

I used Ubuntu back when I was a (satisfied) Linux user, later on I switched to MacOS - but Linux wasn't bad at all ...

Thread Thread
 
ingosteinke profile image
Ingo Steinke, web developer

I think I will first try and switch the display manager from lightdm to sddm, maybe I can even keep Xfce, otherwise I'd probaboly switch to Cinnamon. MacOS is nice, its UI much better than Windows, but still too much Apple vendor lock in.

Thread Thread
 
leob profile image
leob • Edited

Yeah well you're tied to their hardware, which is obviously pretty expensive, but I'm now used to it and pretty satisfied, so I'm not going to switch back ... but, Linux (Ubuntu in my case) was nice, nothing wrong with it!

Collapse
 
ingosteinke profile image
Ingo Steinke, web developer

Updated this post, updated my configuration ... (to be continued)

Collapse
 
grant_macleod_fa25635a596 profile image
Grant Macleod

nice

Some comments may only be visible to logged-in visitors. Sign in to view all comments.