Results 1 to 7 of 7

Thread: Plotting in R

  1. #1
    Join Date
    Dec 2006
    Beans
    5

    Plotting in R

    Hello!

    I'm an Ubuntu newbie, and I'm trying to get R working properly with Edgy. A problem I'm having is that R doesn't seem to make any plots. For instance, if I type
    Code:
    X11()
    or
    Code:
    hist(rnorm(1000))
    the cursor simply blinks, and nothing happens. Also, I can no longer input anything in R, but have to close the terminal window. Is there any way to find out what is going wrong? There are no error messages or anything, and I don't know if it's a problem with R, X11 or Edgy. I've tried completely removing and reinstalling R.

    Thanks, and I look forward to trying any ideas!

    - escargot

    P.S.: I've previously made some changes to the xorg.conf to get it to work with my ati drivers (installing fglrx and so on -- maybe that could have messed up the settings that R needs?)

  2. #2
    Join Date
    Sep 2005
    Location
    Winnipeg, Canada
    Beans
    177
    Distro
    Ubuntu

    Re: Plotting in R

    I have a very similar setup with ATI and fglrx on edgy. R works and plots perfectly. Check if /var/log/Xorg.0.log has any clues.

    Code:
     grep '(EE)' /var/log/Xorg.0.log

  3. #3
    Join Date
    Dec 2006
    Beans
    5

    Re: Plotting in R

    Thanks for your reply, amd-64!
    The command you suggested gives the following output:
    Code:
    (EE) AIGLX error: dlsym for __driCreateNewScreen_20050727 failed (/usr/lib/dri/fglrx_dri.so: undefined symbol: __driCreateNewScreen_20050727)
    (EE) AIGLX: reverting to software rendering
    (EE) xf86OpenSerial: Cannot open device /dev/wacom
    (EE) xf86OpenSerial: Cannot open device /dev/wacom
    (EE) xf86OpenSerial: Cannot open device /dev/wacom
    (EE) xf86OpenSerial: Cannot open device /dev/wacom
    (EE) xf86OpenSerial: Cannot open device /dev/wacom
    (EE) xf86OpenSerial: Cannot open device /dev/wacom
    I don't think it's a problem with a wacom (or lack thereof), but I don't know what the AIGLX error refers to ... could that be the problem?

    I can post my xorg.conf if you think that will help find the problem. Thank you again for helping.

  4. #4
    Join Date
    Sep 2005
    Location
    Winnipeg, Canada
    Beans
    177
    Distro
    Ubuntu

    Re: Plotting in R

    please post your xorg.conf. Are you using compiz or beyrl. You may want to test using the ati or radeon drivers instead of fglrx. This involves replacing the fglrx entry under device in xorg.conf with radeon or with ati.


    Alternatively, you could backup xorg.conf and create a new one with
    Code:
    sudo dpkg-reconfigure xserver-xorg

  5. #5
    Join Date
    Dec 2006
    Beans
    5

    Re: Plotting in R

    Hi amd-64, sorry about the delayed reply, I was away for a while. Here's my xorg.conf:
    Code:
    # /etc/X11/xorg.conf (xorg X Window System server configuration file)
    #
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    #
    # Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
    # (Type "man /etc/X11/xorg.conf" at the shell prompt.)
    #
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    #
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    #   sudo dpkg-reconfigure -phigh xserver-xorg
    
    Section "ServerLayout"
    	Identifier     "Default Layout"
    	Screen      0  "aticonfig-Screen[0]" 0 0
    	InputDevice    "Generic Keyboard"
    	InputDevice    "Configured Mouse"
    	InputDevice    "stylus" "SendCoreEvents"
    	InputDevice    "cursor" "SendCoreEvents"
    	InputDevice    "eraser" "SendCoreEvents"
    EndSection
    
    Section "Files"
    
    	# path to defoma fonts
    	FontPath     "/usr/share/fonts/X11/misc"
    	FontPath     "/usr/share/fonts/X11/cyrillic"
    	FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
    	FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
    	FontPath     "/usr/share/fonts/X11/Type1"
    	FontPath     "/usr/share/fonts/X11/100dpi"
    	FontPath     "/usr/share/fonts/X11/75dpi"
    	FontPath     "/usr/share/fonts/X11/misc"
    	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    EndSection
    
    Section "Module"
    	Load  "i2c"
    	Load  "bitmap"
    	Load  "ddc"
    	Load  "dri"
    	Load  "extmod"
    	Load  "freetype"
    	Load  "glx"
    	Load  "int10"
    	Load  "type1"
    	Load  "vbe"
    EndSection
    
    Section "InputDevice"
    	Identifier  "Generic Keyboard"
    	Driver      "kbd"
    	Option	    "CoreKeyboard"
    	Option	    "XkbRules" "xorg"
    	Option	    "XkbModel" "pc105"
    	Option	    "XkbLayout" "us"
    	Option	    "XkbOptions" "lv3:ralt_switch"
    EndSection
    
    Section "InputDevice"
    	Identifier  "Configured Mouse"
    	Driver      "mouse"
    	Option	    "CorePointer"
    	Option	    "Device" "/dev/input/mice"
    	Option	    "Protocol" "ExplorerPS/2"
    	Option	    "ZAxisMapping" "4 5"
    	Option	    "Emulate3Buttons" "true"
    EndSection
    
    Section "InputDevice"
    
                                                          # /dev/input/event
                                                          # for USB
    	Identifier  "stylus"
    	Driver      "wacom"
    	Option	    "Device" "/dev/wacom"          # Change to 
    	Option	    "Type" "stylus"
    	Option	    "ForceDevice" "ISDV4"               # Tablet PC ONLY
    EndSection
    
    Section "InputDevice"
    
                                                          # /dev/input/event
                                                          # for USB
    	Identifier  "eraser"
    	Driver      "wacom"
    	Option	    "Device" "/dev/wacom"          # Change to 
    	Option	    "Type" "eraser"
    	Option	    "ForceDevice" "ISDV4"               # Tablet PC ONLY
    EndSection
    
    Section "InputDevice"
    
                                                          # /dev/input/event
                                                          # for USB
    	Identifier  "cursor"
    	Driver      "wacom"
    	Option	    "Device" "/dev/wacom"          # Change to 
    	Option	    "Type" "cursor"
    	Option	    "ForceDevice" "ISDV4"               # Tablet PC ONLY
    EndSection
    
    Section "Monitor"
    	Identifier   "Generic Monitor"
    	HorizSync    28.0 - 51.0
    	VertRefresh  43.0 - 60.0
    	Option	    "DPMS"
    EndSection
    
    Section "Monitor"
    	Identifier   "aticonfig-Monitor[0]"
    	Option	    "VendorName" "ATI Proprietary Driver"
    	Option	    "ModelName" "Generic Autodetecting Monitor"
    	Option	    "DPMS" "true"
    EndSection
    
    Section "Device"
    	Identifier  "ATI Technologies, Inc. RV370 5B60 [Radeon X300 (PCIE)]"
    	Driver      "ati"
    	BusID       "PCI:1:0:0"
    EndSection
    
    Section "Device"
    	Identifier  "aticonfig-Device[0]"
    	Driver      "fglrx"
    	Option	    "VideoOverlay" "on"
    	Option	    "OpenGLOverlay" "off"
    EndSection
    
    Section "Screen"
    	Identifier "Default Screen"
    	Device     "ATI Technologies, Inc. RV370 5B60 [Radeon X300 (PCIE)]"
    	Monitor    "Generic Monitor"
    	DefaultDepth     24
    	SubSection "Display"
    		Depth     1
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     4
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     8
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     15
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     16
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     24
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    EndSection
    
    Section "Screen"
    	Identifier "aticonfig-Screen[0]"
    	Device     "aticonfig-Device[0]"
    	Monitor    "aticonfig-Monitor[0]"
    	DefaultDepth     24
    	SubSection "Display"
    		Viewport   0 0
    		Depth     24
    	EndSubSection
    EndSection
    
    Section "DRI"
    	Mode         0666
    EndSection
    
    Section "Extensions"
    	Option	    "Composite" "Disable"
    EndSection
    I tried using sudo dpkg-reconfigure xserver-xorg, but the resulting xorg.conf didn't work at all (my screen just said "Cannot use this display mode", or something like that)

    I don't know what compiz or beryl are, so I don't know which one I am using. Thank you for helping!

  6. #6
    Join Date
    Sep 2005
    Location
    Winnipeg, Canada
    Beans
    177
    Distro
    Ubuntu

    Re: Plotting in R

    While I do not know if it makes any difference, you should remove this section from xorg.conf
    Code:
    Section "Device"
    	Identifier  "ATI Technologies, Inc. RV370 5B60 [Radeon X300 (PCIE)]"
    	Driver      "ati"
    	BusID       "PCI:1:0:0"
    EndSection
    You can also try going back to the open-source ati driver by replacing "fglrx" with "ati" or "radeon".

    You should check is if you have all the packages needed to plot in R. It is not clear to me what packages provide the plotting. As a minimum, r-base and r-recommended are a good starting point.

    If all else fails, you should also check if a log is made in any of the files in /var/log when you issue a plotting command
    Code:
    ls -lsrt /var/log
    will sort the files with the most recent at the bottom.

  7. #7
    Join Date
    Dec 2006
    Beans
    5

    Re: Plotting in R

    Thanks for your help! Turns out that there were several problems with the xorg.conf -- Not only were there two devices (as you noted), but there were also two monitors and two screens specified. Merging the sections and keeping the relevant settings made it work. Also, there were problems with the HorizSync and VertRefresh settings for the monitors.

    Here's the working xorg.conf:
    Code:
    # /etc/X11/xorg.conf (xorg X Window System server configuration file)
    #
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    #
    # Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
    # (Type "man /etc/X11/xorg.conf" at the shell prompt.)
    #
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    #
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    #   sudo dpkg-reconfigure -phigh xserver-xorg
    
    Section "ServerLayout"
    	Identifier     "Default Layout"
    	Screen      0  "aticonfig-Screen[0]" 0 0
    	InputDevice    "Generic Keyboard"
    	InputDevice    "Configured Mouse"
    	InputDevice    "stylus" "SendCoreEvents"
    	InputDevice    "cursor" "SendCoreEvents"
    	InputDevice    "eraser" "SendCoreEvents"
    EndSection
    
    Section "Files"
    
    	# path to defoma fonts
    	FontPath     "/usr/share/fonts/X11/misc"
    	FontPath     "/usr/share/fonts/X11/cyrillic"
    	FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
    	FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
    	FontPath     "/usr/share/fonts/X11/Type1"
    	FontPath     "/usr/share/fonts/X11/100dpi"
    	FontPath     "/usr/share/fonts/X11/75dpi"
    	FontPath     "/usr/share/fonts/X11/misc"
    	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    EndSection
    
    Section "Module"
    	Load  "i2c"
    	Load  "bitmap"
    	Load  "ddc"
    	Load  "dri"
    	Load  "extmod"
    	Load  "freetype"
    	Load  "glx"
    	Load  "int10"
    	Load  "type1"
    	Load  "vbe"
    EndSection
    
    Section "InputDevice"
    	Identifier  "Generic Keyboard"
    	Driver      "kbd"
    	Option	    "CoreKeyboard"
    	Option	    "XkbRules" "xorg"
    	Option	    "XkbModel" "pc105"
    	Option	    "XkbLayout" "us"
    	Option	    "XkbOptions" "lv3:ralt_switch"
    EndSection
    
    Section "InputDevice"
    	Identifier  "Configured Mouse"
    	Driver      "mouse"
    	Option	    "CorePointer"
    	Option	    "Device" "/dev/input/mice"
    	Option	    "Protocol" "ExplorerPS/2"
    	Option	    "ZAxisMapping" "4 5"
    	Option	    "Emulate3Buttons" "true"
    EndSection
    
    Section "InputDevice"
    
                                                          # /dev/input/event
                                                          # for USB
    	Identifier  "stylus"
    	Driver      "wacom"
    	Option	    "Device" "/dev/wacom"          # Change to 
    	Option	    "Type" "stylus"
    	Option	    "ForceDevice" "ISDV4"               # Tablet PC ONLY
    EndSection
    
    Section "InputDevice"
    
                                                          # /dev/input/event
                                                          # for USB
    	Identifier  "eraser"
    	Driver      "wacom"
    	Option	    "Device" "/dev/wacom"          # Change to 
    	Option	    "Type" "eraser"
    	Option	    "ForceDevice" "ISDV4"               # Tablet PC ONLY
    EndSection
    
    Section "InputDevice"
    
                                                          # /dev/input/event
                                                          # for USB
    	Identifier  "cursor"
    	Driver      "wacom"
    	Option	    "Device" "/dev/wacom"          # Change to 
    	Option	    "Type" "cursor"
    	Option	    "ForceDevice" "ISDV4"               # Tablet PC ONLY
    EndSection
    
    Section "Monitor"
    	Identifier   "aticonfig-Monitor[0]"
    	HorizSync    30.0 - 81.0
    	VertRefresh  56.0 - 76.0
    	Option	    "VendorName" "ATI Proprietary Driver"
    	Option	    "ModelName" "Generic Autodetecting Monitor"
    	Option	    "DPMS" "true"
    EndSection
    
    Section "Device"
    	Identifier  "aticonfig-Device[0]"
    	Driver      "ati"
    	BusID       "PCI:1:0:0"
    	Option	    "VideoOverlay" "on"
    	Option	    "OpenGLOverlay" "off"
    EndSection
    
    Section "Screen"
    	Identifier "aticonfig-Screen[0]"
    	Device     "aticonfig-Device[0]"
    	Monitor    "aticonfig-Monitor[0]"
    	DefaultDepth     24
    	SubSection "Display"
    		Depth     1
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     4
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     8
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     15
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     16
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     24
    		Modes    "1280x1024" "1024x768" "800x600" "640x480"
    	EndSubSection
    EndSection
    
    Section "DRI"
    	Mode         0666
    EndSection
    
    Section "Extensions"
    	Option	    "Composite" "Disable"
    EndSection
    Thank you again for your help, and for the encouragement to go muck about in xorg.conf

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •