Bug 103437 - Klaptopdaemon tries to read nonexisting /proc/acpi/button/*/*/status file, ever growing .xsession-errors
Summary: Klaptopdaemon tries to read nonexisting /proc/acpi/button/*/*/status file, e...
Status: RESOLVED INTENTIONAL
Alias: None
Product: klaptopdaemon
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Paul Campbell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-07 17:32 UTC by Samuel Kvasnica
Modified: 2008-08-19 08:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix for .xsession-errors overflow (1.73 KB, patch)
2005-10-16 02:53 UTC, Zed
Details
Introducing guards for all QFile::open() calls (240.42 KB, patch)
2006-01-29 12:51 UTC, Johannes Zarl-Zierl
Details
Introducing guards for all QFile::open() calls (4.79 KB, patch)
2006-01-29 12:58 UTC, Johannes Zarl-Zierl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Kvasnica 2005-04-07 17:32:51 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.1 
OS:                Linux

The.xsession-errors file has grown periodically with "QFile empty
file name warnings" and kept harddisk running.
This happened only if an button action for the LID button was checked in klaptop. On my notebook only the LID button seems to give status (for power and sleep buttons,
the /proc/acpi/button/*/*/status files are missing - seems to be pretty standard since the buttons generate normal ACPI events). 
Missing acpi status file results in empty QString acpi_power_name in file portable.c. 
The warnings come then from the QFile open() call in laptop_protable::get_button().

Fix proposal: 
 You should definitely check for an empty string before this open() call.
Comment 1 Toralf Förster 2005-05-11 11:22:47 UTC
I can confirm, that after a fresh gentoo install my .xsession-errors file grows up with messages 'QFile::open: No file name specified' until I finished the icon to watch/change power settings/battery and so on.
Comment 2 Samuel Kvasnica 2005-05-25 17:00:03 UTC
is somebody maintaining this part of KDE ?
Comment 3 Zed 2005-10-16 02:50:26 UTC
I have experienced the same problem after upgrading to Ubuntu Breezy with KDE 3.4.3. I found out that any other button action than "Off" causes these messages.

As mentioned by Samuel, laptop_portable::get_button doesn't properly check for an empty string. But there is also a bug in laptop_daemon::ButtonThreadInternals which has missing checks if lid or power buttons are enabled. This results in calls to get_button even if this button isn't available.

I have created a patch which fixes these two issues.
Comment 4 Zed 2005-10-16 02:53:43 UTC
Created attachment 13001 [details]
Fix for .xsession-errors overflow

Tested on KDE 3.4.3.
Comment 5 Samuel Kvasnica 2005-10-16 11:50:25 UTC
Praise the Lord !

is somebody finally going to insert this patch into the regular kde 
sources ?
I'm really annoyed having each time to do it myself after downloading a 
new version...

Thanks,
 Sam

Zed wrote:

[bugs.kde.org quoted mail]
Comment 6 Peter Arien 2005-11-16 17:58:39 UTC
Just upgraded to KDE3.5-RC1 and again lots of 'QFile::open: No file name specified' messages in .xsession-errors.
Those messages stopped after 'dcop kded kded unloadModule kdetrayproxy'.
Comment 7 Samuel Kvasnica 2005-11-16 20:31:44 UTC
By all means, I reported this bug in april 2005, along with a fix. 
There was a more extensive patch attached by Zed as well. 

The best joke is, the status of this bug is still "UNCONFIRMED" although it 
is pretty reproducible.

I also wonder when klaptopdaemon will reflect the fact that some acpi stuff moved now to /sys/power (havent tried KDE3.5 though).

Hello, KDE developers, good morning ! Are you still sleeping ?!?
Comment 8 Jarkko Haapalainen 2005-11-27 11:48:08 UTC
Using KDE 3.5 and same bug here. Resolved it by not using "Configure klaptop -> Button actions -> Lid switch closed".

Old bug and not fixed in KDE 3.5 ?!

Running kubuntu and by accident I noticed that my hard drive filling with these messages in .xsession-errors file.
Comment 9 Jarkko Haapalainen 2005-11-27 11:48:38 UTC
*** This bug has been confirmed by popular vote. ***
Comment 10 Samuel Kvasnica 2005-11-27 12:43:27 UTC
And please check also for the new location of acpi stuff in /sts/power (kernel 2.6.14) and new directory name /proc/suspend2 instead of /proc/software_suspend if these are used in klaptopdaemon.
Comment 11 Johannes Zarl-Zierl 2006-01-29 12:51:55 UTC
Created attachment 14441 [details]
Introducing guards for all QFile::open() calls

The problem still occurs here in Debian version 3.5.0-3.

This patch uses QFile::exists() instead of checking for null-filenames to
ensure every file opened by klaptopdaemon really is there.
Comment 12 Johannes Zarl-Zierl 2006-01-29 12:58:51 UTC
Created attachment 14442 [details]
Introducing guards for all QFile::open() calls

Sorry, forgot to gunzip the file before uploading...
Comment 13 Jeng-Liang Tsai 2006-11-12 08:07:33 UTC
Hi,

  The "QFile::open: No file name specified" problem in kdevelop might not be limited to klaptop problem.  When I try to create a "Simple SQL" project, the message pops up and the project failed to create (actually, only proj.kdevelop, proj.sql, templates are created).  However, there is no problem to create a simple "Hello World" project!

  Although I do use a laptop (IBM X31), I don't have klaptop installed.

Comment 14 ermonnezza 2007-03-28 19:23:01 UTC
I have an IBM X31 with Kubuntu Dapper KDE 3.5.2, klaptopdaemon                          3.5.2-0ubuntu8, and I recently found I have this bug. 
For me it works to set the lid action to 'Off'. It is annoying though, as now I have to manually suspend before closing the lid. 

Has the patch been included in newer versions?
Comment 15 ermonnezza 2007-11-19 15:52:29 UTC
Seems resolved in klaptopdaemon 4:3.5.8-0ubuntu1 (Kubuntu Gutsy).
Thanks a lot!
Comment 16 Dirk Mueller 2008-08-19 08:38:49 UTC
klaptopdaemon has been dropped from KDE 4.x