Seketh
Posts: 8
Joined: Mon Mar 11, 2019 1:16 pm

startx - modeset(0): drmSetMaster failed: Permission denied

Sun Apr 12, 2020 6:39 pm

So, I need to start X from console without root.

First, I had the following issue:

Code: Select all

[Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
Which was easily solved by using just adding the pi user to the tty group (sudo adduser pi tty)

However, now the following happens:

Code: Select all

[   207.726] 
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
[   207.727] Build Operating System: Linux 4.15.0-48-generic armv8l Raspbian
[   207.728] Current Operating System: Linux rpi4 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l
[   207.728] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 cma=64M cma=256M video=HDMI-A-1:3840x2160M@30,margin_left=0,margin_right=0,margin_top=0,margin_bottom=0 smsc95xx.macaddr=DC:A6:32:04:2D:10 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  usb-storage.quirks=152d:0578:u console=tty1 root=PARTUUID=afe288fc-abe7-3445-a2d0-9f534ad8eca5 rootfstype=ext4 elevator=deadline fsck.repair=yes fsck.mode=force rootwait quiet splash plymouth.ignore-serial-consoles
[   207.729] Build Date: 05 June 2019  12:49:54PM
[   207.729] xorg-server 2:1.20.4-1+rpt1 (https://www.debian.org/support) 
[   207.729] Current version of pixman: 0.36.0
[   207.730] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[   207.730] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   207.732] (==) Log file: "/home/pi/.local/share/xorg/Xorg.0.log", Time: Sun Apr 12 19:31:58 2020
[   207.732] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   207.733] (==) No Layout section.  Using the first Screen section.
[   207.733] (==) No screen section available. Using defaults.
[   207.733] (**) |-->Screen "Default Screen Section" (0)
[   207.733] (**) |   |-->Monitor "<default monitor>"
[   207.734] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[   207.734] (==) Automatically adding devices
[   207.734] (==) Automatically enabling devices
[   207.734] (==) Automatically adding GPU devices
[   207.734] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   207.734] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.
[   207.734] 	Entry deleted from font path.
[   207.734] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   207.734] 	Entry deleted from font path.
[   207.734] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   207.734] 	Entry deleted from font path.
[   207.734] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
[   207.734] 	Entry deleted from font path.
[   207.734] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   207.734] 	Entry deleted from font path.
[   207.734] (==) FontPath set to:
	/usr/share/fonts/X11/100dpi/:unscaled,
	/usr/share/fonts/X11/100dpi,
	built-ins
[   207.734] (==) ModulePath set to "/usr/lib/xorg/modules"
[   207.734] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[   207.734] (II) Loader magic: 0x1fcf80
[   207.734] (II) Module ABI versions:
[   207.734] 	X.Org ANSI C Emulation: 0.4
[   207.734] 	X.Org Video Driver: 24.0
[   207.734] 	X.Org XInput driver : 24.1
[   207.734] 	X.Org Server Extension : 10.0
[   207.735] (--) using VT number 2

