I've had an issue yesterday with Kubuntu 20.04 LTS. The file "
~/.xsession-errors" filled up all the partition, more than 60GB, mostly with the same error message about VDPAU not being able to create chroma filter. Found 3 log spammers:
Log spammer 1
This was something related with VLC. Played a movie with the VLC hardware decoder set to VDPAU (for nVidia), while the movie was playing on a monitor connected to the onboard i7 GPU (Intel® HD Graphics 4600), then the PC went to standby, and the next day run out of space.
To empty the ~/.xsession-errors file, redirect /dev/null to it
> .xsession-errors
Set the VLC hardware decoding to Automatic in VLC. From menu Tools -> Preferences -> Input/Codecs -> Hardware-accelerated decoding, and from the corresponding drop down box select Automatic, then press Save.
Log spammer 2
Looking in the ~/.xsession-errors again, there was still some smaller spam with the repeated message "qml: temp unit: 0". This was from a widget/plasmoid installed from the official "Plasma Addon - Discover" repository. The addon is called Thermal Monitor, and also has had a minor bug that all the temperatures were shown except for the CPU, where it showed OFF instead of a number. At a right click and Reload Temperature Sources, the CPU temperature start working.
To fix the error log spamming with "qml: temp unit: 0", open the file "
~/.local/share/plasma/plasmoids/org.kde.thermalMonitor/contents/code/temperature-utils.js" and in the line #16, change print into dbgprint, then save, so line 16 will look like that:
dbgprint('temp unit: ' + temperatureUnit)
To fix the OFF displayed instead of hte CPU temperature, open the file "
~/.local/share/plasma/plasmoids/org.kde.thermalMonitor/contents/ui/main.qml" and change the line 58 from "property var systemmonitorAvailableSources" into
property var systemmonitorAvailableSources: []
then save and restart.
The Thermal Monitor plasmoid should now display correctly, without any help, and also should not spam error messages any more. The fixes above were found by reading the github issues and comments, e.g.
https://github.com/kotelnik/plasma-applet-thermal-monitor/issues/53Log spammer 3
A third spammer I found was the KTorrent. When started from the GUI, it was continually sending thousands and thousands of lines into ~/.xsession-errors log, with all the TCP connection, failures, even a canceled attempt of renaming a torrent was logged with all the details, including the old and the new file name, that were the same, since the rename attempt was canceled, way too verbose.
However, when I started ktorrent from a terminal, I noticed the same crazy verbosity, but only in the terminal where ktorrent was running, and nothing into the ~/.xsession-errors. Even more, after redirecting the stdout to /dev/null, no error messages were displaying, so all those were not errors from stderr, were just normal stdout messages, thought, not sure why they had to be many.
To fix that, in the file "
/usr/share/applications/org.kde.ktorrent.desktop", find the "Exec=" key and redirect stdout to /dev/null by replacing the line "Exec=ktorrent %U" with
Exec=sh -c "ktorrent %U" > /dev/null
Save and start the KTorrent from GUI. The extra shell wrapper is required, or else when a new torrent URL is added, the shell will concatenate the %U list of URLs with > /dev/null, which will generate errors.
The .xsession-errors should now stay clean of ktorrent spam, only the ktorrent errors, if any, will go into the error log. If curious about what .desktop file does, what is Exec= key, or what is %U, they are described in the doc pages:
https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.htmlhttps://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.htmlQuestion
About the last one, when a programm is started from a GUI instead of a terminal, it seems OK to redirect the stderr to an error log, but why redirecting the stdout to the ~/.xsession-errors, too? Is this expected behaviour, or a bug?