Can't get PHT to run on ubuntu 14.04

@dcbmyplex - This sounds exactly like what I was experiencing. What CPU do you have? I think it's as I detail in comment #19. 

@SCEO - Here are the two PCs I have been playing around on trying to resolve the PHT issue:

cat /proc/cpuinfo

(AMD Turion)
processor    : 0
vendor_id    : AuthenticAMD
cpu family    : 16
model        : 6
model name    : AMD Turion(tm) II Neo N40L Dual-Core Processor
stepping    : 3
microcode    : 0x10000c8
cpu MHz        : 1500.000
cache size    : 1024 KB
physical id    : 0
siblings    : 2
core id        : 0
cpu cores    : 2
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 5
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate npt lbrv svm_lock nrip_save vmmcall
bugs        : tlb_mmatch apic_c1e fxsave_leak
bogomips    : 2995.03
TLB size    : 1024 4K pages
clflush size    : 64
cache_alignment    : 64
address sizes    : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor    : 1
vendor_id    : AuthenticAMD
cpu family    : 16
model        : 6
model name    : AMD Turion(tm) II Neo N40L Dual-Core Processor
stepping    : 3
microcode    : 0x10000c8
cpu MHz        : 1500.000
cache size    : 1024 KB
physical id    : 0
siblings    : 2
core id        : 1
cpu cores    : 2
apicid        : 1
initial apicid    : 1
fpu        : yes
fpu_exception    : yes
cpuid level    : 5
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate npt lbrv svm_lock nrip_save vmmcall
bugs        : tlb_mmatch apic_c1e fxsave_leak
bogomips    : 2995.03
TLB size    : 1024 4K pages
clflush size    : 64
cache_alignment    : 64
address sizes    : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate


(Intel Atom)
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 28
model name    : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping    : 10
microcode    : 0x107
cpu MHz        : 1795.791
cache size    : 512 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 2
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
bogomips    : 3591.58
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 28
model name    : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping    : 10
microcode    : 0x107
cpu MHz        : 1795.791
cache size    : 512 KB
physical id    : 0
siblings    : 4
core id        : 1
cpu cores    : 2
apicid        : 2
initial apicid    : 2
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
bogomips    : 3591.58
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 2
vendor_id    : GenuineIntel
cpu family    : 6
model        : 28
model name    : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping    : 10
microcode    : 0x107
cpu MHz        : 1795.791
cache size    : 512 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 2
apicid        : 1
initial apicid    : 1
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
bogomips    : 3591.58
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

processor    : 3
vendor_id    : GenuineIntel
cpu family    : 6
model        : 28
model name    : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping    : 10
microcode    : 0x107
cpu MHz        : 1795.791
cache size    : 512 KB
physical id    : 0
siblings    : 4
core id        : 1
cpu cores    : 2
apicid        : 3
initial apicid    : 3
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts nopl aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm
bogomips    : 3591.58
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:
 

I don't think the AMD's support this AES extension at all -- it's an Intel thing I think. The Atom that you have is also shown to NOT support it:

http://ark.intel.com/products/49490/Intel-Atom-Processor-D525-1M-Cache-1_80-GHz

If you can build Plex Home Theater from sources, I can tell you what to change and see if it works for you.

Actually - which processor is it specifically (execute "cat /proc/cpuinfo")?  I think it matters.. I've dug through a little bit and discovered something interesting. In fact, I can get it working with changes to the code that bypass using the extended AES instruction set.

Some chips come with instructions to help speed up encryption and decryption using the AES standard. Others do not. There is a function in /plex-home-theater-public/plex/Third-Party/aes/aes_via_ace.h near line 351 called is_via_cpu() -- which presumably exists to determine whether or not the AES instruction set exists on the processor. 

This is the processor I have. You can see that the AES instruction set is NOT supported on this processor:

http://ark.intel.com/products/29755/Intel-Core2-Duo-Processor-E6420-4M-Cache-2_13-GHz-1066-MHz-FSB

So I took that function and you can see the code that was there that I commented out, and replaced with a more hard "no this is not a VIA cpu":

