Fails to run (cause: missing RANDR extension?)

Bug #526686 reported by Marco Rodrigues
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
StartUp-Manager
New
Undecided
Unassigned
Debian
Fix Released
Unknown

Bug Description

This bug was originally reported in Debian. Bug #562069

$ sudo startupmanager
Xlib: extension "RANDR" missing on display ":1.0".
Xlib: extension "RANDR" missing on display ":1.0".
RandR extension missing
Traceback (most recent call last):
  File "/usr/sbin/startupmanager", line 54, in <module>
    main()
  File "/usr/sbin/startupmanager", line 51, in main
    SumGui()
  File "/usr/share/startupmanager/gtk_frontend.py", line 166, in __init__
    self.resolution = utils.get_resolution()
  File "/usr/lib/pymodules/python2.5/bootconfig/utils.py", line 159, in
get_resolution return matches.group(1) + 'x' + matches.group(2)
AttributeError: 'NoneType' object has no attribute 'group'

It runs fine on another machine, where the RANDR extension is present in the X
server. However, as far as I know this extension is not mandatory and should
not cause a fatal error and inability to run the program.

Changed in debian:
status: Unknown → New
Revision history for this message
Frédéric Bourqui (fbourqui) wrote :

I have almost the same problem :

$ sudo startupmanager
Traceback (most recent call last):
  File "/usr/sbin/startupmanager", line 54, in <module>
    main()
  File "/usr/sbin/startupmanager", line 51, in main
    SumGui()
  File "/usr/share/startupmanager/gtk_frontend.py", line 166, in __init__
    self.resolution = utils.get_resolution()
  File "/usr/lib/pymodules/python2.6/bootconfig/utils.py", line 159, in get_resolution
    return matches.group(1) + 'x' + matches.group(2)
AttributeError: 'NoneType' object has no attribute 'group'

i've traced back the problem to the output of xrandr that as chaged in the latest version :

$ xrandr
 SZ: Pixels Physical Refresh
 0 1024 x 768 ( 347mm x 260mm ) 60
 1 160 x 120 ( 54mm x 41mm ) 60
 2 320 x 240 ( 108mm x 81mm ) 60
 3 640 x 480 ( 217mm x 163mm ) 60
 4 800 x 600 ( 271mm x 203mm ) 60
*5 1914 x 1108 ( 648mm x 375mm ) *60
Current rotation - normal
Current reflection - none
Rotations possible - normal
Reflections possible - none
$ xrandr -v
xrandr program version 1.3.2
Server reports RandR version 1.1

in utils.py

def get_resolution():
    pipe = os.popen('xrandr')
    data = pipe.read()
    pipe.close()
    matches = re.search('current (\d+) x (\d+)', data)
    return matches.group(1) + 'x' + matches.group(2)

there is a search for current \d+ ...
this is not in the output of xrandr anymore.

changing the regexp search like this fix it :

    matches = re.search('\*\s*\d+\s+(\d+) x (\d+)', data)

Revision history for this message
Frédéric Bourqui (fbourqui) wrote :

--- utils.py 2010-05-07 12:42:32.000000000 +0200
***************
*** 155,161 ****
      pipe = os.popen('xrandr')
      data = pipe.read()
      pipe.close()
! matches = re.search('current (\d+) x (\d+)', data)
      return matches.group(1) + 'x' + matches.group(2)

  def set_resolution(resolution):
--- 155,161 ----
      pipe = os.popen('xrandr')
      data = pipe.read()
      pipe.close()
! matches = re.search('\*\s*\d+\s+(\d+) x (\d+)', data)
      return matches.group(1) + 'x' + matches.group(2)

  def set_resolution(resolution):

Changed in debian:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.