[Mostly Solved] Netctl can't use interface, interface is up

Hey all,
I've previously used NetworkManager, but after some issues I tried to use something a bit less bloated to troubleshoot and found netctl to be amazing, how networking should always be. And magically my wireless at uni started working again. Initially netctl worked fine, it still does for the most part but on boot the interfaces seem to be hogged by something else, an issue NetworkManager was able to resolve apparently.
To use netctl, I have to start NetworkManager, then stop it. I can then use netctl without issue.
In a troubleshooting attempt I tried disabling udev renaming, so I am back to eth0 and wlan0: Issues persist.
[root@t60 boza]# netctl status tomato
[email protected] - Networking for netctl profile tomato
Loaded: loaded (/usr/lib/systemd/system/[email protected]; static)
Active: failed (Result: exit-code) since Fri 2013-05-03 00:07:10 EST; 11min ago
Docs: man:netctl.profile(5)
Process: 497 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
May 03 00:07:10 t60 systemd[1]: Starting Networking for netctl profile tomato...
May 03 00:07:10 t60 network[497]: Starting network profile 'tomato'...
May 03 00:07:10 t60 network[497]: The interface of network profile 'tomato' is already up
May 03 00:07:10 t60 systemd[1]: [email protected]: main process exited, code=exited, status=1/FAILURE
May 03 00:07:10 t60 systemd[1]: Failed to start Networking for netctl profile tomato.
May 03 00:07:10 t60 systemd[1]: MESSAGE=Unit [email protected] entered failed state.
Cheers
Last edited by deags (2013-05-02 04:28:07)