INLINE int is_via_cpu(void)
{   int val;
    /*asm("pushl %ebx
	");
    asm("xorl %eax,%eax
	");
    asm("cpuid
	");
    asm("xorl %eax,%eax
	");
    asm("subl $0x746e6543,%ebx
	");
    asm("orl  %ebx,%eax
	");
    asm("subl $0x48727561,%edx
	");
    asm("orl  %edx,%eax
	");
    asm("subl $0x736c7561,%ecx
	");
    asm("orl  %ecx,%eax
	");
    asm("movl %%eax,%0
	" : "=m" (val));
    asm("popl %ebx
	");
    val = (val ? 0 : 1);
    via_flags = (val | NEH_CPU_READ);
    return val;*/
    via_flags = (0 | NEH_CPU_READ);
    return 0;
}

I then rebuilt AND NOW PLEX IS VERY STABLE AND WORKS WELL FOR ME!  Hooray for me, I guess - but lots of other people don't know how to compile from scratch. I wish I knew the appropriate venue to file a bug report for this... the github repo does not have the issue tracker enabled. If anyone knows the proper place to file this I can attach a backtrace and stuff. 

I read through some of the code comments and it seems that if it can't use the AES instruction set it just falls back to using a slower software-based solution, but considering it allowed me to authenticate with plex and everything's running well (I'm basing my build off the 1.3.3 code but I bet this would work fine against 1.3.4 or HEAD) I think I've at least found the crux of the issue. 

Specifically, the segfault happens when trying to set via_flags:

via_flags = (val | NEH_CPU_READ);

So val must be something pretty bogus after all that assembler code executes...?

I think you might be on to something here. My processor is the Q6600 which also doesn't support AES. Will see if I can make a build from source with your changes and get it working.

I will try building my own as well.  My proc seems to fall into the same none supported category.

http://ark.intel.com/products/33910/Intel-Core2-Duo-Processor-E8400-6M-Cache-3_00-GHz-1333-MHz-FSB?q=e8400

I'll be stumbling in the dark to get this built, but I'll try to post an update with the results.

OK, I can confirm comenting that section out works for me.  I hadn't tried doing my own build prior though, so I can completely rule out that it wouldn't work without the comment.

hi,

i have exactly the same problem

can you explain how you did ?

thanks by advance

edit: i managed to reinstall it ! i did the a compilation of pht and applied the fixes mentioned below ! perfect !

I have similar problems on Fedora Core 20 & 21 as well CentOS 7. Sign on never completes. PIN just hangs. Is there some firewall port that needs to be opened or forwarded from the router? Everthing since 1.3.* has failed in one way or another on any Linux I try.

Have your installs been 64 bit or 32 bit?

I'm suffering from this same problem.  I've had a Plex install running quite happily on an old intel atom processor running 32bit ubuntu for several years now. It just updated to Plex 1.3.6 and now Plex displays the splash screen then segfaults.  If I delete ~/.plexht then I can start Plex, but if I try to sign in then it segfaults.  If I skip the sign in then I can get to the main menu and see my content.  Interestingly I can select and play files, but I get no audio and they play at double speed. 

If I quit Plex at this point then I'm back to square one and have to delete .plexht to get it to start.

I don't think I have the time nor energy to work out how to download and compile source to fix this. Is there an easy way to roll back to an older version of Plex? Or failing that is there anyone working on this bug and is there an ETA for a fix?

I am also seeing this issue on Ubuntu 14.04.1 LTS (fresh install) on an Acer netbook. PHT starts, I go through the PIN verification and finish it successfully; PHT then quits and won't restart. It just says "Segmentation fault (core dumped)" on the console.

Edit: deleting .plexht gets me back to the PIN verification, but it always ends in a segfault.

Same here on a Core i3-2100.

This issue should be fixed upstream for all future builds (or people who hand compile and change this line from 1 -> 0 : https://github.com/plexinc/plex-home-theater-public/blob/pht-frodo/plex/Third-Party/aes/aesopt.h#L211)

My Fedora/CentOS builds with version 1.3.6 should have a similar fix that I pushed last week. Please let us know if this wouldn’t fix it for the rest of you also.

- Mark

Hi
i try to comply my Plex on a yaVDR (old ubuntu 64Bit). Since the latest versions in can’t login with PIN nor Username&Password - it just hung there.
My log file shows this:

08:28:38 T:139985047762752 DEBUG: Previous line repeats 4 times.
08:28:38 T:139985047762752 DEBUG: LIRC: Update - NEW at 558473:160 0 KEY_OK devinput (KEY_OK)
08:28:38 T:139985047762752 DEBUG: OnKey: 11 (0b) pressed, action is Select
08:28:38 T:139985047762752 DEBUG: ExecuteXBMCAction : Translating Dialog.Close(4998)
08:28:38 T:139985047762752 DEBUG: ExecuteXBMCAction : To Dialog.Close(4998)
08:28:38 T:139985047762752 DEBUG: ExecuteXBMCAction : Translating Plex.ActivateWindow(plexlogin)
08:28:38 T:139985047762752 DEBUG: ExecuteXBMCAction : To Plex.ActivateWindow(plexlogin)
08:28:38 T:139985047762752 DEBUG: Activating window ID: 10203
08:28:39 T:139985047762752 DEBUG: ------ Window Deinit (Custom1_HomeMenu.xml) ------
08:28:39 T:139985047762752 DEBUG: ------ Window Init (MyPlexLogin.xml) ------
08:28:39 T:139985047762752 INFO: Loading skin file: MyPlexLogin.xml, load type: LOAD_EVERY_TIME
08:28:39 T:139985047762752 DEBUG: Using already stored xml root node for /opt/plexhometheater/share/XBMC/addons/skin.plex/720p/MyPlexLogin.xml
08:28:39 T:139985047762752 DEBUG: Load MyPlexLogin.xml: 74.44ms
08:28:39 T:139985047762752 DEBUG: Alloc resources: 75.95ms (75.53 ms skin load)
08:28:39 T:139985047762752 DEBUG: CMyPlexManager::BroadcastState state: fetching PIN, error: network
08:28:39 T:139984496989952 DEBUG: PlexFile::GetHeaderList Set Client-Profile-Extra: add-transcode-target-audio-codec(type=videoProfile&context=streaming&protocol=&audioCodec=dca,ac3)
08:28:39 T:139984496989952 DEBUG: CPlexFile::BuildHTTPURL translated ‘plexserver://myplex/pins.xml’ to ‘https://plex.tv:443/pins.xml?X-Plex-Token=SECRETSTUFF
08:28:39 T:139984496989952 DEBUG: CurlFile::Open(0x7f50ae378b00) https://plex.tv:443/pins.xml?X-Plex-Token=SECRETSTUFF
08:28:39 T:139984522168064 DEBUG: Mimetype: application/octet-stream
08:28:39 T:139984522168064 DEBUG: PlexFile::GetHeaderList Set Client-Profile-Extra: add-transcode-target-audio-codec(type=videoProfile&context=streaming&protocol=
&audioCodec=dca,ac3)
08:28:39 T:139984522168064 DEBUG: CPlexDirectory::GetDirectory plexserver://best:32400/library/arts/
08:28:39 T:139984522168064 WARNING: CPlexFile::BuildHTTPURL tried to lookup server best but it was not found!
08:28:39 T:139984522168064 DEBUG: CCurlFile::Service reading extra failure information
08:28:39 T:139984522168064 DEBUG: CPlexDirectory::GetDirectory failed to fetch data from plexserver://best:32400/library/arts/: -1
08:28:39 T:139984522168064 ERROR: GetDirectory - Error getting plexserver://best:32400/library/arts/
08:28:39 T:139985047762752 DEBUG: CGUIWindowHome::OnAction Suchen=>
08:28:39 T:139985047762752 DEBUG: Error: Requested setting (pvrmanager.enabled) was not found. It must be case-sensitive
08:28:39 T:139984496989952 WARNING: CCurlFile::FillBuffer [plex.tv:443/pins.xml?X-Plex-Token=SECRETSTUFF] failed: Problem with the SSL CA cert (path? access rights?)
08:28:39 T:139984496989952 DEBUG: CCurlFile::Service reading extra failure information
08:28:39 T:139984496989952 ERROR: CMyPlexManager::GetXml failed to fetch plexserver://myplex/pins.xml : -1
08:28:39 T:139984496989952 DEBUG: CMyPlexManager::BroadcastState state: refresh, error: network
08:28:39 T:139984496989952 DEBUG: CMyPlexManager::Process after a run our state is 0, will now sleep for 3600 seconds
08:28:40 T:139985047762752 DEBUG: Error: Requested setting (pvrmanager.enabled) was not found. It must be case-sensitive

Any hint?

Regards
Thorsten

Is it related to this?
WARNING: CCurlFile::FillBuffer [plex.tv:443/pins.xml?X-Plex-Token=SECRETSTUFF] failed: Problem with the SSL CA cert (path? access rights?)

Edit/Addendum: With 1.3.6 it does still work…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.