Bug 142140 - Dialog doesn´t pop up on new hardware when it was previous configured
Summary: Dialog doesn´t pop up on new hardware when it was previous configured
Status: RESOLVED NORESPONSE
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Hotplug (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Michal Zugec
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-09 19:20 UTC by Michael Stather
Modified: 2008-01-14 11:09 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stather 2006-01-09 19:20:17 UTC
When I insert e.g. a new USB device into my system a dialog pops up whether I want it to be configured. When I configure that device and then remove the configuration, when I plug the device in again the dialog doesn´t pop up. So I think YaST2 leaves something when removing a device while it shouldn´t do this IMHO.
I´ve reported some other bugs which could be related to this one.
Comment 1 Michael Gross 2006-01-10 09:57:29 UTC
This is not a YaST problem, it's related to the hotplug-system. As the system completely changed, I'm not sure what information is required.

Christian: Can you help here? If not, please reassign it or assign it back to us.
Comment 2 Christian Zoz 2006-01-10 11:28:19 UTC
I guess it's best to ask coolo. 
Comment 3 Stephan Kulow 2006-01-10 12:56:03 UTC
Why would you want to configure the USB device twice? If it's configured, it's configured and works.
Comment 4 Michael Stather 2006-01-10 13:56:56 UTC
Yeah I know this may sound a bit weird, but sometimes I remove devices from YaST when I don´t need them. And also when I test hardware and remove it later I don´t want configurations for that devices remain on my system, IMHO removing a device from YaST should put the system in the state where it was before installing the device (just like in Windows for example, when I re-plug such a device I´m asked again to install it).
Comment 5 Stephan Kulow 2006-01-10 14:45:26 UTC
I'm afraid you need to tell us what device that is as this is done per yast module
Comment 6 Steffen Winterfeldt 2006-01-10 14:52:46 UTC
How do you 'remove the configuration'?
Comment 7 Michael Stather 2006-01-10 15:24:44 UTC
It´s a WLAN USB adapter
I remove the device from YaST "network" and then unplug it.
Comment 8 Steffen Winterfeldt 2006-01-10 16:23:57 UTC
Ok, this is a conceptual problem in YaST, then. YaST would have to delete
the stored config file or probably better set the 'configured' status
to 'new'.

Michael, can you check that this works for you? You can use e.g.
'hwinfo --usb' to get the UDI for your device, locate the config
file (/var/lib/hardware/udi/<your_UDI>) and change the key
'hwinfo.configured' from 'yes' to 'new'. You should get a popup
when you plug the device in after that.
Comment 9 Michael Stather 2006-01-10 18:34:08 UTC
Yes it works as you said.
Just from my perspective as a user (or better "tester" *g). When I remove a device from YaST2 I mean I don´t use it any more and I want the settings to be deleted. Just like in e.g. Windows device manager. No settings or udev rules should remain. If I just unplug an USB adapter the configuration stays of course but when I explicitely delete it it should be deleted. Then, when I insert the device again the hardware is again seen as "new" and the popup is displayed.
Comment 10 Steffen Winterfeldt 2006-01-11 10:02:52 UTC
IMO you are right. YaST should set the 'configured' state to 'new' for
hardware it removes.
Comment 11 J. Daniel Schmidt 2006-01-18 15:21:58 UTC
this is a job for yast2-network

... but may be a feature request for other yast modules as well
@emap: do you take care of that?
Comment 12 Michael Stather 2006-01-23 23:19:31 UTC
I opened a new bug about that (and other things which go into the same category) for 10.1
Comment 13 Martin Vidner 2006-01-27 08:54:29 UTC
Coolo, I think that at least yast2-network does not touch the configured status. Who changes it from unconfigured to configured? The applet when it runs yast?
Comment 14 Stephan Kulow 2006-01-27 09:29:21 UTC
it can't, that information is stored in /var/lib/hardware as root. This is done somewhere in yast - Steffen is your contact person I guess.
Comment 15 Steffen Winterfeldt 2006-01-27 11:14:20 UTC
It's done in yast. There's a status change function somewhere.
Comment 16 Martin Vidner 2006-08-28 11:52:31 UTC
Reassigning to the new maintainer of yast2-network.
Comment 17 Michal Zugec 2007-05-28 13:33:31 UTC
Steffen, do we have any documentation about that?
It's not clean for me what to do
Comment 18 Steffen Winterfeldt 2007-05-29 12:52:10 UTC
You'd have to run the ycp-equivalent of hd_change_config_status(); see sample
C-code below. 'id' is either (hd_t)->uid or (hd_t)->unique_id.


hd_data_t *hd_data;
hd_status_t status = { configured:status_new };
const char *id = "/org/freedesktop/Hal/devices/pci_1106_3059";

hd_data = calloc(1, sizeof *hd_data);
hd_change_config_status(hd_data, id, status, NULL);
hd_free_hd_data(hd_data);
free(hd_data);
Comment 19 Michal Zugec 2007-05-29 14:19:06 UTC
thanks, got it!
reminder for me(example):
file /var/lib/hardware/udi/org/freedesktop/Hal/devices/pci_10ec_8180
hwinfo.res.interrupts = { '169,1818818,1' }
hwinfo.res.memory = { '0xe6000000,0x200,0,3,1' }
hwinfo.res.io = { '0xa000,0x4000,0,3' }
hwinfo.hwclasslist = '00000220000000'
hwinfo.sysfsbusid = '0000:16:00.0'
hwinfo.sysfsid = '/devices/pci0000:00/0000:00:1e.0/0000:15:00.0/0000:16:00.0'
hwinfo.subdeviceid = 98688 (0x18180)
hwinfo.subvendorname = 'Realtek Semiconductor Co., Ltd.'
hwinfo.subvendorid = 69868 (0x110ec)
hwinfo.devicename = 'RTL8180L 802.11b MAC'
hwinfo.deviceid = 98688 (0x18180)
hwinfo.vendorname = 'Realtek Semiconductor Co., Ltd.'
hwinfo.vendorid = 69868 (0x110ec)
hwinfo.revisionid = 32 (0x20)
hwinfo.baseclass = 2 (0x2)
hwinfo.slot = 5632 (0x1600)
hwinfo.bus = 4 (0x4)
hwinfo.active = 'unknown'
hwinfo.needed = 'no'
hwinfo.available = 'yes'
hwinfo.configured = 'no'
hwinfo.hwclass = 'network'
hwinfo.model = 'Realtek RTL8180L 802.11b MAC'
hwinfo.parentid = '4Ivu.QoLDkQcpy16'
hwinfo.uniqueid = 'm862.moeRe+D9b3F'
info.udi = '/org/freedesktop/Hal/devices/pci_10ec_8180'


edit "hwinfo.configured"
Comment 20 Michal Zugec 2007-12-12 13:02:28 UTC
Sorry for long delay.
Unfortunate it's not enought - whole configuration file must be be removed.

And second - this seems per-user depend because of suseplugger configuration - UDI is stored in ~/kde/share/config/susepluggerrc

KDE-maintainers: is that possible to improve suseplugger to ignore devices in ~/kde/share/config/susepluggerrc without /var/lib/hardware/udi/$UDI ? I mean to show popup when I remove /var/lib/hardware/udi/$UDI configuration?
Comment 23 Michal Zugec 2008-01-14 11:09:37 UTC
When you'll be able to provide requested informations (from comment #20), reopen this bug.