Sorry, you are right I haven't worded this well.
You are correct, there are no other network management daemons running, and on boot the interface is DOWN.
Despite being down, netctl can not start the interface.
If I manually 'ip link set wlan0 down', despite it already being reported as DOWN, netctl can then use the interface.
Here is some output, after logging in:
[root@t60 ~]# netctl start tomato
Job for [email protected] failed. See 'systemctl status [email protected]' and 'journalctl -xn' for details.
[root@t60 ~]# netctl status tomato
[email protected] - Networking for netctl profile tomato
Loaded: loaded (/usr/lib/systemd/system/[email protected]; static)
Active: failed (Result: exit-code) since Fri 2013-05-03 01:51:59 EST; 42s ago
Docs: man:netctl.profile(5)
Process: 456 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
May 03 01:51:58 t60 systemd[1]: Starting Networking for netctl profile tomato...
May 03 01:51:59 t60 network[456]: Starting network profile 'tomato'...
May 03 01:51:59 t60 network[456]: The interface of network profile 'tomato' is already up
May 03 01:51:59 t60 systemd[1]: [email protected]: main process exited, code=exited, status=1/FAILURE
May 03 01:51:59 t60 systemd[1]: Failed to start Networking for netctl profile tomato.
May 03 01:51:59 t60 systemd[1]: MESSAGE=Unit [email protected] entered failed state.
[root@t60 ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 00:15:58:2b:ea:56 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
link/ether 00:13:02:69:8c:d4 brd ff:ff:ff:ff:ff:ff
As you can see, netctl thinks the interface is UP, but ip says it is DOWN. To get going from this point, this works:
[root@t60 ~]# ip link set wlan0 down
[root@t60 ~]# netctl start tomato
[root@t60 ~]#

Similar Messages

  • [solved] Texlive: Can't use kpfonts after installing extrafonts

    I've just installed texlive-extrafonts but I can't use kpfonts.
    I've created a dummy file like this:
    \documentclass{article}
    \usepackage{kpfonts}
    \begin{document}
    Asd
    \end{document}
    But when I try to create the pdf file I got an error. I can create a dvi file, but if I try to convert to pdf I got a similar error:
    This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Arch Linux)
    restricted \write18 enabled.
    entering extended mode
    (./test.tex
    LaTeX2e <2005/12/01>
    Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
    yphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek, ibycus, ar
    abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc
    h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono
    greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, ku
    rmanji, latin, latvian, lithuanian, mongolian, mongolian2a, bokmal, nynorsk, po
    lish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, span
    ish, swedish, turkish, ukenglish, ukrainian, uppersorbian, welsh, loaded.
    (/usr/share/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
    (/usr/share/texmf-dist/tex/latex/base/size10.clo))
    (/usr/share/texmf-dist/tex/latex/kpfonts/kpfonts.sty
    (/usr/share/texmf-dist/tex/latex/base/textcomp.sty
    (/usr/share/texmf-dist/tex/latex/base/ts1enc.def))
    (/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty
    For additional information on amsmath, use the `?' option.
    (/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty
    (/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty))
    (/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty)
    (/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty))) (./test.aux)
    (/usr/share/texmf-dist/tex/latex/kpfonts/omljkp.fd)
    (/usr/share/texmf-dist/tex/latex/kpfonts/omsjkp.fd)
    (/usr/share/texmf-dist/tex/latex/kpfonts/omxjkp.fd)
    (/usr/share/texmf-dist/tex/latex/kpfonts/ujkpexa.fd)
    (/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)
    (/usr/share/texmf-dist/tex/latex/kpfonts/ot1jkp.fd) [1{/usr/share/texmf-var/fon
    ts/map/pdftex/updmap/pdftex.map}] (./test.aux)
    kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 jkpmn8r
    mktexpk: don't know how to create bitmap font for jkpmn8r.
    kpathsea: Appending font creation commands to missfont.log.
    !pdfTeX error: pdflatex (file jkpmn8r): Font jkpmn8r at 600 not found
    ==> Fatal error occurred, no output PDF file produced!
    I've also tried running 'updmap-sys' and 'texhash', but it didn't worked. Any help is appreciated.
    Last edited by andre.ramaciotti (2009-10-04 20:34:04)

    I've tried both commands, but they print the following and I still have the same problem:
    sudo updmap-sys --enable Map=kpfonts.map
    Password:
    updmap: This is updmap, version $Id: updmap 14402 2009-07-23 17:09:15Z karl $
    updmap: using transcript file `/usr/share/texmf-var/web2c/updmap.log'
    updmap: initial config file is `/usr/share/texmf-config/web2c/updmap.cfg'
    updmap: configuration (updmap.cfg) unchanged. Map files will not be recreated.

  • [Solved]how can i use netmanager to connect wifi?

    hi,
    My laptop is lenovo ideapad v360.
    Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
    kernel:3.1.5-2-ck #1 SMP PREEMPT Fri Dec 9 20:12:54 EST 2011 x86_64 Intel(R) Core(TM) i3 CPU M 390 @ 2.67GHz GenuineIntel GNU/Linux
    When i use netmanager to enable wifi,it would be inactive.I wonder if anyone can help me?
    NetworkManager DEBUG message:
    NetworkManager[12329]: <debug> [1324536199.430916] [nm-manager.c:3385] manager_radio_user_toggled(): (WiFi): setting radio enabled by user
    NetworkManager[12329]: <debug> [1324536199.431525] [nm-manager.c:1162] manager_update_radio_enabled(): (wlan0): setting radio enabled
    NetworkManager[12329]: <debug> [1324536199.431686] [nm-device-wifi.c:3058] real_set_enabled(): (wlan0): device now enabled
    NetworkManager[12329]: <info> (wlan0): bringing up device.
    NetworkManager[12329]: <debug> [1324536199.434304] [nm-supplicant-manager.c:88] nm_supplicant_manager_iface_get(): (wlan0): creating new supplicant interface
    NetworkManager[12329]: <debug> [1324536199.434634] [nm-supplicant-interface.c:692] interface_add(): (wlan0): adding interface to supplicant
    NetworkManager[12329]: <debug> [1324536199.434970] [nm-device-wifi.c:3093] real_set_enabled(): (wlan0): enable waiting on supplicant state
    NetworkManager[12329]: <info> WiFi hardware radio set enabled
    NetworkManager[12329]: <debug> [1324536199.441904] [nm-netlink-monitor.c:163] link_msg_handler(): netlink link message: iface idx 3 flags 0x1003
    NetworkManager[12329]: <debug> [1324536199.442122] [nm-udev-manager.c:690] handle_uevent(): UDEV event: action 'change' subsys 'rfkill' device 'rfkill0'
    NetworkManager[12329]: <debug> [1324536199.442993] [nm-udev-manager.c:249] recheck_killswitches(): WiFi rfkill state now 'unblocked'
    NetworkManager[12329]: <debug> [1324536199.443088] [nm-manager.c:1310] manager_rfkill_update_one_type(): WiFi hw-enabled 1 sw-enabled 1
    NetworkManager[12329]: <info> WiFi now enabled by radio killswitch
    NetworkManager[12329]: <debug> [1324536199.443228] [nm-manager.c:1162] manager_update_radio_enabled(): (wlan0): setting radio enabled
    NetworkManager[12329]: <debug> [1324536199.443387] [nm-udev-manager.c:690] handle_uevent(): UDEV event: action 'change' subsys 'rfkill' device 'rfkill2'
    NetworkManager[12329]: <debug> [1324536199.444230] [nm-udev-manager.c:690] handle_uevent(): UDEV event: action 'change' subsys 'rfkill' device 'rfkill3'
    NetworkManager[12329]: <debug> [1324536199.466648] [nm-supplicant-interface.c:539] interface_add_done(): (wlan0): interface added to supplicant
    NetworkManager[12329]: <info> (wlan0): supplicant interface state: starting -> ready
    NetworkManager[12329]: <info> (wlan0): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
    NetworkManager[12329]: <info> (wlan0): supplicant interface state: ready -> inactive
    NetworkManager[12329]: <warn> Trying to remove a non-existant call id.
    NetworkManager[12329]: <debug> [1324536199.609897] [nm-udev-manager.c:690] handle_uevent(): UDEV event: action 'change' subsys 'rfkill' device 'rfkill2'
    NetworkManager[12329]: <debug> [1324536199.610362] [nm-udev-manager.c:249] recheck_killswitches(): WiFi rfkill state now 'soft-blocked'
    NetworkManager[12329]: <debug> [1324536199.610422] [nm-manager.c:1310] manager_rfkill_update_one_type(): WiFi hw-enabled 1 sw-enabled 0
    NetworkManager[12329]: <info> WiFi now disabled by radio killswitch
    NetworkManager[12329]: <debug> [1324536199.610531] [nm-manager.c:1162] manager_update_radio_enabled(): (wlan0): setting radio disabled
    NetworkManager[12329]: <debug> [1324536199.610569] [nm-device-wifi.c:3058] real_set_enabled(): (wlan0): device now disabled
    NetworkManager[12329]: <info> (wlan0): device state change: disconnected -> unavailable (reason 'none') [30 20 0]
    NetworkManager[12329]: <info> (wlan0): deactivating device (reason 'none') [0]
    NetworkManager[12329]: <debug> [1324536199.610706] [nm-device-wifi.c:859] _set_hw_addr(): (wlan0): no MAC address change needed
    NetworkManager[12329]: <debug> [1324536199.610918] [nm-system.c:1158] nm_system_iface_flush_routes(): (wlan0): flushing routes ifindex 3 family INET (2)
    NetworkManager[12329]: <debug> [1324536199.611159] [nm-netlink-utils.c:317] dump_route():   route idx 1 family INET (2) addr 127.0.0.0/32
    NetworkManager[12329]: <debug> [1324536199.611200] [nm-netlink-utils.c:317] dump_route():   route idx 1 family INET (2) addr 127.0.0.0/8
    NetworkManager[12329]: <debug> [1324536199.611239] [nm-netlink-utils.c:317] dump_route():   route idx 1 family INET (2) addr 127.0.0.1/32
    NetworkManager[12329]: <debug> [1324536199.611294] [nm-netlink-utils.c:317] dump_route():   route idx 1 family INET (2) addr 127.255.255.255/32
    NetworkManager[12329]: <debug> [1324536199.611556] [nm-system.c:190] sync_addresses(): (wlan0): syncing addresses (family 2)
    NetworkManager[12329]: <debug> [1324536199.612133] [nm-device-wifi.c:1235] real_is_available(): (wlan0): not available because not enabled
    NetworkManager[12329]: <debug> [1324536199.612202] [nm-device.c:4163] nm_device_state_changed(): (wlan0): device not yet available for transition to DISCONNECTED
    NetworkManager[12329]: <info> (wlan0): taking down device.
    NetworkManager[12329]: <debug> [1324536199.643093] [nm-netlink-monitor.c:163] link_msg_handler(): netlink link message: iface idx 3 flags 0x1002
    wpa_supplicant:
    Initializing interface 'wlan0' conf 'N/A' driver 'nl80211,wext' ctrl_interface 'N/A' bridge 'N/A'
    netlink: Operstate: linkmode=1, operstate=5
    Own MAC address: ac:81:12:11:a3:90
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x466559 key_idx=0 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x466559 key_idx=1 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x466559 key_idx=2 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x466559 key_idx=3 set_tx=0 seq_len=0 key_len=0
    RSN: flushing PMKID list in the driver
    State: DISCONNECTED -> INACTIVE
    WPS: UUID based on MAC address - hexdump(len=16): 65 80 55 d2 39 72 50 db a8 19 ab 81 79 b6 16 a0
    EAPOL: SUPP_PAE entering state DISCONNECTED
    EAPOL: Supplicant port status: Unauthorized
    EAPOL: KEY_RX entering state NO_KEY_RECEIVE
    EAPOL: SUPP_BE entering state INITIALIZE
    EAP: EAP entering state DISABLED
    EAPOL: Supplicant port status: Unauthorized
    EAPOL: Supplicant port status: Unauthorized
    dbus: Register interface object '/fi/w1/wpa_supplicant1/Interfaces/1'
    Added interface wlan0
    Scan requested (ret=0) - scan timeout 10 seconds
    nl80211: Event message available
    nl80211: Scan trigger
    nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
    Removing interface wlan0
    No keys have been configured - skip key clearing
    State: INACTIVE -> DISCONNECTED
    wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
    netlink: Operstate: linkmode=-1, operstate=5
    EAPOL: External notification - portEnabled=0
    EAPOL: Supplicant port status: Unauthorized
    EAPOL: External notification - portValid=0
    EAPOL: Supplicant port status: Unauthorized
    No keys have been configured - skip key clearing
    Cancelling scan request
    Cancelling authentication timeout
    dbus: Unregister interface object '/fi/w1/wpa_supplicant1/Interfaces/1'
    netlink: Operstate: linkmode=0, operstate=6
    Last edited by czheji (2011-12-22 08:11:25)

    I got a solution:`rmmod acer_wmi` and adding it to blacklist solves the problem
    https://bugzilla.redhat.com/show_bug.cgi?id=674353

  • [SOLVED]I can't use my usb mouse after updating kernel to 3.15.5-1

    Hi~
    I have a problem with using my usb mouse.
    Well.. I'm using laptop and there are two usb-3.0 ports.
    One of them is worked correctly, but other is worked only with usb storage device.
    When I try to connect usb mouse and keyboard, it won't work at all. ( nothing is printed out with dmesg )
    I googled about this issue, but I couldn't find o.O...
    Is it problem with kernel ? or hardware!? How can I fix this ?
    [ 1.176616] ACPI: bus type USB registered
    [ 1.176646] usbcore: registered new interface driver usbfs
    [ 1.176658] usbcore: registered new interface driver hub
    [ 1.177628] usbcore: registered new device driver usb
    [ 1.178550] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 1.189661] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
    [ 1.189925] hub 1-0:1.0: USB hub found
    [ 1.192041] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
    [ 1.192239] hub 2-0:1.0: USB hub found
    [ 1.195303] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 3
    [ 1.208760] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
    [ 1.208951] hub 3-0:1.0: USB hub found
    [ 1.548583] usb 1-1: new low-speed USB device number 2 using xhci_hcd
    [ 1.741222] usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 1.741228] usb 1-1: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 1.901718] usb 1-3: new high-speed USB device number 3 using xhci_hcd
    [ 2.234848] usb 1-4: new full-speed USB device number 4 using xhci_hcd
    [ 2.568121] usb 1-7: new high-speed USB device number 5 using xhci_hcd
    [ 2.840667] usbcore: registered new interface driver btusb
    [ 2.844649] input: LG HD WebCam as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/input/input16
    [ 2.844722] usbcore: registered new interface driver uvcvideo
    [ 2.844723] USB Video Class driver (1.1.1)
    [ 2.860601] usbcore: registered new interface driver usbhid
    [ 2.860602] usbhid: USB HID core driver
    [ 2.861624] input: Microsoft Comfort Curve Keyboard 2000 as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:045E:00DD.0001/input/input17
    [ 2.861727] hid-generic 0003:045E:00DD.0001: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Comfort Curve Keyboard 2000] on usb-0000:00:14.0-1/input0
    [ 2.862942] input: Microsoft Comfort Curve Keyboard 2000 as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/0003:045E:00DD.0002/input/input18
    [ 2.863039] hid-generic 0003:045E:00DD.0002: input,hidraw1: USB HID v1.11 Device [Microsoft Comfort Curve Keyboard 2000] on usb-0000:00:14.0-1/input1
    [ 2.907910] usb 3-1: new high-speed USB device number 2 using ehci-pci
    [ 3.031829] hub 3-1:1.0: USB hub found
    [ 3.048394] scsi4 : SCSI emulation for RTS5139 USB card reader
    [ 3.048528] usbcore: registered new interface driver rts5139
    [ 216.214721] usb 1-1: USB disconnect, device number 2
    [ 216.927102] usb 1-1: new low-speed USB device number 6 using xhci_hcd
    [ 217.119883] usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 217.119887] usb 1-1: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 217.127966] input: Microsoft Comfort Curve Keyboard 2000 as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:045E:00DD.0003/input/input23
    [ 217.128101] hid-generic 0003:045E:00DD.0003: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Comfort Curve Keyboard 2000] on usb-0000:00:14.0-1/input0
    [ 217.138871] input: Microsoft Comfort Curve Keyboard 2000 as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.1/0003:045E:00DD.0004/input/input24
    [ 217.139016] hid-generic 0003:045E:00DD.0004: input,hidraw1: USB HID v1.11 Device [Microsoft Comfort Curve Keyboard 2000] on usb-0000:00:14.0-1/input1
    Last edited by chaoxifer (2014-07-16 08:49:12)

    Well.. I executed pacman -Syu, so most system packages have been updated.
    Anyway, I got new dmesg  when It  pasted few minutes after booting system.
    [ 228.041923] usb 1-2: new low-speed USB device number 6 using xhci_hcd
    [ 228.216510] usb 1-2: device descriptor read/all, error -71
    [ 228.375078] usb 1-2: new low-speed USB device number 7 using xhci_hcd
    [ 228.534966] usb 1-2: device descriptor read/64, error -71
    [ 228.638302] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 6.
    [ 228.638315] usb 1-2: hub failed to enable device, error -22
    [ 228.798196] usb 1-2: new low-speed USB device number 8 using xhci_hcd
    [ 228.812966] usb 1-2: device descriptor read/8, error -71
    [ 228.929432] usb 1-2: device descriptor read/8, error -71
    [ 229.191283] usb 1-2: new low-speed USB device number 9 using xhci_hcd
    [ 229.205938] usb 1-2: device descriptor read/8, error -71
    [ 229.322657] usb 1-2: device descriptor read/8, error -71
    [ 229.424542] hub 1-0:1.0: unable to enumerate USB device on port 2
    I found some articles from ubuntu and they said it caused by usbcore because it tries to use 'new' usbcore scheme.
    And the solution in there is
    echo Y > /sys/module/usbcore/parameters/old_scheme_first
    but it won't work. ;(..

  • [solved] bumblebee - can't use NVIDIA

    hi
    I can't find anything helpfull about this error.
    johannes@arch-laptop ~ % optirun steam
    [ 1074.176912] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) systemd-logind: failed to get session: PID 753 does not belong to any known session
    [ 1074.176969] [ERROR]Aborting because fallback start is disabled.
    1 johannes@arch-laptop ~ % cat /var/log/Xorg.8.log :(
    [ 25.790]
    X.Org X Server 1.16.0
    Release Date: 2014-07-16
    [ 25.790] X Protocol Version 11, Revision 0
    [ 25.790] Build Operating System: Linux 3.15.5-2-ARCH x86_64
    [ 25.790] Current Operating System: Linux arch-laptop 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64
    [ 25.790] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=b9d0c62c-be3e-43e3-ae89-1908af570819 rw quiet
    [ 25.790] Build Date: 31 July 2014 11:53:19AM
    [ 25.790]
    [ 25.790] Current version of pixman: 0.32.6
    [ 25.790] Before reporting problems, check [url]http://wiki.x.org[/url]
    to make sure that you have the latest version.
    [ 25.790] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    [ 25.791] (==) Log file: "/var/log/Xorg.8.log", Time: Tue Aug 19 10:09:35 2014
    [ 25.791] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"
    [ 25.791] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"
    [ 25.791] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
    [ 25.791] (==) ServerLayout "Layout0"
    [ 25.791] (==) No screen section available. Using defaults.
    [ 25.791] (**) |-->Screen "Default Screen Section" (0)
    [ 25.791] (**) | |-->Monitor "<default monitor>"
    [ 25.791] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
    [ 25.791] (**) | |-->Device "DiscreteNvidia"
    [ 25.791] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
    [ 25.791] (**) Option "AutoAddDevices" "false"
    [ 25.791] (**) Option "AutoAddGPU" "false"
    [ 25.791] (**) Not automatically adding devices
    [ 25.791] (==) Automatically enabling devices
    [ 25.791] (**) Not automatically adding GPU devices
    [ 25.791] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
    [ 25.791] Entry deleted from font path.
    [ 25.791] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
    [ 25.791] Entry deleted from font path.
    [ 25.791] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
    [ 25.791] Entry deleted from font path.
    [ 25.791] (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
    [ 25.791] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
    [ 25.791] Entry deleted from font path.
    [ 25.791] (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
    [ 25.791] (==) FontPath set to:
    /usr/share/fonts/misc/,
    /usr/share/fonts/TTF/
    [ 25.791] (++) ModulePath set to "/usr/lib/nvidia/xorg/,/usr/lib/xorg/modules"
    [ 25.791] (==) |-->Input Device "<default pointer>"
    [ 25.791] (==) |-->Input Device "<default keyboard>"
    [ 25.791] (==) The core pointer device wasn't specified explicitly in the layout.
    Using the default mouse configuration.
    [ 25.791] (==) The core keyboard device wasn't specified explicitly in the layout.
    Using the default keyboard configuration.
    [ 25.791] (II) Loader magic: 0x818d80
    [ 25.791] (II) Module ABI versions:
    [ 25.791] X.Org ANSI C Emulation: 0.4
    [ 25.791] X.Org Video Driver: 18.0
    [ 25.791] X.Org XInput driver : 21.0
    [ 25.791] X.Org Server Extension : 8.0
    [ 25.792] (EE) systemd-logind: failed to get session: PID 753 does not belong to any known session
    [ 25.792] (II) xfree86: Adding drm device (/dev/dri/card1)
    [ 25.792] (II) xfree86: Adding drm device (/dev/dri/card0)
    [ 25.792] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
    [ 25.793] (--) PCI:*(0:1:0:0) 10de:11e2:1558:3537 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
    [ 25.793] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
    [ 25.793] (II) LoadModule: "glx"
    [ 25.793] (II) Loading /usr/lib/nvidia/xorg/modules/extensions/libglx.so
    [ 25.879] (II) Module glx: vendor="NVIDIA Corporation"
    [ 25.879] compiled for 4.0.2, module version = 1.0.0
    [ 25.879] Module class: X.Org Server Extension
    [ 25.880] (II) NVIDIA GLX Module 340.32 Tue Aug 5 20:32:43 PDT 2014
    [ 25.880] (II) LoadModule: "nvidia"
    [ 25.881] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
    [ 25.886] (II) Module nvidia: vendor="NVIDIA Corporation"
    [ 25.886] compiled for 4.0.2, module version = 1.0.0
    [ 25.886] Module class: X.Org Video Driver
    [ 25.887] (II) LoadModule: "mouse"
    [ 25.887] (WW) Warning, couldn't open module mouse
    [ 25.887] (II) UnloadModule: "mouse"
    [ 25.887] (II) Unloading mouse
    [ 25.887] (EE) Failed to load module "mouse" (module does not exist, 0)
    [ 25.887] (II) LoadModule: "kbd"
    [ 25.887] (WW) Warning, couldn't open module kbd
    [ 25.887] (II) UnloadModule: "kbd"
    [ 25.887] (II) Unloading kbd
    [ 25.887] (EE) Failed to load module "kbd" (module does not exist, 0)
    [ 25.887] (II) NVIDIA dlloader X Driver 340.32 Tue Aug 5 20:13:04 PDT 2014
    [ 25.887] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
    [ 25.888] (--) using VT number 1
    [ 25.888] (II) Loading sub module "fb"
    [ 25.888] (II) LoadModule: "fb"
    [ 25.888] (II) Loading /usr/lib/xorg/modules/libfb.so
    [ 25.889] (II) Module fb: vendor="X.Org Foundation"
    [ 25.889] compiled for 1.16.0, module version = 1.0.0
    [ 25.889] ABI class: X.Org ANSI C Emulation, version 0.4
    [ 25.889] (WW) Unresolved symbol: fbGetGCPrivateKey
    [ 25.889] (II) Loading sub module "wfb"
    [ 25.889] (II) LoadModule: "wfb"
    [ 25.889] (II) Loading /usr/lib/xorg/modules/libwfb.so
    [ 25.890] (II) Module wfb: vendor="X.Org Foundation"
    [ 25.890] compiled for 1.16.0, module version = 1.0.0
    [ 25.890] ABI class: X.Org ANSI C Emulation, version 0.4
    [ 25.890] (II) Loading sub module "ramdac"
    [ 25.890] (II) LoadModule: "ramdac"
    [ 25.890] (II) Module "ramdac" already built-in
    [ 25.892] (II) NVIDIA(0): Creating default Display subsection in Screen section
    "Default Screen Section" for depth/fbbpp 24/32
    [ 25.892] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
    [ 25.892] (==) NVIDIA(0): RGB weight 888
    [ 25.892] (==) NVIDIA(0): Default visual is TrueColor
    [ 25.892] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
    [ 25.892] (**) NVIDIA(0): Option "NoLogo" "true"
    [ 25.892] (**) NVIDIA(0): Option "ProbeAllGpus" "false"
    [ 25.892] (**) NVIDIA(0): Option "UseEDID" "false"
    [ 25.892] (**) NVIDIA(0): Option "UseDisplayDevice" "none"
    [ 25.892] (**) NVIDIA(0): Enabling 2D acceleration
    [ 25.892] (**) NVIDIA(0): Ignoring EDIDs
    [ 25.892] (**) NVIDIA(0): Option "UseDisplayDevice" set to "none"; enabling NoScanout
    [ 25.892] (**) NVIDIA(0): mode
    [ 26.062] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please
    [ 26.062] (EE) NVIDIA(GPU-0): check your system's kernel log for additional error
    [ 26.062] (EE) NVIDIA(GPU-0): messages and refer to Chapter 8: Common Problems in the
    [ 26.062] (EE) NVIDIA(GPU-0): README for additional information.
    [ 26.062] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA graphics device!
    [ 26.062] (EE) NVIDIA(0): Failing initialization of X screen 0
    [ 26.062] (II) UnloadModule: "nvidia"
    [ 26.062] (II) UnloadSubModule: "wfb"
    [ 26.062] (II) UnloadSubModule: "fb"
    [ 26.062] (EE) Screen(s) found, but none have a usable configuration.
    [ 26.062] (EE)
    Fatal server error:
    [ 26.062] (EE) no screens found(EE)
    [ 26.062] (EE)
    Please consult the The X.Org Foundation support
    at [url]http://wiki.x.org[/url]
    for help.
    [ 26.062] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
    [ 26.062] (EE)
    [ 26.062] (EE) Server terminated with error (1). Closing log file.
    dmesg:
    [ 21.892672] NVRM: RmInitAdapter failed! (0x24:0x28:1170)
    [ 21.892678] NVRM: rm_init_adapter failed for device bearing minor number 0
    [ 21.892694] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
    [ 21.897046] NVRM: request_irq() failed (-22)
    [ 21.897050] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -22
    [ 21.900586] NVRM: request_irq() failed (-22)
    [ 21.900590] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -22
    [ 21.906486] NVRM: request_irq() failed (-22)
    [ 21.906491] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -22
    [ 21.910275] NVRM: request_irq() failed (-22)
    [ 21.910279] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -22
    [ 22.193946] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is off
    [ 25.312453] bbswitch: enabling discrete graphics
    [ 25.914870] vgaarb: this pci device is not a vga device
    [ 25.916494] nvidia 0000:01:00.0: irq 51 for MSI/MSI-X
    [ 25.918744] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 25.918793] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 25.918819] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 25.918851] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 25.918876] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 25.918900] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 25.918928] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 25.918953] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 25.964044] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
    [ 26.083073] NVRM: GPU at 0000:01:00.0 has fallen off the bus.
    [ 26.085289] NVRM: RmInitAdapter failed! (0x25:0x28:1196)
    [ 26.085296] NVRM: rm_init_adapter failed for device bearing minor number 0
    [ 26.085312] NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5
    [ 32.838914] bbswitch: enabling discrete graphics
    [ 54.361747] bbswitch: enabling discrete graphics
    [ 54.373589] nvidia 0000:01:00.0: Refused to change power state, currently in D3
    [ 272.255328] [drm] Module unloaded
    [ 292.733787] NVRM: This is a 64-bit BAR mapped above 4GB by the system
    NVRM: BIOS or the Linux kernel, but the PCI bridge
    NVRM: immediately upstream of this GPU does not define
    NVRM: a matching prefetchable memory window.
    [ 292.733790] NVRM: This may be due to a known Linux kernel bug. Please
    NVRM: see the README section on 64-bit BARs for additional
    NVRM: information.
    [ 292.733793] nvidia: probe of 0000:01:00.0 failed with error -1
    [ 292.734134] NVRM: The NVIDIA probe routine failed for 1 device(s).
    [ 292.734135] NVRM: None of the NVIDIA graphics adapters were initialized!
    [ 292.734137] [drm] Module unloaded
    [ 292.734224] NVRM: NVIDIA init module failed!
    [ 601.447155] bbswitch: enabling discrete graphics
    [ 601.458443] pci 0000:01:00.0: Refused to change power state, currently in D3
    [ 1074.830805] bbswitch: enabling discrete graphics
    [ 1074.841537] pci 0000:01:00.0: Refused to change power state, currently in D3
    edit: I think it has something to do with the new Xorg-server:
    https://github.com/Bumblebee-Project/Bu … issues/600
    Last edited by aligator (2014-08-20 17:15:19)

    johannes@arch-laptop ~ % systemctl status bumblebeed
    ● bumblebeed.service - Bumblebee C Daemon
    Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
    Active: active (running) since Di 2014-08-19 12:12:40 CEST; 11min ago
    Main PID: 290 (bumblebeed)
    CGroup: /system.slice/bumblebeed.service
    └─290 /usr/bin/bumblebeed
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.738516] [ERROR][XORG] (EE) NVIDIA(0): Failing initialization of X screen 0
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.738519] [ERROR][XORG] (EE) Screen(s) found, but none have a usable configuration.
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.738521] [ERROR][XORG] (EE)
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.738525] [ERROR][XORG] (EE) no screens found(EE)
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.738528] [ERROR][XORG] (EE)
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.738531] [ERROR][XORG] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.738533] [ERROR][XORG] (EE)
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.738535] [ERROR][XORG] (EE) Server terminated with error (1). Closing log file.
    Aug 19 12:13:03 arch-laptop bumblebeed[290]: [ 26.741900] [ERROR]X did not start properly
    Aug 19 12:13:22 arch-laptop bumblebeed[290]: [ 45.367149] [ERROR]Could not enable discrete graphics card
    1 johannes@arch-laptop ~ % sudo lspci -k | grep -A 2 -i "VGA" :(
    [sudo] password for johannes:
    00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
    Subsystem: CLEVO/KAPOK Computer Device 3537
    Kernel driver in use: i915
    1 johannes@arch-laptop ~ % sudo lspci -k | grep -A 2 -i "NVIDIA" :(
    01:00.0 3D controller: NVIDIA Corporation GK106M [GeForce GTX 765M] (rev ff)
    Kernel driver in use: nvidia
    Kernel modules: nouveau, nvidia
    The strange thing is that sometimes it works great after reboot...
    Last edited by aligator (2014-08-18 10:30:10)

  • SOLVED: How can I use or call a function that returns %ROWTYPE?

    Hi
    edit: you can probably skip all this guff and go straight to the bottom...In the end this is probably just a question of how to use a function that returns a %rowtype.  Thanks.
    Currently reading Feuerstein's tome, 5th ed. I've downloaded and run the file genaa.sp, which is a code generator. Specifically, you feed it a table name and it generates code (package header and package body) that will create a cache of the specified table's contents.
    So, I ran:
    HR@XE> @"C:\Documents and Settings\Jason\My Documents\Work\SQL\OPP5.WEB.CODE\OPP5.WEB.CODE\genaa.sp"
    749  /
    Procedure created.
    HR@XE> exec genaa('EMPLOYEES');which generated a nice bunch of code, viz:
    create or replace package EMPLOYEES_cache is
        function onerow ( EMPLOYEE_ID_in IN HR.EMPLOYEES.EMPLOYEE_ID%TYPE) return HR.EMPLOYEES%ROWTYPE;
        function onerow_by_EMP_EMAIL_UK (EMAIL_in IN HR.EMPLOYEES.EMAIL%TYPE) return HR.EMPLOYEES%ROWTYPE;
        procedure test;
    end EMPLOYEES_cache;
    create or replace package body EMPLOYEES_cache is
        TYPE EMPLOYEES_aat IS TABLE OF HR.EMPLOYEES%ROWTYPE INDEX BY PLS_INTEGER;
        EMP_EMP_ID_PK_aa EMPLOYEES_aat;
        TYPE EMP_EMAIL_UK_aat IS TABLE OF HR.EMPLOYEES.EMPLOYEE_ID%TYPE INDEX BY HR.EMPLOYEES.EMAIL%TYPE;
        EMP_EMAIL_UK_aa EMP_EMAIL_UK_aat;
        function onerow ( EMPLOYEE_ID_in IN HR.EMPLOYEES.EMPLOYEE_ID%TYPE)
            return HR.EMPLOYEES%ROWTYPE is
            begin
                return EMP_EMP_ID_PK_aa (EMPLOYEE_ID_in);
            end;
        function onerow_by_EMP_EMAIL_UK (EMAIL_in IN HR.EMPLOYEES.EMAIL%TYPE)
            return HR.EMPLOYEES%ROWTYPE is
            begin
                return EMP_EMP_ID_PK_aa (EMP_EMAIL_UK_aa (EMAIL_in));
            end;
        procedure load_arrays is
            begin
                FOR rec IN (SELECT * FROM HR.EMPLOYEES)
                LOOP
                    EMP_EMP_ID_PK_aa(rec.EMPLOYEE_ID) := rec;
                    EMP_EMAIL_UK_aa(rec.EMAIL) := rec.EMPLOYEE_ID;
                end loop;
            END load_arrays;
        procedure test is
            pky_rec HR.EMPLOYEES%ROWTYPE;
            EMP_EMAIL_UK_aa_rec HR.EMPLOYEES%ROWTYPE;
            begin
                for rec in (select * from HR.EMPLOYEES) loop
                    pky_rec := onerow (rec.EMPLOYEE_ID);
                    EMP_EMAIL_UK_aa_rec := onerow_by_EMP_EMAIL_UK (rec.EMAIL);
                    if rec.EMPLOYEE_ID = EMP_EMAIL_UK_aa_rec.EMPLOYEE_ID then
                        dbms_output.put_line ('EMP_EMAIL_UK  lookup OK');
                    else
                        dbms_output.put_line ('EMP_EMAIL_UK  lookup NOT OK');
                    end if;
                end loop;
            end test;
        BEGIN
            load_arrays;
        end EMPLOYEES_cache;
    /which I have run successfully:
    HR@XE> @"C:\Documents and Settings\Jason\My Documents\Work\SQL\EMPLOYEES_CACHE.sql"
    Package created.
    Package body created.I am now trying to use the functionality within the package.
    I have figured out that the section
        BEGIN
            load_arrays;
        end EMPLOYEES_cache;
    /is the initialization section, and my understanding is that this is supposed to run when any of the package variables or functions are referenced. Is that correct?
    With that in mind, I'm trying to call the onerow() function, but it's not working:
    HR@XE> select onerow(100) from dual;
    select onerow(100) from dual
    ERROR at line 1:
    ORA-00904: "ONEROW": invalid identifier
    HR@XE> select employees_cache.onerow(100) from dual;
    select employees_cache.onerow(100) from dual
    ERROR at line 1:
    ORA-06553: PLS-801: internal error [55018]
    HR@XE> select table(employees_cache.onerow(100)) from dual;
    select table(employees_cache.onerow(100)) from dual
    ERROR at line 1:
    ORA-00936: missing expressionHe provides the code genaa.sp, and a very brief description of what it does, but doesn't tell us how to run the generated code!
    Now, I have just done some googling, and it seems that what I am trying to do isn't possible. Apparently %ROWTYPE is PL/SQL, and not understood by SQL, so you can't call onerow() from sql. Correct?
    So I try wrapping the call in an exec:
    HR@XE> exec select employees_cache.onerow(100) from dual;
    BEGIN select employees_cache.onerow(100) from dual; END;
    ERROR at line 1:
    ORA-06550: line 1, column 30:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PLS-00428: an INTO clause is expected in this SELECT statement
    HR@XE> exec select table(employees_cache.onerow(100)) from dual;
    BEGIN select table(employees_cache.onerow(100)) from dual; END;
    ERROR at line 1:
    ORA-06550: line 1, column 14:
    PL/SQL: ORA-00936: missing expression
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    HR@XE> exec employees_cache.onerow(100)
    BEGIN employees_cache.onerow(100); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00221: 'ONEROW' is not a procedure or is undefined
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredNo joy.
    Of course, now that I'm looking at it again, it seems that the way to go is indicated by the first error:
    PLS-00428: an INTO clause is expected in this SELECT statement
    So am I supposed to create a type of EMPLOYEES%ROWTYPE in a PL/SQL procedure, and the idea of this code, is that the first call to onerow() runs the initialiation code, which populates the cache, and all subsequent calls to onerow() (whether by my session or any other) will use the cache?
    I've had a stab at this, but still, no joy:
    create or replace procedure testcache is
        emp employees%rowtype;
        begin
            select employees_cache.onerow(100) from dual into emp;
            dbms_output.put_line('Emp id: ' || emp.employee_id);
        end testcache;
    show errors
    HR@XE> @testcache.sql
    Warning: Procedure created with compilation errors.
    Errors for PROCEDURE TESTCACHE:
    LINE/COL ERROR
    4/9      PL/SQL: SQL Statement ignored
    4/54     PL/SQL: ORA-00933: SQL command not properly ended
    HR@XE>Have a feeling this should be really easy. Can anybody help?
    Many thanks in advance.
    Jason
    Edited by: 942375 on 08-Feb-2013 11:45

    >
    Ha, figured it out
    >
    Hopefully you also figured out that the example is just that: a technical example of how to use certain Oracle functionality. Unfortunately it is also an example of what you should NOT do in an actual application.
    That code isn't scaleable, uses expensive PGA memory, has no limit on the amount of memory that might be used and, contrary to your belief will result in EVERY SESSION HAVING ITS OWN CACHE of exactly the same data if the session even touches that package.
    Mr. Feuerstein is an expert in SQL and PL/SQL and his books cover virtually all of the functionality available. He also does an excellent job of providing examples to illustrate how that functionality can be combined and used. But the bulk of those examples are intended solely to illustrate the 'technical' aspects of the technology. They do not necessarily reflect best practices and they often do not address performance or other issues that need to be considered when actually using those techniques in a particular application. The examples show WHAT can be done but not necessarily WHEN or even IF a given technique should be used.
    It is up to the reader to learn the advantages and disadvantages of each technicalogical piece and determine when and how to use them.
    >
    Now, I have just done some googling, and it seems that what I am trying to do isn't possible. Apparently %ROWTYPE is PL/SQL, and not understood by SQL, so you can't call onerow() from sql. Correct?
    >
    That is correct. To be used by SQL you would need to create SQL types using the CREATE TYPE syntax. Currently that syntax does not support anything similar to %ROWTYPE.
    >
    So am I supposed to create a type of EMPLOYEES%ROWTYPE in a PL/SQL procedure, and the idea of this code, is that the first call to onerow() runs the initialiation code, which populates the cache, and all subsequent calls to onerow() (whether by my session or any other) will use the cache?
    >
    NO! That is a common misconception. Each session has its own set of package variables. Any session that touches that package will cause the entire EMPLOYEES table to be queried and stored in a new associative array specifically for that session.
    That duplicates the cache for each session using the package. So while there might be some marginal benefit for a single session to cache data like that the benefit usually disappears if multiple sessions are involved.
    The main use case that I am aware of where such caching has benefit is during ETL processing of staged data when the processing of each record is too complex to be done in SQL and the records need to be BULK loaded and the data manipulated in a loop. Then using an associative array as a lookup table to quickly get a small amount of data can be effective. And if the ETL procedure is being processed in parallel (meaning different sessions) then for a small lookup array the additional memory use is tolerable.
    Mitigating against that is the fact that:
    1. Such frequently used data that you might store in the array is likely to be cached by Oracle in the buffer cache anyway
    2. Newer versions of Oracle now have more than one cache
    3. The SQL query needed to get the data from the table will use a bind variable that eliminates repeated hard parsing.
    4. The cursor and the buffer caches ARE SHARED by multiple sessions globally.
    So the short story is that there would rarely be a use case where ARRAYs like that would be preferred over accessing the data from the table.

  • [solved] (how) can I use my laptop as a router for other computers?

    First of all, I have to admit that I do not know too much about networking. Just enough to make the simple things work properly.
    I have a laptop, which accesses the internet by wireless lan. The router is in my downstairs office. So far so, good, I have a media computer (both running Arch) in my room upstairs, intended to watch dvds or internet tv on the tv screen.
    Connecting this computer to the downstairs-router by cable is not possible. Now I wondered, if I really needed to buy a wlan-card (any suggestions which one works well with linux?) or if there might be an (easy) solution using my laptop as (sort of) a router, connecting them by cable and establishing a lan connection between both of them.
    Is it possible, to get internet access on the media computer that way, without to much effort? And what do I need to do to get it working?
    Last edited by saciel (2008-07-07 01:13:05)

    Well, I tried to set it up to day, realizing that it is probably not as easy as it appears to be.
    I did everything according to the wiki but from the laptop I can access either the internet OR the other computer, but not both at the same time. It seems to depend on which network profile I activate first.
    If I first activate and configure the ethernet card, I can acces the other computer (I tried ping and ssh), but if I then start the wlan profile I cannot access the internet on the laptop. If I start the internet profile first and then configure the ethernet card, I cannot ping the media pc anymore.
    I'm not sure what could be wrong, as I just did everything according to the wiki entry. Ideas?

  • [SOLVED] vim can't use colorscheme from ~/.vim/colors

    Hello
    I wanted to use the Molokai Theme for vim. So I downloaded molokai.vim from http://www.vim.org/scripts/script.php?script_id=2340 Copied it to ~/.vim/colors folder. In vim I enter :colorscheme molokai.vim but it can't find it.
    Also install molokai-vim from AUR but still. E185: Cannot find color scheme 'molokai.vim'
    Any thoughts?
    Last edited by blackout23 (2013-04-01 08:15:38)

    I'm sure I tried it with and without extension and it didn't work.
    However after creating a .vimrc (didn't have one before) according to this:
    http://dthettich.tumblr.com/post/131989 … rc-molokai
    It worked.
    @WonderWoofy
    The AUR package installed it into that directory.
    Thanks to all!

  • [SOLVED] How can I use numix as my lightdm-gtk-greeter theme?

    I've gone into /etc/lightdm/lightdm-gtk-greeter.conf and set the theme to numix, however it didn't change anything.  So then I went into /etc/lightdm/lightdm.conf and specifically set the greeter-session to lightdm-gtk-greeter.  It's the only greeter I have installed.
    I did a reboot after each change but there was no effect.
    Thanks.
    Last edited by sajan (2015-04-10 09:04:08)

    "theme-name" option is case-sensitive, try to use Numix.

  • [SOLVED] NetworkManager can't use DHCP

    I just installed a fresh Arch Linux on whatever network modem is onboard the Gigabyte 990FXA-UD3 motherboard. The ethernet port works out-of-the-box using dhcpcd on the installer ISO and on my actual installation of Arch. Using KDE, I followed NetworkManager's setup guide in the wiki, but if I try to connect to anything, it instantly fails once I click on it. Then I tried clicking on Manage Connections and making a new Wired connection. It still failed. Then I tried changing that connection from DHCP to manual IPv4 and DNS numbers, and it worked just fine. I've done a lot of Googling, but nothing in the wiki or forums is fixing this issue for me.
    Last edited by Cadeyrn (2013-06-25 22:24:32)

    I'm confused, did someone prevent you from updating the Wiki?
    Yes, I tried, but I admittedly lack the skills to debate technically, with someone who obviously possesses the skills.
    https://wiki.archlinux.org/index.php?title=NetworkManager&action=history
    (cur | prev) 07:09, 3 September 2013 Lahwaacz (Talk | contribs) . . (28,477 bytes) (-253) . . (Undo revision 274198 by Jeff story (talk) completely covered by the note above removed text)
    (cur | prev) 23:18, 2 September 2013 Jeff story (Talk | contribs) . . (28,730 bytes) (+253) . . (clarify and instruct to disable and stop dhcpcd.service)
    Honestly though, at this point, your question is no longer important.
    What would be cool though is for someone with the expertise on this subject to take notice, figure out exactly what is lacking in the wiki and be willing to contribute the info for the good of the community, which I believe should include the Arch newbs or non coders / programmers.
    Then be able to persuade Scimmia and Lahwaacz that in fact, something needs "fixed", even though from their perspective (Linux guru?) there is nothing wrong or missing.
    EDIT: Added second name to clarify situation.
    Last edited by jeff story (2013-12-30 03:53:51)

  • If my school has the license for most adobe products can students use it at home

    Hey
    im a student taking design at school and my school has a license to the adobe suite.. I am wondering if my design class are able to get a cheap or free student version under their license. Thanks and sorry for my spelling

    Bennydevs it is quite possibly your school may be participating in such a program.  Please contact your school/educational organization for any details regarding their participation in such as program.
    If you wish to obtain an education discount for a Creative Cloud membership then please see https://www.adobe.com/products/creativecloud/buying-guide-education.html.

  • How can use interface in JSP?

    hi! friends i have one dought in JSP? it's possible interface in JSP? how?
    waiting for ur reply!

    hi
    i think u can not use interface in JSP but u can extend a class which implements an interface

  • What is difference between using interface as source and table as source?

    I am working on a batch flow which need several steps to populate data from source to target. For example, I need 5 interfaces to finish final data loading. I can either use interface or use temporary table as source and target for the interface 2, 3, and 4. It looks like both case will use tables no matter use interface or use temporary table. So my question is if there is any difference between these two (using interface as source or use temporary table as source)?
    Thanks

    if you use a Table as source for the intermediate process, it will create a physical temporary table i your work rep(depends on you choice) and populate the data into the table. if you use a interface as a source, just it will create a sub query instead of temporary table.
    Thanks
    nidhi

  • Using Interfaces.

    Ok Guys,
    I am a newbie so apologies, and i know you are all going OH no not interfaces.
    I understand interfaces, why to use them when.
    I don't understand them in a program that i am using.
    I have inherited a program that is using interfaces.
    Here is a bit of code:
    public class Playing {
         public static void main(String[] args) {
              Object1 obj = null ;
              Document1 doc = null ;
              Group group = null ;
    We then manipulate these objects.
    NOw when I look in the documentation these are all interfaces.
    Why then in the class do we not use the implements.
    Is this because every class in the package inherits these interfaces so i can just use them as they are? This is the only reason i can think of. So when can we use interfaces as above and when do we use the implements key word.When would i use the new key word or would that just be for a method?
    Thanks.

    You mean that Object1, etcetera are interfaces? Surprise, surprise, I haven't actually thought of interface variables before. But if they exist it must mean that you can assign object references to them of any class that implements the interface. I tried this example,
        public interface I {
            public void m();
        public class C1 implements I {
            public void m() {
        public class C2 implements I {
            public void m() {
            public void mm() {
        void test() {
            I inter;          // interface variable
            inter = new C1(); // okay because C1 implements I
            inter = new C2(); // okay too
            inter.m();     // okay because m part of interface I
    //        inter.mm();  // error because mm not part of interface I
        }The interface variable inter can hold objects of classes C1 and C2 because they implement I, but only methods of interface I can be accessed.

  • How can I use my NI 9401 to send a 5V signal to a solid state relay?

    To start off, I am a complete novice to LabVIEW and I am working on my senior capstone project. Please, bear with me and I will try my best to help you help me.
    I am wanting to use my NI 9401 to send a voltage to a solid state relay so that I can control the temperature of a heating element. Ideally what I want to do is:
    1. LabVIEW sends voltage to relay.  
    2. Relay turns on.
    3. Heating element reaches desired temperature.
    4. LabVIEW does some sort of pulse to maintain that temperature.
    Right now I have one wire set inside of DIO 4 (or pin 20?) because I have read that 4:7 are for outputs. I also have another wire in the first COM slot (pin 1?).  I believe that these two wires will be placed in the "input signal" spots on the diagram below. 

    Your description is not very clear for me. However, usually output lines of control boards do not have a 5V signal as required by a solid state relay. The output usually is "TTL compatible" which means that it may be anywhere between 2.8V and 5.0V in high state. 
    Usually solid state relays are connected to an "open collector output". Most digital outputs can be used in this mode, too. You have to wire the (+) terminal of the relay to a 5VDC source (many boards have a 5VDC output - with limited current capacity, when using an external 5VDC source the GND terminal of the latter must be connected to GND or COM of the board). The (-) output goes to the digital output of the board. When wiring this way, logic states are inverted with respect to the relay operation. The relay will be ON when the digital output is in LOW state and will be OFF when the output is in HIGH state. 
    Check the current limit of your output line in "sink mode" and compare it with the current requirement of the relay input. Most solid state relays require 10 to 20 milli-amps at the input which is well inside the current limit of most digital outputs (usually 24 milli-amps, sometimes 48 milli-amps). 

Maybe you are looking for

  • Install Windows 8.1 64bit on a Macbook Pro Late 2008 (using bootcamp 4.0.4033)

    Hi everyone, I just tried to install windows 8.1 64bit (x64) on my MacBook Pro 15'' Late 2008 (Core 2 Duo 2.4Ghz - 4GB RAM - Nvidia 9600M GT 512Mo), running Mavericks (10.9.5), and successed it with bootcamp 4.0.4033. I installed it from scratch (new

  • Image processing from .txt file onto an intensity graph

    I am doing a mini project in my class and I was wondering if anyone could help me. It about image processing but I am bit stuck. Heres the idea: "An image is really nothing more than a 2D array of data. The value of every element in the array corresp

  • How can i sync my iphone and ipad to a new computer

    how can i sync my iphone and ipad to a new computer

  • Getting a "pop" when fading titles

    never particularly noticed this before ... when fading (using cross dissolve) titles in & out, i'm observing a pop at the point where the transition begins. the fade is not smooth. there's a visible of a degradation in quality at the the first frame

  • How can I download a Standalone OS?

    Hi, my MBP is on the Net, so no problem with upgrading to Mavericks. My MP is not on the net and I would like to upgrade too. (Currently runs on Mountain Lion) Is there and stand alone folder I can download? In Apple Store I only can install direct t