[   207.736] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[   207.737] (II) xfree86: Adding drm device (/dev/dri/card1)
[   207.770] (II) xfree86: Adding drm device (/dev/dri/card0)
[   207.771] (II) no primary bus or device found
[   207.771] 	falling back to /sys/devices/platform/soc/soc:gpu/drm/card1
[   207.771] (II) LoadModule: "glx"
[   207.772] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   207.774] (II) Module glx: vendor="X.Org Foundation"
[   207.774] 	compiled for 1.20.4, module version = 1.0.0
[   207.774] 	ABI class: X.Org Server Extension, version 10.0
[   207.774] (==) Matched modesetting as autoconfigured driver 0
[   207.775] (==) Matched fbdev as autoconfigured driver 1
[   207.775] (==) Assigned the driver to the xf86ConfigLayout
[   207.775] (II) LoadModule: "modesetting"
[   207.775] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   207.775] (II) Module modesetting: vendor="X.Org Foundation"
[   207.775] 	compiled for 1.20.4, module version = 1.20.4
[   207.775] 	Module class: X.Org Video Driver
[   207.775] 	ABI class: X.Org Video Driver, version 24.0
[   207.775] (II) LoadModule: "fbdev"
[   207.775] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[   207.776] (II) Module fbdev: vendor="X.Org Foundation"
[   207.776] 	compiled for 1.20.3, module version = 0.5.0
[   207.776] 	Module class: X.Org Video Driver
[   207.776] 	ABI class: X.Org Video Driver, version 24.0
[   207.776] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   207.776] (II) FBDEV: driver for framebuffer: fbdev
[   207.836] (II) modeset(0): using drv /dev/dri/card1
[   207.837] (WW) Falling back to old probe method for fbdev
[   207.837] (II) Loading sub module "fbdevhw"
[   207.837] (II) LoadModule: "fbdevhw"
[   207.837] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[   207.837] (II) Module fbdevhw: vendor="X.Org Foundation"
[   207.837] 	compiled for 1.20.4, module version = 0.0.2
[   207.837] 	ABI class: X.Org Video Driver, version 24.0
[   207.837] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   207.838] (II) modeset(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[   207.838] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[   207.838] (==) modeset(0): RGB weight 888
[   207.838] (==) modeset(0): Default visual is TrueColor
[   207.838] (II) Loading sub module "glamoregl"
[   207.838] (II) LoadModule: "glamoregl"
[   207.838] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[   207.847] (II) Module glamoregl: vendor="X.Org Foundation"
[   207.847] 	compiled for 1.20.4, module version = 1.0.1
[   207.847] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   208.365] (II) modeset(0): glamor X acceleration enabled on V3D 4.2
[   208.365] (II) modeset(0): glamor initialized
[   208.394] (II) modeset(0): Output HDMI-1 has no monitor section
[   208.424] (II) modeset(0): EDID for output HDMI-1
[   208.424] (II) modeset(0): Manufacturer: HEC  Model: 2f  Serial#: 1
[   208.424] (II) modeset(0): Year: 2016  Week: 12
[   208.424] (II) modeset(0): EDID Version: 1.3
[   208.424] (II) modeset(0): Digital Display Input
[   208.424] (II) modeset(0): Max Image Size [cm]: horiz.: 115  vert.: 65
[   208.424] (II) modeset(0): Gamma: 2.20
[   208.424] (II) modeset(0): No DPMS capabilities specified
[   208.424] (II) modeset(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 
[   208.424] (II) modeset(0): First detailed timing is preferred mode
[   208.424] (II) modeset(0): redX: 0.640 redY: 0.340   greenX: 0.300 greenY: 0.690
[   208.424] (II) modeset(0): blueX: 0.138 blueY: 0.038   whiteX: 0.282 whiteY: 0.297
[   208.424] (II) modeset(0): Supported established timings:
[   208.424] (II) modeset(0): 640x480@60Hz
[   208.424] (II) modeset(0): 800x600@60Hz
[   208.424] (II) modeset(0): 1024x768@60Hz
[   208.424] (II) modeset(0): Manufacturer's mask: 0
[   208.424] (II) modeset(0): Supported standard timings:
[   208.424] (II) modeset(0): #0: hsize: 1280  vsize 720  refresh: 60  vid: 49281
[   208.424] (II) modeset(0): #1: hsize: 1280  vsize 960  refresh: 60  vid: 16513
[   208.424] (II) modeset(0): #2: hsize: 1280  vsize 1024  refresh: 60  vid: 32897
[   208.424] (II) modeset(0): Supported detailed timing:
[   208.424] (II) modeset(0): clock: 297.0 MHz   Image Size:  1872 x 1053 mm
[   208.424] (II) modeset(0): h_active: 3840  h_sync: 4016  h_sync_end 4104 h_blank_end 4400 h_border: 0
[   208.424] (II) modeset(0): v_active: 2160  v_sync: 2168  v_sync_end 2178 v_blanking: 2250 v_border: 0
[   208.424] (II) modeset(0): Supported detailed timing:
[   208.424] (II) modeset(0): clock: 148.5 MHz   Image Size:  1872 x 1053 mm
[   208.424] (II) modeset(0): h_active: 1920  h_sync: 2008  h_sync_end 2052 h_blank_end 2200 h_border: 0
[   208.424] (II) modeset(0): v_active: 1080  v_sync: 1084  v_sync_end 1089 v_blanking: 1125 v_border: 0
[   208.424] (II) modeset(0): Monitor name: HISENSE
[   208.424] (II) modeset(0): Ranges: V min: 24 V max: 75 Hz, H min: 15 H max: 81 kHz, PixClock max 305 MHz
[   208.424] (II) modeset(0): Supported detailed timing:
[   208.424] (II) modeset(0): clock: 74.2 MHz   Image Size:  708 x 398 mm
[   208.424] (II) modeset(0): h_active: 1920  h_sync: 2008  h_sync_end 2052 h_blank_end 2200 h_border: 0
[   208.424] (II) modeset(0): v_active: 540  v_sync: 542  v_sync_end 547 v_blanking: 562 v_border: 0
[   208.424] (II) modeset(0): Supported detailed timing:
[   208.424] (II) modeset(0): clock: 74.2 MHz   Image Size:  708 x 398 mm
[   208.425] (II) modeset(0): h_active: 1920  h_sync: 2448  h_sync_end 2492 h_blank_end 2640 h_border: 0
[   208.425] (II) modeset(0): v_active: 540  v_sync: 542  v_sync_end 547 v_blanking: 562 v_border: 0
[   208.425] (II) modeset(0): Supported detailed timing:
[   208.425] (II) modeset(0): clock: 148.5 MHz   Image Size:  708 x 398 mm
[   208.425] (II) modeset(0): h_active: 1920  h_sync: 2448  h_sync_end 2492 h_blank_end 2640 h_border: 0
[   208.425] (II) modeset(0): v_active: 1080  v_sync: 1084  v_sync_end 1089 v_blanking: 1125 v_border: 0
[   208.425] (II) modeset(0): Number of EDID sections to follow: 1
[   208.425] (II) modeset(0): EDID (in hex):
[   208.425] (II) modeset(0): 	00ffffffffffff0020a32f0001000000
[   208.425] (II) modeset(0): 	0c1a0103807341780acf74a3574cb023
[   208.425] (II) modeset(0): 	09484c21080081c08140818001010101
[   208.425] (II) modeset(0): 	01010101010104740030f2705a80b058
[   208.425] (II) modeset(0): 	8a00501d7400001e023a801871382d40
[   208.425] (II) modeset(0): 	582c4500501d7400001e000000fc0048
[   208.425] (II) modeset(0): 	4953454e53450a2020202020000000fd
[   208.425] (II) modeset(0): 	00184b0f511e000a202020202020017f
[   208.425] (II) modeset(0): 	02034571525f5e5d0102040510111314
[   208.425] (II) modeset(0): 	1f202122626364290907071507505506
[   208.425] (II) modeset(0): 	0083010000e200f9e305ff016e030c00
[   208.425] (II) modeset(0): 	3000383c20008001020304e50e60616a
[   208.425] (II) modeset(0): 	6be3060d01011d8018711c1620582c25
[   208.425] (II) modeset(0): 	00c48e2100009e011d80d0721c162010
[   208.425] (II) modeset(0): 	2c2580c48e2100009e023a80d072382d
[   208.425] (II) modeset(0): 	40102c4580c48e2100001e00000000b5
[   208.425] (--) modeset(0): HDMI max TMDS frequency 300000KHz
[   208.425] (II) modeset(0): Printing probed modes for output HDMI-1
[   208.425] (II) modeset(0): Modeline "3840x2160"x30.0  297.00  3840 4016 4104 4400  2160 2168 2178 2250 +hsync +vsync (67.5 kHz eP)
[   208.425] (II) modeset(0): Modeline "4096x2160"x30.0  297.00  4096 4184 4272 4400  2160 2168 2178 2250 +hsync +vsync (67.5 kHz e)
[   208.426] (II) modeset(0): Modeline "4096x2160"x25.0  297.00  4096 5064 5152 5280  2160 2168 2178 2250 +hsync +vsync (56.2 kHz e)
[   208.426] (II) modeset(0): Modeline "4096x2160"x24.0  297.00  4096 5116 5204 5500  2160 2168 2178 2250 +hsync +vsync (54.0 kHz e)
[   208.426] (II) modeset(0): Modeline "4096x2160"x24.0  297.00  4096 5116 5204 5500  2160 2168 2178 2250 +hsync +vsync (54.0 kHz e)
[   208.426] (II) modeset(0): Modeline "4096x2160"x30.0  296.70  4096 4184 4272 4400  2160 2168 2178 2250 +hsync +vsync (67.4 kHz e)
[   208.426] (II) modeset(0): Modeline "4096x2160"x24.0  296.70  4096 5116 5204 5500  2160 2168 2178 2250 +hsync +vsync (53.9 kHz e)
[   208.426] (II) modeset(0): Modeline "3840x2160"x30.0  297.00  3840 4016 4104 4400  2160 2168 2178 2250 +hsync +vsync (67.5 kHz e)
[   208.426] (II) modeset(0): Modeline "3840x2160"x25.0  297.00  3840 4896 4984 5280  2160 2168 2178 2250 +hsync +vsync (56.2 kHz e)
[   208.426] (II) modeset(0): Modeline "3840x2160"x25.0  297.00  3840 4896 4984 5280  2160 2168 2178 2250 +hsync +vsync (56.2 kHz e)
[   208.426] (II) modeset(0): Modeline "3840x2160"x24.0  297.00  3840 5116 5204 5500  2160 2168 2178 2250 +hsync +vsync (54.0 kHz e)
[   208.426] (II) modeset(0): Modeline "3840x2160"x24.0  297.00  3840 5116 5204 5500  2160 2168 2178 2250 +hsync +vsync (54.0 kHz e)
[   208.426] (II) modeset(0): Modeline "3840x2160"x30.0  296.70  3840 4016 4104 4400  2160 2168 2178 2250 +hsync +vsync (67.4 kHz e)
[   208.426] (II) modeset(0): Modeline "3840x2160"x24.0  296.70  3840 5116 5204 5500  2160 2168 2178 2250 +hsync +vsync (53.9 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x60.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x60.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x50.0  148.50  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync (56.2 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x50.0  148.50  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync (56.2 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x59.9  148.35  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.4 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x30.0   74.25  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (33.8 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x25.0   74.25  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync (28.1 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x24.0   74.25  1920 2558 2602 2750  1080 1084 1089 1125 +hsync +vsync (27.0 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x30.0   74.18  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (33.7 kHz e)
[   208.426] (II) modeset(0): Modeline "1920x1080"x24.0   74.18  1920 2558 2602 2750  1080 1084 1089 1125 +hsync +vsync (27.0 kHz e)
[   208.426] (II) modeset(0): Modeline "1280x1024"x60.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[   208.426] (II) modeset(0): Modeline "1280x960"x60.0  108.00  1280 1376 1488 1800  960 961 964 1000 +hsync +vsync (60.0 kHz e)
[   208.426] (II) modeset(0): Modeline "1280x720"x60.0   74.25  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[   208.427] (II) modeset(0): Modeline "1280x720"x60.0   74.25  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[   208.427] (II) modeset(0): Modeline "1280x720"x50.0   74.25  1280 1720 1760 1980  720 725 730 750 +hsync +vsync (37.5 kHz e)
[   208.427] (II) modeset(0): Modeline "1280x720"x59.9   74.18  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[   208.427] (II) modeset(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[   208.427] (II) modeset(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[   208.427] (II) modeset(0): Modeline "720x576"x50.0   27.00  720 732 796 864  576 581 586 625 -hsync -vsync (31.2 kHz e)
[   208.427] (II) modeset(0): Modeline "720x480"x60.0   27.03  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[   208.427] (II) modeset(0): Modeline "720x480"x59.9   27.00  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[   208.427] (II) modeset(0): Modeline "640x480"x60.0   25.20  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[   208.427] (II) modeset(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[   208.427] (II) modeset(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[   208.427] (II) modeset(0): Output HDMI-1 connected
[   208.427] (II) modeset(0): Using exact sizes for initial modes
[   208.427] (II) modeset(0): Output HDMI-1 using initial mode 3840x2160 +0+0
[   208.427] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[   208.427] (==) modeset(0): DPI set to (96, 96)
[   208.427] (II) Loading sub module "fb"
[   208.427] (II) LoadModule: "fb"
[   208.428] (II) Loading /usr/lib/xorg/modules/libfb.so
[   208.428] (II) Module fb: vendor="X.Org Foundation"
[   208.428] 	compiled for 1.20.4, module version = 1.0.0
[   208.428] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   208.428] (II) UnloadModule: "fbdev"
[   208.428] (II) Unloading fbdev
[   208.429] (II) UnloadSubModule: "fbdevhw"
[   208.429] (II) Unloading fbdevhw
[   208.429] (EE) modeset(0): drmSetMaster failed: Permission denied
[   208.429] (EE) 
Fatal server error:
[   208.429] (EE) AddScreen/ScreenInit failed for driver 0
[   208.429] (EE) 
[   208.429] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[   208.430] (EE) Please also check the log file at "/home/pi/.local/share/xorg/Xorg.0.log" for additional information.
[   208.430] (EE) 
[   208.530] (EE) Server terminated with error (1). Closing log file.
The relevant information seems to be "modeset(0): drmSetMaster failed: Permission denied", but why is this happening?

Thanks!

ganzgustav22
Posts: 324
Joined: Tue Feb 11, 2020 1:04 pm

Re: startx - modeset(0): drmSetMaster failed: Permission denied

Wed Jun 10, 2020 2:57 pm

Hmm, same issue here since upgrading to Raspberry Pi OS 2020-05-27. Before I used 2020-02-13 and it worked without root.

ganzgustav22
Posts: 324
Joined: Tue Feb 11, 2020 1:04 pm

Re: startx - modeset(0): drmSetMaster failed: Permission denied

Mon Jun 29, 2020 1:17 pm

Well, I figured I'll just use "sudo" when starting X as a quick (but dirty and insecure) fix.

But now running chromium is not possible because it complains about not liking being run as root. Sigh.

Return to “Advanced users”