This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

A Good Bug Report...

...is about one specific problem, and includes the following things:

Log File Locations

NetworkManager

Where NetworkManager log output goes varies by distribution:

NetworkManager uses the 'daemon' syslog facility, so unless your distribution has modified the location of NetworkManager's log output specifically, all the logging will be directed to wherever your distro directs the 'daemon' facility's output.

wpa_supplicant

Supplicant logging is normally directed to /var/log/wpa_supplicant.log. For wpa_supplicant 0.7 and later, this location is controlled by the /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service file.

For wpa_supplicant 0.6, the log location is controlled by the /usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service file.

Debugging WiFi Connections

NetworkManager logs the configuration it sends to wpa_supplication in the normal syslog location. That's very important since it tells us what parameters wpa_supplicant will use to connect to the wifi network, and it looks like this:

Apr 27 17:49:43 dcbw NetworkManager[922]: <info> Config: added 'ssid' value 'swedish-chef'
Apr 27 17:49:43 dcbw NetworkManager[922]: <info> Config: added 'scan_ssid' value '1'
Apr 27 17:49:43 dcbw NetworkManager[922]: <info> Config: added 'key_mgmt' value 'WPA-PSK'
Apr 27 17:49:43 dcbw NetworkManager[922]: <info> Config: added 'psk' value '<omitted>'
Apr 27 17:49:43 dcbw NetworkManager[922]: <info> Config: added 'proto' value 'WPA RSN'
Apr 27 17:49:43 dcbw NetworkManager[922]: <info> Activation (wlan12) Stage 2 of 5 (Device Configure) complete.
Apr 27 17:49:43 dcbw NetworkManager[922]: <info> Config: set interface ap_scan to 1

Next, to debug most low-level wifi problems like failure to connect or dropped connections, we need to get debug logging from the supplicant.

Debugging wpa_supplicant 0.7 and later

If your /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service file contains "-f /var/log/wpa_supplicant.log" on the Exec= line, then you can execute the following commands in a terminal to get verbose debug logging sent to /var/log/wpa_supplicant.log:

sudo dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Set string:fi.w1.wpa_supplicant1 string:DebugTimestamp variant:boolean:true

sudo dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Set string:fi.w1.wpa_supplicant1 string:DebugLevel variant:string:"msgdump"

That's it! Reproduce the problem and then send /var/log/wpa_supplicant.log to the NetworkManager developers. Be aware that this may include some personal and network-related information, so if you attach this log to a bug report you'll want to make it private, and if you email the log you may not want to send it to a mailing list.

Rebooting will reset the supplicant log level, but if you want to turn it off manually, you can run the following command:

sudo dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Set string:fi.w1.wpa_supplicant1 string:DebugLevel variant:string:"info"

These instructions rely on wpa_supplicant being built with CONFIG_CTRL_IFACE_DBUS_NEW. If only the old D-Bus control interface has been enabled at the supplicant's build time (like on Red Hat Enterprise Linux 6), try:

sudo dbus-send --system --print-reply --dest=fi.epitest.hostap.WPASupplicant /fi/epitest/hostap/WPASupplicant fi.epitest.hostap.WPASupplicant.setDebugParams int32:0 boolean:true boolean:false

and to return to normal:

sudo dbus-send --system --print-reply --dest=fi.epitest.hostap.WPASupplicant /fi/epitest/hostap/WPASupplicant fi.epitest.hostap.WPASupplicant.setDebugParams int32:2 boolean:false boolean:false

Debugging wpa_supplicant 0.6 and earlier

You'll need to modify the D-Bus service activation file to enable debugging and the log output to a file:

[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
Exec=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log -dddt
User=root

Hidden networks

Hidden networks do not broadcast their SSID. This is false security. Don't use them if you can help it. Even Cisco says so:

Q. If I disable SSID broadcast, can I achieve enhanced security on a WLAN network?

A. When you disable SSID broadcast, SSID is not sent in Beacon messages. However, other frames such as, Probe Requests and Probe Responses still have the SSID in clear text. So you do not achieve enhanced Wireless security if you disable the SSID. The SSID is not designed, nor intended for use, as a security mechanism. In addition, if you disable SSID broadcasts, you can encounter problems with Wi-Fi interoperability for mixed-client deployments. Therefore, Cisco does not recommend that you use the SSID as a mode of security. 

In any case, people have to live with hidden SSID networks. There are a few things you can do to figure out if your driver is at fault or something else:

If that still doesn't show your AP, chances are your driver is not working correctly. There is one more thing to try.

If that still doesn't show your AP, *including the SSID*, then your driver is broken or your AP may need a reboot. At this point, only kernel driver debugging will help fix the problem. If you are using a 'staging', vendor, or binary driver, chances are your driver is broken and it's unlikely to be fixed because it's not one of the upstream official kernel drivers.

Other NetworkManager Debugging

If your problem isn't wifi related, or you just want to get some more debugging information out of NetworkManager, you can tell NM to change it's log level dynamically using dbus-send. NM has both log levels and log domains; the level controls how verbose NM's log output will be. Domains control what parts of networking NM emits log messages for. For example:

sudo dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.SetLogging string:"debug" string:""

will result in verbose debugging information directed to normal NetworkManager log locations. In this request, the first argument is the log level, and the second is the log domain. Leaving either of the two arguments blank (ie, an empty string) will leave that argument unchanged. See 'man NetworkManager.conf' for a list of available log domains.

To turn off debug logging, run the dbus-send command referenced above, except use 'info' as the log level instead of 'debug':

sudo dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.SetLogging string:"info" string:""

Debugging NetworkManager 0.8 and 0.9 3G connections

NetworkManager 0.8 and later use ModemManager for 3G device control. To get logs from modem-manager, we use the "--debug" option.

NM_PPP_DEBUG=1 /usr/sbin/NetworkManager --no-daemon

Debugging NetworkManager 0.7.x 3G connections

(NetworkManager 0.8 uses modem-manager so this does not apply)

NM_SERIAL_DEBUG=1 NM_PPP_DEBUG=1 /usr/sbin/NetworkManager --no-daemon

Debugging NetworkManager-openvpn

/usr/libexec/nm-openvpn-service --debug

Debugging NetworkManager-vpnc

See #Debugging_NetworkManager-openvpn

Debugging NetworkManager-pptp

See #Debugging_NetworkManager-openvpn


2024-10-23 11:37